|
|
@ -120,7 +120,7 @@ namespace storm { |
|
|
|
ChoiceInformation result; |
|
|
|
storm::storage::SparseMatrix<T> const& transitionMatrix = labeledMdp.getTransitionMatrix(); |
|
|
|
std::vector<uint_fast64_t> const& nondeterministicChoiceIndices = labeledMdp.getNondeterministicChoiceIndices(); |
|
|
|
std::vector<std::list<uint_fast64_t>> const& choiceLabeling = labeledMdp.getChoiceLabeling(); |
|
|
|
std::vector<std::set<uint_fast64_t>> const& choiceLabeling = labeledMdp.getChoiceLabeling(); |
|
|
|
|
|
|
|
// Now traverse all choices of all relevant states and check whether there is a relevant target state. |
|
|
|
// If so, the associated labels become relevant. Also, if a choice of relevant state has at least one |
|
|
@ -489,7 +489,7 @@ namespace storm { |
|
|
|
* @param probabilityThreshold The probability that the subsystem must exceed. |
|
|
|
* @return The total number of constraints that were created. |
|
|
|
*/ |
|
|
|
static uint_fast64_t assertProbabilityGreaterThanThreshold(GRBenv* env, GRBmodel* model, storm::models::Mdp<T> const& labeledMdp, VariableInformation const& variableInformation, T probabilityThreshold) { |
|
|
|
static uint_fast64_t assertProbabilityGreaterThanThreshold(GRBenv* env, GRBmodel* model, storm::models::Mdp<T> const& labeledMdp, VariableInformation const& variableInformation, double probabilityThreshold) { |
|
|
|
uint_fast64_t numberOfConstraintsCreated = 0; |
|
|
|
int error = 0; |
|
|
|
storm::storage::BitVector const& initialStates = labeledMdp.getInitialStates(); |
|
|
@ -555,7 +555,7 @@ namespace storm { |
|
|
|
static uint_fast64_t assertChoicesImplyLabels(GRBenv* env, GRBmodel* model, storm::models::Mdp<T> const& labeledMdp, StateInformation const& stateInformation, ChoiceInformation const& choiceInformation, VariableInformation const& variableInformation) { |
|
|
|
uint_fast64_t numberOfConstraintsCreated = 0; |
|
|
|
int error = 0; |
|
|
|
std::vector<std::list<uint_fast64_t>> const& choiceLabeling = labeledMdp.getChoiceLabeling(); |
|
|
|
std::vector<std::set<uint_fast64_t>> const& choiceLabeling = labeledMdp.getChoiceLabeling(); |
|
|
|
for (auto state : stateInformation.relevantStates) { |
|
|
|
std::list<uint_fast64_t>::const_iterator choiceVariableIndicesIterator = variableInformation.stateToChoiceVariablesIndexMap.at(state).begin(); |
|
|
|
for (auto choice : choiceInformation.relevantChoicesForRelevantStates.at(state)) { |
|
|
@ -916,7 +916,7 @@ namespace storm { |
|
|
|
* @param includeSchedulerCuts If set to true, additional constraints are asserted that reduce the set of |
|
|
|
* possible choices. |
|
|
|
*/ |
|
|
|
static void buildConstraintSystem(GRBenv* env, GRBmodel* model, storm::models::Mdp<T> const& labeledMdp, storm::storage::BitVector const& psiStates, StateInformation const& stateInformation, ChoiceInformation const& choiceInformation, VariableInformation const& variableInformation, T probabilityThreshold, bool includeSchedulerCuts = false) { |
|
|
|
static void buildConstraintSystem(GRBenv* env, GRBmodel* model, storm::models::Mdp<T> const& labeledMdp, storm::storage::BitVector const& psiStates, StateInformation const& stateInformation, ChoiceInformation const& choiceInformation, VariableInformation const& variableInformation, double probabilityThreshold, bool includeSchedulerCuts = false) { |
|
|
|
// Assert that the reachability probability in the subsystem exceeds the given threshold. |
|
|
|
uint_fast64_t numberOfConstraints = assertProbabilityGreaterThanThreshold(env, model, labeledMdp, variableInformation, probabilityThreshold); |
|
|
|
|
|
|
@ -1054,7 +1054,7 @@ namespace storm { |
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
static std::unordered_set<uint_fast64_t> getMinimalLabelSet(storm::models::Mdp<T> const& labeledMdp, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates, T probabilityThreshold, bool checkThresholdFeasible = false, bool includeSchedulerCuts = false) { |
|
|
|
static std::unordered_set<uint_fast64_t> getMinimalLabelSet(storm::models::Mdp<T> const& labeledMdp, storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates, double probabilityThreshold, bool checkThresholdFeasible = false, bool includeSchedulerCuts = false) { |
|
|
|
#ifdef STORM_HAVE_GUROBI |
|
|
|
// (0) Check whether the MDP is indeed labeled. |
|
|
|
if (!labeledMdp.hasChoiceLabels()) { |
|
|
|