Policy scripts

Inventory Policy

An inventory policy allows you to create more detailed calculations to determine whether to replenish and at what quantities. For example, an organization may want to create a maximum amount ordered at any given inventory review. You can apply an inventory policy script in the Inventory Policy field in the Inventory Policies table.

Arguments: (<Site> object, <Product> object, Quantity Real)

Returns the site object and product object under review and the number of units ordered that triggered the inventory review. If the review period is not continuous, the Quantity will be null. This quantity can be decremented from the inventory position to calculate what the inventory position will be after the order is processed.

If the script results in a need for replenishment, use a global method to create the replenishment order. If the site is expected to source the product from another location, use Global Functions. If the site is expected to Make or produce the product, use Global Functions. If you are unsure of the sourcing policy in place for the site / product, it is best practice to check the sourcing policy and then choose the appropriate method. If no order is created, there will be no further action from this inventory policy review.

Make Policy

The Make Policy allows you to create more detailed sourcing logic. For example, an organization might want to choose a certain process based on the quantity of the order. You can apply a Make policy script in the Production Policy field in the Production Policies table.

Arguments: (<Order Object> object, <SiteProduct Object> object, <Site Object> object)

Returns the current order, site product and site under review

Return string

Return the name of a chosen source as a string. If no source is chosen, the order will not continue in the simulation.

Sourcing Policy

The Sourcing Policy allows you to create more detailed sourcing logic. For example, an organization might want to choose a source based on the distance from the destination or based on the priority of the order. You can apply a sourcing policy script in the Sourcing Policy field in the Site Sourcing Policies and Customer Sourcing Policies tables.

The objects returned to the script are based on the site type of the destination. Sourcing policies that are written to choose a source for a Customer type destination will not work for situations where the destination is an Existing Site site type.

Arguments: (<CustomerProduct Object> object OR <SiteProduct Object> object, <Order Object> object)

Returns the customer product or site product and order under review.

Return string

Return the name of a chosen source as a string. If no source is chosen, the order will not continue in the simulation.

Last modified: Wednesday May 15, 2024

Is this useful?