Distances Model
Properties
The default initial location.
The default distance from a location to itself must be greater than or equal to 0.0
The data associated with the schedule
The names of the locations.
The locations that have been added to the model.
Functions
Adds the distance data to the distances model.
Adds the distance from location fromLoc to location toLoc where fromLoc and toLoc are string names of locations. If a location with the name does not already exist in the model, then a new location with the name is created. The flag symmetric will cause an additional distance to be added going from toLoc to location fromLoc that has the same distance. The default value of the flag is false. The pair must not have been added to the model.
Adds a distance value between the pair of locations, going from fromLocation to toLocation. The distance must be greater than or equal to 0.0. The flag symmetric will cause an additional distance to be added going from toLocation to location fromLocation that has the same distance. The default value of the flag is false. The pair must not have been added to the model. Use changeDistance() in that case.
Assumes that matrix is square and contains the from-to distances. Any values on the diagonal are ignored. No values can be 0.0
Changes a distance value between the pair of locations, going from fromLocation to toLocation. The distance must be greater than or equal to 0.0. The pair must already be part of the model.
Clears all distances from the distance model
For this model, this returns true if and only if the locations are the same object instances.
Computes the distance between fromLocation and toLocation based on the spatial model's distance metric