#include "linear_solver/linear_solver2.pb.h"
#include "util/proto_tools.h"
new_proto::MPModelProto exported_model;
solver.ExportModelToNewProto(&exported_model);
WriteProtoToFile("/tmp/lin.pb.txt", exported_model, false, false);
I'm including the file generated with your example.
Cheers,
BdB
--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,The coefficients in the problem have a very high dynamic range: some coefficients have a magnitude of 1E-8 while some others have a magnitude of 1E4. Even after scaling, Glop does not manage to reduce the dynamic range enough, and in the ends it returns a solution that is IMPRECISE. In that respect, Glop is more accurate than most other solvers, because it tells when it is not sure about a solution.Still, the result status is not converted properly in MPSolver, and MPSolver returns ABNORMAL when Glop gives IMPRECISE.
We will work to correct this issue. In the meantime, you may want to change the scale of the matrix, by changing the units of some variables. A variable x where coefficients 1e-8 appear would be replaced by a variable y = 1e-8 *x, and all the coefficients would be multiplied by 1e8.
Finally, a simple tip to spare you the time of writing C++ code that enables to reproduce a problem, you can export any model that you create as a protobuf, thatcan then be solved using solve.cc in example by using the following code snippet: