Browse Source

added first version of model instantiator

refactoring
Sebastian Junges 8 years ago
parent
commit
4ad1358a2a
  1. 10
      src/storage/model.cpp
  2. 1
      src/storage/model.h

10
src/storage/model.cpp

@ -4,6 +4,7 @@
#include "storm/models/sparse/Dtmc.h"
#include "storm/models/sparse/Mdp.h"
#include "storm/models/sparse/StandardRewardModel.h"
#include "storm/utility/ModelInstantiator.h"
// Thin wrapper for getting initial states
template<typename ValueType>
@ -77,3 +78,12 @@ void define_model(py::module& m) {
;
}
void define_model_instantiator(py::module& m) {
py::class_<storm::utility::ModelInstantiator<storm::models::sparse::Dtmc<storm::RationalFunction>,storm::models::sparse::Dtmc<double>>>(m, "PdtmcInstantiator", "Instantiate PDTMCs to DTMCs")
.def(py::init<storm::models::sparse::Dtmc<storm::RationalFunction>>(), "parametric model"_a)
.def("instantiate", &storm::utility::ModelInstantiator<storm::models::sparse::Dtmc<storm::RationalFunction>, storm::models::sparse::Dtmc<double>>::instantiate, "Instantiate model with given parameter values");
}

1
src/storage/model.h

@ -4,5 +4,6 @@
#include "common.h"
void define_model(py::module& m);
void define_model_instantiator(py::module& m);
#endif /* PYTHON_STORAGE_MODEL_H_ */
Loading…
Cancel
Save