Step costs in Network Optimization
When using step costs with Network Optimization, it is important to understand how the piecewise function is formulated. The default behavior described applies for cases with the exception of transportation costs.
For this example, assume that you are defining two different step costs - one for fixed cost and the other for variable cost per unit. The step capacities (minimum quantity) for the two are the same:
Minimum quantity |
Fixed cost |
Variable cost per unit |
0 |
1000 |
10 |
100000 |
2000 |
7 |
200000 |
3000 |
5 |
We have 3 segments defined:
First segment: [0,100000] quantity with fixed cost = 1000 and variable cost = 10
Second segment: [100000,200000] quantity with fixed cost = 2000 and variable cost = 7
Third segment: [200000,INF] quantity with fixed cost = 3000 and variable cost = 5
For each cost (fixed and variable):
- The solver needs to select one of these segments.
- Three binary decision variables are created based on the segments.
- Only one of the binary decision variables can be active (set to 1) for each cost.
The segments are inclusive at their boundaries. The first segment includes the quantity values 0 or 100000; the second, includes 100000 or 200000; and so on. This means that if the quantity is 100000, it can be in either the first or second segment. The inclusive nature is based on all constraints being in the "<=" or ">=" format.
Using this example, if the quantity is 100000, the fixed cost will be 1000 (from the first segment) and the variable cost per unit will be 7 (from the second segment). This is based on returning the lowest cost segment per cost.
You may want to have both the fixed cost and variable cost per unit fall into the same segment. If you have a cost structure such as shown in the example, with rising fixed cost and falling variable cost that can result in different segments, you can do one of the following:
- Create custom constraints to set the binaries corresponding to the segment to be equal. Contact Coupa Support for additional information. In the case of transportation step costs (in the Transportation Policies or Modes tables), you can use the option as described in Transportation step costs to control this behavior.
- Adjust the minimum quantity by a small amount for one of the two costs so that if a quantity falls on the boundary for one cost, it will not be on the boundary of the other. In the example above, you could either decrease the minimum quantity for the fixed cost or increase the minimum quantity for the variable cost per unit. The amount by which you adjust the minimum quantity will vary based on the size of the objective function for the model and should be examined.
Transportation step costs
In the case where both Variable Transportation Cost and Fixed Shipment Cost use step costs with the same Minimum Quantity structure in the Transportation Policies or Modes tables and the actual quantity is exactly equal to the step Minimum Quantity, the solver pairs the Fixed Shipment Cost and Variable Transportation Cost to use the same step by default. An option in the Config_NO user defined table affects how these transportation-based step costs are handled. The default, when "Pair_Fixed_Variable_Step_Cost" is set to 1 forces both cost columns to use the same step. When this option is included and set to 0, the cheapest step is used, which may be different for the two costs.
For example, assume step costs such as shown. The Variable Transportation Cost decreases as the step increases, while the Fixed Shipment Cost increases as the step increases:
Minimum quantity |
Fixed cost |
Variable cost per unit |
0 |
100 |
10 |
10 |
200 |
8 |
20 |
300 |
6 |
If you include the "Pair_Fixed_Variable_Step_Cost" parameter, the cost is calculated as follows:
Parameter value |
Variable transportation cost |
Fixed transportation cost |
Total transportation cost |
---|---|---|---|
1 |
10 |
100 |
200 |
0 |
8 |
100 |
180 |
You create the Config_NO table using the Create Advanced NO Parameter Table model transformation.
Last modified: Wednesday May 15, 2024