jmri.jmrit.dispatcher
Class AllocationPlan

java.lang.Object
  extended by jmri.jmrit.dispatcher.AllocationPlan

public class AllocationPlan
extends Object

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.

Author:
Dave Duchamp Copyright (C) 2011

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

NONE

protected static final int NONE
Constants representing the type of AllocationPlan

See Also:
Constant Field Values

XING_MEET

protected static final int XING_MEET
See Also:
Constant Field Values

PASSING_MEET

protected static final int PASSING_MEET
See Also:
Constant Field Values

CONTINUING

protected static final int CONTINUING
See Also:
Constant Field Values
Constructor Detail

AllocationPlan

public AllocationPlan(AutoAllocate aa,
                      int planNum)
Method Detail

getPlanNum

protected int getPlanNum()
Access methods


getPlanType

protected int getPlanType()

setPlanType

protected void setPlanType(int type)

getActiveTrain

protected ActiveTrain getActiveTrain(int i)

setActiveTrain

protected void setActiveTrain(ActiveTrain at,
                              int i)

getTargetSection

protected Section getTargetSection(int i)

setTargetSection

protected void setTargetSection(Section s,
                                int seq,
                                int i)

getTargetSectionSequenceNum

protected int getTargetSectionSequenceNum(int i)

isComplete

protected boolean isComplete()
Other Methods


dispose

public void dispose()


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: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads