public void instrumentModel(IModel model,
IComputationTaskConfiguration simConfig) {
ICoupledModel m = (ICoupledModel) model;
AbstractState mapState = ((IAtomicModel<?>) m.getModel("Map")).getState();
mapState.setMediator(new Mediator());
// System.out.println("Instrumenting the model");
IObserver<? extends IObservable> obs = null;
obs = new FFStateModelObs(model);
if (obs == null) {
return;
}
mapState.registerObserver(obs);
observers = new ArrayList<>();
// observers.clear();
observers.add(obs);
}