Class TrainBuilderEngines
java.lang.Object
jmri.jmrit.operations.trains.trainbuilder.TrainCommon
jmri.jmrit.operations.trains.trainbuilder.TrainBuilderBase
jmri.jmrit.operations.trains.trainbuilder.TrainBuilderEngines
- Direct Known Subclasses:
TrainBuilderCars
Contains methods for engines when building a train.
-
Field Summary
Fields inherited from class jmri.jmrit.operations.trains.trainbuilder.TrainBuilderBase
_buildReport, _carIndex, _carList, _completedMoves, _departLocation, _departStageTrack, _engineList, _lastEngine, _modifiedLocations, _notRoutable, _numberCars, _numOfBlocks, _reqNumOfMoves, _routeList, _secondLeadEngine, _startTime, _terminateLocation, _terminateStageTrack, _thirdLeadEngine, _train, _warnings, carLoads, DISPLAY_CAR_LIMIT_100, DISPLAY_CAR_LIMIT_20, DISPLAY_CAR_LIMIT_50, FIVE, ONE, router, routeToTrackFound, SEVEN, THREE, TIMING, trainManager, trainScheduleManager, USE_BUNITFields inherited from class jmri.jmrit.operations.trains.trainbuilder.TrainCommon
_dropCars, _pickupCars, _printLocalMoveHeader, _printPickupHeader, _printSetoutHeader, BLANK_LINE, BUILD_REPORT_CHAR, carManager, doneCars, ENGINE, engineManager, HORIZONTAL_LINE_CHAR, HYPHEN, index, IS_MANIFEST, IS_TWO_COLUMN_TRACK, LOCAL, locationManager, NEW_LINE, PAPER_MARGINS, PICKUP, SPACE, TAB, TEXT_COLOR_DONE, TEXT_COLOR_END, TEXT_COLOR_START, utilityCarTypes, VERTICAL_LINE_CHAR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds engines to the train starting at the first location in the train's route.protected voidChecks to see if the engine or consist assigned to the train has the appropriate HP.protected voidChecks to see if additional engines are needed for the train based on the train's calculated tonnage.protected voidBuilds a list of possible engines for this train.Methods inherited from class jmri.jmrit.operations.trains.trainbuilder.TrainBuilderBase
addEnginesBasedHPT, adjustCarsInStaging, checkBasicMoves, checkDepartureStagingTrack, checkDropTrainDirection, checkDropTrainDirection, checkForAlternate, checkForEarlierDrop, checkForLaterPickUp, checkPickupInterchangeDestinationRestrictions, checkPickupInterchangeOrSpur, checkPickUpTrainDirection, checkPickUpTrainDirection, checkReserved, checkStuckCarsInStaging, checkTerminateStagingTrack, checkThroughCarsAllowed, checkTrainCanDrop, checkTrainLength, countRollingStockAt, createBuildReportFile, finishAddRsToTrain, generateLoadCarDepartingAndTerminatingIntoStaging, getCarList, getConsist, getEngines, getEngines, getLargestBlock, getLocationWithMaximumMoves, getNewEngine, getNumberEngines, getScheduleItem, getTracksAtDestination, isCarStuckStaging, makeAdjustmentsIfDepartingStaging, promptFromStagingDialog, promptToStagingDialog, removeCaboosesAndCarsWithFred, removeCarsFromStaging, removeEngineFromTrain, removeRollingStockFromTrain, restoreCarsIfDepartingStaging, saveCarFinalDestinations, setDepartureTrack, setEngineDestination, setUpRoute, showAndInitializeTrainRoute, showBuildReportInfo, showCarsByLocation, showCarServiceOrder, showCarsNotMoved, showCarsNotRoutable, showEnginesByLocation, showIfLocalSwitcher, showLoadGenerationOptionsStaging, showSpecificTrainBuildOptions, showTrainBuildOptions, showTrainCabooseRoads, showTrainCarRoads, showTrainCarTypes, showTrainLoadNames, showTrainRequirements, showTrainServices, sortCarsOnFifoLifoTracks, tryStagingMethods inherited from class jmri.jmrit.operations.trains.trainbuilder.TrainCommon
addCarsLocationUnknown, addLine, addLine, blockCarsByTrack, blockCarsByTrackNameTwoColumn, blockCarsTwoColumn, blockLocosTwoColumn, clearUtilityCarTypes, convertStringTime, convertStringToDate, countPickupUtilityCars, countSetoutUtilityCars, countUtilityCars, createTabIfNeeded, dropCar, dropCar, dropEngine, dropEngines, formatColorString, formatStringToCommaSeparated, getDate, getDate, getDropCarHeader, getDropEngineHeader, getISO8601Date, getLineLength, getLocalMoveHeader, getManifestHeaderLineLength, getPageSize, getPickupCarHeader, getPickupEngineHeader, getSwitchListTrainStatus, getTextColor, getTextColorName, getTextColorString, getTrainMessage, isNextCar, isNextCar, isThereWorkAtLocation, isThereWorkAtLocation, localMoveCar, newLine, newLine, padAndTruncate, padAndTruncateIfNeeded, padString, pickupCar, pickUpCar, pickUpCarTruncated, pickupEngine, pickupEngines, pickupUtilityCars, pickupUtilityCars, printCarHeader, printDropCarHeader, printDropEngineHeader, printEngineHeader, printHorizontalLine, printHorizontalLine, printHorizontalLine1, printHorizontalLine2, printHorizontalLine3, printLocalCarMoveHeader, printPickupCarHeader, printPickupEngineHeader, printTrackComments, printTrackNameHeader, setCarPickupAndSetoutTimes, setoutUtilityCars, setoutUtilityCars, setoutUtilityCars, splitString, splitStringLeftParenthesis, tabString, truncatedDropCar
-
Constructor Details
-
TrainBuilderEngines
public TrainBuilderEngines()
-
-
Method Details
-
getAndRemoveEnginesFromList
Builds a list of possible engines for this train. -
addEnginesToTrain
Adds engines to the train starting at the first location in the train's route. Note that engines from staging are already part of the train. There can be up to two engine swaps in a train's route.- Throws:
BuildFailedException- if required engines can't be added to train.
-
checkEngineHP
Checks to see if the engine or consist assigned to the train has the appropriate HP. If the train's HP requirements are significantly higher or lower than the engine that was assigned, the program will search for a more appropriate engine or consist, and assign that engine or consist to the train. The HP calculation is based on a minimum train speed of 36 MPH. The formula HPT x 12 / % Grade = Speed, is used to determine the horsepower required. Speed is fixed at 36 MPH. For example a 1% grade requires a minimum of 3 HPT. Disabled for trains departing staging.- Throws:
BuildFailedException- if coding error.
-
checkNumnberOfEnginesNeededHPT
Checks to see if additional engines are needed for the train based on the train's calculated tonnage. Minimum speed for the train is fixed at 36 MPH. The formula HPT x 12 / % Grade = Speed, is used to determine the horsepower needed. For example a 1% grade requires a minimum of 3 HPT. Ignored when departing staging- Throws:
BuildFailedException- if build failure
-