Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uchicago.src.sim.engine
Class AsynchSchedule

    java.lang.Object
      uchicago.src.sim.engine.BasicAction
          uchicago.src.sim.engine.ScheduleBase
              uchicago.src.sim.engine.Schedule
                  uchicago.src.sim.engine.AsynchSchedule

All Implemented Interfaces:
  java.io.Serializable, TickCounter

    public class AsynchSchedule

extends Schedule
implements java.io.Serializable

A subclass of schedule useful for asynchronous scheduling.

Since:
  3.0
Version:
  $Revision: 1.6 $ $Date: 2005/08/12 16:13:29 $
Author:
  Michael North
See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class uchicago.src.sim.engine.ScheduleBase
`ScheduleBase.Order`

Field Summary

Fields inherited from class uchicago.src.sim.engine.ScheduleBase
`actionQueue, CONCURRENT, groupToExecute, indexCount, LAST, lastGroup, lastQueue, preExecuted, randGroup, RANDOM, repeatInterval, ticks, topGroup`

Fields inherited from class uchicago.src.sim.engine.BasicAction
`INTERVAL_UPDATER, ONE_TIME_UPDATER, updater`

Constructor Summary
`AsynchSchedule()`
`AsynchSchedule(double executionInterval)` Constructs a schedule that executes at the specified interval.

Method Summary
`double` | `getDelta()`
`double` | `getStartTime()`
`double` | `getTotalTime()`
`boolean` | `isNotingCaller()`
`BasicAction` | `schedule(double time, IAsynchAgent agent, java.lang.String methodName, java.lang.Object param0, java.lang.Object param1, java.lang.Object param2)` Schedules a method to be called on an agent.
`BasicAction` | `scheduleAfterWaiting(IAsynchAgent agent, java.lang.String methodName)` Schedules a method to be called on an agent after a certain waiting period.
`BasicAction` | `scheduleAfterWaiting(IAsynchAgent agent, java.lang.String methodName, java.lang.Object param0)` Schedules a method to be called on an agent after a certain waiting period.
`BasicAction` | `scheduleAfterWaiting(IAsynchAgent agent, java.lang.String methodName, java.lang.Object param0, java.lang.Object param1)` Schedules a method to be called on an agent after a certain waiting period.
`BasicAction` | `scheduleAfterWaiting(IAsynchAgent agent, java.lang.String methodName, java.lang.Object param0, java.lang.Object param1, java.lang.Object param2)` Schedules a method to be called on an agent after a certain waiting period.
`BasicAction` | `scheduleAt(double time, IAsynchAgent agent, java.lang.String methodName)` Schedules a method to be called on an agent at a certain time.
`BasicAction` | `scheduleAt(double time, IAsynchAgent agent, java.lang.String methodName, java.lang.Object param0)` Schedules a method to be called on an agent at a certain time.
`BasicAction` | `scheduleAt(double time, IAsynchAgent agent, java.lang.String methodName, java.lang.Object param0, java.lang.Object param1)` Schedules a method to be called on an agent at a certain time.
`BasicAction` | `scheduleAt(double time, IAsynchAgent agent, java.lang.String methodName, java.lang.Object param0, java.lang.Object param1, java.lang.Object param2)` Schedules a method to be called on an agent at a certain time.
`BasicAction` | `scheduleNow(IAsynchAgent o, java.lang.String methodName)` Schedules a method to be called now.
`BasicAction` | `scheduleNow(IAsynchAgent o, java.lang.String methodName, java.lang.Object param0)` Schedules a method to be called now.
`BasicAction` | `scheduleNow(IAsynchAgent o, java.lang.String methodName, java.lang.Object param0, java.lang.Object param1)` Schedules a method to be called now.
`BasicAction` | `scheduleNow(IAsynchAgent o, java.lang.String methodName, java.lang.Object param0, java.lang.Object param1, java.lang.Object param2)` Schedules a method to be called now.
`BasicAction` | `scheduleWhenAvailable(IAsynchAgent o, java.lang.String methodName)` Schedules a method to be called when the agent is next available.
`BasicAction` | `scheduleWhenAvailable(IAsynchAgent agent, java.lang.String methodName, java.lang.Object param0)` Schedules a method to be called when the agent is next available.
`BasicAction` | `scheduleWhenAvailable(IAsynchAgent agent, java.lang.String methodName, java.lang.Object param0, java.lang.Object param1)` Schedules a method to be called when the agent is next available.
`BasicAction` | `scheduleWhenAvailable(IAsynchAgent agent, java.lang.String methodName, java.lang.Object param0, java.lang.Object param1, java.lang.Object param2)` Schedules a method to be called when the agent is next available.
`void` | `setDelta(double d)`
`void` | `setNotingCaller(boolean b)`
`void` | `setStartTime(double d)`

