gsm_serial Module

Overview

The gsm_serial module contains code to implement dynamic programming (DP) algorithm for guaranteed-service model (GSM) for multi-echelon inventory systems with serial structures by Inderfurth (1991)).

Note

The terms “node” and “stage” are used interchangeably in the documentation.

Note

The notation and references (equations, sections, examples, etc.) used below refer to Snyder and Shen, Fundamentals of Supply Chain Theory (FoSCT), 2nd edition (2019).

See Also

For an overview of multi-echelon inventory optimization in Stockpyl, see the tutorial page for multi-echelon inventory optimization.

References

K. Inderfurth. Safety stock optimization in multistage inventory systems. International Journal of Production Economics, 24:103-113, 1991.

API Reference

optimize_committed_service_times(num_nodes=None, local_holding_cost=None, processing_time=None, demand_bound_constant=None, external_outbound_cst=None, external_inbound_cst=None, demand_mean=None, demand_standard_deviation=None, demand_source=None, network=None)[source]

Optimize committed service times using the dynamic programming (DP) algorithm of Inderfurth (1991).

Problem instance may either be provided in the individual parameters num_nodes, …, demand_source, or in the network parameter.

If the instance is specified in the individual parameters, the nodes must be indexed \(N, \ldots, 1\). (If the instance is specified in the network parameter, the nodes may be indexed in any way.) The node-specific parameters (local_holding_cost, processing_time, and demand_bound_constant) must be either a dict, a list, or a singleton, with the following requirements:

  • If the parameter is a dict, its keys must equal 1,…, num_nodes, each corresponding to a node index.

  • If the parameter is a list, it must have length num_nodes; the n th entry in the list corresponds to node with index n + 1.

  • If the parameter is a singleton, all nodes will have that parameter set to the singleton value.

Either demand_mean and demand_standard_deviation must be provided (in which case the demand will be assumed to be normally distributed) or a demand_source must be provided.

Parameters
  • num_nodes (int, optional) – Number of nodes in serial system. [\(N\)]

  • local_holding_cost (float, list, or dict, optional) – Local holding cost at each node. [\(h\)]

  • processing_time (float, list, or dict, optional) – Processing time at each node. [\(T\)]

  • demand_bound_constant (float, optional) – The constant to use in setting the demand bound. [\(z_\alpha\)]

  • external_outbound_cst (int, optional) – Outbound CST to external customer at node 1.

  • external_inbound_cst (int, optional) – Inbound CST from external supplier at node N.

  • demand_mean (float, optional) – Mean demand per unit time at node 1. Ignored if demand_source is not None. [\(\mu\)]

  • demand_standard_deviation (float, optional) – Standard deviation of demand per unit time at node 1. Ignored if demand_source is not None. [\(\mu\)]

  • demand_source (DemandSource, optional) – A DemandSource object describing the demand distribution at node 1. Required if demand_mean and demand_standard_deviation are None.

  • network (SupplyChainNetwork, optional) – A SupplyChainNetwork object that provides all of the necessary data. If provided, num_nodes, …, demand_source are ignored.

Returns

  • opt_cst (dict) – Dict of optimal CSTs, with node indices as keys and CSTs as values.

  • opt_cost (float) – Optimal expected cost of system.

Example (Example 6.3):

>>> from stockpyl.instances import load_instance
>>> network = load_instance("example_6_3")
>>> opt_cst, opt_cost = optimize_committed_service_times(network=network)
>>> opt_cst
{3: 0, 2: 0, 1: 1}
>>> opt_cost
2.8284271247461903

References

K. Inderfurth. Safety stock optimization in multistage inventory systems. International Journal of Production Economics, 24:103-113, 1991.