NS3 Cost modelCost model
Overview
Cost models provide a simple way of describing the cost to other nodes in the network from a specified source node. One can think of a cost model as being a wrapper for multiple lane rates where all the lane rates have the same unit dimensional costs and flow constraints. It’s typical to use cost models in situations where one can describe the costing of transactions from a single location in an easy manner. An example of this is when working with approximating a secondary distribution model from a warehouse to a candidate footprint. In such situations, it’s typical to apply a cost per km/mile from the warehouse to the footprint. This gives an indicative split of the territory into regions which are “cheaper” to serve than another candidate warehouse. Fine-grained secondary routing simulations can then be done using the ivr model to get an accurate depiction of the cost to serve a particular footprint, or to update the values of the cost model employed in the sourcing model.
Applicable models
- NS3
ns3-tbfvuwtge2iq
Cost Model
A cost model specifies a general model of connections between a specified source node and all consumption nodes. This allows users to easily create a single cost model per warehouse/distribution point and obtain an optimal split of the underlying footprint.
Schema definition
message CostModel {
required string id = 1;
required string source = 2;
repeated string productGroupIds = 3; // cost models only work with product groups.
repeated UnitDimensionCost unitDimensionCost = 4;
repeated FlowDimensionalConstraint flowConstraints = 5;
}
Fields
- id
- The unique identifier for this cost model. Should be unique for a give sourcing model.
- source
- The node identifier for this cost model. The node must be defined within the encapsulating model.
- productGroupIds
- A list of product group identifiers which may use this cost model. If no list is provided, it is assumed that this cost model may be applied to all product groups.
- unitDimensionCost
- A list of unit dimensional costs which should be applied when this particular cost model is used in the solution. This enables modelling a cost which is distance or time based or a cost per unit dimension or a mix of these.
- flowConstraints
- A list of flow constraints which should be applied to this particular cost model. These are hard constraints which enforce a restriction on the amount of a particular dimension that may be assigned to any one generated lane by the cost model.
Examples
This example illustrates a cost model which uses the distance between the source node and consumption points as the primary costing mechanism for transport. Only products belonging to the product group Beer
are permitted on this cost model.
id: "costmodel: Galway Warehouse:Beer"
source: "Galway Warehouse"
productGroupIds: "Beer"
unitDimensionCost {
dimensionIds: "distance"
dimensionCoefficients: 1
costPerUnit: 0.2
}