mirror of
https://github.com/gsi-upm/soil
synced 2025-08-23 19:52:19 +00:00
All settings as JSON and documentation updated
This commit is contained in:
23
docs/_build/html/usage.html
vendored
23
docs/_build/html/usage.html
vendored
@@ -50,17 +50,18 @@
|
||||
<h2>Simulation Settings<a class="headerlink" href="#simulation-settings" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Once installed, before running a simulation, you need to configure it.</p>
|
||||
<ul>
|
||||
<li><p class="first">In the settings.py file you will find the configuration of the network.</p>
|
||||
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="c1"># Network settings</span>
|
||||
<span class="n">network_type</span> <span class="o">=</span> <span class="mi">1</span>
|
||||
<span class="n">number_of_nodes</span> <span class="o">=</span> <span class="mi">1000</span>
|
||||
<span class="n">max_time</span> <span class="o">=</span> <span class="mi">50</span>
|
||||
<span class="n">num_trials</span> <span class="o">=</span> <span class="mi">1</span>
|
||||
<span class="n">timeout</span> <span class="o">=</span> <span class="mi">2</span>
|
||||
<li><p class="first">In the Settings JSON file you will find the configuration of the network.</p>
|
||||
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="s2">"network_type"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
|
||||
<span class="s2">"number_of_nodes"</span><span class="p">:</span> <span class="mi">1000</span><span class="p">,</span>
|
||||
<span class="s2">"max_time"</span><span class="p">:</span> <span class="mi">50</span><span class="p">,</span>
|
||||
<span class="s2">"num_trials"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
|
||||
<span class="s2">"timeout"</span><span class="p">:</span> <span class="mi">2</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
<li><p class="first">In the Simulation Settings JSON file, you will find the configuration of the models.</p>
|
||||
<li><p class="first">In the Settings JSON file, you will also find the configuration of the models.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -80,7 +81,7 @@
|
||||
<div class="section" id="models-settings">
|
||||
<h2>Models Settings<a class="headerlink" href="#models-settings" title="Permalink to this headline">¶</a></h2>
|
||||
<p>After having configured the simulation, the next step is setting up the variables of the models.
|
||||
For this, you will need to modify the Simulation Settings JSON file.</p>
|
||||
For this, you will need to modify the Settings JSON file again.</p>
|
||||
<div class="code json highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="s2">"agent"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"SISaModel"</span><span class="p">,</span><span class="s2">"ControlModelM2"</span><span class="p">],</span>
|
||||
|
||||
@@ -114,7 +115,7 @@ For this, you will need to modify the Simulation Settings JSON file.</p>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>In this file you will define the different models you are going to simulate. You can simulate as many models
|
||||
as you want.</p>
|
||||
as you want. Each model will be simulated separately.</p>
|
||||
<p>After setting up the models, you have to initialize the parameters of each one. You will find the parameters needed
|
||||
in the documentation of each model.</p>
|
||||
<p>Parameter validation will fail if a required parameter without a default has not been provided.</p>
|
||||
@@ -122,7 +123,7 @@ in the documentation of each model.</p>
|
||||
<div class="section" id="running-the-simulation">
|
||||
<h2>Running the Simulation<a class="headerlink" href="#running-the-simulation" title="Permalink to this headline">¶</a></h2>
|
||||
<p>After setting all the configuration, you will be able to run the simulation. All you need to do is execute:</p>
|
||||
<div class="code bash highlight-default"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">soil</span><span class="o">.</span><span class="n">py</span>
|
||||
<div class="code bash highlight-default"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="n">soil</span><span class="o">.</span><span class="n">py</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The simulation will return a dynamic graph .gexf file which could be visualized with
|
||||
|
Reference in New Issue
Block a user