Index

Environment

InventoryManagement.SupplyChainEnvType
Supply Chain Simulation Environment Constructor

Fields:

  • network::MetaDiGraph: Supply chain network directed graph.
  • markets::Vector: Vector of market nodes where demand occurs.
  • producers::Vector: Vector of producer nodes where material transformation occurs.
  • echelons::Dict: Dictionary with Vector of nodes downstream of each node in the network (including that node).
  • materials::Vector: Vector with the names of all materials in the system.
  • tmp::Dict: Dictionary storing the current and previous on-hand, pipeline, echelon, discarded inventories for each material at each node.
  • inventory::DataFrame: Timeseries with inventories @ each node.
  • orders::DataFrame: History of all orders received.
  • open_orders::DataFrame: Temporary table with outstanding orders.
  • fulfillments::DataFrame: Fulfilment log for system orders.
  • shipments::DataFrame: Temporary table with active shipments and time to arrival on each arc.
  • profit::DataFrame: Timeseries with profit @ each node.
  • metrics::Dict: Service metrics (service level and fill rate) for each supplier and material.
  • reward::Float64: Final reward in the system (used for RL)
  • period::Int: Current period in the simulation.
  • num_periods::Int: Number of periods in the simulation.
  • num_orders::Int: Number of orders in the system.
  • discount::Float64: Time discount factor (i.e. interest rate).
  • options::Dict: Simulation options
    • backlog::Bool: Indicator if backlogging is allowed.
    • reallocate::Bool: Indicator if unfulfilled requests should be reallocated to alternate suppliers.
    • evaluate_profit::Bool: Indicator if the profit should be evaluated at each node.
    • capacitated_inventory::Bool: Indicator if inventory limits should be enforced.
    • guaranteed_service::Bool: Indicator if simulation should force lost sales after service lead time expires.
    • adjusted_stock::Bool: Indicator if the inventory position and echelon stocks should account for orders that have been placed, but are not yet due.
    • numerical_precision::Int: Numerical precision (number of digits) for external demand sampling.
  • seed::Int: Random seed.
source

Inventory Policy

InventoryManagement.reorder_policyFunction
reorder_policy(env::SupplyChainEnv, reorder_point::Dict, policy_param::Dict,
                    policy_type::Union{Dict, Symbol} = :rQ, 
                    review_period::Union{Int, AbstractRange, Vector, Dict} = 1,
                    min_order_qty::Union{Real, Dict} = 0,
                    order_multiples::Union{Real, Dict} = 1)

Apply an inventory policy to specify the replinishment orders for each material throughout the SupplyChainEnv.

Arguments

  • env: inventory management environment
  • reorder_point: the s or r parameter in each node for each material in the system. The keys are of the form (node, material).
  • policy_param: the S or Q parameter in each node for each material in the system. The keys are of the form (node, material).
  • policy_type: :rQ for an (r,Q) policy, or :sS for an (s,S) policy. If passing a Dict, the policy type should be specified for each node (keys).
  • review_period: number of periods between each inventory review (Default = 1 for continuous review.). If a AbstractRange or Vector is used, the review_period indicates which periods the review is performed on. If a Dict is used, the review period should be specified for each (node, material) Tuple (keys). The values of this Dict can be either Int, AbstractRange, or Vector. Any missing (node, material) key will be assigned a default value of 1.
  • min_order_qty: minimum order quantity (MOQ) at each supply node. If a Dict is passed, the MOQ should be specified for each (node, material) Tuple (keys). The values should be Real. Any missing key will be assigned a default value of 0.
  • order_multiples: size increments for each order (default is -1, which means no constraint on order sizes). If a Dict is passed, the order multiples should be specified for each (node, material) Tuple (keys). The values should be Real. Any missing key will be assigned a default value of -1 (no order multiples enforced).
source
InventoryManagement.simulate_policy!Function
simulate_policy!(env::SupplyChainEnv, args...; window::Tuple=(0,Inf), metrics::Tuple = (:service_levels,:fill_rates), kwargs...)

Step through a simulation using a specified reorder policy. args are the arguments that are passed to the reorder_policy function.

source

Reorder Actions

InventoryManagement.show_actionFunction
show_action(x::SupplyChainEnv, action::Vector{T} where T <: Real)

Convert a replenishment order vector into a NamedArray indicating how much of each material (rows) is being requested on each arc (columns).

source

Spaces

Missing docstring.

Missing docstring for InventoryManagement.action_space. Check Documenter's build log for details.

Missing docstring.

Missing docstring for InventoryManagement.state. Check Documenter's build log for details.

Missing docstring.

Missing docstring for InventoryManagement.state_space. Check Documenter's build log for details.