public class DefaultCycleProcessor6 extends java.lang.Object implements ICycleProcessor
Constructor and Description |
---|
DefaultCycleProcessor6() |
Modifier and Type | Method and Description |
---|---|
protected double |
calculateNextWaitTime(double now,
double productionFiringTime,
BasicModel model,
boolean eventsHaveFired)
using the current state, guestimate as to the how long this cycle will run
assuming that no production actually fired
|
double |
cycle(IModel model,
boolean eventsHaveFired)
run a single cycle of the model
|
protected double |
evaluateAndFireProduction(BasicModel model,
double currentTime)
using the current contents of the buffer, derive the conflict set and
select the best production.
|
void |
executeAfter(java.lang.Runnable runner)
execute this after the current cycle finishes
|
void |
executeBefore(java.lang.Runnable runner)
execute this before the next cycle starts
|
boolean |
isExecuting()
is the cycle currently executing? True between cycle start and stop events.
|
public double cycle(IModel model, boolean eventsHaveFired)
cycle
in interface ICycleProcessor
eventsHaveFired
- TODOCallable.call()
protected double calculateNextWaitTime(double now, double productionFiringTime, BasicModel model, boolean eventsHaveFired)
protected double evaluateAndFireProduction(BasicModel model, double currentTime) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public void executeAfter(java.lang.Runnable runner)
ICycleProcessor
executeAfter
in interface ICycleProcessor
public void executeBefore(java.lang.Runnable runner)
ICycleProcessor
executeBefore
in interface ICycleProcessor
public boolean isExecuting()
ICycleProcessor
isExecuting
in interface ICycleProcessor