NS3 DimensionDimension
Overview
Dimensions describe the quantities that are used in a particular model. Some quantities may be instantaneous such as distance or time, i.e. trying to find the cheapest way to service a node in a network. Other dimensions may describe quantities which need to be moved from one location to another in order to satisfy the constraints of a model. An example of this would be dimensions such as mass, weight, volume or pallets. A user dimension would describe quantities which need to be provided to demand nodes (from a set of possible production nodes) while internal dimensions (such as distance or time) represent information which can be used to cost transactions in a particular model (such as a cost per km or cost per hour).
Applicable models
- NS3
ns3-tbfvuwtge2iq
Internal Dimension
Schema definition
message InternalDimension {
enum eMeasurementUnit {
SECONDS = 0; // timeConfig
MINUTES = 1; // timeConfig
HOURS = 2; // timeConfig
DAYS = 3; // timeConfig
KILOMETRES = 4; // distanceConfig
MILES = 5; // distanceConfig
}
required string id = 1;
required eMeasurementUnit measurementUnit = 2;
}
Fields
- id
- The unique identifier for the internal dimension. Typical examples include
distance
ortime
. - measurementUnit
- The measurement unit corresponding to the internal dimension defined. The measurement unit is required to be one of the
eMeasurementUnit
definitions, i.e. seconds, minutes, hours or days for time, or kilometres or miles for distance.
Examples
This example defines an internal dimension for time measured in hours.
timeConfig {
id: "time"
measurementUnit: HOURS
}
User Dimension
User dimensions are used to specify other dimensions which the model employs. Typical examples of this include mass, weight or volume.
Schema definition
message UserDimension {
required string id = 1;
required string units = 2;
}
Fields
- id
- A unique identifier for the dimension.
- units
- The units the dimension is being measured in. This field is not used in any transformation procedures and is recommended for model debugging.
Examples
The following provides an example of a user dimension which specifies a weight dimension measured in kilograms.
userDimensions {
id: "weight"
units: "kilograms"
}
Dimension Configuration
A dimension configuration for the NS3 describes all the dimensions and the configuration for a given NS3 model.
Schema definition
message DimensionConfiguration {
optional InternalDimension timeConfig = 1;
optional InternalDimension distanceConfig = 2;
repeated UserDimension userDimensions = 3;
}
Fields
- timeConfig
- Optional configuration for a time dimension (commonly configured).
- distanceConfig
- Optional configuration for a distance dimension (commonly configured).
- userDimensions
- A list of additional dimensions, such as weight, mass or volume. User dimensions are considered independent of one another in this representation. The field can be omitted (left empty) if there are no additional dimensions being measured although this is rather unusual in the context of a sourcing model.
Examples
This example shows a configuration for a typical NS3 model where a time dimension (hours), distance dimension (kilometres) and weight dimension are defined for use in the model.
timeConfig {
id: "time"
measurementUnit: HOURS
}
distanceConfig {
id: "distance"
measurementUnit: KILOMETRES
}
userDimensions {
id: "weight"
units: "Kilograms"
}