instance->addOption(storm::settings::OptionBuilder("GlpkLpSolver","glpkoutput","","If set, the glpk output will be printed to the command line.").build());
LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
LOG4CPLUS_ERROR(logger,"Illegal value for binary variable in Gurobi solution ("<<value<<").");
throwstorm::exceptions::InvalidStateException()<<"Illegal value for binary variable in Gurobi solution ("<<value<<").";
}
// Now check the desired precision was actually achieved.
LOG_THROW(std::abs(static_cast<int>(value)-value)<=storm::settings::Settings::getInstance()->getOptionByLongName("glpkinttol").getArgument(0).getValueAsDouble(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in glpk solution ("<<value<<").");
LOG_THROW(variableIndexPair!=this->variableNameToIndexMap.end(),storm::exceptions::InvalidAccessException,"Accessing value of unknown variable '"<<name<<"'.");
LOG_THROW(std::abs(static_cast<int>(value)-value)<=storm::settings::Settings::getInstance()->getOptionByLongName("glpkinttol").getArgument(0).getValueAsDouble(),storm::exceptions::InvalidStateException,"Illegal value for binary variable in glpk solution ("<<value<<").");
returnstatic_cast<bool>(value);
}
doubleGlpkLpSolver::getObjectiveValue()const{
if(!this->isOptimal()){
if(this->isInfeasible()){
LOG4CPLUS_ERROR(logger,"Unable to get glpk solution from infeasible model.");
throwstorm::exceptions::InvalidStateException()<<"Unable to get Gurobi solution from infeasible model.";
}elseif(this->isUnbounded()){
LOG4CPLUS_ERROR(logger,"Unable to get glpk solution from unbounded model.");
throwstorm::exceptions::InvalidStateException()<<"Unable to get Gurobi solution from unbounded model.";
}else{
LOG4CPLUS_ERROR(logger,"Unable to get glpk solution from unoptimized model.");
throwstorm::exceptions::InvalidStateException()<<"Unable to get Gurobi solution from unoptimized model.";
}
LOG_THROW(!this->isInfeasible(),storm::exceptions::InvalidAccessException,"Unable to get glpk solution from infeasible model.");
LOG_THROW(!this->isUnbounded(),storm::exceptions::InvalidAccessException,"Unable to get glpk solution from unbounded model.");
LOG_THROW(false,storm::exceptions::InvalidAccessException,"Unable to get glpk solution from unoptimized model.");
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
}
@ -137,14 +180,14 @@ namespace storm {
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
}
virtualvoidoptimize()constoverride{
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
}
virtualboolisInfeasible()constoverride{
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
}
@ -157,15 +200,15 @@ namespace storm {
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";}
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";
}
virtualvoidupdate()constoverride{
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";
}
@ -154,15 +190,15 @@ namespace storm {
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";
throwstorm::exceptions::NotImplementedException()<<"This version of StoRM was compiled without support for Gurobi. Yet, a method was called that requires this support. Please choose a version of support with Gurobi support.";