Methods inherited from class uchicago.src.sim.engine.Schedule
`execute, executeEndActions, executePauseActions, getEndActions, getPauseActions, removeEndAction, removePauseAction, scheduleActionAtEnd, scheduleActionAtEnd, scheduleActionAtEnd, scheduleActionAtEnd, scheduleActionAtEndRnd, scheduleActionAtEndRnd, scheduleActionAtPause, scheduleActionAtPause, scheduleActionAtPause, scheduleActionAtPause, scheduleActionAtPauseRnd, scheduleActionAtPauseRnd`

Methods inherited from class uchicago.src.sim.engine.ScheduleBase
`getCurrentTime, getCurrentTimeDouble, preExecute, removeAction, removeActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtIntervalRnd, scheduleActionAtIntervalRnd, scheduleActionAtIntervalRnd, scheduleActionAtIntervalRnd, scheduleActionAtIntervalRnd, scheduleActionAtIntervalRnd, scheduleActionAtIntervalRnd, scheduleActionAtIntervalRnd, scheduleActionAtRnd, scheduleActionAtRnd, scheduleActionAtRnd, scheduleActionAtRnd, scheduleActionAtRnd, scheduleActionAtRnd, scheduleActionAtRnd, scheduleActionAtRnd, scheduleActionBeginning, scheduleActionBeginning, scheduleActionBeginning, scheduleActionBeginning, scheduleActionBeginning, scheduleActionBeginning, scheduleActionBeginning, scheduleActionBeginning, scheduleActionBeginningRnd, scheduleActionBeginningRnd, scheduleActionBeginningRnd, scheduleActionBeginningRnd`

Methods inherited from class uchicago.src.sim.engine.BasicAction
`addToGroup, getIntervalTime, getName, getNextTime, reSchedule, setIntervalTime, setName, setNextTime`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AsynchSchedule

    public AsynchSchedule()

