// this.clock = clock;
this.ksessions = new HashSet<StatefulKnowledgeSession>();
this.startTime = startTime;
this.simulation = (SimulationImpl) simulation;
this.root = new ContextImpl( ROOT,
this );
this.root.set( "simulator",
this );
this.contexts = new HashMap<String, Context>();
this.contexts.put( ROOT,
this.root );
Map<String, Path> paths = this.simulation.getPaths();
// calculate capacity
int capacity = 0;
for ( Path path : paths.values() ) {
this.contexts.put( path.getName(),
new ContextImpl( path.getName(),
this,
root ) );
capacity += path.getSteps().size();
}