Skip to content

Commit

Permalink
deploy: e3b74f5
Browse files Browse the repository at this point in the history
  • Loading branch information
msiket-iit committed Nov 27, 2024
1 parent deceb9a commit 14d0c38
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 10 deletions.
Binary file added _images/gui.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 38 additions & 5 deletions _sources/usage.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,36 @@
Quickstart
============

To get started immediately, run :code:`interface_cmd.py` to activate a command line interface (CLI).
Requirements
-----------------

* Python 3.12.0
* Dependencies can be installed via :code:`pip install -r requirements.txt`


Graphical User Interface
-----------------------------

Provides a graphical user interface in a web app.

To run it locally:

blocks::

> streamlit run interface_gui.py

.. image:: imgs/gui.gif
:target: _images/gui.gif

Command Line - Interactive
--------------------------------

Provides an interactive prompt environment to set the simulation settings.

To get started run :code:`interface_cmd.py` to activate a command line interface (CLI).

Run the simulator
------------
* :code:`simulate` This command is used to run the simulation with the assigned settings.
* Using just :code:`simulate` generates a default scenario (`defaults </_autosummary/pymgipsim.Settings.DefaultSettings.html>`_).
* Using just :code:`simulate` generates a default scenario.
* Predefined scenarios are available in the :code:`./Scenarios/` folder. To use one of them, use :code:`load -sn <scenario name>` and :code:`simulate`.
* Results are stored in the directory :code:`./SimulationResults/<results folder with datetime from simulation run time>`

Expand All @@ -18,4 +41,14 @@ Plot the results
* :code:`plot` This command is used to generate plots from the simulation results.
* :code:`plot -h` lists the arguments that can be used with :code:`plot <arguments>`
* :code:`plot` with no arguments generates and saves all figures without displaying them.
* :code:`plot --all` both generates and displays all figures.
* :code:`plot --all` both generates and displays all figures.

.. image:: imgs/cmd.gif
:target: _images/cmd.gif

Command Line - single command
----------------------------------
Simulation settings are defined in a single command line.

Start by running :code:`interface_cli.py [OPTIONS]`.

2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

32 changes: 28 additions & 4 deletions usage.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,30 @@

<section id="quickstart">
<h1>Quickstart<a class="headerlink" href="#quickstart" title="Link to this heading"></a></h1>
<p>To get started immediately, run <code class="code docutils literal notranslate"><span class="pre">interface_cmd.py</span></code> to activate a command line interface (CLI).</p>
<section id="run-the-simulator">
<h2>Run the simulator<a class="headerlink" href="#run-the-simulator" title="Link to this heading"></a></h2>
<section id="requirements">
<h2>Requirements<a class="headerlink" href="#requirements" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p>Python 3.12.0</p></li>
<li><p>Dependencies can be installed via <code class="code docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">-r</span> <span class="pre">requirements.txt</span></code></p></li>
</ul>
</section>
<section id="graphical-user-interface">
<h2>Graphical User Interface<a class="headerlink" href="#graphical-user-interface" title="Link to this heading"></a></h2>
<p>Provides a graphical user interface in a web app.</p>
<p>To run it locally:</p>
<p>blocks:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">&gt;</span> <span class="n">streamlit</span> <span class="n">run</span> <span class="n">interface_gui</span><span class="o">.</span><span class="n">py</span>
</pre></div>
</div>
<a class="reference external image-reference" href="_images/gui.gif"><img alt="_images/gui.gif" src="_images/gui.gif" /></a>
</section>
<section id="command-line-interactive">
<h2>Command Line - Interactive<a class="headerlink" href="#command-line-interactive" title="Link to this heading"></a></h2>
<p>Provides an interactive prompt environment to set the simulation settings.</p>
<p>To get started run <code class="code docutils literal notranslate"><span class="pre">interface_cmd.py</span></code> to activate a command line interface (CLI).</p>
<ul class="simple">
<li><p><code class="code docutils literal notranslate"><span class="pre">simulate</span></code> This command is used to run the simulation with the assigned settings.</p></li>
<li><p>Using just <code class="code docutils literal notranslate"><span class="pre">simulate</span></code> generates a default scenario (<a class="reference external" href="/_autosummary/pymgipsim.Settings.DefaultSettings.html">defaults</a>).</p></li>
<li><p>Using just <code class="code docutils literal notranslate"><span class="pre">simulate</span></code> generates a default scenario.</p></li>
<li><p>Predefined scenarios are available in the <code class="code docutils literal notranslate"><span class="pre">./Scenarios/</span></code> folder. To use one of them, use <code class="code docutils literal notranslate"><span class="pre">load</span> <span class="pre">-sn</span> <span class="pre">&lt;scenario</span> <span class="pre">name&gt;</span></code> and <code class="code docutils literal notranslate"><span class="pre">simulate</span></code>.</p></li>
<li><p>Results are stored in the directory <code class="code docutils literal notranslate"><span class="pre">./SimulationResults/&lt;results</span> <span class="pre">folder</span> <span class="pre">with</span> <span class="pre">datetime</span> <span class="pre">from</span> <span class="pre">simulation</span> <span class="pre">run</span> <span class="pre">time&gt;</span></code></p></li>
</ul>
Expand All @@ -102,6 +120,12 @@ <h2>Plot the results<a class="headerlink" href="#plot-the-results" title="Link t
<li><p><code class="code docutils literal notranslate"><span class="pre">plot</span></code> with no arguments generates and saves all figures without displaying them.</p></li>
<li><p><code class="code docutils literal notranslate"><span class="pre">plot</span> <span class="pre">--all</span></code> both generates and displays all figures.</p></li>
</ul>
<a class="reference external image-reference" href="_images/cmd.gif"><img alt="imgs/cmd.gif" src="imgs/cmd.gif" /></a>
</section>
<section id="command-line-single-command">
<h2>Command Line - single command<a class="headerlink" href="#command-line-single-command" title="Link to this heading"></a></h2>
<p>Simulation settings are defined in a single command line.</p>
<p>Start by running <code class="code docutils literal notranslate"><span class="pre">interface_cli.py</span> <span class="pre">[OPTIONS]</span></code>.</p>
</section>
</section>

Expand Down

0 comments on commit 14d0c38

Please sign in to comment.