### AsynchSchedule

    public AsynchSchedule(double executionInterval)

  Constructs a schedule that executes at the specified interval. (i.e a schedule with an interval of 2 executes all its BasicActions every other clock tick. The master Schedule built in a model and used to execute all the actions in the simulation will typicaly have an interval of 1. Any sub schedules added to this "master" schedule might have other intervals.

  Parameters:
    `executionInterval` - the execution interval.

Method Detail

### scheduleNow

    public BasicAction scheduleNow(IAsynchAgent o,
                                   java.lang.String methodName)

  Schedules a method to be called now. This method must have no parameters.

  Parameters:
    `o` - the object to call the method on
    `methodName` - the method to call on the object
  Returns:
    the BasicAction that was scheduled

### scheduleNow

    public BasicAction scheduleNow(IAsynchAgent o,
                                   java.lang.String methodName,
                                   java.lang.Object param0)

  Schedules a method to be called now. This method must have 1 parameter. methodName(param0)

  Parameters:
    `o` - the object to call the method on
    `methodName` - the method to call on the object
    `param0` - a parameter passed to the method.
  Returns:
    the BasicAction that was scheduled

### scheduleNow

    public BasicAction scheduleNow(IAsynchAgent o,
                                   java.lang.String methodName,
                                   java.lang.Object param0,
                                   java.lang.Object param1)

  Schedules a method to be called now. This method must have 2 parameters. methodName(param0, param1)

  Parameters:
    `o` - the object to call the method on
    `methodName` - the method to call on the object
    `param0` - a parameter passed to the method.
    `param1` - a parameter passed to the method.
  Returns:
    the BasicAction that was scheduled

### scheduleNow

    public BasicAction scheduleNow(IAsynchAgent o,
                                   java.lang.String methodName,
                                   java.lang.Object param0,
                                   java.lang.Object param1,
                                   java.lang.Object param2)

  Schedules a method to be called now. This method must have 3 parameters. methodName(param0, param1, param2)

  Parameters:
    `o` - the object to call the method on
    `methodName` - the method to call on the object
    `param0` - a parameter passed to the method.
    `param1` - a parameter passed to the method.
    `param2` - a parameter passed to the method.
  Returns:
    the BasicAction that was scheduled

### scheduleWhenAvailable

    public BasicAction scheduleWhenAvailable(IAsynchAgent o,
                                             java.lang.String methodName)

  Schedules a method to be called when the agent is next available. This method must have 0 parameters. methodName()

  Parameters:
    `o` - the object to call the method on
    `methodName` - the method to call on the object
  Returns:
    the BasicAction that was scheduled

### scheduleWhenAvailable

    public BasicAction scheduleWhenAvailable(IAsynchAgent agent,
                                             java.lang.String methodName,
                                             java.lang.Object param0)

  Schedules a method to be called when the agent is next available. This method must have 1 parameter. methodName(param0)

  Parameters:
    `o` - the agent to call the method on
    `methodName` - the method to call on the object
    `param0` - a parameter passed to the method.
  Returns:
    the BasicAction that was scheduled

### scheduleWhenAvailable

    public BasicAction scheduleWhenAvailable(IAsynchAgent agent,
                                             java.lang.String methodName,
                                             java.lang.Object param0,
                                             java.lang.Object param1)

  Schedules a method to be called when the agent is next available. This method must have 2 parameters. methodName(param0, param1)

  Parameters:
    `o` - the agent to call the method on
    `methodName` - the method to call on the object
    `param0` - a parameter passed to the method.
    `param1` - a parameter passed to the method.
  Returns:
    the BasicAction that was scheduled

### scheduleWhenAvailable

    public BasicAction scheduleWhenAvailable(IAsynchAgent agent,
                                             java.lang.String methodName,
                                             java.lang.Object param0,
                                             java.lang.Object param1,
                                             java.lang.Object param2)

  Schedules a method to be called when the agent is next available. This method must have 3 parameters. methodName(param0, param1, param2)

  Parameters:
    `o` - the agent to call the method on
    `methodName` - the method to call on the object
    `param0` - a parameter passed to the method.
    `param1` - a parameter passed to the method.
    `param2` - a parameter passed to the method.
  Returns:
    the BasicAction that was scheduled

### scheduleAt

    public BasicAction scheduleAt(double time,
                                  IAsynchAgent agent,
                                  java.lang.String methodName)

  Schedules a method to be called on an agent at a certain time. This method must have no parameters. methodName()

  Parameters:
    `o` - the agent to call the method on
    `methodName` - the method to call on the object
  Returns:
    the BasicAction that was scheduled

### scheduleAt

    public BasicAction scheduleAt(double time,
                                  IAsynchAgent agent,
                                  java.lang.String methodName,
                                  java.lang.Object param0)

  Schedules a method to be called on an agent at a certain time. This method must have 1 parameters. methodName(param0)

  Parameters:
    `o` - the agent to call the method on
    `methodName` - the method to call on the object
    `param0` - a parameter passed to the method.
  Returns:
    the BasicAction that was scheduled

### scheduleAt

    public BasicAction scheduleAt(double time,
                                  IAsynchAgent agent,
                                  java.lang.String methodName,
                                  java.lang.Object param0,
                                  java.lang.Object param1)

  Schedules a method to be called on an agent at a certain time. This method must have 2 parameters. methodName(param0, param1)

  Parameters:
    `o` - the agent to call the method on
    `methodName` - the method to call on the object
    `param0` - a parameter passed to the method.
    `param1` - a parameter passed to the method.
  Returns:
    the BasicAction that was scheduled

### scheduleAt

    public BasicAction scheduleAt(double time,
                                  IAsynchAgent agent,
                                  java.lang.String methodName,
                                  java.lang.Object param0,
                                  java.lang.Object param1,
                                  java.lang.Object param2)

  Schedules a method to be called on an agent at a certain time. This method must have 3 parameters. methodName(param0, param1, param2)

  Parameters:
    `o` - the agent to call the method on
    `methodName` - the method to call on the object
    `param0` - a parameter passed to the method.
    `param1` - a parameter passed to the method.
    `param2` - a parameter passed to the method.
  Returns:
    the BasicAction that was scheduled

### scheduleAfterWaiting

    public BasicAction scheduleAfterWaiting(IAsynchAgent agent,
                                            java.lang.String methodName)

  Schedules a method to be called on an agent after a certain waiting period. This method must have no parameters. methodName(param0)

  Parameters:
    `o` - the agent to call the method on
    `methodName` - the method to call on the object
  Returns:
    the BasicAction that was scheduled

### scheduleAfterWaiting

    public BasicAction scheduleAfterWaiting(IAsynchAgent agent,
                                            java.lang.String methodName,
                                            java.lang.Object param0)

  Schedules a method to be called on an agent after a certain waiting period. This method must have 1 parameter. methodName(param0, param1, param2)

  Parameters:
    `o` - the agent to call the method on
    `methodName` - the method to call on the object
    `param0` - a parameter passed to the method.
  Returns:
    the BasicAction that was scheduled

### scheduleAfterWaiting

    public BasicAction scheduleAfterWaiting(IAsynchAgent agent,
                                            java.lang.String methodName,
                                            java.lang.Object param0,
                                            java.lang.Object param1)

  Schedules a method to be called on an agent after a certain waiting period. This method must have 2 parameters. methodName(param0, param1)

  Parameters:
    `o` - the agent to call the method on
    `methodName` - the method to call on the object
    `param0` - a parameter passed to the method.
    `param1` - a parameter passed to the method.
  Returns:
    the BasicAction that was scheduled

### scheduleAfterWaiting

    public BasicAction scheduleAfterWaiting(IAsynchAgent agent,
                                            java.lang.String methodName,
                                            java.lang.Object param0,
                                            java.lang.Object param1,
                                            java.lang.Object param2)

  Schedules a method to be called on an agent after a certain waiting period. This method must have 3 parameters. methodName(param0, param1, param2)

  Parameters:
    `o` - the agent to call the method on
    `methodName` - the method to call on the object
    `param0` - a parameter passed to the method.
    `param1` - a parameter passed to the method.
    `param2` - a parameter passed to the method.
  Returns:
    the BasicAction that was scheduled

### schedule

    public BasicAction schedule(double time,
                                IAsynchAgent agent,
                                java.lang.String methodName,
                                java.lang.Object param0,
                                java.lang.Object param1,
                                java.lang.Object param2)

  Schedules a method to be called on an agent. If the method takes parameters, then the cooresponding param0, param1, param2 must be set, otherwise they must be null.
  Note: this determines how many parameters the method has by how many of param{0, 1, 2} are null, therefore if you inadvertently pass a null parameter to this method it may not be able to find the method you are attempting to call.

  Parameters:
    `o` - the agent to call the method on
    `methodName` - the method to call on the object
    `param0` - a parameter passed to the method.
    `param1` - a parameter passed to the method.
    `param2` - a parameter passed to the method.
  Returns:
    the BasicAction that was scheduled

### getDelta

    public double getDelta()

  Returns:
    The step size for "now".

### setDelta

    public void setDelta(double d)

  Parameters:
    `d` - The step size for "now".

### getTotalTime

    public double getTotalTime()

  Returns:
    currentTime - startTime

### getStartTime

    public double getStartTime()

### setStartTime

    public void setStartTime(double d)

### isNotingCaller

    public boolean isNotingCaller()

### setNotingCaller

    public void setNotingCaller(boolean b)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD