diff --git a/src/storage/modelcomponents.cpp b/src/storage/modelcomponents.cpp new file mode 100644 index 0000000..4521b96 --- /dev/null +++ b/src/storage/modelcomponents.cpp @@ -0,0 +1,37 @@ +#include "modelcomponents.h" +#include "storm/models/sparse/StandardRewardModel.h" +#include "storm/models/symbolic/StandardRewardModel.h" +#include "storm/storage/sparse/ModelComponents.h" + + +// or just template using ModelComponents = storm::storage::sparse::ModelComponents; todo +template using StandardRewardModel = storm::models::sparse::StandardRewardModel; +template> using ModelComponents = storm::storage::sparse::ModelComponents; + +void define_model_components(py::module& m) { + + py::class_>>(m, "ModelComponents", "ModelComponents description..") + //todo .def(py::init<...>) + + // todo: readwrite or readonly? + // general components (for all model types) + .def_readwrite("transition_matrix", &ModelComponents>::transitionMatrix) + .def_readwrite("state_labeling", &ModelComponents>::stateLabeling) + .def_readwrite("reward_models", &ModelComponents>::rewardModels, "Reward models associated with the model") + .def_readwrite("choice_labeling", &ModelComponents>::choiceLabeling, "A vector that stores a labeling for each choic") + .def_readwrite("state_valuations", &ModelComponents>::stateValuations, "A vector that stores for each state to which variable valuation it belongs") + .def_readwrite("choice_origins", &ModelComponents>::choiceOrigins, "Stores for each choice from which parts of the input model description it originates") + + // POMDP specific components + .def_readwrite("observability_classes", &ModelComponents>::observabilityClasses, "The POMDP observations") + + // Continuous time specific components (CTMCs, Markov Automata): + .def_readwrite("rate_transitions", &ModelComponents>::rateTransitions, "True iff the transition values (for Markovian choices) are interpreted as rates") + .def_readwrite("exit_Rates", &ModelComponents>::exitRates, "The exit rate for each state. Must be given for CTMCs and MAs, if rate_transitions is false. Otherwise, it is optional.") + .def_readwrite("markovian_states", &ModelComponents>::markovianStates, "A vector that stores which states are markovian (only for Markov Automata)") + + // Stochastic two player game specific components: + .def_readwrite("player1_matrix", &ModelComponents>::observabilityClasses, "Matrix of player 1 choices (needed for stochastic two player games") + + + ; diff --git a/src/storage/modelcomponents.h b/src/storage/modelcomponents.h new file mode 100644 index 0000000..cce0999 --- /dev/null +++ b/src/storage/modelcomponents.h @@ -0,0 +1,8 @@ +#ifndef PYSTORM_MODELCOMPONENTS_H +#define PYSTORM_MODELCOMPONENTS_H + +#include "common.h" + +void define_model_cmponents(py::module& m); + +#endif /* PYSTORM_MODELCOMPONENTS_H */