[PPL-devel] [GIT] ppl/ppl(pip): Properly set status flags when solving a PIP_Problem having no constraints .
Enea Zaffanella
zaffanella at cs.unipr.it
Thu Nov 26 14:44:13 CET 2009
Module: ppl/ppl
Branch: pip
Commit: 3bb1ea9da4415fee8b48c9fa32f7883777403a66
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=3bb1ea9da4415fee8b48c9fa32f7883777403a66
Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date: Thu Nov 26 14:41:05 2009 +0100
Properly set status flags when solving a PIP_Problem having no constraints.
Minor correction to ascii_dump method.
---
src/PIP_Problem.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/PIP_Problem.cc b/src/PIP_Problem.cc
index b7100e8..4857949 100644
--- a/src/PIP_Problem.cc
+++ b/src/PIP_Problem.cc
@@ -103,6 +103,7 @@ PPL::PIP_Problem::solve() const {
x.current_solution = new PIP_Solution_Node();
if (input_cs.empty()) {
// No constraints: solution = {0}.
+ x.status = OPTIMIZED;
return OPTIMIZED_PIP_PROBLEM;
}
@@ -291,7 +292,7 @@ PPL::PIP_Problem::ascii_dump(std::ostream& s) const {
s << "\nparameters";
parameters.ascii_dump(s);
- s << "\ninitial_context";
+ s << "\ninitial_context\n";
initial_context.ascii_dump(s);
s << "\ncontrol_parameters\n";
More information about the PPL-devel
mailing list