* the parameters with which the model shall be initialised
* @return instantiated model
*/
public static IModel instantiateModel(ParameterBlock rwSimCfgParams,
URI modelLocation, Map<String, ?> modelParameters) {
ParameterBlock rwParams = rwSimCfgParams == null ? new ParameterBlock()
: rwSimCfgParams.getCopy();
rwParams.addSubBlock(IURIHandling.URI, new ParameterBlock(modelLocation));
ModelReaderFactory modelReaderWriterFactory = SimSystem.getRegistry()
.getFactory(AbstractModelReaderFactory.class, rwParams);
IModel model = modelReaderWriterFactory.create(rwParams, SimSystem.getRegistry().createContext()).read(
modelLocation, modelParameters);
return model;