help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] [Fwd: Ceil in minimize function -- invalid type error (m


From: Andrew Makhorin
Subject: Re: [Help-glpk] [Fwd: Ceil in minimize function -- invalid type error (mod file in attachment)]
Date: Thu, 19 Jan 2017 17:54:25 +0300

On Thu, 2017-01-19 at 15:27 +0100, Piotr Kwas wrote:
> Of course, you're right, the line looks like
> s.t. foo{a in Art, s in Supp} : Z[a,s] >= OrdQty[a,s]/ArtPackQty[a];
> 
> 
> 
> The ceil function was there just for 5 seconds, just for last try, but
> it doesn't work. (I didn't cut it before write the previous message).
> 
> 
> But the problem i described before, can you help me maybe with it ?
> 

Attached is your model I changed to simulate ceil by with auxiliary
integer variables; see four lines added near the objective. The output
from glpsol is following:

GLPSOL: GLPK LP/MIP Solver, v4.61
Parameter(s) specified in the command line:
 -m supp.mod
Reading model section from supp.mod...
Reading data section from supp.mod...
supp.mod:78: warning: unexpected end of file; missing end statement
inserted
78 lines were read
Generating SuppValue...
Generating Quantity...
Generating CorrectSupplier...
Generating foo...
Generating goal...
Model has been successfully generated
GLPK Integer Optimizer, v4.61
72 rows, 60 columns, 198 non-zeros
30 integer variables, none of which are binary
Preprocessing...
28 rows, 36 columns, 66 non-zeros
18 integer variables, none of which are binary
Scaling...
 A: min|aij| =  5.000e-02  max|aij| =  4.400e+00  ratio =  8.800e+01
GM: min|aij| =  8.173e-01  max|aij| =  1.224e+00  ratio =  1.497e+00
EQ: min|aij| =  6.760e-01  max|aij| =  1.000e+00  ratio =  1.479e+00
2N: min|aij| =  4.000e-01  max|aij| =  1.100e+00  ratio =  2.750e+00
Constructing initial basis...
Size of triangular part is 28
Solving LP relaxation...
GLPK Simplex Optimizer, v4.61
28 rows, 36 columns, 66 non-zeros
      0: obj =   2.610000000e+03 inf =   1.160e+02 (6)
      6: obj =   4.837500000e+03 inf =   0.000e+00 (0)
*    31: obj =   1.315010526e+03 inf =   0.000e+00 (0)
OPTIMAL LP SOLUTION FOUND
Integer optimization begins...
+    31: mip =     not found yet >=              -inf        (1; 0)
+    36: >>>>>   1.362200000e+03 >=   1.330300000e+03   2.3% (6; 0)
+    42: >>>>>   1.345800000e+03 >=   1.341378947e+03   0.3% (3; 4)
+    46: mip =   1.345800000e+03 >=     tree is empty   0.0% (0; 13)
INTEGER OPTIMAL SOLUTION FOUND
Time used:   0.0 secs
Memory used: 0.2 Mb (175615 bytes)
        50.0    0.0     0.0     0.0     0.0
        0.0     30.0    0.0     0.0     0.0
        0.0     0.0     0.0     10.0    0.0
        0.0     0.0     80.0    0.0     0.0
        0.0     0.0     0.0     30.0    0.0
        0.0     0.0     40.0    50.0    0.0
Model has been successfully processed


Attachment: supp.mod
Description: audio/mod


reply via email to

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