message(FATAL_ERROR"Library location for carl is not found, did you build carl?")
if(EXISTS${STORM_3RDPARTY_BINARY_DIR}/carl)
message(WARNING"Storm - Library for carl location is not found but the directory ${STORM_3RDPARTY_BINARY_DIR}/carl exists. Will (re-)try to build a shipped version of carl.")
set(STORM_SHIPPED_CARLON)
else()
message(FATAL_ERROR"Library location for carl is not found, did you build carl?")
endif()
elseif(EXISTS${carlLOCATION})
#emptyonpurpose
else()
message(FATAL_ERROR"File ${carlLOCATION} does not exist, did you build carl?")
if(EXISTS${STORM_3RDPARTY_BINARY_DIR}/carl)
message(WARNING"Storm - File ${carlLOCATION} does not exist but the directory ${STORM_3RDPARTY_BINARY_DIR}/carl exists. Will (re-)try to build a shipped version of carl.")
set(STORM_SHIPPED_CARLON)
else()
message(FATAL_ERROR"File ${carlLOCATION} does not exist, did you build carl?")
STORM_LOG_THROW(numOfVariables<=std::numeric_limits<std::size_t>::digits,storm::exceptions::OutOfRangeException,"Number of variables "<<numOfVariables<<" is too high.");
// Time formulas are only supported for Markov automata
STORM_LOG_THROW(data.model->isOfType(storm::models::ModelType::MarkovAutomaton),storm::exceptions::InvalidPropertyException,"Time operator formulas are only supported for Markov automata.");
STORM_LOG_THROW(false,storm::exceptions::InvalidPropertyException,"The formula "<<formula<<" neither considers reachability probabilities nor reachability rewards "<<(data.model->isOfType(storm::models::ModelType::MarkovAutomaton)?"nor reachability time":"")<<". This is not supported.");
this->addOption(storm::settings::OptionBuilder(moduleName,precisionUpdateFactorOptionName,false,"Sets with which factor the precision of the inner value iteration is updated.").setIsAdvanced().addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("factor","The factor.").setDefaultValueDouble(0.4).addValidatorDouble(ArgumentValidatorFactory::createDoubleRangeValidatorExcluding(0.0,1.0)).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,useRelevantValuesForPrecisionUpdateOptionName,false,"Sets whether the precision of the inner value iteration is only based on the relevant values (i.e. initial states).").setIsAdvanced().build());
this->addOption(storm::settings::OptionBuilder(moduleName,maxVerificationIterationFactorOptionName,false,"Controls how many verification iterations are performed before guessing a new upper bound.").setIsAdvanced().addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("factor","The factor.").setDefaultValueDouble(0.1).addValidatorDouble(ArgumentValidatorFactory::createDoubleGreaterValidator(0.0)).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,maxVerificationIterationFactorOptionName,false,"Controls how many verification iterations are performed before guessing a new upper bound.").setIsAdvanced().addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("factor","The factor.").setDefaultValueDouble(1.0).addValidatorDouble(ArgumentValidatorFactory::createDoubleGreaterValidator(0.0)).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,upperBoundGuessingFactorOptionName,false,"Sets with which factor the precision is multiplied to guess the upper bound.").setIsAdvanced().addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("factor","The factor.").setDefaultValueDouble(1.0).addValidatorDouble(ArgumentValidatorFactory::createDoubleGreaterValidator(0.0)).build()).build());
STORM_LOG_THROW(storm::utility::isZero(xi),storm::exceptions::InvalidOperationException,"The equation system has no solution.");
}else{
xi/=denominator;
}
STORM_LOG_WARN_COND_DEBUG(storm::NumberTraits<ValueType>::IsExact||!storm::utility::isAlmostZero(denominator)||storm::utility::isZero(denominator),"State "<<sccState<<" has a selfloop with probability '1-("<<denominator<<")'. This could be an indication for numerical issues.");
if(storm::utility::isZero(denominator)){
STORM_LOG_THROW(storm::utility::isZero(xi),storm::exceptions::InvalidOperationException,"The equation system has no solution.");
STORM_LOG_WARN_COND_DEBUG(storm::NumberTraits<ValueType>::IsExact||!storm::utility::isAlmostZero(denominator)||storm::utility::isZero(denominator),"State "<<sccState<<" has a selfloop with probability '1-("<<denominator<<")'. This could be an indication for numerical issues.");
if(storm::utility::isZero(denominator)){
// In this case we have a selfloop on this state. This can never an optimal choice:
// When minimizing, we are looking for the largest fixpoint (which will never be attained by this action)
STORM_LOG_THROW(static_cast<uint64_t>(std::numeric_limits<uint32_t>::max())>matrix.getRowCount()+1,storm::exceptions::NotSupportedException,"Matrix dimensions too large.");
STORM_LOG_THROW(static_cast<uint64_t>(std::numeric_limits<uint32_t>::max())>matrix.getEntryCount(),storm::exceptions::NotSupportedException,"Matrix dimensions too large.");
// The following case below covers that both vectors (old and new) are equal.
// Theoretically, this means that the precise fixpoint has been reached. However, numerical instabilities can be tricky and this detection might be incorrect (see the haddad-monmege model).
// We therefore disable it. It is very unlikely that we guessed the right fixpoint anyway.
//} else if (upperBoundIterResult == oviinternal::UpperBoundIterator<ValueType>::IterateResult::Equal) {
// In this case, the guessed upper bound is the precise fixpoint
// In this case we will make one more iteration on the lower bound (mainly to obtain a new iterationPrecision)
if(reachedPrecision){
status=SolverStatus::Converged;
break;
}else{
// From now on, we keep updating both bounds
intervalIterationNeeded=true;
}
// The following case below covers that both vectors (old and new) are equal.
// Theoretically, this means that the precise fixpoint has been reached. However, numerical instabilities can be tricky and this detection might be incorrect (see the haddad-monmege model).
// We therefore disable it. It is very unlikely that we guessed the right fixpoint anyway.
//} else if (upperBoundIterResult == oviinternal::IterationHelper<ValueType>::IterateResult::Equal) {
// In this case, the guessed upper bound is the precise fixpoint