STORM_LOG_THROW(chkRes!=z3::unknown,storm::exceptions::InvalidStateException,"Unable to solve LP problem with Z3: Check result is unknown. Reason: "<<Z3_optimize_get_reason_unknown(*context,*solver));
this->currentModelHasBeenOptimized=true;
solver->pop();// removes current optimization function
// We need to store the resulting information at this point. Otherwise, the information would be lost after calling pop() ...
// Assert that the upper approximation equals the lower one
STORM_LOG_ASSERT(std::string(Z3_get_numeral_string(*context,*lastCheckObjectiveValue))==std::string(Z3_get_numeral_string(*context,solver->lower(optFuncHandle))),"Lower and Upper Approximation of z3LPSolver result do not match.");
solver->pop();// removes current optimization function
this->currentModelHasBeenOptimized=true;
}
boolZ3LpSolver::isInfeasible()const{
STORM_LOG_THROW(this->currentModelHasBeenOptimized,storm::exceptions::InvalidStateException,"Illegal call to Z3LpSolver::isInfeasible: model has not been optimized.");
returnz3CheckResult==z3::unsat;
returnlastCheckInfeasible;
}
boolZ3LpSolver::isUnbounded()const{
STORM_LOG_THROW(this->currentModelHasBeenOptimized,storm::exceptions::InvalidStateException,"Illegal call to Z3LpSolver::isInfeasible: model has not been optimized.");
z3::exprexpr=solver->upper(z3Handle);
STORM_LOG_THROW(expr.is_app(),storm::exceptions::ExpressionEvaluationException,"Failed to convert Z3 expression. Encountered unknown expression type.");
returnexpr.decl().decl_kind()!=Z3_OP_ANUM;
STORM_LOG_THROW(this->currentModelHasBeenOptimized,storm::exceptions::InvalidStateException,"Illegal call to Z3LpSolver::isUnbounded: model has not been optimized.");
STORM_LOG_THROW(this->currentModelHasBeenOptimized,storm::exceptions::InvalidStateException,"Illegal call to Z3LpSolver::isOptimal: model has not been optimized.");
STORM_LOG_THROW((val==0||val==1),storm::exceptions::InvalidAccessException,"Tried to get a binary value for a variable that is neither 0 nor 1.");
returnval==1;
}
doubleZ3LpSolver::getObjectiveValue()const{
@ -188,9 +209,9 @@ namespace storm {
STORM_LOG_THROW(!this->isUnbounded(),storm::exceptions::InvalidAccessException,"Unable to get Z3 solution from unbounded model.");
STORM_LOG_THROW(false,storm::exceptions::InvalidAccessException,"Unable to get Z3 solution from unoptimized model.");
}
z3::exprexpr=solver->upper(z3Handle);
STORM_LOG_THROW(expr==solver->lower(z3Handle),storm::exceptions::InvalidAccessException,"Lower and Upper Approximation of z3LPSolver result do not match.");// TODO: make this an assertion
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
}
Z3LpSolver::Z3LpSolver(std::stringconst&){
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
}
Z3LpSolver::Z3LpSolver(){
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";}
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";}
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
}
voidZ3LpSolver::update()const{
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
}
voidZ3LpSolver::optimize()const{
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
}
boolZ3LpSolver::isInfeasible()const{
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
}
boolZ3LpSolver::isUnbounded()const{
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
}
boolZ3LpSolver::isOptimal()const{
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
}
doubleZ3LpSolver::getObjectiveValue()const{
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";
}
voidZ3LpSolver::toggleOutput(bool)const{
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support. Please choose a version of support with Z3 support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without support for Z3. Yet, a method was called that requires this support.";