// Assert whether the variable does not exist yet.
// Due to incremental usage (push(), pop()), a variable might be declared in the manager but not in the lp model.
STORM_LOG_ASSERT(variableToIndexMap.count(variable)==0,"Variable "<<variable.getName()<<" exists already in the model.");
// Check for valid variable type.
// Check for valid variable type.
STORM_LOG_ASSERT(variableType==GRB_CONTINUOUS||variableType==GRB_INTEGER||variableType==GRB_BINARY,"Illegal type '"<<variableType<<"' for Gurobi variable.");
STORM_LOG_ASSERT(variableType==GRB_CONTINUOUS||variableType==GRB_INTEGER||variableType==GRB_BINARY,"Illegal type '"<<variableType<<"' for Gurobi variable.");
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without Z3 or the version of Z3 does not support optimization. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without Z3 or the version of Z3 does not support optimization. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without Z3 or the version of Z3 does not support optimization. Yet, a method was called that requires this support.";
}
template<typenameValueType>
template<typenameValueType>
voidZ3LpSolver<ValueType>::push(){
voidZ3LpSolver<ValueType>::push(){
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without Z3 or the version of Z3 does not support optimization. Yet, a method was called that requires this support.";
throwstorm::exceptions::NotImplementedException()<<"This version of storm was compiled without Z3 or the version of Z3 does not support optimization. Yet, a method was called that requires this support.";
STORM_LOG_THROW(!checkName||isValidVariableName(name),storm::exceptions::InvalidArgumentException,"Invalid variable name '"<<name<<"'.");
STORM_LOG_THROW(!checkName||isValidVariableName(name),storm::exceptions::InvalidArgumentException,"Invalid variable name '"<<name<<"'.");
autonameIndexPair=nameToIndexMapping.find(name);
autonameIndexPair=nameToIndexMapping.find(name);
if(nameIndexPair!=nameToIndexMapping.end()){
if(nameIndexPair!=nameToIndexMapping.end()){
STORM_LOG_ASSERT(indexToTypeMapping.at(nameIndexPair->second)==variableType,"Tried to declareOrGet variable '"<<name<<"' of type '"<<variableType<<"' but there is a variable with that name and different type '"<<indexToTypeMapping.at(nameIndexPair->second)<<"'.");
STORM_LOG_THROW(model.isDiscreteTimeModel()||!acc.isExitSet()||!baseRewardModel.hasStateRewards(),storm::exceptions::NotSupportedException,"Exit rewards for continuous time models are not supported.");
STORM_LOG_THROW(isDiscreteTimeModel||!acc.isExitSet()||!baseRewardModel.hasStateRewards(),storm::exceptions::NotSupportedException,"Exit rewards for continuous time models are not supported.");