Skip links

Transportation Costs in Optimization

Here we will cover the options a Cosmic Frog user has for modeling transportation costs when using the Neo Optimization engine. The different fields that can be populated and how the calculations under the hood work will be explained in detail. 

There are many ways in which transportation can be costed in real life supply chains. The Transportation Policies table contains 4 cost fields to help users model costs as close as possible to reality. These fields are: Unit Cost, Fixed Cost, Duty Rate and Inventory Carrying Cost Percentage. Not all these costs need to be used: the one(s) that are applicable should be populated and the others can be left blank. The way some of these costs work depends on additional information specified in other fields, which will be explained as well. 

Note that in the screenshots throughout this documentation some fields in the Cosmic Frog tables have been moved so they could be shown together in a screenshot. You may need to scroll right to see the same fields in your Cosmic Frog model tables and they may be in a different order. 

We will first discuss the input fields with the calculations and some examples; at the end of the document an overview is given of how the cost inputs translate to outputs in the optimization output tables. 

Unit Cost Field

This field is used for transportation costs that increase when the amount of product being transported increases and/or the transportation distance or time increases. As there are quite a few different measures based on which costs can depend on the amount of product that is transported (e.g. $2 per each, or $0.01 per each per mile, or $10 per mile for a whole shipment of 1000 units, etc.) there is a Unit Cost UOM field that specifies how the cost specified in the Unit Cost field should be applied. In a couple of cases, the Average Shipment Size and Average Shipment Size UOM fields must be specified too as we need to know the total number of shipments for the total Unit Cost calculation. The following table provides an overview of the Unit Cost UOM options and explains how the total Unit Costs are calculated for each UOM:

Unit Cost UOM  Needs Average Shipment Size  Calculation of total Unit Costs  Notes 
Quantity  No  Total Flow Quantity * Unit Cost   
Volume  No  Total Flow Volume * Unit Cost   
Weight  No  Total Flow Weight * Unit Cost   
Distance  Yes  Unit Cost * Transport Distance * Total Flow / Average Shipment Size  Total Flow in Quantity, Volume or Weight, to match the Average Shipment Size UOM 
Time  Yes  Unit Cost * Transport Time *  

Total Flow / Average Shipment Size 

Total Flow in Quantity, Volume or Weight, to match the Average Shipment Size UOM 
Quantity-Distance  No  Unit Cost * Total Flow Quantity * Transport Distance   
Quantity-Time  No  Unit Cost * Total Flow Quantity * Transport Time   
Volume-Distance  No  Unit Cost * Total Flow Volume * Transport Distance   
Volume-Time  No  Unit Cost * Total Flow Volume * Transport Time   
Weight-Distance  No  Unit Cost * Total Flow Weight * Transport Distance   
Weight-Time  No  Unit Cost * Total Flow Weight * Transport Time   

Example of Unit Cost field with different Unit of Measures

tp costs 1

