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

update_config(env, config)[source]

Update agent information based on the config__file

Parameters
  • env – The environment being used.

  • config – The dictionary of values used to set up the environment.

update_parameters(param)[source]

Update the parameters, r and S.

Parameters

param – A list of the form [r, S] where r is a list of integers and S is an integer.