Index
InventoryManagement.SupplyChainEnv
InventoryManagement.connect_nodes!
InventoryManagement.is_terminated
InventoryManagement.reorder_policy
InventoryManagement.reset!
InventoryManagement.show_action
InventoryManagement.simulate_policy!
Environment
InventoryManagement.SupplyChainEnv
— TypeSupply 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 optionsbacklog::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.
InventoryManagement.connect_nodes!
— Functionconnect_nodes!(net::AbstractGraph, arcs...)
Connect nodes identified by arc
pairs (e.g., 1 => 2
).
InventoryManagement.reset!
— Functionreset!(env::SupplyChainEnv)
Reset a SupplyChainEnv
(empty all logging dataframes and set simulation time to 0).
InventoryManagement.is_terminated
— Functionis_terminated(env::SupplyChainEnv)
Check if a simulation has terminated (i.e., has reached the maximum number of periods).
Inventory Policy
InventoryManagement.reorder_policy
— Functionreorder_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 environmentreorder_point
: thes
orr
parameter in each node for each material in the system. Thekeys
are of the form(node, material)
.policy_param
: theS
orQ
parameter in each node for each material in the system. Thekeys
are of the form(node, material)
.policy_type
::rQ
for an(r,Q)
policy, or:sS
for an(s,S)
policy. If passing aDict
, 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 aAbstractRange
orVector
is used, thereview_period
indicates which periods the review is performed on. If aDict
is used, the review period should be specified for each(node, material)
Tuple
(keys). The values of thisDict
can be eitherInt
,AbstractRange
, orVector
. 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 aDict
is passed, the MOQ should be specified for each(node, material)
Tuple
(keys). The values should beReal
. 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 aDict
is passed, the order multiples should be specified for each(node, material)
Tuple
(keys). The values should beReal
. Any missing key will be assigned a default value of -1 (no order multiples enforced).
InventoryManagement.simulate_policy!
— Functionsimulate_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.
Reorder Actions
InventoryManagement.show_action
— Functionshow_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).
Spaces
Missing docstring for InventoryManagement.action_space
. Check Documenter's build log for details.
Missing docstring for InventoryManagement.state
. Check Documenter's build log for details.
Missing docstring for InventoryManagement.state_space
. Check Documenter's build log for details.