Browse Source

compute the depth of the model, i.e., the longest shortest path from an initial state

refactoring
Sebastian Junges 5 years ago
parent
commit
d9e0a9ac92
  1. 2
      src/storage/model.cpp

2
src/storage/model.cpp

@ -15,6 +15,7 @@
#include "storm/models/symbolic/Ctmc.h"
#include "storm/models/symbolic/MarkovAutomaton.h"
#include "storm/models/symbolic/StandardRewardModel.h"
#include "storm/utility/dd.h"
#include "storm/storage/Scheduler.h"
@ -305,6 +306,7 @@ void define_symbolic_model(py::module& m, std::string vt_suffix) {
.def_property_readonly("reachable_states", &SymbolicModel<DdType, double>::getReachableStates, "reachable states as DD")
.def_property_readonly("initial_states", &SymbolicModel<DdType, double>::getInitialStates, "initial states as DD")
.def("get_states", [](SymbolicModel<DdType, double> const& model, storm::expressions::Expression const& expr) {return model.getStates(expr);}, py::arg("expression"), "Get states that are described by the expression")
.def("compute_depth", [](SymbolicModel<DdType, double> const& model) {return storm::utility::dd::computeReachableStates(model.getInitialStates(), model.getQualitativeTransitionMatrix(false), model.getRowVariables(), model.getColumnVariables()).second;}, "Computes the depth of the model, i.e., the distance to the node with the largest minimal distance from the initial states")
.def("reduce_to_state_based_rewards", &SymbolicModel<DdType, double>::reduceToStateBasedRewards)
.def("__str__", &getModelInfoPrinter)
;

Loading…
Cancel
Save