jmri.jmrit.operations.router
Class Router
java.lang.Object
jmri.jmrit.operations.trains.TrainCommon
jmri.jmrit.operations.router.Router
public class Router
- extends TrainCommon
Router for car movement. This code attempts to find a way to move a car to
its final destination through the use of two or more trains. Code first tries
to move car using a single train. If that fails, attempts are made to use two
trains via an interchange track , then a yard. Next attempts are made using
three or more trains using any combination of interchanges and yards.
Currently the router is limited to five trains.
- Author:
- Daniel Boudreau Copyright (C) 2010, 2011
| Fields inherited from class jmri.jmrit.operations.trains.TrainCommon |
TAB |
| Methods inherited from class jmri.jmrit.operations.trains.TrainCommon |
addLine, addLine, dropCar, dropEngine, dropEngines, getCarAttribute, getCarsLocationUnknown, getDate, getEngineAttribute, getRollingStockAttribute, lineLength, newLine, pickupCar, pickupEngine, pickupEngines, searchForCar, splitString, tabString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
enable_staging
public boolean enable_staging
SEVEN
protected static final String SEVEN
- See Also:
- Constant Field Values
Router
public Router()
instance
public static Router instance()
setDestination
public boolean setDestination(Car car,
Train train,
PrintWriter buildReport)
- Attempts to set the car's destination if a next destination exists.
Only sets the car's destination if the train is part of the car's route.
- Parameters:
car - the car to routetrain - the first train to carry this car, can be nullbuildReport - PrintWriter for build report, and can be null
- Returns:
- true if car can be routed.
getStatus
public String getStatus()
Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: