Skip to content

Commit

Permalink
Update CHANGELOG, rebuild docs
Browse files Browse the repository at this point in the history
  • Loading branch information
LarrySnyder committed Jun 29, 2022
1 parent edc0e8e commit 1d9d63b
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 16 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.0.9] -- 2022-06-28

### Fixed
- Bug that prevented named instances from being loaded correctly
- Bug that prevented named instances from being loaded correctly using ``load_instance()``

### Added
- Methods to convert objects to and from dicts
Expand Down
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
8 changes: 5 additions & 3 deletions docs/_build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
Stockpyl
========

|sp| is a Python package for inventory optimization. It implements
|sp| is a Python package for inventory optimization and simulation. It implements
classical single-node inventory models like the economic order quantity (EOQ), newsvendor,
and Wagner-Whitin problems. It also contains algorithms for multi-echelon inventory optimization
(MEIO) under both stochastic-service model (SSM) and guaranteed-service model (GSM) assumptions.
And, it has extensive features for simulating multi-echelon inventory systems.

.. note:: |fosct_notation|

Expand All @@ -16,7 +17,7 @@ and Wagner-Whitin problems. It also contains algorithms for multi-echelon invent
Some Examples
-------------

Solve the EOQ problem with :math:`K=8`, :math:`h=0.225`, and :math:`\lambda=1300` (Example 3.1 in *FoSCT*):
Solve the EOQ problem with a fixed cost of 8, a holding cost of 0.225, and a demand rate of 1300 (Example 3.1 in *FoSCT*):

.. doctest::

