STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi Parameter IntFeasTol ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to get Gurobi solution ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(std::abs(static_cast<int>(value)-value)<=storm::settings::getModule<storm::settings::modules::GurobiSettings>().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
STORM_LOG_THROW(std::abs(std::round(value)-value)<=storm::settings::getModule<storm::settings::modules::GurobiSettings>().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to get Gurobi solution ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
if(value>0.5){
STORM_LOG_THROW(std::abs(static_cast<int>(value)-1)<=storm::settings::getModule<storm::settings::modules::GurobiSettings>().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
STORM_LOG_THROW(std::abs(value-1.0)<=storm::settings::getModule<storm::settings::modules::GurobiSettings>().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
returntrue;
}else{
STORM_LOG_THROW(value<=storm::settings::getModule<storm::settings::modules::GurobiSettings>().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
STORM_LOG_THROW(std::abs(value)<=storm::settings::getModule<storm::settings::modules::GurobiSettings>().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
returnfalse;
}
returnstatic_cast<bool>(value);
}
template<typenameValueType>
@ -496,9 +499,9 @@ namespace storm {
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to set Gurobi solution index ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to get Gurobi solution ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
STORM_LOG_THROW(std::abs(static_cast<int>(value)-value)<=storm::settings::getModule<storm::settings::modules::GurobiSettings>().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
STORM_LOG_THROW(std::abs(std::round(value)-value)<=storm::settings::getModule<storm::settings::modules::GurobiSettings>().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
STORM_LOG_THROW(error==0,storm::exceptions::InvalidStateException,"Unable to get Gurobi solution ("<<GRBgeterrormsg(env)<<", error code "<<error<<").");
if(value>0.5){
STORM_LOG_THROW(std::abs(static_cast<int>(value)-1)<=storm::settings::getModule<storm::settings::modules::GurobiSettings>().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
STORM_LOG_THROW(std::abs(value-1)<=storm::settings::getModule<storm::settings::modules::GurobiSettings>().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
returntrue;
}else{
STORM_LOG_THROW(value<=storm::settings::getModule<storm::settings::modules::GurobiSettings>().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");
STORM_LOG_THROW(std::abs(value)<=storm::settings::getModule<storm::settings::modules::GurobiSettings>().getIntegerTolerance(),storm::exceptions::InvalidStateException,"Illegal value for integer variable in Gurobi solution ("<<value<<").");