Browse Source

Gurobi output now only gets printed to standard out and logfile if --debug has been set.

Former-commit-id: 4cd300ec5e
tempestpy_adaptions
dehnert 11 years ago
parent
commit
b546118c98
  1. 12
      src/counterexamples/MinimalLabelSetGenerator.h
  2. 2
      src/storm.cpp

12
src/counterexamples/MinimalLabelSetGenerator.h

@ -159,6 +159,15 @@ namespace storm {
return result;
}
/*!
* Sets the desired properties for the given Gurobi environment.
*
* @param env The Gurobi environment to modify.
*/
static void setGurobiEnvironmentProperties(GRBenv* env) {
int error = error = GRBsetintparam(env, "OutputFlag", storm::settings::Settings::getInstance()->getOptionByLongName("debug").getHasOptionBeenSet() ? 1 : 0);
}
/*!
* Creates a Gurobi environment and model and returns pointers to them.
*
@ -171,6 +180,9 @@ namespace storm {
LOG4CPLUS_ERROR(logger, "Could not initialize Gurobi (" << GRBgeterrormsg(env) << ").");
throw storm::exceptions::InvalidStateException() << "Could not initialize Gurobi (" << GRBgeterrormsg(env) << ").";
}
setGurobiEnvironmentProperties(env);
GRBmodel* model = nullptr;
error = GRBnewmodel(env, &model, "minimal_label_milp", 0, nullptr, nullptr, nullptr, nullptr, nullptr);
if (error) {

2
src/storm.cpp

@ -342,7 +342,7 @@ int main(const int argc, const char* argv[]) {
storm::storage::BitVector const& finishedStates = labeledMdp->getLabeledStates("finished");
storm::storage::BitVector const& allCoinsEqual1States = labeledMdp->getLabeledStates("all_coins_equal_1");
storm::storage::BitVector targetStates = finishedStates & allCoinsEqual1States;
storm::counterexamples::MinimalLabelSetGenerator<double>::getMinimalLabelSet(*labeledMdp, storm::storage::BitVector(labeledMdp->getNumberOfStates(), true), targetStates, 0.4, true, true);
storm::counterexamples::MinimalLabelSetGenerator<double>::getMinimalLabelSet(*labeledMdp, storm::storage::BitVector(labeledMdp->getNumberOfStates(), true), targetStates, 0.3, true, true);
}
}

Loading…
Cancel
Save