With the settings as in the screenshot above, total Unit Costs will be calculated as follows for beds, pillows, and alarm clocks going from DC_Reno to CUST_Phoenix: 

  1. Beds: say 75 beds are being transported, then the cost associated with this flow = $0.02 (cost per bed per mile) * 75 (# beds) * 703 (distance in miles) = $1,054.50. 
  2. Pillows: say 500 pillows are being transported, then the cost associated with this flow = $3.50 (cost per pillow) * 500 (# pillows) = $1750.00. 
  3. Alarm clocks: say 2,000 alarm clocks are being transported, then the cost associated with this flow = $4 (cost per mile) * 703 (distance in miles) * 2,000 (# alarm clocks) / 1000 (average # alarm clocks per shipment) = $5,624.00. In other words, the cost per shipment = $4/mi * 703 mi = $2,812 and there are 2 shipments needed to ship 2000 units when 1 shipment contains 1000 units on average. 

The Unit Cost field can contain a single numeric value (as in the examples above), a step cost specified in the Step Costs table, a rate specified in the Transportation Rates table, or a custom cost function.

Product Name Group Behavior field and example

If stepped costs are used as the Unit Cost for Transportation Policies that use Groups in the Product Name field, then the Product Name Group Behavior field determines how these stepped costs are applied: 

  • If Product Name Group Behavior = Enumerate, then the step of the cost to be used will be determined for each individual product based on the total flow of that product. This option is used by default if the Product Name Group Behavior field is left blank. 
  • If Product Name Group Behavior = Aggregate, then the step of the cost to be used will be based on the total flow of all products. 

See following screenshots for an example of using stepped costs in the Unit Cost field and the difference in cost calculations for when Product Name Group Behavior is set to Enumerate vs Aggregate:

tp costs 2

On the Step Costs table (screenshot above), the stepped costs we will be using in the Unit Cost field on the Transportation policies table are specified. All records with the same Step Cost Name (TransportUnitCost_2 here) make up 1 set of stepped costs. The Step Cost Behavior is set to Incremental here, meaning that discounted costs apply from the specified throughput level only, not to all items once we go over a certain throughput. So, in this example, the per unit cost for units 0 through 10,000 is $1.75, $1.68 for units 10,001 through 25,000, $1.57 for units 25,001 through 50,000, and $1.40 for all units over 50,000. 

The configuration in the Transportation Policies table looks as follows:

tp costs 3

  1. A Group is used in the Product Name field, this group “AllProducts” contains all 3 products that are being modelled: beds, pillows and alarm clocks. 
  2. The stepped costs that have been set up are used in the Unit Cost field by typing the Step Cost Name of “TransportUnitCost_2” in this field. 
  3. Since stepped costs are used on a record that uses a Group for the Product Name, the Product Name Group Behavior field needs to be used to indicate if the stepped cost function is to be applied over the flow of all 3 products together, in which case this field should be set to Aggregate, or if the stepped function is to be applied to the flow of each product individually, in which case this field should be set to Enumerate. 

The following screenshot shows the outputs on the Optimization Flow Summary table of 2 scenarios that were run with these stepped costs, 1 scenario used the Enumerate option for the Product Name Group Behavior and the other 1 used the Aggregate option. The cost calculations are explained below the screenshot.

tp costs 4

  1. When the stepped costs are applied to all 3 products together (Product Name Group Behavior = Aggregate), the total Transportation Cost is calculated based on the total Flow Quantity which is: 22,950 (# beds) + 45,899 (# pillows) + 9,180 (# alarm clocks) = 78,029 units. The stepped costs are then applied to this number as follows: 10,000 (units 1-10,000) * $1.75 + 15,000 (units 10,001-25,000) * $1.68 +25,000 (units 25,001-50,000) * $1.57 + 28,029 (units 50,001-78,029) * $1.40 = $121,190.60. These costs are divided over the 3 products by prorating the cost based on the individual flow quantities. For beds this results in: $121,190.60 * 22,950 / 78,029 = $35,644.75; similar calculations are used for pillows and alarm clocks. 
  2. When the stepped costs are applied to the products individually (Product Name Group Behavior = Enumerate), the Transportation Cost for each product is calculated based on its Flow Quantity. So, the stepped costs are applied to the 22,950 beds as follows: 10,000 (beds 1-10,000) * $1.75 + 12,950 (beds 10,001-22,950) * $1.68 = $39,256. Similar calculations are used to calculate the transportation costs for pillows and alarm clocks.

Fixed Cost Field

The Fixed Cost field can be used to apply a fixed cost to each shipment for the specified origin-destination-product-mode combination. An average shipment size needs to be specified to be able to calculate the number of shipments from the amount of product that is being transported. When calculating the number of shipments, the result can contain fractions of shipments, e.g. 2.8 or 5.2. If desirable, these can be rounded up to the next integer (e.g. 3 and 6 respectively) by setting the Fixed Cost Rule field to Treat As Full. Note however that using this setting can increase model runtimes, and using the default Prorate setting is recommended in most cases.  

In summary, The Fixed Cost field therefore works together with the Fixed Cost Rule, Average Shipment Size, and Average Shipment Size UOM fields. The following table shows how the calculations work: 

Fixed Cost Rule  Average Shipment Size UOM  Calculation of total Fixed Costs  Notes 
Prorate  Quantity (e.g. EA)  Fixed Cost * Total Flow Quantity / Average Shipment Size   
Treat As Full  Quantity (e.g. EA)  Fixed Cost * roundup (Total Flow Quantity / Average Shipment Size)  Rounding up to next integer 
Prorate  Volume (e.g. CFT)  Fixed Cost * Total Flow Volume / Average Shipment Size   
Treat As Full  Volume (e.g. CFT)  Fixed Cost * roundup (Total Flow Volume / Average Shipment Size)  Rounding up to next integer 
Prorate  Weight (e.g. LB)  Fixed Cost * Total Flow Weight / Average Shipment Size   
Treat As Full  Weight (e.g. LB)  Fixed Cost * roundup (Total Flow Weight/ Average Shipment Size)  Rounding up to next integer 

 

The Fixed Cost field can contain a single numeric value, or a step cost specified in the Step Costs table. 

Example of Fixed Costs and use of Fixed Cost Rule field

Following example shows how Fixed Costs are calculated on the DC_ScrantonCUST_Augusta lane and illustrates the difference between setting the Fixed Cost Rule to Prorate vs Treat As Full

tp costs 5

This setup in the Transportation Policies table means that the cost for 1 shipment with on average 1,000 units on it is $100. 2 scenarios were run with this cost setup, 1 where Fixed Cost Rule was set to Prorate and 1 where it was set to Treat As Full. Following screenshot shows the outputs of these 2 scenarios:

tp costs 6

  1. In the Prorate scenario, 3,828 pillows are moved from DC_Scranton to CUST_Augusta. This means 3,828 / 1,000 = 3.828 shipments. The Shipment Cost for 3.828 shipments = $100 * 3.8282 = $382.80. Similar calculations are used for the Shipment Costs foralarm clocks and beds. 
  2. In the Treat As Full scenario, again 3,828 pillows are moved from DC_Scranton to CUST_Augusta, which again leads to 3.828 shipments being calculated. Since the Fixed Cost Rule is set to Treat As Full here, this is rounded up to the next integer, which is 4. Then the Shipment Cost is calculated as $100 * 4 = $400. Again, similar calculations are used for the Shipment Costs for alarm clocks and beds.

Product Name Group Behavior field and example

For Fixed Costs on Transportation Policies that use Groups in the Product Name field, the Product Name Group Behavior field determines how these fixed costs are applied: 

  • If Product Name Group Behavior = Enumerate, then the fixed costs to be used will be determined for each individual product based on the total flow of that product. In other words, the number of shipments for each individual product is determined, and the fixed costs then applied based on that number. This option is used by default if the Product Name Group Behavior field is left blank 
  • If Product Name Group Behavior = Aggregate, then the fixed costs to be used will be based on the total flow of all products. In other words, the number of shipments needed if different products can be on the same shipment is calculated and the fixed costs are applied to that number. 

See following screenshots for an example of using Fixed Costs where the Fixed Cost Rule is set to Treat As Full and the difference in cost calculations for when Product Name Group Behavior is set to Enumerate vs Aggregate:

tp costs 7

The transportation policy from DC_Birmingham to CUST_Baton Rouge uses the AllProducts group as the ProductName. This Group contains all 3 products being modelled: beds, pillows, and alarm clocks. The costs on this policy are a fixed cost of $100 per shipment, where an average shipment contains 1,000 units. The Fixed Cost Rule is set to Treat As Full meaning that the number of shipments will be rounded up to the next integer. Depending on the Product Name Group Behavior field this is done for the flow of each product individually (when set to Enumerate) or done for the flow of all 3 products together (when set to Aggregate):

tp costs 8

  1. When the fixed costs are applied to the products individually (Product Name Group Behavior = Enumerate), the fixed Shipment Cost for each product is calculated based on its Flow Quantity. So, the fixed costs are applied to the 45,123 pillows as follows: number of shipments = roundup (45,123 / 1,000) = 46 and therefore the fixed Shipment Cost for pillows = 46 shipments * $100 = $4,600. Similar calculations are used to calculate the transportation costs for beds and alarm clocks, which result in 10 shipments for alarm clocks and 23 shipments for beds. So, the total number of shipments is 46 + 10 + 23 = 79, and the total Fixed Shipment cost for the 3 products is $7,900. 
  2. When the fixed costs are applied to all 3 products together (Product Name Group Behavior = Aggregate), the total Fixed Shipment Cost is calculated based on the total Flow Quantity which is: 22,450 (# beds) + 45,123 (# pillows) + 9,180 (# alarm clocks) = 76,753 units. This translates to a number of shipments of: roundup (76,753 / 1,000) = 77. The fixed costs are then applied to this number and calculated as: 77 * $100 = $7,700. These costs are divided over the 3 products by prorating the costs based on the individual flow quantities. For pillows this results in: $7,7000 * 45,123 / 76,753 = $4,526.82. Similar calculations are used for beds and alarm clocks.

Duty Rate Field

When products are imported or exported from/to different countries, there may be cases where duties need to be paid. Cosmic Frog enables you to capture these costs by using the Duty Rate field on the Transportation Policies table. In this field you can specify the percentage of the Product Value (as specified on the Products table) that will be incurred as duty. If this percentage is for example 9%, you need to enter a value of 9 into the Duty Rate field. The calculation of total duties on a lane is as follows: Flow Quantity * Product Value * Duty Rate. 

Example using the Duty Rate field

The following screenshots show the Product Value of beds, pillows and alarm clocks in the Products table, the Duty Rate set to 10% on the DC_Birmingham to CUST_Nashville lane in the Transportation Policies table, and the resulting Duty Costs in the Optimization Flow Summary table, respectively. 

tp costs 9

tp costs 10

tp costs 11

Alarm clocks have a Product Value of $30. With a Duty Rate of 10% and moving 24,049 from DC_Birmingham to CUST_Nashville, the resulting Duty Cost = 24,049 * $30 * 0.1 = $72,147. 

Inventory Carrying Cost Percentage Field

If in transit inventory holding costs need to be calculated, the Inventory Carrying Cost Percentage field on the Transportation Policies table can be used. The value entered here will be used as the percentage of product value (specified on the Products table) to incur the in transit holding costs. If the Inventory Carrying Cost Percentage is 13%, then enter a value of 13 into this field. This percentage is interpreted as an annual percentage, so the in transit holding cost is then prorated based on transit time. The calculation of the in transit holding costs becomes: Flow Quantity * Product Value * Inventory Carrying Cost Percentage * Transit Time (in days) / 365. 

Note that there is also an Inventory Carrying Cost Percentage field in the Model Settings table. If this is set to a value greater than 0 and there is no value specified in the Transportation Policies table, the value from the Model Settings table is automatically used for inventory carrying cost calculations, including in transit holding costs. If there are values specified in both tables, the one(s) in the Transportation Policies table take precedence for In Transit Holding Cost calculations.

Example using the Inventory Carrying Cost Percentage field 

The following screenshots show the Inventory Carrying Cost Percentage set to 20% on the DC_Birmingham to CUST_Nashville lane in the Transportation Policies table, and the resulting In Transit Holding Costs in the Optimization Flow Summary table, respectively. The Product Values are as shown in the screenshot of the Products table in the previous section on Duty Rates.

tp costs 12

tp costs 13

For Pillows, the Product Value set on the Products Table is $100. When 120,245 units are moved from DC_Birmingham to CUST_Nashville, which takes 3.8909 hours (214 MI / 55 MPH), the In Transit Holding Costs are calculated as follows: 120,245 (units) * $100 (product value) * 0.2 (Carrying Cost Percentage) * (3.8909 HR (transport time) / 24 (HRs in a day)) / 365 (days in a year) = $1,068.18.

Summary of Transportation Cost fields on Output Tables 

The following table gives an overview of how the inputs into the 4 cost fields on the Transportation Policies table translate to outputs in multiple optimization output tables. The table contains the field names in the output tables and shows from which input field they result.

 

Transportation Policies table cost input fields

Output Table  Unit Cost  Fixed Cost  Duty Rate  Inventory Carrying Cost Percentage 
Optimization Network Summary  Total Transportation Cost  Total Shipment Cost  Total Duty Cost  Total In Transit Holding Cost 
Optimization Cost To Serve Summary  Per Unit Transportation Cost  Per Unit Shipment Cost  Per Unit Duty Cost  Per Unit In Transit Holding Cost 
Optimization Facility Summary        Total In Transit Holding Cost 
Optimization Facility Cost To Serve Summary  Per Unit Transportation Cost  Per Unit Shipment Cost  Per Unit Duty Cost  Per Unit In Transit Holding Cost 
Optimization Flow Summary  Transportation Cost  Shipment Cost  Duty Cost  In Transit Holding Cost 
Optimization Shipment Summary    Shipment Cost     

 

Note that the 4 different types of transportation costs are also included in the Landed Cost (Optimization Demand Summary table) and Parent Node Cost (Optimization Cost To Serve Parent Information Report table) calculations.  

Have More Questions?

Contact Support Contact Sales Visit Frogger Pond Community