Route Assignment Table
A Route can be manually assigned using the Route option in the change object.
Routes are used to tell trains which stations to go to on a track network.
The Route Assignment Dialog displays a list of all of the Routes that you have specified in your model.
In this list of Routes, each Route has a unique index number, which was defined at the time the route was created.
Below the Routes list is a "Selector Reference" Attribute. This provides a value for which a matching Route index value is sought.
When an item passes through the Change Object, the Route whose index value matches the value of this Selector Reference Attribute will be assigned to the train item.
You use the ">" button to configure the Selector Reference Attribute. Its default is a constant value of 1.
More common would be to use an item attribute which has been set in routine code before the train item arrives at this change object.
Because the Selector Reference is an Attribute, you can point to an attribute that varies during a model run.
e.g. You can create an Item Attribute called "Trip_Name". Each item can be given a different trip_name value, and each item will be assigned a different Route when it passes through this change object.
Selector Reference Enables Multiple Choices
The Selector Reference can be pointed to a Table. This enables a number of routes to be specified and they will be tested sequentially, with the first "accepting" route taken by an item.
- The reference must be to the entire table.
- The route index values to test are specified in column 1 of the table.
- The rows in this column should be set to the route IDs to test.
Row Limit Attribute
When you are using the table-based multiple choice Selector Reference, you can set an additional "row limit" attribute.
You use the ">" button to configure the Row Limit Attribute. Its default is a constant value of 1.
This provides a convenient means of limiting the number of rows tested.
This is useful because the table needs to be prepared and available during lookahead, during which time rows cannot be added/ removed from a table.
The default of -1 for the row limit will scan all rows in the table.
The Delete button clears the route assignment function in this change object (so it performs no route