*/
@Override
public void getOutputs() {
// call getOutputs imminent child
ICoupledModel cm = getModel();
// System.out.println(getTime()+" -- "+subProcessors.size()+" --- "+
// events.size());
// while (events.size() > 0)
// System.out.println(events.getMin()+" "+ events.dequeue());
Collection<IBasicDEVSModel> imminentsSel = events.dequeueAll();
// execute the select method
IBasicDEVSModel imminent = cm.select(new HashSet<>(imminentsSel));
imminents.put(imminent, null);
// now lets place all not imminent models back into the queue
for (IBasicDEVSModel m: imminentsSel) {
if (m != imminent) {
events.enqueue(m, getTime());
}
}
// the models which get influenced by one the imminent one
HashMap<IBasicAtomicModel<? extends AbstractState>, Object> influencees =
new HashMap<>();
HashMap<IBasicCoupledModel, Object> influencedCM =
new HashMap<>();
// System.out.println(((DEVSProcessorState) getState()).getTonie()+":
// propagate the messages ...
// Calling getOutputs for the model "+model);
subProcessors.get(imminent).getOutputs();
copyHandler.copyValues(cm.getICIterator(imminent), cm, influencees,
influencedCM);
copyHandler.copyValues(cm.getEOCIterator(imminent), cm, influencees,
influencedCM);
imminent.clearOutPorts();
imminents.putAll(influencees);
imminents.putAll(influencedCM);