// Create new model reader if necessary
if (getAbsModReaderParams() == null
|| !getAbsModReaderParams().equals(taskConfig.getModelReaderParams())) {
ModelReaderFactory modelReaderWriterFactory =
SimSystem.getRegistry().getFactory(AbstractModelReaderFactory.class,
taskConfig != null ? taskConfig.getModelReaderParams() : null);
if (modelReaderWriterFactory == null) {
SimSystem.report(Level.SEVERE, "Model reader creation failed");
handleEarlyAbort(taskConfig, null);
return;
}
setModelReader(modelReaderWriterFactory.create(taskConfig
.getCustomRWParams(), SimSystem.getRegistry().createContext()));
setAbsModReaderParams(taskConfig.getModelReaderParams());
}