Send Help-glpk
mailing list submissions to
address@hiddenTo subscribe or unsubscribe via the World Wide Web, visit
https://lists.gnu.org/mailman/listinfo/help-glpkor, via email, send a message with subject or body 'help' to
address@hiddenYou can reach the person managing the list at
address@hiddenWhen replying, please edit your Subject line so it is more specific
than "Re: Contents of Help-glpk digest..."
Today's Topics:
1. solving large models with glpsol (Andrew
Makhorin)
----------------------------------------------------------------------
Message: 1
Date: Sun, 21 Jul 2013 12:48:59 +0400
From: Andrew Makhorin <
address@hidden>
To:
address@hiddenSubject: [Help-glpk] solving large models with glpsol
Message-ID: <address@hidden>
Content-Type: text/plain; charset="UTF-8"
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
address@hiddenhttps://lists.gnu.org/mailman/listinfo/help-glpkEnd of Help-glpk Digest, Vol 128, Issue 12
******************************************