SupplyChainModeling
Installation
SupplyChainModeling can be installed using the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run
pkg> add SupplyChainModelingAPI
SupplyChainModeling.Customer — TypeA customer.
SupplyChainModeling.Demand — TypeThe demand a customer has for a product.
SupplyChainModeling.Lane — TypeA transportation lane between two or more nodes of the supply chain.
SupplyChainModeling.Location — TypeThe geographical location of a node of the supply chain. The location is defined by its latitude and longitude.
SupplyChainModeling.Node — TypeA node of the supply chain.
SupplyChainModeling.Plant — TypeA plant.
SupplyChainModeling.Product — TypeA product in the supply chain.
SupplyChainModeling.Storage — TypeA storage location.
SupplyChainModeling.Supplier — TypeA supplier.
SupplyChainModeling.SupplyChain — TypeThe supply chain.
SupplyChainModeling.add_customer! — Methodadd_customer!(supply_chain, customer)Adds a customer to the supply chain.
SupplyChainModeling.add_demand! — Methodadd_demand!(supply_chain, demand)Adds demand to the supply chain.
SupplyChainModeling.add_demand! — Methodadd_demand!(supply_chain, customer, product, demand::Array{Float64, 1}; service_level=1.0)Adds customer demand for a product. The demand is specified for each time period.
The keyword arguments are:
service_level: indicates how many lost sales are allowed as a ratio of demand. No demand can be lost if the service level is 1.0 and all demand can be lost if the service level is 0.0.sales_price: the sales price of a unit of product.lost_sales_cost: the cost of losing the sales of a unit of product.
SupplyChainModeling.add_lane! — Methodadd_lane!(supply_chain, lane)Adds a transportation lane to the supply chain.
SupplyChainModeling.add_plant! — Methodadd_plant!(supply_chain, plant)Adds a plant to the supply chain.
SupplyChainModeling.add_product! — Methodadd_product!(plant::Plant, product::Product; bill_of_material::Dict{Product, Float64}, unit_cost, maximum_throughput)Indicates that a plant can produce a product.
The keyword arguments are:
bill_of_material: the amount of other product needed to produce one unit of the product. This dictionary can be empty if there are no other products needed.unit_cost: the cost of producing one unit of product.maximum_throughput: the maximum amount of product that can be produced in a time period.time: the production lead time.
SupplyChainModeling.add_product! — Methodadd_product!(storage::Storage, product; initial_inventory::Real=0,
unit_handling_cost::Real=0,
unit_holding_cost::Real=0,
maximum_throughput::Float64=Inf,
additional_stock_cover::Real=0.0)Indicates that a storage can store a product.
The keyword arguments are: - initial_inventory: the amount of product initially at the storage location - unit_handling_cost: : the cost of handling a unit of product at the storage location - unit_holding_cost: the cost of holding a unit of product at the storage location per period - maximum_throughput: the maximum number of units of product that can be sent per period
SupplyChainModeling.add_product! — Methodadd_product!(supplier::Supplier, product::Product; unit_cost::Float64, maximum_throughput::Float64)Indicates that a supplier can provide a product.
The keyword arguments are:
unit_cost: the cost per unit of the product from this supplier.maximum_throughput: the maximum number of units that can be provided in each time period.
SupplyChainModeling.add_product! — Methodadd_product!(supply_chain, product)Adds a product to the supply chain.
SupplyChainModeling.add_storage! — Methodadd_storage!(supply_chain, storage)Adds a storage location to the supply chain.
SupplyChainModeling.add_supplier! — Methodadd_supplier!(supply_chain, supplier)Adds a supplier to the supply chain.
SupplyChainModeling.can_ship — Methodcan_ship(lane::Lane, time::Int)Checks if inventory can be send on a lane at a given time.
SupplyChainModeling.get_arrivals — Methodget_arrivals(lane::Lane, destination, time::Int)Gets the known inventory arrivals on a lane for a given time.
SupplyChainModeling.get_demand — Methodget_demand(supply_chain, customer, product, time)Gets the demand of a customer for a product at a given time.
SupplyChainModeling.get_destinations — Methodget_destinations(lane::Lane)Gets the destinations of a lane.
SupplyChainModeling.get_fixed_cost — Methodget_fixed_cost(lane::Lane)Gets the fixed cost of using a lane.
SupplyChainModeling.get_initial_inventory — Methodget_initial_inventory(storage, product)Gets the inventory at the storage location at the start of the simulation.
SupplyChainModeling.get_lanes_between — Methodget_lanes_between(supply_chain, from, to)::Set{Lane}()Gets the lanes between two locations in the supply chain.
SupplyChainModeling.get_lanes_in — Methodget_lanes_in(supply_chain, node)::Set{Lane}()Gets the lanes going into a node in the supply chain.
SupplyChainModeling.get_lanes_out — Methodget_lanes_out(supply_chain, node)::Set{Lane}()Gets the lanes coming out of a node in the supply chain.
SupplyChainModeling.get_leadtime — Methodget_leadtime(lane::Lane, destination::Node)Gets the lead time to reach a destination using a lane.
SupplyChainModeling.get_maximum_throughput — Methodget_maximum_throughput(node, product)Gets the maximum throughput for a product at a given node.
SupplyChainModeling.is_destination — Methodis_destination(location, lane::Lane)::boolChecks if a location is a destination of a lane.