Cost Basis Calculation scripts
Transportation Cost Basis
A Transportation Cost Basis allows you to define more detailed transportation costs versus the standard available options. Examples of these more detailed costs include by multiple trip or order properties, day of week, past orders, or specific destination. Transportation costs for a shipment are calculated when a shipment departs a site. You input the default transportation cost value in the Variable Transportation Cost field in the Transportation Policies table. You can apply a Transportation Cost Basis script in the Variable Cost Basis field in the Transportation Policies table.
Arguments: (<Shipment Object> object, <ShippingRoute Object> object, <TransportationMode Object> object)
Returns the current shipment, shipping route and transportation mode under review. The initial transportation cost value is accessed in <TransportationMode Object>.transportationcost.
The expected activity is to calculate the cost of the shipment and allocate the cost to the details of each shipping item on the shipment. To accomplish this, loop through each shipment item on the shipment and set the transportcost attribute in each of the shipment item details. If the transportcost attribute is not changed, a zero transportation cost is applied.
Duty Cost Basis
A Duty Cost Basis allows you to define more detailed duty costs versus the standard option of total value of all items on the shipment multiplied by the duty cost entered in the Transportation Policies table. Examples of these more detailed costs include charging duty by single shipment or by shipment volume. You input the default duty cost value in the Duty Cost field in the Transportation Policies table. You set the custom Duty Cost Basis manually in the model input file. In the Transportation Mode line, set the DutyCostBasis to Custom and the DutyCostScript to the name of the script to apply. Be sure to uncheck the “Build Input Files” option in the Run Simulation form before running the simulation model to preserve the manual change. This is described in Running Simulation.
Arguments: (<Shipment Object> object, <ShippingRoute Object> object, <TransportationMode Object> object)
Returns the current shipment, shipping route and transportation mode under review. The initial duty cost value is accessed in <TransportationMode Object>.dutycost.
The expected activity is to calculate the duty cost of the shipment and allocate the cost to the details of each shipping item on the shipment. To accomplish this, loop through each shipment item on the shipment and set the dutycost attribute in each of the shipment item details. If the dutycost attribute is not changed, a zero duty cost is applied.
Return Trip Cost Basis
A Return Trip Cost Basis allows you to define more detailed return costs versus the default option of return cost multiplied by distance. You set the custom Return Trip Cost Basis manually in the model input file. In the Mode line, set the ReturnTripCostBasis to Custom and the ReturnTripCostScript to the name of the script to apply. Be sure to uncheck the “Build Input Files” option in the Run Simulation form before running the simulation model to preserve the manual change. This is described in Running Simulation.
Arguments: (<Shipment Object> object, <ShippingRoute Object> object, <TransportationMode Object> object)
Returns the current shipment, shipping route and transportation mode under review. The default return cost value is accessed in <TransportationMode>.returntripcost.
Return double
Return the calculated return cost for the entire shipment.
Last modified: Wednesday May 15, 2024