Expand All @@ -27,7 +28,8 @@ Solve the EOQ problem with :math:`K=8`, :math:`h=0.225`, and :math:`\lambda=1300
>>> cost
68.41052550594829

Or the newsvendor problem with :math:`h=0.18`, :math:`p=0.70`, and :math:`D\sim N(50, 8^2)` (Example 4.3 in *FoSCT*):
Or the newsvendor problem with a holding cost of 0.18, a stockout cost of 0.70, and demand that is normally
distributed with mean 50 and standard deviation 8 (Example 4.3 in *FoSCT*):

.. doctest::

Expand Down
40 changes: 33 additions & 7 deletions docs/_build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ <h2 id="C">C</h2>
<h2 id="D">D</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="api/datatypes/supply_chain_network.html#stockpyl.supply_chain_network.SupplyChainNetwork.deep_equal_to">deep_equal_to() (SupplyChainNetwork method)</a>
<li><a href="api/datatypes/supply_chain_node.html#stockpyl.supply_chain_node.NodeStateVars.deep_equal_to">deep_equal_to() (NodeStateVars method)</a>

<ul>
<li><a href="api/datatypes/supply_chain_network.html#stockpyl.supply_chain_network.SupplyChainNetwork.deep_equal_to">(SupplyChainNetwork method)</a>
</li>
<li><a href="api/datatypes/supply_chain_node.html#stockpyl.supply_chain_node.SupplyChainNode.deep_equal_to">(SupplyChainNode method)</a>
</li>
</ul></li>
<li><a href="api/other/instances.html#stockpyl.instances.DEFAULT_JSON_FILEPATH">DEFAULT_JSON_FILEPATH (in module stockpyl.instances)</a>
</li>
<li><a href="api/datatypes/supply_chain_node.html#stockpyl.supply_chain_node.NodeStateVars.demand_cumul">demand_cumul (NodeStateVars attribute)</a>
</li>
<li><a href="api/datatypes/demand_source.html#stockpyl.demand_source.DemandSource.demand_distribution">demand_distribution (DemandSource property)</a>
Expand Down Expand Up @@ -277,12 +277,24 @@ <h2 id="F">F</h2>
</li>
<li><a href="api/other/helpers.html#stockpyl.helpers.find_nearest">find_nearest() (in module stockpyl.helpers)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="api/seio/finite_horizon.html#stockpyl.finite_horizon.finite_horizon_dp">finite_horizon_dp() (in module stockpyl.finite_horizon)</a>
</li>
<li><a href="api/datatypes/supply_chain_node.html#stockpyl.supply_chain_node.SupplyChainNode.forward_echelon_lead_time">forward_echelon_lead_time (SupplyChainNode property)</a>
</li>
<li><a href="api/datatypes/demand_source.html#stockpyl.demand_source.DemandSource.from_dict">from_dict() (DemandSource class method)</a>

<ul>
<li><a href="api/datatypes/disruption_process.html#stockpyl.disruption_process.DisruptionProcess.from_dict">(DisruptionProcess class method)</a>
</li>
<li><a href="api/datatypes/supply_chain_node.html#stockpyl.supply_chain_node.NodeStateVars.from_dict">(NodeStateVars class method)</a>
</li>
<li><a href="api/datatypes/policy.html#stockpyl.policy.Policy.from_dict">(Policy class method)</a>
</li>
<li><a href="api/datatypes/supply_chain_network.html#stockpyl.supply_chain_network.SupplyChainNetwork.from_dict">(SupplyChainNetwork class method)</a>
</li>
<li><a href="api/datatypes/supply_chain_node.html#stockpyl.supply_chain_node.SupplyChainNode.from_dict">(SupplyChainNode class method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>

Expand Down Expand Up @@ -939,12 +951,26 @@ <h2 id="S">S</h2>
<h2 id="T">T</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="api/datatypes/supply_chain_node.html#stockpyl.supply_chain_node.NodeStateVars.total_cost_incurred">total_cost_incurred (NodeStateVars attribute)</a>
<li><a href="api/datatypes/demand_source.html#stockpyl.demand_source.DemandSource.to_dict">to_dict() (DemandSource method)</a>

<ul>
<li><a href="api/datatypes/disruption_process.html#stockpyl.disruption_process.DisruptionProcess.to_dict">(DisruptionProcess method)</a>
</li>
<li><a href="api/meio/meio_general.html#stockpyl.meio_general.truncate_and_discretize">truncate_and_discretize() (in module stockpyl.meio_general)</a>
<li><a href="api/datatypes/supply_chain_node.html#stockpyl.supply_chain_node.NodeStateVars.to_dict">(NodeStateVars method)</a>
</li>
<li><a href="api/datatypes/policy.html#stockpyl.policy.Policy.to_dict">(Policy method)</a>
</li>
<li><a href="api/datatypes/supply_chain_network.html#stockpyl.supply_chain_network.SupplyChainNetwork.to_dict">(SupplyChainNetwork method)</a>
</li>
<li><a href="api/datatypes/supply_chain_node.html#stockpyl.supply_chain_node.SupplyChainNode.to_dict">(SupplyChainNode method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="api/datatypes/supply_chain_node.html#stockpyl.supply_chain_node.NodeStateVars.total_cost_incurred">total_cost_incurred (NodeStateVars attribute)</a>
</li>
<li><a href="api/meio/meio_general.html#stockpyl.meio_general.truncate_and_discretize">truncate_and_discretize() (in module stockpyl.meio_general)</a>
</li>
<li><a href="api/datatypes/demand_source.html#stockpyl.demand_source.DemandSource.type">type (DemandSource attribute)</a>

<ul>
Expand Down
10 changes: 6 additions & 4 deletions docs/_build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,19 @@

<section id="stockpyl">
<h1>Stockpyl<a class="headerlink" href="#stockpyl" title="Permalink to this heading"></a></h1>
<p>Stockpyl is a Python package for inventory optimization. It implements
<p>Stockpyl is a Python package for inventory optimization and simulation. It implements
classical single-node inventory models like the economic order quantity (EOQ), newsvendor,
and Wagner-Whitin problems. It also contains algorithms for multi-echelon inventory optimization
(MEIO) under both stochastic-service model (SSM) and guaranteed-service model (GSM) assumptions.</p>
(MEIO) under both stochastic-service model (SSM) and guaranteed-service model (GSM) assumptions.
And, it has extensive features for simulating multi-echelon inventory systems.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The notation and references (equations, sections, examples, etc.) used below refer to Snyder and Shen, <em>Fundamentals of Supply Chain Theory</em> (<em>FoSCT</em>), 2nd edition (2019).</p>
</div>
<hr class="docutils" />
<section id="some-examples">
<h2>Some Examples<a class="headerlink" href="#some-examples" title="Permalink to this heading"></a></h2>
<p>Solve the EOQ problem with <span class="math notranslate nohighlight">\(K=8\)</span>, <span class="math notranslate nohighlight">\(h=0.225\)</span>, and <span class="math notranslate nohighlight">\(\lambda=1300\)</span> (Example 3.1 in <em>FoSCT</em>):</p>
<p>Solve the EOQ problem with a fixed cost of 8, a holding cost of 0.225, and a demand rate of 1300 (Example 3.1 in <em>FoSCT</em>):</p>
<div class="highlight-pycon3 notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">stockpyl.eoq</span> <span class="kn">import</span> <span class="n">economic_order_quantity</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Q</span><span class="p">,</span> <span class="n">cost</span> <span class="o">=</span> <span class="n">economic_order_quantity</span><span class="p">(</span><span class="n">fixed_cost</span><span class="o">=</span><span class="mi">8</span><span class="p">,</span> <span class="n">holding_cost</span><span class="o">=</span><span class="mf">0.225</span><span class="p">,</span> <span class="n">demand_rate</span><span class="o">=</span><span class="mi">1300</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Q</span>
Expand All @@ -91,7 +92,8 @@ <h2>Some Examples<a class="headerlink" href="#some-examples" title="Permalink to
<span class="go">68.41052550594829</span>
</pre></div>
</div>
<p>Or the newsvendor problem with <span class="math notranslate nohighlight">\(h=0.18\)</span>, <span class="math notranslate nohighlight">\(p=0.70\)</span>, and <span class="math notranslate nohighlight">\(D\sim N(50, 8^2)\)</span> (Example 4.3 in <em>FoSCT</em>):</p>
<p>Or the newsvendor problem with a holding cost of 0.18, a stockout cost of 0.70, and demand that is normally
distributed with mean 50 and standard deviation 8 (Example 4.3 in <em>FoSCT</em>):</p>
<div class="highlight-pycon3 notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">stockpyl.newsvendor</span> <span class="kn">import</span> <span class="n">newsvendor_normal</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">S</span><span class="p">,</span> <span class="n">cost</span> <span class="o">=</span> <span class="n">newsvendor_normal</span><span class="p">(</span><span class="n">holding_cost</span><span class="o">=</span><span class="mf">0.18</span><span class="p">,</span> <span class="n">stockout_cost</span><span class="o">=</span><span class="mf">0.70</span><span class="p">,</span> <span class="n">demand_mean</span><span class="o">=</span><span class="mi">50</span><span class="p">,</span> <span class="n">demand_sd</span><span class="o">=</span><span class="mi">8</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">S</span>
Expand Down
Binary file modified docs/_build/html/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 1d9d63b

Please sign in to comment.