Base Surge Agent
- class or_suite.agents.inventory_control_multiple_suppliers.base_surge.base_surgeAgent(r, S)[source]
Uses a value, r, which is a vector of order amounts of length number of suppliers - 1, and an order-up-to-amount, S, which is used to calculate the order amount for the supplier with the greatest lead time.
The base surge agent has 2 parameters, r and S. Each action is expressed as [r,[orderamount]]. r is a vector of the order amounts for all suppliers except the one with the greatest lead time. S represents the “order up to amount”. orderamount is calculated by calculating S - I where I is the current on-hand inventory. This value is then made 0 if it is negative or is reduced to the maxorder if it is greater. This order amount is used for the supplier with the greatest lead time.
- r
A vector of order amounts of length number of suppliers - 1.
- S
The order-up-to amount for the supplier with the greatest lead time.
- config
The dictionary of values used to set up the environment.
- offset
Either 0 or the value of the max_inventory. It is used to have correct order amounts when inventory is strictly positive or if it is positive and negative.
- max_order
The maximum order amount for every supplier.
- __init__(r, S)[source]
Initializes the agent with attributes r and S.
- Parameters
r – A vector of order amounts of length number of suppliers - 1.
S – The order-up-to amount for the supplier with the greatest lead time.
- pick_action(obs, h)[source]
Select an action based upon the observation.
- Parameters
obs – The most recently observed state.
h – Not used.
- Returns
action: The action the agent will take in the next timestep.
- Return type
list