Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:StochSS/GillesPy2 into 825--all_…
Browse files Browse the repository at this point in the history
…discrete_optimization
  • Loading branch information
briandrawert committed Apr 27, 2023
2 parents 6d50606 + 59c97dc commit 85dd8aa
Show file tree
Hide file tree
Showing 20 changed files with 130 additions and 68 deletions.
2 changes: 1 addition & 1 deletion docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: b998718273ef126a3f951b8b3e19a1b3
config: 6224f6c27785099ae9bf97ec5ae27f60
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified docs/build/html/.doctrees/classes/gillespy2.core.doctree
Binary file not shown.
Binary file modified docs/build/html/.doctrees/classes/gillespy2.stochss.doctree
Binary file not shown.
Binary file modified docs/build/html/.doctrees/environment.pickle
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/_modules/gillespy2/core/parameter.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ <h1>Source code for gillespy2.core.parameter</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">expression</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">ParameterError</span><span class="p">(</span><span class="s2">&quot;initial_value can&#39;t be None type.&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span>
<span class="k">raise</span> <span class="n">ParameterError</span><span class="p">(</span><span class="s2">&quot;expression must be of type str, float, or int.&quot;</span><span class="p">)</span>
<span class="k">raise</span> <span class="n">ParameterError</span><span class="p">(</span><span class="s2">&quot;expression must be of type str.&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">expression</span> <span class="o">==</span> <span class="s2">&quot;&quot;</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">ParameterError</span><span class="p">(</span><span class="s2">&quot;expression can&#39;t be an empty string.&quot;</span><span class="p">)</span></div></div>
</pre></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ <h1>Source code for gillespy2.solvers.cpp.c_decoder</h1><div class="highlight"><

<span class="sd"> :returns: Pass-through for IterativeSimDecoder.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">callable</span><span class="p">(</span><span class="n">callback</span><span class="p">):</span>
<span class="k">if</span> <span class="ow">not</span> <span class="nb">callable</span><span class="p">(</span><span class="n">callback</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Expected function as callback: got </span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="n">callback</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">callback</span> <span class="o">=</span> <span class="n">callback</span>
<span class="k">return</span> <span class="bp">self</span></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ <h1>Source code for gillespy2.solvers.numpy.CLE_solver</h1><div class="highlight
<span class="kn">from</span> <span class="nn">gillespy2.core.results</span> <span class="kn">import</span> <span class="n">Results</span>


<div class="viewcode-block" id="CLESolver"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.numpy.html#gillespy2.solvers.CLESolver">[docs]</a><span class="k">class</span> <span class="nc">CLESolver</span><span class="p">(</span><span class="n">GillesPySolver</span><span class="p">):</span>
<div class="viewcode-block" id="CLESolver"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.html#gillespy2.solvers.CLESolver">[docs]</a><span class="k">class</span> <span class="nc">CLESolver</span><span class="p">(</span><span class="n">GillesPySolver</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> A Chemical Langevin Equation Solver for GillesPy2 models.</span>

Expand Down Expand Up @@ -202,7 +202,7 @@ <h1>Source code for gillespy2.solvers.numpy.CLE_solver</h1><div class="highlight

<span class="k">return</span> <span class="n">rxn_count</span><span class="p">,</span> <span class="n">curr_state</span><span class="p">,</span> <span class="n">curr_time</span>

<div class="viewcode-block" id="CLESolver.get_solver_settings"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.numpy.html#gillespy2.solvers.CLESolver.get_solver_settings">[docs]</a> <span class="nd">@classmethod</span>
<div class="viewcode-block" id="CLESolver.get_solver_settings"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.html#gillespy2.solvers.CLESolver.get_solver_settings">[docs]</a> <span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">get_solver_settings</span><span class="p">(</span><span class="bp">cls</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns a list of arguments supported by CLE_solver.run.</span>
Expand All @@ -211,7 +211,7 @@ <h1>Source code for gillespy2.solvers.numpy.CLE_solver</h1><div class="highlight
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="p">(</span><span class="s1">&#39;model&#39;</span><span class="p">,</span> <span class="s1">&#39;t&#39;</span><span class="p">,</span> <span class="s1">&#39;number_of_trajectories&#39;</span><span class="p">,</span> <span class="s1">&#39;increment&#39;</span><span class="p">,</span> <span class="s1">&#39;seed&#39;</span><span class="p">,</span> <span class="s1">&#39;debug&#39;</span><span class="p">,</span> <span class="s1">&#39;profile&#39;</span><span class="p">,</span><span class="s1">&#39;timeout&#39;</span><span class="p">,</span> <span class="s1">&#39;tau_tol&#39;</span><span class="p">)</span></div>

<div class="viewcode-block" id="CLESolver.run"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.numpy.html#gillespy2.solvers.CLESolver.run">[docs]</a> <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">model</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">t</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">number_of_trajectories</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">increment</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<div class="viewcode-block" id="CLESolver.run"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.html#gillespy2.solvers.CLESolver.run">[docs]</a> <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">model</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">t</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">number_of_trajectories</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">increment</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">debug</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">profile</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">live_output</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">live_output_options</span><span class="o">=</span><span class="p">{},</span>
<span class="n">timeout</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">resume</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">tau_tol</span><span class="o">=</span><span class="mf">0.03</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ <h1>Source code for gillespy2.solvers.numpy.ode_solver</h1><div class="highlight
<span class="kn">from</span> <span class="nn">gillespy2.core.results</span> <span class="kn">import</span> <span class="n">Results</span>


<div class="viewcode-block" id="ODESolver"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.numpy.html#gillespy2.solvers.ODESolver">[docs]</a><span class="k">class</span> <span class="nc">ODESolver</span><span class="p">(</span><span class="n">GillesPySolver</span><span class="p">):</span>
<div class="viewcode-block" id="ODESolver"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.html#gillespy2.solvers.ODESolver">[docs]</a><span class="k">class</span> <span class="nc">ODESolver</span><span class="p">(</span><span class="n">GillesPySolver</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This solver produces the deterministic continuous solution via Ordinary Differential Equations.</span>
<span class="sd"> Uses integrators from scipy.integrate.ode to perform calculations used to produce solutions.</span>
Expand Down Expand Up @@ -184,7 +184,7 @@ <h1>Source code for gillespy2.solvers.numpy.ode_solver</h1><div class="highlight
<span class="n">state_change</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">state_change</span><span class="o">.</span><span class="n">values</span><span class="p">())</span>
<span class="k">return</span> <span class="n">state_change</span>

<div class="viewcode-block" id="ODESolver.get_solver_settings"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.numpy.html#gillespy2.solvers.ODESolver.get_solver_settings">[docs]</a> <span class="nd">@classmethod</span>
<div class="viewcode-block" id="ODESolver.get_solver_settings"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.html#gillespy2.solvers.ODESolver.get_solver_settings">[docs]</a> <span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">get_solver_settings</span><span class="p">(</span><span class="bp">cls</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns a list of arguments supported by ode_solver.run.</span>
Expand All @@ -194,7 +194,7 @@ <h1>Source code for gillespy2.solvers.numpy.ode_solver</h1><div class="highlight
<span class="k">return</span> <span class="p">(</span><span class="s1">&#39;model&#39;</span><span class="p">,</span> <span class="s1">&#39;t&#39;</span><span class="p">,</span> <span class="s1">&#39;number_of_trajectories&#39;</span><span class="p">,</span> <span class="s1">&#39;increment&#39;</span><span class="p">,</span> <span class="s1">&#39;integrator&#39;</span><span class="p">,</span> <span class="s1">&#39;integrator_options&#39;</span><span class="p">,</span>
<span class="s1">&#39;timeout&#39;</span><span class="p">)</span></div>

<div class="viewcode-block" id="ODESolver.run"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.numpy.html#gillespy2.solvers.ODESolver.run">[docs]</a> <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">model</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">t</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">number_of_trajectories</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">increment</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">integrator</span><span class="o">=</span><span class="s1">&#39;lsoda&#39;</span><span class="p">,</span>
<div class="viewcode-block" id="ODESolver.run"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.html#gillespy2.solvers.ODESolver.run">[docs]</a> <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">model</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">t</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">number_of_trajectories</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">increment</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">integrator</span><span class="o">=</span><span class="s1">&#39;lsoda&#39;</span><span class="p">,</span>
<span class="n">integrator_options</span><span class="o">=</span><span class="p">{},</span> <span class="n">live_output</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">live_output_options</span><span class="o">=</span><span class="p">{},</span> <span class="n">timeout</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">resume</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> :param model: The model on which the solver will operate. (Deprecated)</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ <h1>Source code for gillespy2.solvers.numpy.ssa_solver</h1><div class="highlight
<span class="n">np</span><span class="o">.</span><span class="n">set_printoptions</span><span class="p">(</span><span class="n">suppress</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>


<div class="viewcode-block" id="NumPySSASolver"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.numpy.html#gillespy2.solvers.NumPySSASolver">[docs]</a><span class="k">class</span> <span class="nc">NumPySSASolver</span><span class="p">(</span><span class="n">GillesPySolver</span><span class="p">):</span>
<div class="viewcode-block" id="NumPySSASolver"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.html#gillespy2.solvers.NumPySSASolver">[docs]</a><span class="k">class</span> <span class="nc">NumPySSASolver</span><span class="p">(</span><span class="n">GillesPySolver</span><span class="p">):</span>

<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This solver produces simulations of systems via Stochastic Simulation Algorithm.</span>
Expand All @@ -157,7 +157,7 @@ <h1>Source code for gillespy2.solvers.numpy.ssa_solver</h1><div class="highlight
<span class="bp">self</span><span class="o">.</span><span class="n">model</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span><span class="p">(</span><span class="n">model</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">is_instantiated</span> <span class="o">=</span> <span class="kc">True</span>

<div class="viewcode-block" id="NumPySSASolver.get_solver_settings"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.numpy.html#gillespy2.solvers.NumPySSASolver.get_solver_settings">[docs]</a> <span class="nd">@classmethod</span>
<div class="viewcode-block" id="NumPySSASolver.get_solver_settings"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.html#gillespy2.solvers.NumPySSASolver.get_solver_settings">[docs]</a> <span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">get_solver_settings</span><span class="p">(</span><span class="bp">cls</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns a list of arguments supported by the ssa_solver.run</span>
Expand All @@ -166,7 +166,7 @@ <h1>Source code for gillespy2.solvers.numpy.ssa_solver</h1><div class="highlight
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="p">(</span><span class="s1">&#39;model&#39;</span><span class="p">,</span> <span class="s1">&#39;t&#39;</span><span class="p">,</span> <span class="s1">&#39;number_of_trajectories&#39;</span><span class="p">,</span> <span class="s1">&#39;increment&#39;</span><span class="p">,</span> <span class="s1">&#39;seed&#39;</span><span class="p">,</span> <span class="s1">&#39;debug&#39;</span><span class="p">,</span> <span class="s1">&#39;timeout&#39;</span><span class="p">)</span></div>

<div class="viewcode-block" id="NumPySSASolver.run"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.numpy.html#gillespy2.solvers.NumPySSASolver.run">[docs]</a> <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">model</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">t</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">number_of_trajectories</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">increment</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">debug</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<div class="viewcode-block" id="NumPySSASolver.run"><a class="viewcode-back" href="../../../../classes/gillespy2.solvers.html#gillespy2.solvers.NumPySSASolver.run">[docs]</a> <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">model</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">t</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">number_of_trajectories</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">increment</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">seed</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">debug</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">live_output</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">live_output_options</span><span class="o">=</span><span class="p">{},</span> <span class="n">timeout</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">resume</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>

<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
Expand Down
Loading

0 comments on commit 85dd8aa

Please sign in to comment.