Does the --save option for each intermediate solution work with non-MIP
problems? I'm assuming not unless this is a recent feature.
If not, is there a simple model modification that would allow doing this
without increasing the computational workload excessively? Some more
discussion of this in the wiki would be a huge help.
I have some moderately large problems I want to play with again when other
demands on my time abate a bit. I sometimes converge to the wrong answer when
solving synthetic examples and have struggled to understand why.
Reg
________________________________
From: Andrew Makhorin <m...@gnu.org>
To: help-glpk@gnu.org
Sent: Sunday, July 21, 2013 3:48 AM
Subject: [Help-glpk] solving large models with glpsol
SOLVING LARGE MODELS WITH GLPSOL
Solving large models may take a long time and require a lot of memory,
so in this case it may be more convenient to split the solution process
into three stages as described below.
1. Translate the model to GLPK format as follows:
glpsol -m model.mod --wglp model.glp --check
In this case glpsol reads the model from file 'model.mod', process
it, and writes it to file 'model.glp' in GLPK format (which is
a low-level text format similar to MPS format). The option '--check'
tells glpsol not to solve the model right now.
2. Solve the model using the following command:
glpsol --glp model.glp ... -w model.sol
In this case glpsol reads the model in GLPK format from file
'model.glp', solves it, and writes its final solution to a text file
'model.sol'.
On solving the model you may try to use different options, e.g.
options to find an initial solution with a primal heuristic, options
that specify the branching technique, options that enable generating
cutting planes, etc.
If the model is of MIP class, you may save to a file not only the
final solution, but all intermediate integer feasible solutions
discovered by the solver, with the option '--save filename'. The
filename string specified in the '--save' option should contain
an asterisk (*), which will be replaced by a file serial number.
For example, if you specify '--save foo/bar*.txt', the first
solution will be written to file 'foo/bar001.txt', the second to
file 'foo/bar002.txt', etc.
3. To process the solution previously saved to a file you need to use
the following command:
glpsol -m model.mod -r model.sol [-o ...]
In this case glpsol reads the model from file 'model.mod', process
it, and reads its solution from file 'model.sol' as if the model
were solved in a normal way. This, in particular, allows to execute
model statements that follow the solve statement.
_______________________________________________
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk
_______________________________________________
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk