Package jmri.jmrit.operations.locations
Class Track
java.lang.Object
jmri.beans.PropertyChangeSupport
jmri.jmrit.operations.locations.Track
- All Implemented Interfaces:
PropertyChangeFirer,PropertyChangeProvider
Represents a location (track) on the layout Can be a spur, yard, staging, or
interchange track.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected intprotected intprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected intprotected booleanprotected Stringprotected intprotected intprotected Stringprotected intprotected Locationprotected intprotected intprotected intprotected intprotected Stringprotected intprotected intprotected intprotected intprotected booleanprotected Stringprotected Stringprotected intprotected Poolprotected booleanprotected booleanprotected Reporterprotected intprotected intprotected intprotected intprotected intprotected Stringprotected intprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected intprotected intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final intstatic final intstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final StringFields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDestination(Location destination) adds a location to the list of acceptable destinations for this track.voidvoidvoidaddLoadName(String load) Add a receive load that the track will either service or exclude.voidaddPickupId(String id) Add train or route id to this track.voidIncrements the number of cars and or engines that will be picked up by a train from this track.voidaddReservedInRoute(Car car) voidaddRoadName(String road) voidaddRS(RollingStock rs) Adds rolling stock to a specific track.voidaddShipLoadName(String load) Add a ship load that the track will either service or exclude.voidaddTypeName(String type) voidvoidIncrements the schedule count if there's a schedule and the schedule is running in sequential mode.Checks to see if all car types can be pulled from this trackcheckSchedule(Car car) Checks to see if car can be placed on this spur using this schedule.booleancheckScheduleAttribute(String attribute, String carType, Car car) Check to see if schedule is valid for the track at this location.booleancontainsDropId(String id) booleanbooleancontainsRoadName(String road) Creates a copy of this track.voiddeleteDestination(Location destination) voiddeleteDropId(String id) voidvoiddeleteLoadName(String load) Delete a receive load name that the track will either service or exclude.voiddeletePickupId(String id) voidvoiddeleteReservedInRoute(Car car) voiddeleteRoadName(String road) voiddeleteRS(RollingStock rs) voiddeleteShipLoadName(String load) Delete a ship load name that the track will either service or exclude.voiddeleteTypeName(String type) voiddispose()Returns the alternate track for a spurintAvailable track space.intGets the blocking order for this track.Get's the current schedule item for this track Protects against user deleting an item in a shared schedule.String[]intGet destination option for interchange or staging trackString[]Gets the drop option for this track.intgetId()intintString[]Provides a list of receive loads that the track will either service or exclude.Gets the car receive load option for this track.intgetMoves()getName()intintintintString[]Gets the pickup option for this track.intgetPool()intintintintintUsed to determine how much track space is going to be consumed by cars in route to this track.intintString[]intReturns how many times the current schedule item has been accessed.Recommend getCurrentScheduleItem() to get the current schedule item for this track.intGets the mode of operation for the schedule assigned to this track.Returns the name of the schedule.Get the service order for this track.String[]Provides a list of ship loads that the track will either service or exclude.Gets the car ship load option for this track.A track has four priorities: PRIORITY_HIGH, PRIORITY_MEDIUM, PRIORITY_NORMAL, and PRIORITY_LOW.Gets the track typestatic StringgetTrackTypeName(String trackType) intString[]Returns all of the rolling stock type names serviced by this track.intbooleanbooleanbooleanbooleanbooleanUsed to determine if track has been assigned as an alternatebooleanWhen enabled block cars from staging.booleanisDestinationAccepted(Location destination) Returns true if destination is valid from this track.booleanbooleanisDropRouteAccepted(Route route) booleanisDropTrainAccepted(Train train) Determine if train can set out cars to this track.booleanIf enabled (true), hold cars with custom loads rather than allowing them to go to staging if the spur and the alternate track were full.booleanbooleanbooleanisLoadNameAccepted(String load) Determine if track will service a specific receive load name.booleanisLoadNameAndCarTypeAccepted(String load, String type) Determine if track will service a specific receive load and car type.booleanisLoadNameAndCarTypeShipped(String load, String type) Determine if track will service a specific ship load and car type.booleanisLoadNameShipped(String load) Determine if track will service a specific ship load name.booleanbooleanbooleanWhen true the track will only accept cars that have a final destination that can be serviced by the track.booleanisPickupRouteAccepted(Route route) booleanisPickupTrainAccepted(Train train) Determine if train can pick up cars from this track.booleanbooleanbooleanbooleanbooleanisRoadNameAccepted(String road) Used to determine if track can service the rolling stock.booleanisSpaceAvailable(Car car) Used to determine if there's space available at this track for the car.booleanisSpur()booleanbooleanisTypeNameAccepted(String type) booleanisYard()scheduleNext(Car car) Check to see if track has schedule and if it does will schedule the next item in the list.voidsetAddCustomLoadsAnySpurEnabled(boolean enable) When enabled, add custom car loads if there's a demand by any spur/industry.voidsetAddCustomLoadsAnyStagingTrackEnabled(boolean enable) When enabled, add custom car loads to cars in staging for new destinations that are staging.voidsetAddCustomLoadsEnabled(boolean enable) When enabled, add custom car loads if there's a demand.voidsetAlternateTrack(Track track) voidsetBlockCarsEnabled(boolean enable) voidsetBlockingOrder(int order) voidsetComment(String comment) voidsetCommentBoth(String comment) voidsetCommentPickup(String comment) voidsetCommentSetout(String comment) voidsetDestinationIds(String[] ids) voidsetDestinationOption(String option) Sets the destination option for this track.protected voidsetDirtyAndFirePropertyChange(String p, Object old, Object n) voidsetDisableLoadChangeEnabled(boolean enable) voidsetDropOption(String option) Set the car drop option for this track.voidsetHoldCarsWithCustomLoadsEnabled(boolean enable) voidsetIgnoreUsedLengthPercentage(int percentage) The amount of consumed track space to be ignored when sending new rolling stock to the track.voidsetLength(int length) voidsetLoadEmptyEnabled(boolean enable) Enable setting the car generic load state to empty when car arrives at this track.voidsetLoadOption(String option) Set how this track deals with receiving car loadsvoidsetLoadSwapEnabled(boolean enable) Enable changing the car generic load state when car arrives at this track.voidsetMoves(int moves) voidvoidsetOnlyCarsWithFinalDestinationEnabled(boolean enable) voidsetPickupOption(String option) Set the car pick up option for this track.voidvoidsetPoolMaximumLength(int length) Sets the maximum length of this track when the track is in a pool.voidsetPoolMinimumLength(int length) Sets the minimum length of this track when the track is in a pool.voidsetPrintManifestCommentEnabled(boolean enable) voidsetPrintSwitchListCommentEnabled(boolean enable) voidsetQuickServiceEnabled(boolean enable) voidsetRemoveCustomLoadsEnabled(boolean enable) When enabled, remove Scheduled car loads.voidvoidsetReservationFactor(int factor) Set the reservation factor.protected voidsetReserved(int reserved) The amount of track space that is reserved for car drops or pick ups.voidsetRoadOption(String option) Set the road option for this track.voidsetSchedule(Schedule schedule) voidsetScheduleCount(int count) voidsetScheduleId(String id) voidvoidsetScheduleMode(int mode) Sets the mode of operation for the schedule assigned to this track.voidsetServiceOrder(String order) Set the service order for this track.voidsetShipLoadOption(String option) Set how this track deals with shipping car loadsvoidsetTrackPriority(String priority) voidsetTrackType(String type) Sets the track type, spur, interchange, yard, stagingvoidsetTrainDirections(int direction) Sets the train directions that can service this trackvoidsetUsedLength(int length) org.jdom2.Elementstore()Create an XML element to represent this Entry.toString()Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
NONE
- See Also:
-
_id
-
_name
-
_trackType
-
_location
-
_trainDir
-
_numberRS
-
_numberCars
-
_numberEngines
-
_pickupRS
-
_dropRS
-
_length
-
_reserved
-
_reservedLengthSetouts
-
_reservedLengthPickups
-
_numberCarsEnRoute
-
_usedLength
-
_ignoreUsedLengthPercentage
-
IGNORE_0
- See Also:
-
IGNORE_25
- See Also:
-
IGNORE_50
- See Also:
-
IGNORE_75
- See Also:
-
IGNORE_100
- See Also:
-
_moves
-
_blockingOrder
-
_alternateTrackId
-
_comment
-
_typeList
-
_printCommentManifest
-
_printCommentSwitchList
-
_commentPickup
-
_commentSetout
-
_commentBoth
-
_roadOption
-
_roadList
-
_loadOption
-
_loadList
-
_shipLoadOption
-
_shipLoadList
-
_destinationOption
-
_destinationIdList
-
_scheduleName
-
_scheduleId
-
_scheduleItemId
-
_scheduleCount
-
_reservedEnRoute
-
_reservationFactor
-
_mode
-
_holdCustomLoads
-
_dropOption
-
_pickupOption
-
ANY
- See Also:
-
TRAINS
- See Also:
-
ROUTES
- See Also:
-
EXCLUDE_TRAINS
- See Also:
-
EXCLUDE_ROUTES
- See Also:
-
_dropList
-
_pickupList
-
_loadOptions
-
_blockOptions
-
_order
-
NORMAL
-
FIFO
-
LIFO
-
_trackPriority
-
PRIORITY_HIGH
-
PRIORITY_MEDIUM
-
PRIORITY_NORMAL
-
PRIORITY_LOW
-
STAGING
- See Also:
-
INTERCHANGE
- See Also:
-
YARD
- See Also:
-
SPUR
- See Also:
-
EAST
- See Also:
-
WEST
- See Also:
-
NORTH
- See Also:
-
SOUTH
- See Also:
-
ALL_ROADS
-
INCLUDE_ROADS
-
EXCLUDE_ROADS
-
ALL_LOADS
-
INCLUDE_LOADS
-
EXCLUDE_LOADS
-
ALL_DESTINATIONS
-
INCLUDE_DESTINATIONS
-
EXCLUDE_DESTINATIONS
-
_onlyCarsWithFD
-
SEQUENTIAL
- See Also:
-
MATCH
- See Also:
-
PICKUP_OKAY
- See Also:
-
_pool
-
_minimumLength
-
_maximumLength
-
OKAY
-
LENGTH
-
TYPE
-
ROAD
-
LOAD
-
CAPACITY
-
SCHEDULE
-
CUSTOM
-
DESTINATION
-
NO_FINAL_DESTINATION
-
TYPES_CHANGED_PROPERTY
- See Also:
-
ROADS_CHANGED_PROPERTY
- See Also:
-
NAME_CHANGED_PROPERTY
- See Also:
-
LENGTH_CHANGED_PROPERTY
- See Also:
-
MIN_LENGTH_CHANGED_PROPERTY
- See Also:
-
MAX_LENGTH_CHANGED_PROPERTY
- See Also:
-
SCHEDULE_CHANGED_PROPERTY
- See Also:
-
DISPOSE_CHANGED_PROPERTY
- See Also:
-
TRAIN_DIRECTION_CHANGED_PROPERTY
- See Also:
-
DROP_CHANGED_PROPERTY
- See Also:
-
PICKUP_CHANGED_PROPERTY
- See Also:
-
TRACK_TYPE_CHANGED_PROPERTY
- See Also:
-
LOADS_CHANGED_PROPERTY
- See Also:
-
POOL_CHANGED_PROPERTY
- See Also:
-
PLANNED_PICKUPS_CHANGED_PROPERTY
- See Also:
-
LOAD_OPTIONS_CHANGED_PROPERTY
- See Also:
-
DESTINATIONS_CHANGED_PROPERTY
- See Also:
-
DESTINATION_OPTIONS_CHANGED_PROPERTY
- See Also:
-
SCHEDULE_MODE_CHANGED_PROPERTY
- See Also:
-
SCHEDULE_ID_CHANGED_PROPERTY
- See Also:
-
SERVICE_ORDER_CHANGED_PROPERTY
- See Also:
-
ALTERNATE_TRACK_CHANGED_PROPERTY
- See Also:
-
TRACK_BLOCKING_ORDER_CHANGED_PROPERTY
- See Also:
-
TRACK_REPORTER_CHANGED_PROPERTY
- See Also:
-
ROUTED_CHANGED_PROPERTY
- See Also:
-
HOLD_CARS_CHANGED_PROPERTY
- See Also:
-
TRACK_COMMENT_CHANGED_PROPERTY
- See Also:
-
TRACK_FACTOR_CHANGED_PROPERTY
- See Also:
-
PRIORITY_CHANGED_PROPERTY
- See Also:
-
_reader
-
TRAIN_SCHEDULE
- See Also:
-
ALL
- See Also:
-
-
Constructor Details
-
Track
-
Track
Construct this Entry from XML. This member has to remain synchronized with the detailed DTD in operations-location.dtd.- Parameters:
e- Consist XML elementlocation- The Location loading this track.
-
-
Method Details
-
copyTrack
Creates a copy of this track.- Parameters:
newName- The name of the new track.newLocation- The location of the new track.- Returns:
- Track
-
toString
-
getId
-
getLocation
-
setName
-
getName
-
getSplitName
-
getDivision
-
getDivisionName
-
isSpur
-
isYard
-
isInterchange
-
isStaging
-
hasMessages
-
getTrackType
Gets the track type- Returns:
- Track.SPUR Track.YARD Track.INTERCHANGE or Track.STAGING
-
setTrackType
Sets the track type, spur, interchange, yard, staging- Parameters:
type- Track.SPUR Track.YARD Track.INTERCHANGE Track.STAGING
-
getTrackTypeName
-
getTrackTypeName
-
setLength
-
getLength
-
setPoolMinimumLength
Sets the minimum length of this track when the track is in a pool.- Parameters:
length- minimum
-
getPoolMinimumLength
-
setPoolMaximumLength
Sets the maximum length of this track when the track is in a pool.- Parameters:
length- maximum
-
getPoolMaximumLength
-
setReserved
The amount of track space that is reserved for car drops or pick ups. Can be positive or negative.- Parameters:
reserved- the calculated track space
-
getReserved
-
addReservedInRoute
-
deleteReservedInRoute
-
getReservedInRoute
Used to determine how much track space is going to be consumed by cars in route to this track. See isSpaceAvailable().- Returns:
- The length of all cars en route to this track including couplers.
-
getNumberOfCarsInRoute
-
setReservationFactor
Set the reservation factor. Default 100 (100%). Used by the program when generating car loads from staging. A factor of 100% allows the program to fill a track with car loads. Numbers over 100% can overload a track.- Parameters:
factor- A number from 0 to 10000.
-
getReservationFactor
-
setScheduleMode
Sets the mode of operation for the schedule assigned to this track.- Parameters:
mode- Track.SEQUENTIAL or Track.MATCH
-
getScheduleMode
Gets the mode of operation for the schedule assigned to this track.- Returns:
- Mode of operation: Track.SEQUENTIAL or Track.MATCH
-
getScheduleModeName
-
setAlternateTrack
-
getAlternateTrack
Returns the alternate track for a spur- Returns:
- alternate track
-
setHoldCarsWithCustomLoadsEnabled
-
isHoldCarsWithCustomLoadsEnabled
If enabled (true), hold cars with custom loads rather than allowing them to go to staging if the spur and the alternate track were full. If disabled, cars with custom loads can be forwarded to staging when this spur and all others with this option are also false.- Returns:
- True if enabled
-
isSpaceAvailable
Used to determine if there's space available at this track for the car. Considers cars en-route to this track. Used to prevent overloading the track.- Parameters:
car- The car to be set out.- Returns:
- true if space available.
-
setUsedLength
-
getUsedLength
-
setIgnoreUsedLengthPercentage
The amount of consumed track space to be ignored when sending new rolling stock to the track. See Planned Pickups in help.- Parameters:
percentage- a number between 0 and 100
-
getIgnoreUsedLengthPercentage
-
getNumberRS
- Returns:
- The number of rolling stock (cars and engines) on this track
-
getNumberCars
- Returns:
- The number of cars on this track
-
getNumberEngines
- Returns:
- The number of engines on this track
-
addRS
Adds rolling stock to a specific track.- Parameters:
rs- The rolling stock to place on the track.
-
deleteRS
-
addPickupRS
Increments the number of cars and or engines that will be picked up by a train from this track.- Parameters:
rs- The rolling stock.
-
deletePickupRS
-
getPickupRS
- Returns:
- the number of rolling stock (cars and or locos) that are scheduled for pick up from this track.
-
getReservedLengthPickups
-
addDropRS
-
deleteDropRS
-
getDropRS
-
getReservedLengthSetouts
-
setComment
-
getComment
-
setCommentPickup
-
getCommentPickup
-
getCommentPickupWithColor
-
setCommentSetout
-
getCommentSetout
-
getCommentSetoutWithColor
-
setCommentBoth
-
getCommentBoth
-
getCommentBothWithColor
-
isPrintManifestCommentEnabled
-
setPrintManifestCommentEnabled
-
isPrintSwitchListCommentEnabled
-
setPrintSwitchListCommentEnabled
-
getTypeNames
Returns all of the rolling stock type names serviced by this track.- Returns:
- rolling stock type names
-
addTypeName
-
deleteTypeName
-
isTypeNameAccepted
-
setTrainDirections
Sets the train directions that can service this track- Parameters:
direction- EAST, WEST, NORTH, SOUTH
-
getTrainDirections
-
getRoadOption
-
getRoadOptionString
-
setRoadOption
Set the road option for this track.- Parameters:
option- ALLROADS, INCLUDEROADS, or EXCLUDEROADS
-
getRoadNames
-
addRoadName
-
deleteRoadName
-
isRoadNameAccepted
-
containsRoadName
-
getLoadOption
Gets the car receive load option for this track.- Returns:
- ALL_LOADS INCLUDE_LOADS EXCLUDE_LOADS
-
getLoadOptionString
-
setLoadOption
Set how this track deals with receiving car loads- Parameters:
option- ALL_LOADS INCLUDE_LOADS EXCLUDE_LOADS
-
getLoadNames
Provides a list of receive loads that the track will either service or exclude. See setLoadOption- Returns:
- Array of load names as Strings
-
addLoadName
Add a receive load that the track will either service or exclude. See setLoadOption- Parameters:
load- The string load name.
-
deleteLoadName
Delete a receive load name that the track will either service or exclude. See setLoadOption- Parameters:
load- The string load name.
-
isLoadNameAccepted
Determine if track will service a specific receive load name.- Parameters:
load- the load name to check.- Returns:
- true if track will service this load.
-
isLoadNameAndCarTypeAccepted
Determine if track will service a specific receive load and car type.- Parameters:
load- the load name to check.type- the type of car used to carry the load.- Returns:
- true if track will service this load.
-
getShipLoadOption
Gets the car ship load option for this track.- Returns:
- ALL_LOADS INCLUDE_LOADS EXCLUDE_LOADS
-
getShipLoadOptionString
-
setShipLoadOption
Set how this track deals with shipping car loads- Parameters:
option- ALL_LOADS INCLUDE_LOADS EXCLUDE_LOADS
-
getShipLoadNames
Provides a list of ship loads that the track will either service or exclude. See setShipLoadOption- Returns:
- Array of load names as Strings
-
addShipLoadName
Add a ship load that the track will either service or exclude. See setShipLoadOption- Parameters:
load- The string load name.
-
deleteShipLoadName
Delete a ship load name that the track will either service or exclude. See setLoadOption- Parameters:
load- The string load name.
-
isLoadNameShipped
Determine if track will service a specific ship load name.- Parameters:
load- the load name to check.- Returns:
- true if track will service this load.
-
isLoadNameAndCarTypeShipped
Determine if track will service a specific ship load and car type.- Parameters:
load- the load name to check.type- the type of car used to carry the load.- Returns:
- true if track will service this load.
-
getDropOption
Gets the drop option for this track. ANY means that all trains and routes can drop cars to this track. The other four options are used to restrict the track to certain trains or routes.- Returns:
- ANY, TRAINS, ROUTES, EXCLUDE_TRAINS, or EXCLUDE_ROUTES
-
setDropOption
Set the car drop option for this track.- Parameters:
option- ANY, TRAINS, ROUTES, EXCLUDE_TRAINS, or EXCLUDE_ROUTES
-
getPickupOption
Gets the pickup option for this track. ANY means that all trains and routes can pull cars from this track. The other four options are used to restrict the track to certain trains or routes.- Returns:
- ANY, TRAINS, ROUTES, EXCLUDE_TRAINS, or EXCLUDE_ROUTES
-
setPickupOption
Set the car pick up option for this track.- Parameters:
option- ANY, TRAINS, ROUTES, EXCLUDE_TRAINS, or EXCLUDE_ROUTES
-
getDropIds
-
addDropId
-
deleteDropId
-
isDropTrainAccepted
Determine if train can set out cars to this track. Based on the train's id or train's route id. See setDropOption(option).- Parameters:
train- The Train to test.- Returns:
- true if the train can set out cars to this track.
-
isDropRouteAccepted
-
containsDropId
-
getPickupIds
-
addPickupId
Add train or route id to this track.- Parameters:
id- The string id for the train or route.
-
deletePickupId
-
isPickupTrainAccepted
Determine if train can pick up cars from this track. Based on the train's id or train's route id. See setPickupOption(option).- Parameters:
train- The Train to test.- Returns:
- true if the train can pick up cars from this track.
-
isPickupRouteAccepted
-
containsPickupId
-
checkPickups
Checks to see if all car types can be pulled from this track- Returns:
- PICKUP_OKAY if any train can pull all car types from this track
-
getTrackPriority
A track has four priorities: PRIORITY_HIGH, PRIORITY_MEDIUM, PRIORITY_NORMAL, and PRIORITY_LOW. Cars are serviced from a location based on the track priority. Default is normal.- Returns:
- track priority
-
setTrackPriority
-
isRollingStockAccepted
Used to determine if track can service the rolling stock.- Parameters:
rs- the car or loco to be tested- Returns:
- Error string starting with TYPE, ROAD, CAPACITY, LENGTH, DESTINATION or LOAD if there's an issue. OKAY if track can service Rolling Stock.
-
getAvailableTrackSpace
Available track space. Adjusted when a track is using the planned pickups feature- Returns:
- available track space
-
getMoves
-
setMoves
-
bumpMoves
-
getBlockingOrder
Gets the blocking order for this track. Default is zero, in that case, tracks are sorted by name.- Returns:
- the blocking order
-
setBlockingOrder
-
getServiceOrder
Get the service order for this track. Yards and interchange have this feature for cars. Staging has this feature for trains.- Returns:
- Service order: Track.NORMAL, Track.FIFO, Track.LIFO
-
setServiceOrder
Set the service order for this track. Only yards and interchange have this feature.- Parameters:
order- Track.NORMAL, Track.FIFO, Track.LIFO
-
getScheduleName
Returns the name of the schedule. Note that this returns the schedule name based on the schedule's id. A schedule's name can be modified by the user.- Returns:
- Schedule name
-
getSchedule
-
setSchedule
-
getScheduleId
-
setScheduleId
-
getScheduleItemId
Recommend getCurrentScheduleItem() to get the current schedule item for this track. Protects against user deleting a schedule item from the schedule.- Returns:
- schedule item id
-
setScheduleItemId
-
getCurrentScheduleItem
Get's the current schedule item for this track Protects against user deleting an item in a shared schedule. Recommend using this versus getScheduleItemId() as the id can be obsolete.- Returns:
- The current ScheduleItem.
-
bumpSchedule
Increments the schedule count if there's a schedule and the schedule is running in sequential mode. Resets the schedule count if the maximum is reached and then goes to the next item in the schedule's list. -
getNextScheduleItem
-
getScheduleCount
Returns how many times the current schedule item has been accessed.- Returns:
- count
-
setScheduleCount
-
checkScheduleValid
Check to see if schedule is valid for the track at this location.- Returns:
- SCHEDULE_OKAY if schedule okay, otherwise an error message.
-
checkSchedule
Checks to see if car can be placed on this spur using this schedule. Returns OKAY if the schedule can service the car.- Parameters:
car- The Car to be tested.- Returns:
- Track.OKAY track.CUSTOM track.SCHEDULE
-
scheduleNext
Check to see if track has schedule and if it does will schedule the next item in the list. Loads the car with the schedule id.- Parameters:
car- The Car to be modified.- Returns:
- Track.OKAY or Track.SCHEDULE
-
checkScheduleAttribute
-
setLoadSwapEnabled
Enable changing the car generic load state when car arrives at this track.- Parameters:
enable- when true, swap generic car load state
-
isLoadSwapEnabled
-
setLoadEmptyEnabled
Enable setting the car generic load state to empty when car arrives at this track.- Parameters:
enable- when true, set generic car load to empty
-
isLoadEmptyEnabled
-
setRemoveCustomLoadsEnabled
When enabled, remove Scheduled car loads.- Parameters:
enable- when true, remove Scheduled loads from cars
-
isRemoveCustomLoadsEnabled
-
setAddCustomLoadsEnabled
When enabled, add custom car loads if there's a demand.- Parameters:
enable- when true, add custom loads to cars
-
isAddCustomLoadsEnabled
-
setAddCustomLoadsAnySpurEnabled
When enabled, add custom car loads if there's a demand by any spur/industry.- Parameters:
enable- when true, add custom loads to cars
-
isAddCustomLoadsAnySpurEnabled
-
setAddCustomLoadsAnyStagingTrackEnabled
When enabled, add custom car loads to cars in staging for new destinations that are staging.- Parameters:
enable- when true, add custom load to car
-
isAddCustomLoadsAnyStagingTrackEnabled
-
isModifyLoadsEnabled
-
setDisableLoadChangeEnabled
-
isDisableLoadChangeEnabled
-
setQuickServiceEnabled
-
isQuickServiceEnabled
-
setBlockCarsEnabled
-
isBlockCarsEnabled
When enabled block cars from staging.- Returns:
- true if blocking is enabled.
-
setPool
-
getPool
-
getPoolName
-
getDestinationListSize
-
addDestination
adds a location to the list of acceptable destinations for this track.- Parameters:
destination- location that is acceptable
-
deleteDestination
-
isDestinationAccepted
Returns true if destination is valid from this track.- Parameters:
destination- The Location to be checked.- Returns:
- true if track services the destination
-
setDestinationIds
-
getDestinationIds
-
setDestinationOption
Sets the destination option for this track. The three options are:ALL_DESTINATIONS which means this track services all destinations, the default.
INCLUDE_DESTINATIONS which means this track services only certain destinations.
EXCLUDE_DESTINATIONS which means this track does not service certain destinations.
- Parameters:
option- Track.ALL_DESTINATIONS, Track.INCLUDE_DESTINATIONS, or Track.EXCLUDE_DESTINATIONS
-
getDestinationOption
Get destination option for interchange or staging track- Returns:
- option
-
setOnlyCarsWithFinalDestinationEnabled
-
isOnlyCarsWithFinalDestinationEnabled
When true the track will only accept cars that have a final destination that can be serviced by the track. See acceptsDestination(Location).- Returns:
- false if any car spotted, true if only cars with a FD.
-
isAlternate
Used to determine if track has been assigned as an alternate- Returns:
- true if track is an alternate
-
dispose
-
store
Create an XML element to represent this Entry. This member has to remain synchronized with the detailed DTD in operations-location.dtd.- Returns:
- Contents in a JDOM Element
-
setDirtyAndFirePropertyChange
-
setReporter
-
getReporter
-
getReporterName
-