TRoadClassSpeed

Top  Previous  Next

This class is used for storing a set of speeds related to each road class.

 

It is a fixed array of doubles with index 0 to 31. Default value is 60 km/h. Only values >0 are allowed.

 

It can be accessed directly using its index.

 

 

It has a single method for loading from an INI file in the same format as used by FleetEngine and RouteWare Studio.

Default speed is 60 km/h for undefined classes.

 

If mph=true, all speeds are multiplied by 1.609 when read from the ini file.

Fractional speeds are allowed, always use . as decimal separator.

 

Syntax: LoadFromINI(filename, section: string: mph: boolean);

 

Example: LoadFromINI('c:\fleetengine.ini' , 'Net1');

 

[net1]

Speed1 = 110

Speed2 = 90

Speed3 = 71.5

etc.