help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Writing Output File to MS Access


From: Andrew Makhorin
Subject: Re: [Help-glpk] Writing Output File to MS Access
Date: Mon, 05 Sep 2011 11:45:23 +0400

> Thanks for your reply.  I have tried the proposed approach and I get the
> following:
> 
> -----------------------------------------------
> Parameter(s) specified in the command line:
>  --glp foo.glp -w foo.sol
> Reading problem data from 'foo.glp'...
> Foo.glp:7: error: too many data fields specified
> GLPK LP/MIP processing error
> -----------------------------------------------
> 
> When I run this model through gusek (as the original .mod file with the
> reduced data set) the model solves, so I'm not sure how to prepare the
> mps model to adopt your proposal.  I would appreciate any guidance on
> this error.

In Gusek you may enter commands directly in the output panel which
usually appears on the right or bottom. Make sure that file foo.glp is
created with the option '--wglp foo.glp'.

> 
> I have interpreted your proposal as an iterative process - something
> like this:
> 
> 1.    prepare the problem with the reduced data set then follow the
> proposal
> 2.    expand the data set and repeat
> 3.    continue performing 3 until solved (with all data) or out of
> memory.
> 
> Is that correct?

No, it isn't. The idea is not to keep the source model components (i.e.
data tables) in the memory on the step 2 when the solver is working.
Note that the model and corresponding data on the step 3 must be exactly
the same as on the step 1. So, if you need to solve your model using
different data, you should again perform all the steps.

STEP 1: translating

$ ./glpsol -m queens.mod --check --wglp foo.glp
GLPSOL: GLPK LP/MIP Solver, v4.46
Parameter(s) specified in the command line:
 -m queens.mod --check --wglp foo.glp
Reading model section from queens.mod...
41 lines were read
Generating a...
Generating b...
Generating c...
Generating d...
Generating obj...
Model has been successfully generated
Writing problem data to `foo.glp'...
534 lines were written

STEP 2: solving

$ ./glpsol --glp foo.glp -w foo.sol
GLPSOL: GLPK LP/MIP Solver, v4.46
Parameter(s) specified in the command line:
 --glp foo.glp -w foo.sol
Reading problem data from `foo.glp'...
Problem: queens
Objective: obj
43 rows, 64 columns, 316 non-zeros
64 integer variables, all of which are binary
534 lines were read
GLPK Integer Optimizer, v4.46
43 rows, 64 columns, 316 non-zeros
64 integer variables, all of which are binary
Preprocessing...
42 rows, 64 columns, 252 non-zeros
64 integer variables, all of which are binary
Scaling...
 A: min|aij| =  1.000e+00  max|aij| =  1.000e+00  ratio =  1.000e+00
Problem data seem to be well scaled
Constructing initial basis...
Size of triangular part = 42
Solving LP relaxation...
GLPK Simplex Optimizer, v4.46
42 rows, 64 columns, 252 non-zeros
*     0: obj =   0.000000000e+00  infeas =  0.000e+00 (0)
*    30: obj =   8.000000000e+00  infeas =  2.220e-16 (0)
OPTIMAL SOLUTION FOUND
Integer optimization begins...
+    30: mip =     not found yet <=              +inf        (1; 0)
+    64: >>>>>   7.000000000e+00 <=   8.000000000e+00  14.3% (7; 0)
+   133: >>>>>   8.000000000e+00 <=   8.000000000e+00   0.0% (4; 13)
+   133: mip =   8.000000000e+00 <=     tree is empty   0.0% (0; 21)
INTEGER OPTIMAL SOLUTION FOUND
Time used:   0.0 secs
Memory used: 0.1 Mb (132801 bytes)
Writing MIP solution to `foo.sol'...
109 lines were written

STEP 3: postprocessing

$ ./glpsol -m queens.mod -r foo.sol
GLPSOL: GLPK LP/MIP Solver, v4.46
Parameter(s) specified in the command line:
 -m queens.mod -r foo.sol
Reading model section from queens.mod...
41 lines were read
Generating a...
Generating b...
Generating c...
Generating d...
Generating obj...
Model has been successfully generated
Reading MIP solution from `foo.sol'...
109 lines were read
 . . . Q . . . .
 . Q . . . . . .
 . . . . . . . Q
 . . . . . Q . .
 Q . . . . . . .
 . . Q . . . . .
 . . . . Q . . .
 . . . . . . Q .
Model has been successfully processed





reply via email to

[Prev in Thread] Current Thread [Next in Thread]