STORM_LOG_THROW(!formula.getBound().threshold.containsVariables(),storm::exceptions::InvalidPropertyException,"The formula "<<formula<<"considers a non-constant threshold");
STORM_LOG_WARN_COND(!formula.hasOptimalityType()||formula.getOptimalityType()==objective.optimizationDirection,"Optimization direction of formula "<<formula<<" ignored as the formula also specifies a threshold.");
STORM_LOG_WARN_COND(!formula.hasOptimalityType(),"Optimization direction of formula "<<formula<<" ignored as the formula also specifies a threshold.");
||(!formula.hasRewardModelName()&&data.originalModel.hasUniqueRewardModel()),storm::exceptions::InvalidPropertyException,"The reward model is not unique or the formula "<<formula<<" does not specify an existing reward model.");
// Time formulas are only supported for Markov automata
STORM_LOG_THROW(data.originalModel.isOfType(storm::models::ModelType::MarkovAutomaton),storm::exceptions::InvalidPropertyException,"Time operator formulas are only supported for Markov automata.");
STORM_LOG_THROW(false,storm::exceptions::NotImplementedException,"The Probability for the objective "<<*data.objectives.back()->originalFormula<<" is always one as the rhs of the until formula is true in the initial state. This (trivial) case is currently not implemented.");
}
}
// TODO: Handle this case more properly
STORM_LOG_THROW((data.originalModel.getInitialStates()&rightSubformulaResult).empty(),storm::exceptions::NotImplementedException,"The Probability for the objective "<<*data.objectives.back()->originalFormula<<" is always one as the rhs of the until formula is true in the initial state. This (trivial) case is currently not implemented.");
// Create a memory structure that stores whether a non-PhiState or a PsiState has already been reached
STORM_LOG_THROW(!formula.getLowerBound().containsVariables(),storm::exceptions::InvalidPropertyException,"The lower time bound for the formula "<<formula<<" still contains variables");
STORM_LOG_THROW(!formula.getUpperBound().containsVariables(),storm::exceptions::InvalidPropertyException,"The Upper time bound for the formula "<<formula<<" still contains variables");
STORM_LOG_THROW(!data.originalModel.isOfType(storm::models::ModelType::MarkovAutomaton)||formula.getTimeBoundReference().isTimeBound(),storm::exceptions::InvalidPropertyException,"Bounded until formulas for Markov Automata are only allowed when time bounds are considered.");
STORM_LOG_THROW(data.originalModel.isOfType(storm::models::ModelType::Mdp),storm::exceptions::InvalidPropertyException,"Cumulative reward formulas are not supported for the given model type.");
STORM_LOG_THROW(!formula.getBound().containsVariables(),storm::exceptions::InvalidPropertyException,"The time bound for the formula "<<formula<<" still contains variables");
STORM_LOG_ASSERT(result.objectives[objIndex].formula->isRewardOperatorFormula(),"Objective needs to be checked for finite reward but has no reward operator.");
STORM_LOG_THROW(obj.bound,storm::exceptions::InvalidOperationException,"Invoked achievability query but no bound was specified for at least one objective.");
STORM_LOG_THROW(!obj.lowerTimeBound&&!obj.upperTimeBound,storm::exceptions::NotSupportedException,"Constraint based method currently does not support step bounds");
// We need to actually evaluate the threshold as rational number. Otherwise a threshold like '<=16/9' might be considered as 1 due to integer division
STORM_LOG_THROW(!obj.bound->threshold.containsVariables(),storm::exceptions::InvalidOperationException,"The threshold for one objective still contains undefined variables");
STORM_LOG_THROW(false,storm::exceptions::InvalidOperationException,"One or more objectives have an invalid comparison type");
STORM_LOG_THROW(obj.formula->isRewardOperatorFormula()&&obj.formula->getSubformula().isTotalRewardFormula(),storm::exceptions::InvalidOperationException,"Constraint-based solver only supports total-reward objectives. Got "<<*obj.formula<<" instead.");
STORM_LOG_THROW(obj.formula->hasBound(),storm::exceptions::InvalidOperationException,"Invoked achievability query but no bound was specified for at least one objective.");
STORM_LOG_THROW(obj.formula->asRewardOperatorFormula().hasRewardModelName(),storm::exceptions::InvalidOperationException,"Expected reward operator with a reward model name. Got "<<*obj.formula<<" instead.");
STORM_LOG_THROW(formula.isRewardOperatorFormula()&&formula.asRewardOperatorFormula().hasRewardModelName(),storm::exceptions::UnexpectedException,"Unexpected type of operator formula: "<<formula);
STORM_LOG_THROW(formula.getSubformula().isTotalRewardFormula()||(formula.getSubformula().isCumulativeRewardFormula()&&formula.getSubformula().asCumulativeRewardFormula().isTimeBounded()),storm::exceptions::UnexpectedException,"Unexpected type of sub-formula: "<<formula.getSubformula());
STORM_LOG_WARN_COND(!formula.getSubformula().isCumulativeRewardFormula()||(objectives[objIndex].originalFormula->isProbabilityOperatorFormula()&&objectives[objIndex].originalFormula->asProbabilityOperatorFormula().getSubformula().isBoundedUntilFormula()),"Objective "<<objectives[objIndex].originalFormula<<" was simplified to a cumulative reward formula. Correctness of the algorithm is unknown for this type of property.");
STORM_LOG_THROW(!obj.timeBoundReference||obj.timeBoundReference->isTimeBound(),storm::exceptions::InvalidPropertyException,"Multi-objective model checking of Markov automata is only supported for time-bounded formulass.");
}
// Split the preprocessed model into transitions from/to probabilistic/Markovian states.
STORM_LOG_THROW(!storm::utility::isZero(timeBounds.back()),storm::exceptions::InvalidPropertyException,"Got zero-valued upper time bound. This is not suppoted.");
// Note that we do not consider an estimate for each objective (as done in the unbounded phase) since the results from the previous epoch are already pretty close
STORM_LOG_ASSERT(!rewModel.hasTransitionRewards(),"Reward model has transition rewards which is not expected.");
autoconst&formula=*objectives[objIndex].formula;
STORM_LOG_THROW(formula.isRewardOperatorFormula()&&formula.asRewardOperatorFormula().hasRewardModelName(),storm::exceptions::UnexpectedException,"Unexpected type of operator formula: "<<formula);
STORM_LOG_THROW(formula.getSubformula().isCumulativeRewardFormula()||formula.getSubformula().isTotalRewardFormula(),storm::exceptions::UnexpectedException,"Unexpected type of sub-formula: "<<formula.getSubformula());
STORM_LOG_THROW(!rewModel.hasTransitionRewards(),storm::exceptions::NotSupportedException,"Reward model has transition rewards which is not expected.");
STORM_LOG_ASSERT(obj.bound.is_initialized(),"Achievability query invoked but there is an objective without bound.");
STORM_LOG_THROW(!obj.bound->threshold.containsVariables(),storm::exceptions::InvalidOperationException,"There is an objective whose bound contains undefined variables.");
STORM_LOG_THROW(!obj.bound->threshold.containsVariables(),storm::exceptions::InvalidOperationException,"There is an objective whose bound contains undefined variables.");
STORM_LOG_THROW(this->checkHasBeenCalled,storm::exceptions::IllegalFunctionCallException,"Tried to retrieve results but check(..) has not been called before.");
for(autoconst&obj:this->objectives){
STORM_LOG_THROW(!obj.lowerTimeBound&&!obj.upperTimeBound,storm::exceptions::NotImplementedException,"Scheduler retrival is not implemented for timeBounded objectives.");
for(autoconst&obj:this->objectives){
STORM_LOG_THROW(obj.formula->getSubformula().isTotalRewardFormula(),storm::exceptions::NotImplementedException,"Scheduler retrival is only implemented for objectives without time-bound.");