Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
chraibi committed Mar 13, 2024
1 parent 5c90f2d commit c50bf6c
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,54 @@ def read_data(output_file: str) -> pd.DataFrame:
min_value=min_value,
)

with st.expander("(click) to enlarge documentation"):
st.markdown("""### Default Strategy""")
st.markdown(r"""
$
\textbf{motivation}(distance) =
\begin{cases}
0 & \text{if\;} distance \geq \text{width}, \\
e \cdot \text{height}\cdot\exp\left(\frac{1}{\left(\frac{distance}{\text{width}}\right)^2 - 1}\right) & \text{otherwise}.
\end{cases}
$
---
---
""")
st.markdown(r"""
### EVC
$\textbf{motivation} = E\cdot V\cdot C,$ where
- $E$: expectancy
- $V$: value
- $C$: competition
---
""")

st.markdown(r"""
$
\textbf{expectancy}(distance) =
\begin{cases}
0 & \text{if\;} distance \geq \text{width}, \\
e \cdot \text{height}\cdot\exp\left(\frac{1}{\left(\frac{distance}{\text{width}}\right)^2 - 1}\right) & \text{otherwise}.
\end{cases}\\
$
**Note:** this is the same function like default strategy
---
$
\textbf{competition} = 1 - \frac{N}{N_0},
$
$N$: Agents still in the simulation and $N_0$ initial number of agents.
---
$\textbf{value} = random\_number \in [v_{\min}, v_{\max}].$
""")

figs = motivation_strategy.plot()
with st.expander("Plot model", expanded=True):
for fig in figs:
Expand Down

0 comments on commit c50bf6c

Please sign in to comment.