Browse Source

Merge branch 'master' into deterministicScheds

tempestpy_adaptions
Tim Quatmann 6 years ago
parent
commit
9bde9c4127
  1. 2
      src/storm/solver/GurobiLpSolver.cpp
  2. 2
      src/storm/storage/expressions/ExpressionManager.cpp

2
src/storm/solver/GurobiLpSolver.cpp

@ -158,7 +158,7 @@ namespace storm {
void GurobiLpSolver<ValueType>::addVariable(storm::expressions::Variable const& variable, char variableType, ValueType lowerBound, ValueType upperBound, ValueType objectiveFunctionCoefficient) {
// 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 << " exists already in the model.");
STORM_LOG_ASSERT(variableToIndexMap.count(variable) == 0, "Variable " << variable.getName() << " exists already in the model.");
// Check for valid variable type.
STORM_LOG_ASSERT(variableType == GRB_CONTINUOUS || variableType == GRB_INTEGER || variableType == GRB_BINARY, "Illegal type '" << variableType << "' for Gurobi variable.");

2
src/storm/storage/expressions/ExpressionManager.cpp

@ -167,7 +167,7 @@ namespace storm {
STORM_LOG_THROW(!checkName || isValidVariableName(name), storm::exceptions::InvalidArgumentException, "Invalid variable name '" << name << "'.");
auto nameIndexPair = nameToIndexMapping.find(name);
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_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) << "'.");
return Variable(this->getSharedPointer(), nameIndexPair->second);
} else {
uint_fast64_t offset = 0;

Loading…
Cancel
Save