this->addOption(storm::settings::OptionBuilder(moduleName,maximalIterationsOptionName,false,"The maximal number of iterations to perform before iterative solving is aborted.").setShortName(maximalIterationsOptionShortName).addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("count","The maximal iteration count.").setDefaultValueUnsignedInteger(20000).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,precisionOptionName,false,"The precision used for detecting convergence of iterative methods.").addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value","The precision to achieve.").setDefaultValueDouble(1e-06).addValidatorDouble(ArgumentValidatorFactory::createDoubleRangeValidatorExcluding(0.0,1.0)).build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,absoluteOptionName,false,"Sets whether the relative or the absolute error is considered for detecting convergence.").build());
STORM_LOG_WARN_COND(storm::settings::getModule<storm::settings::modules::CoreSettings>().getEquationSolver()==storm::solver::EquationSolverType::Gmmxx||!optionsSet,"gmm++ is not selected as the preferred equation solver, so setting options for gmm++ might have no effect.");
this->addOption(storm::settings::OptionBuilder(moduleName,lraMethodOptionName,false,"Sets which method is preferred for computing long run averages.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("name","The name of a long run average computation method.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(lraMethods)).setDefaultValueString("vi").build()).build());
this->addOption(storm::settings::OptionBuilder(moduleName,valueIterationMultiplicationStyleOptionName,false,"Sets which method multiplication style to prefer for value iteration.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("name","The name of a multiplication style.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(multiplicationStyles)).setDefaultValueString("gaussseidel").build()).build());
STORM_LOG_INFO("Solving linear equation system ("<<x.size()<<" rows) with Gmmxx linear equation solver with method '"<<method<<"' and preconditioner '"<<preconditioner<<"' (max. "<<this->getSettings().getMaximalNumberOfIterations()<<" iterations).");
// If the vector and the result are aliases and this is not set to be allowed, we need and temporary vector.
std::vector<ValueType>*target;
std::vector<ValueType>temporary;
boolvectorsAliased=&vector==&result;
if(!allowAliasing&&vectorsAliased){
STORM_LOG_WARN("Vectors are aliased but are not allowed to be. Using temporary, which is potentially slow.");
temporary=std::vector<ValueType>(vector.size());
target=&temporary;
STORM_LOG_WARN_COND(multiplicationDirection!=MultiplicationDirection::DontCare,"Not specifying multiplication direction for aliased vectors may yield unexpected results.");
}else{
target=&result;
}
STORM_LOG_WARN_COND(vectorsAliased||multiplicationDirection==MultiplicationDirection::DontCare,"Setting a multiplication direction for unaliased vectors. Check whether this is intended.");
STORM_LOG_WARN("Matrix-vector-multiplication invoked but the target vector uses the same memory as the input vector. This requires to allocate auxiliary memory.");
// If the vector and the result are aliases and this is not set to be allowed, we need and temporary vector.
std::vector<ValueType>*target;
std::vector<ValueType>temporary;
boolvectorsAliased=&vector==&result;
if(!allowAliasing&&vectorsAliased){
STORM_LOG_WARN("Vectors are aliased but are not allowed to be. Using temporary, which is potentially slow.");
temporary=std::vector<ValueType>(vector.size());
target=&temporary;
STORM_LOG_WARN_COND(multiplicationDirection!=MultiplicationDirection::DontCare,"Not specifying multiplication direction for aliased vectors may yield unexpected results.");
}else{
target=&result;
}
STORM_LOG_WARN_COND(vectorsAliased||multiplicationDirection==MultiplicationDirection::DontCare,"Setting a multiplication direction for unaliased vectors. Check whether this is intended.");