Adapted all places that are accessing the settings to the new interface. It now compiles again with a lot of linker errors (because of method bodies that are not yet present).
LOG_THROW(std::abs(1-probabilitySum)<storm::settings::SettingsManager::getInstance()->getOptionByLongName("precision").getArgument(0).getValueAsDouble(),storm::exceptions::WrongFormatException,"Probabilities do not sum to one for command '"<<command<<"'.");
LOG_THROW(std::abs(1-probabilitySum)<storm::settings::generalSettings().getPrecision(),storm::exceptions::WrongFormatException,"Probabilities do not sum to one for command '"<<command<<"'.");
std::cout<<std::endl<<"Computed minimal label set of size "<<usedLabelSet.size()<<" in "<<std::chrono::duration_cast<std::chrono::milliseconds>(endTime-startTime).count()<<"ms."<<std::endl;
LOG_THROW(this->validate(newDefault),storm::exceptions::IllegalArgumentValueException,"The default value for the argument did not pass all validation functions.");
LOG4CPLUS_ERROR(logger,"SettingsManager::handleAssignment: Unable to parse arguments for option \""<<longOptionName<<"\": "<<arguments.size()<<" arguments given, but expected no more than "<<option->getArgumentCount()<<".");
throwstorm::exceptions::OptionParserException()<<"Unable to parse arguments for option \""<<longOptionName<<"\": "<<arguments.size()<<" arguments given, but expected no more than "<<option->getArgumentCount()<<".";
LOG4CPLUS_ERROR(logger,"SettingsManager::handleAssignment: Unable to parse arguments for option \""<<longOptionName<<"\": argument "<<option->getArgument(i).getArgumentName()<<" rejected the given value \""<<arguments.at(i)<<"\" with message:\r\n"<<assignmentResult.second<<".");
throwstorm::exceptions::OptionParserException()<<"Unable to parse arguments for option \""<<longOptionName<<"\": argument "<<option->getArgument(i).getArgumentName()<<" rejected the given value \""<<arguments.at(i)<<"\" with message:\r\n"<<assignmentResult.second<<".";
}
}else{
// There is no given value for this argument, only optional
if(!option->getArgument(i).getIsOptional()){
LOG4CPLUS_ERROR(logger,"Settings::handleAssignment: Unable to parse arguments for option \""<<longOptionName<<"\": "<<arguments.size()<<" arguments given, but more arguments were expected.");
throwstorm::exceptions::OptionParserException()<<"Unable to parse arguments for option \""<<longOptionName<<"\": "<<arguments.size()<<" arguments given, but more arguments were expected.";
LOG4CPLUS_ERROR(logger,"Settings::parseCommandLine: Found stray argument while parsing a given configuration, \""<<stringArgv.at(i)<<"\" is neither a known option nor preceeded by an option.");
throwstorm::exceptions::OptionParserException()<<"Found stray argument while parsing a given configuration; \""<<stringArgv.at(i)<<"\" is neither a known option nor preceeded by an option.";
// There exists an option which uses the same shortname
//LOG4CPLUS_ERROR(logger, "Settings::addOption: Error: The Option \"" << shortNameIterator->second << "\" from Module \"" << this->options.find(shortNameIterator->second)->second.get()->getModuleName() << "\" uses the same ShortName as the Option \"" << option->getLongName() << "\" from Module \"" << option->getModuleName() << "\"!");
throwstorm::exceptions::OptionUnificationException()<<"Error: The option \""<<shortNameIterator->second<<"\" of module \""<<this->options.find(shortNameIterator->second)->second.get()->getModuleName()<<"\" uses the same name as option \""<<option->getLongName()<<"\" of module \""<<option->getModuleName()<<"\".";
options.push_back(storm::settings::OptionBuilder(moduleName,minimalCommandSetOptionName,true,"Computes a counterexample for the given model in terms of a minimal command set. Note that this requires the model to be given in a symbolic format.")
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,minimalCommandSetOptionName,true,"Computes a counterexample for the given model in terms of a minimal command set. Note that this requires the model to be given in a symbolic format.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The file containing the properties for which counterexamples are to be generated.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build())
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("method","Sets which technique is used to derive the counterexample. Available are {milp, maxsat}").setDefaultValueString("maxsat").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(techniques)).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,statisticsOptionName,true,"Sets whether to display statistics for counterexample generation.").build());
options.push_back(storm::settings::OptionBuilder(moduleName,encodeReachabilityOptionName,true,"Sets whether to encode reachability for MAXSAT-based minimal command counterexample generation.").build());
options.push_back(storm::settings::OptionBuilder(moduleName,schedulerCutsOptionName,true,"Sets whether to add the scheduler cuts for MILP-based minimal command counterexample generation.").build());
// Finally, register all options that we just created.
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,statisticsOptionName,true,"Sets whether to display statistics for counterexample generation.").build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,encodeReachabilityOptionName,true,"Sets whether to encode reachability for MAXSAT-based minimal command counterexample generation.").build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,schedulerCutsOptionName,true,"Sets whether to add the scheduler cuts for MILP-based minimal command counterexample generation.").build());
// First, we need to create all options of this module.
std::vector<std::shared_ptr<Option>>options;
options.push_back(storm::settings::OptionBuilder(moduleName,precisionOptionName,true,"Sets the precision used by Cudd.").addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value","The precision up to which to constants are considered to be different.").setDefaultValueDouble(1e-15).addValidationFunctionDouble(storm::settings::ArgumentValidators::doubleRangeValidatorExcluding(0.0,1.0)).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,precisionOptionName,true,"Sets the precision used by Cudd.").addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value","The precision up to which to constants are considered to be different.").setDefaultValueDouble(1e-15).addValidationFunctionDouble(storm::settings::ArgumentValidators::doubleRangeValidatorExcluding(0.0,1.0)).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,maximalMemoryOptionName,true,"Sets the upper bound of memory available to Cudd in MB.").addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("mb","The memory available to Cudd (0 means unlimited).").setDefaultValueUnsignedInteger(2048).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,maximalMemoryOptionName,true,"Sets the upper bound of memory available to Cudd in MB.").addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("mb","The memory available to Cudd (0 means unlimited).").setDefaultValueUnsignedInteger(2048).build()).build());
std::vector<std::string>reorderingTechniques;
reorderingTechniques.push_back("none");
@ -37,10 +35,7 @@ namespace storm {
reorderingTechniques.push_back("annealing");
reorderingTechniques.push_back("genetic");
reorderingTechniques.push_back("exact");
options.push_back(storm::settings::OptionBuilder(moduleName,reorderOptionName,true,"Sets the reordering technique used by Cudd.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("method","Sets which technique is used by Cudd's reordering routines. Must be in {none, random, randompivot, sift, siftconv, ssift, ssiftconv, gsift, gsiftconv, win2, win2conv, win3, win3conv, win4, win4conv, annealing, genetic, exact}.").setDefaultValueString("gsift").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(reorderingTechniques)).build()).build());
// Finally, register all options that we just created.
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,reorderOptionName,true,"Sets the reordering technique used by Cudd.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("method","Sets which technique is used by Cudd's reordering routines. Must be in {none, random, randompivot, sift, siftconv, ssift, ssiftconv, gsift, gsiftconv, win2, win2conv, win3, win3conv, win4, win4conv, annealing, genetic, exact}.").setDefaultValueString("gsift").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(reorderingTechniques)).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,traceOptionName,false,"Print even more debug output.").build());
options.push_back(storm::settings::OptionBuilder(moduleName,logfileOptionName,false,"If specified, the log output will also be written to this file.").setShortName(logfileOptionShortName)
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,traceOptionName,false,"Print even more debug output.").build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,logfileOptionName,false,"If specified, the log output will also be written to this file.").setShortName(logfileOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file to write the log.").build()).build());
// Finally, register all options that we just created.
options.push_back(storm::settings::OptionBuilder(moduleName,helpOptionName,false,"Shows all available options, arguments and descriptions.").setShortName(helpOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("module","The module for which to show the help or 'all' for all modules.").setDefaultValueString("all").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(moduleNames)).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,verboseOptionName,false,"Enables more verbose output.").setShortName(verboseOptionShortName).build());
options.push_back(storm::settings::OptionBuilder(moduleName,exportDotOptionName,"","If given, the loaded model will be written to the specified file in the dot format.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file to which the model is to be written.").build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,configOptionName,false,"If given, this file will be read and parsed for additional configuration settings.").setShortName(configOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file from which to read the configuration.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,explicitOptionName,false,"Parses the model given in an explicit (sparse) representation.").setShortName(explicitOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file from which to read the transitions.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build())
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file from which to read the state labeling.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,symbolicOptionName,false,"Parses the model given in a symbolic representation.").setShortName(symbolicOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file from which to read the symbolic model.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,pctlOptionName,false,"Specifies the PCTL formulas that are to be checked on the model.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The file from which to read the PCTL formulas.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,cslOptionName,false,"Specifies the CSL formulas that are to be checked on the model.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The file from which to read the CSL formulas.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,ltlOptionName,false,"Specifies the LTL formulas that are to be checked on the model.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The file from which to read the LTL formulas.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,counterexampleOptionName,false,"Generates a counterexample for the given PRCTL formulas if not satisfied by the model")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file to which the counterexample is to be written.").build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,helpOptionName,false,"Shows all available options, arguments and descriptions.").setShortName(helpOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("module","The module for which to show the help or 'all' for all modules.").setDefaultValueString("all").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(moduleNames)).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,verboseOptionName,false,"Enables more verbose output.").setShortName(verboseOptionShortName).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,precisionOptionName,true,"The internally used precision.").setShortName(precisionOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value","The precision to use.").setDefaultValueDouble(1e-06).addValidationFunctionDouble(storm::settings::ArgumentValidators::doubleRangeValidatorExcluding(0.0,1.0)).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,exportDotOptionName,"","If given, the loaded model will be written to the specified file in the dot format.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file to which the model is to be written.").build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,configOptionName,false,"If given, this file will be read and parsed for additional configuration settings.").setShortName(configOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file from which to read the configuration.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,explicitOptionName,false,"Parses the model given in an explicit (sparse) representation.").setShortName(explicitOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("transition filename","The name of the file from which to read the transitions.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build())
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("labeling filename","The name of the file from which to read the state labeling.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,symbolicOptionName,false,"Parses the model given in a symbolic representation.").setShortName(symbolicOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file from which to read the symbolic model.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,pctlOptionName,false,"Specifies the PCTL formulas that are to be checked on the model.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The file from which to read the PCTL formulas.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,cslOptionName,false,"Specifies the CSL formulas that are to be checked on the model.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The file from which to read the CSL formulas.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,ltlOptionName,false,"Specifies the LTL formulas that are to be checked on the model.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The file from which to read the LTL formulas.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,counterexampleOptionName,false,"Generates a counterexample for the given PRCTL formulas if not satisfied by the model")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The name of the file to which the counterexample is to be written.").build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,transitionRewardsOptionName,"","If given, the transition rewards are read from this file and added to the explicit model. Note that this requires the model to be given as an explicit model (i.e., via --"+explicitOptionName+").")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The file from which to read the transition rewards.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,stateRewardsOptionName,false,"If given, the state rewards are read from this file and added to the explicit model. Note that this requires the model to be given as an explicit model (i.e., via --"+explicitOptionName+").")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The file from which to read the state rewards.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,fixDeadlockOptionName,false,"If the model contains deadlock states, they need to be fixed by setting this option.").setShortName(fixDeadlockOptionShortName).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,transitionRewardsOptionName,"","If given, the transition rewards are read from this file and added to the explicit model. Note that this requires the model to be given as an explicit model (i.e., via --"+explicitOptionName+").")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The file from which to read the transition rewards.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,stateRewardsOptionName,false,"If given, the state rewards are read from this file and added to the explicit model. Note that this requires the model to be given as an explicit model (i.e., via --"+explicitOptionName+").")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename","The file from which to read the state rewards.").addValidationFunctionString(storm::settings::ArgumentValidators::existingReadableFileValidator()).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,fixDeadlockOptionName,false,"If the model contains deadlock states, they need to be fixed by setting this option.").setShortName(fixDeadlockOptionShortName).build());
options.push_back(storm::settings::OptionBuilder(moduleName,eqSolverOptionName,false,"Sets which solver is preferred for solving systems of linear equations.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("name","The name of the solver to prefer. Available are: gmm++ and native.").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(linearEquationSolver)).setDefaultValueString("gmm++").build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,timeoutOptionName,false,"If given, computation will abort after the timeout has been reached.").setShortName(timeoutOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("time","The number of seconds after which to timeout.").setDefaultValueUnsignedInteger(0).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,eqSolverOptionName,false,"Sets which solver is preferred for solving systems of linear equations.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("name","The name of the solver to prefer. Available are: gmm++ and native.").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(linearEquationSolver)).setDefaultValueString("gmm++").build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,timeoutOptionName,false,"If given, computation will abort after the timeout has been reached.").setShortName(timeoutOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("time","The number of seconds after which to timeout.").setDefaultValueUnsignedInteger(0).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,lpSolverOptionName,false,"Sets which LP solver is preferred.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("name","The name of an LP solver. Available are: gurobi and glpk.").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(lpSolvers)).setDefaultValueString("glpk").build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,constantsOptionName,false,"Specifies the constant replacements to use in symbolic models. Note that Note that this requires the model to be given as an symbolic model (i.e., via --"+symbolicOptionName+").").setShortName(constantsOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("values","A comma separated list of constants and their value, e.g. a=1,b=2,c=3.").setDefaultValueString("").build()).build());
// Finally, register all options that we just created.
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,lpSolverOptionName,false,"Sets which LP solver is preferred.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("name","The name of an LP solver. Available are: gurobi and glpk.").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(lpSolvers)).setDefaultValueString("glpk").build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,constantsOptionName,false,"Specifies the constant replacements to use in symbolic models. Note that Note that this requires the model to be given as an symbolic model (i.e., via --"+symbolicOptionName+").").setShortName(constantsOptionShortName)
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("values","A comma separated list of constants and their value, e.g. a=1,b=2,c=3.").setDefaultValueString("").build()).build());
// First, we need to create all options of this module.
std::vector<std::shared_ptr<Option>>options;
options.push_back(storm::settings::OptionBuilder(moduleName,outputOptionName,true,"If set, the glpk output will be printed to the command line.").build());
options.push_back(storm::settings::OptionBuilder(moduleName,integerToleranceOption,true,"Sets glpk's precision for integer variables.").addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value","The precision to achieve.").setDefaultValueDouble(1e-06).addValidationFunctionDouble(storm::settings::ArgumentValidators::doubleRangeValidatorExcluding(0.0,1.0)).build()).build());
// Finally, register all options that we just created.
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,outputOptionName,true,"If set, the glpk output will be printed to the command line.").build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,integerToleranceOption,true,"Sets glpk's precision for integer variables.").addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value","The precision to achieve.").setDefaultValueDouble(1e-06).addValidationFunctionDouble(storm::settings::ArgumentValidators::doubleRangeValidatorExcluding(0.0,1.0)).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,techniqueOptionName,true,"The method to be used for solving linear equation systems with the gmm++ engine. Available are {bicgstab, qmr, gmres, jacobi}.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("name","The name of the method to use.").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(methods)).setDefaultValueString("gmres").build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,techniqueOptionName,true,"The method to be used for solving linear equation systems with the gmm++ engine. Available are {bicgstab, qmr, gmres, jacobi}.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("name","The name of the method to use.").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(methods)).setDefaultValueString("gmres").build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,preconditionOptionName,true,"The preconditioning technique used for solving linear equation systems. Available are {ilu, diagonal, none}.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("name","The name of the preconditioning method.").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(preconditioner)).setDefaultValueString("ilu").build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,preconditionOptionName,true,"The preconditioning technique used for solving linear equation systems. Available are {ilu, diagonal, none}.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("name","The name of the preconditioning method.").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(preconditioner)).setDefaultValueString("ilu").build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,restartOptionName,true,"The number of iteration until restarted methods are actually restarted.").addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("count","The number of iterations.").setDefaultValueUnsignedInteger(50).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,restartOptionName,true,"The number of iteration until restarted methods are actually restarted.").addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("count","The number of iterations.").setDefaultValueUnsignedInteger(50).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,maximalIterationsOptionName,true,"The maximal number of iterations to perform before iterative solving is aborted.").setShortName(maximalIterationsOptionShortName).addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("iterations","The maximal iteration count.").setDefaultValueUnsignedInteger(10000).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,maximalIterationsOptionName,true,"The maximal number of iterations to perform before iterative solving is aborted.").setShortName(maximalIterationsOptionShortName).addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("iterations","The maximal iteration count.").setDefaultValueUnsignedInteger(10000).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,precisionOptionName,true,"The precision used for detecting convergence of iterative methods.").addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value","The precision to achieve.").setDefaultValueDouble(1e-06).addValidationFunctionDouble(storm::settings::ArgumentValidators::doubleRangeValidatorExcluding(0.0,1.0)).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,precisionOptionName,true,"The precision used for detecting convergence of iterative methods.").addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value","The precision to achieve.").setDefaultValueDouble(1e-06).addValidationFunctionDouble(storm::settings::ArgumentValidators::doubleRangeValidatorExcluding(0.0,1.0)).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,absoluteOptionName,true,"Sets whether the relative or the absolute error is considered for detecting convergence.").build());
// Finally, register all options that we just created.
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,absoluteOptionName,true,"Sets whether the relative or the absolute error is considered for detecting convergence.").build());
// First, we need to create all options of this module.
std::vector<std::shared_ptr<Option>>options;
options.push_back(storm::settings::OptionBuilder(moduleName,threadsOption,true,"The number of threads that may be used by Gurobi.").addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("count","The number of threads.").setDefaultValueUnsignedInteger(1).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,threadsOption,true,"The number of threads that may be used by Gurobi.").addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("count","The number of threads.").setDefaultValueUnsignedInteger(1).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,outputOption,true,"If set, the Gurobi output will be printed to the command line.").build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,outputOption,true,"If set, the Gurobi output will be printed to the command line.").build());
options.push_back(storm::settings::OptionBuilder(moduleName,integerToleranceOption,true,"Sets Gurobi's precision for integer variables.").addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value","The precision to achieve.").setDefaultValueDouble(1e-06).addValidationFunctionDouble(storm::settings::ArgumentValidators::doubleRangeValidatorExcluding(0.0,1.0)).build()).build());
// Finally, register all options that we just created.
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,integerToleranceOption,true,"Sets Gurobi's precision for integer variables.").addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value","The precision to achieve.").setDefaultValueDouble(1e-06).addValidationFunctionDouble(storm::settings::ArgumentValidators::doubleRangeValidatorExcluding(0.0,1.0)).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,techniqueOptionName,true,"The method to be used for solving linear equation systems with the native engine. Available are: { jacobi }.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("name","The name of the method to use.").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(methods)).setDefaultValueString("jacobi").build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,techniqueOptionName,true,"The method to be used for solving linear equation systems with the native engine. Available are: { jacobi }.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("name","The name of the method to use.").addValidationFunctionString(storm::settings::ArgumentValidators::stringInListValidator(methods)).setDefaultValueString("jacobi").build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,maximalIterationsOptionName,true,"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(10000).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,maximalIterationsOptionName,true,"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(10000).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,precisionOptionName,true,"The precision used for detecting convergence of iterative methods.").addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value","The precision to achieve.").setDefaultValueDouble(1e-06).addValidationFunctionDouble(storm::settings::ArgumentValidators::doubleRangeValidatorExcluding(0.0,1.0)).build()).build());
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,precisionOptionName,true,"The precision used for detecting convergence of iterative methods.").addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value","The precision to achieve.").setDefaultValueDouble(1e-06).addValidationFunctionDouble(storm::settings::ArgumentValidators::doubleRangeValidatorExcluding(0.0,1.0)).build()).build());
options.push_back(storm::settings::OptionBuilder(moduleName,absoluteOptionName,true,"Sets whether the relative or the absolute error is considered for detecting convergence.").build());
// Finally, register all options that we just created.
this->addAndRegisterOption(storm::settings::OptionBuilder(moduleName,absoluteOptionName,true,"Sets whether the relative or the absolute error is considered for detecting convergence.").build());
// Now check the desired precision was actually achieved.
LOG_THROW(std::abs(static_cast<int>(value)-value)<=storm::settings::SettingsManager::getInstance()->getOptionByLongName("glpkinttol").getArgument(0).getValueAsDouble(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in glpk solution ("<<value<<").");
LOG_THROW(std::abs(static_cast<int>(value)-value)<=storm::settings::glpkSettings().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in glpk solution ("<<value<<").");
LOG_THROW(std::abs(static_cast<int>(value)-value)<=storm::settings::SettingsManager::getInstance()->getOptionByLongName("glpkinttol").getArgument(0).getValueAsDouble(),storm::exceptions::InvalidStateException,"Illegal value for binary variable in glpk solution ("<<value<<").");
LOG_THROW(std::abs(static_cast<int>(value)-value)<=storm::settings::glpkSettings().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for binary variable in glpk solution ("<<value<<").");
std::cout<<"Parsing the given model took "<<std::chrono::duration_cast<std::chrono::milliseconds>(parsingEnd-executionStart).count()<<" milliseconds."<<std::endl;
std::cout<<"Running the ModelChecker took "<<std::chrono::duration_cast<std::chrono::milliseconds>(modelcheckingEnd-modelcheckingStart).count()<<" milliseconds."<<std::endl;