Using matrix references for demand calculation

In procedures of demand modeling various matrices are used as input and output variables. Where suitable, the program, by default, suggests that you define matrices based on their properties. You then use matrix references. They allow for a better description of the function of the respective matrix in the model.

Examples

  • Matrices created as the result of trip distribution in a 4-step model are demand matrices with the zones, demand model and demand stratum dimension.

The matrix attribute Matrix type, Reference type, DemandModelCode, DemandStratumCode are assigned values for the result matrix. The ModeCode attribute value remains empty.

  • Matrices created as the result of mode choice in a 4-step model are demand matrices with the zones, demand model, demand stratum and mode dimension.

The matrix attribute Matrix type, Reference type, DemandModelCode, DemandStratumCode and ModeCode are assigned values for the result matrix.

  • Matrices created as the result of skim calculation belong to the matrix type skim matrices. Code and demand segment are defined. The matrix dimension (e.g. zones, main zones) depends on the respective procedure used.

The matrix attributes Code, Matrix type, Reference type, DemandSegmentCode are assigned values for the result matrix.

The utility definition in demand procedures allows you to enter formulas directly into the definition. In these formulas, you can then use coefficients depending on the context. The context depends on your selection of reference objects. Each selection includes exactly one demand model. Other context dependencies result from the type of demand model (e.g. demand strata, person groups) and the calculation (distribution, mode choice) used.

Example 1

You cant to calculate mode choice for all demand strata of a 4-step model. The utility definition uses coefficients that you have defined as attributes of the demand strata. For mode C, you can use the following formula:

Matrix([CODE] = "TTC" & [MATRIXTYPE] = 4 & [DSEGCODE] = "C") * CONTEXT[DEMANDSTRATUM\C_TTCCOEFF]

+ FROM[ACCESSTIMECAR] * CONTEXT[DEMANDSTRATUM\C_ACCEGRCOEFF]

+ TO[EGRESSTIMECAR] * CONTEXT[DEMANDSTRATUM\C_ACCEGRCOEFF]

+ CONTEXT[DEMANDSTRATUM\C_CONST]

The context is determined by the respective demand stratum. In this example, the run time, access time (attribute of origin zone) and egress time (attribute of destination zone) are each multiplied by the attributes of the demand stratum and a constant defined for the demand stratum is added.

Example 2

You want to calculate the mode choice for all demand strata of a tour-based model within combined trip distribution/mode choice. The utility definition for mode choice uses coefficients that you have defined as attributes of person groups. For mode B, you can use the following formula:

Matrix([CODE] = "TT0" & [MATRIXTYPE] = 4 & [DSEGCODE] = "B") * CONTEXT[PERSONGROUP\B_TT0COEFF]

In a tour-based model, the mode choice context results form the person group and mode used. This means you can use coefficients for these two network objects in the formula. In the example, the skim matrix run time in the empty network is multiplied with an attribute defined for the person group.