|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.dispatcher.AllocationPlan
public class AllocationPlan
Handle planning information for AutoAllocate
An Allocation Plan involves a planned meet of two ActiveTrains in a specified area of the layout.
AllocationPlan objects are transient (not saved between runs).
AllocationPlan objects are created and disposed by AutoAllocate as needed. AutoAllocate serves as the manager of AllocationPlan objects.
An ActiveTrain may be in more than one AllocationPlan of the same type, provided its target Section in all active AllocationPlans is the same.
An AllocationPlan is "complete" when both Active Trains have been allocated their target Sections.
This file is part of JMRI.
JMRI is open source software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
| Field Summary | |
|---|---|
protected static int |
CONTINUING
|
protected static int |
NONE
Constants representing the type of AllocationPlan |
protected static int |
PASSING_MEET
|
protected static int |
XING_MEET
|
| Constructor Summary | |
|---|---|
AllocationPlan(AutoAllocate aa,
int planNum)
|
|
| Method Summary | |
|---|---|
void |
dispose()
|
protected ActiveTrain |
getActiveTrain(int i)
|
protected int |
getPlanNum()
Access methods |
protected int |
getPlanType()
|
protected Section |
getTargetSection(int i)
|
protected int |
getTargetSectionSequenceNum(int i)
|
protected boolean |
isComplete()
Other Methods |
protected void |
setActiveTrain(ActiveTrain at,
int i)
|
protected void |
setPlanType(int type)
|
protected void |
setTargetSection(Section s,
int seq,
int i)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int NONE
protected static final int XING_MEET
protected static final int PASSING_MEET
protected static final int CONTINUING
| Constructor Detail |
|---|
public AllocationPlan(AutoAllocate aa,
int planNum)
| Method Detail |
|---|
protected int getPlanNum()
protected int getPlanType()
protected void setPlanType(int type)
protected ActiveTrain getActiveTrain(int i)
protected void setActiveTrain(ActiveTrain at,
int i)
protected Section getTargetSection(int i)
protected void setTargetSection(Section s,
int seq,
int i)
protected int getTargetSectionSequenceNum(int i)
protected boolean isComplete()
public void dispose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||