From 4ad1358a2a6c295e926560b6ebee385860da1115 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Fri, 30 Dec 2016 22:03:18 +0100 Subject: [PATCH] added first version of model instantiator --- src/storage/model.cpp | 10 ++++++++++ src/storage/model.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/storage/model.cpp b/src/storage/model.cpp index 370ceb5..c8a8945 100644 --- a/src/storage/model.cpp +++ b/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 @@ -77,3 +78,12 @@ void define_model(py::module& m) { ; } + + + +void define_model_instantiator(py::module& m) { + py::class_,storm::models::sparse::Dtmc>>(m, "PdtmcInstantiator", "Instantiate PDTMCs to DTMCs") + .def(py::init>(), "parametric model"_a) + .def("instantiate", &storm::utility::ModelInstantiator, storm::models::sparse::Dtmc>::instantiate, "Instantiate model with given parameter values"); + +} \ No newline at end of file diff --git a/src/storage/model.h b/src/storage/model.h index c779f26..69e4359 100644 --- a/src/storage/model.h +++ b/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_ */