Can I read the model file back from model.ExportToFile('test.pd.txt') in Or-Tools CP-SAT and solve it again for debug purpose

88 Views Asked by At

I have a file generated from model.ExportToFile('test.pd.txt') in ortools CP-SAT. can I read the txt file back and solve it again for debug purpose?

we can do this in other solvers like, cplex, gurobi. But i do know how to do it in OR-Tools CP-SAT.

read the model txt file directly and then solve it.

1

There are 1 best solutions below

2
Laurent Perron On BEST ANSWER

The binary sat_runner can load and run saved models.

sat_runner --input proto_file --params params_in_text_format

The source is in ortools/sat/sat_runner.cc

See also this thread