help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] slow matrix generation compared to AMPL


From: kendall bailey
Subject: Re: [Help-glpk] slow matrix generation compared to AMPL
Date: Mon, 09 Aug 2004 11:42:06 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030428

Andrew Makhorin wrote:

  I received a .mod and .dat file from a colleague using AMPL, and
tried to run glpsol --check on it. I've added "data;" and "end;" statements where appropriate and everything worked fine. The problem is that it took over 24 hours to complete, where AMPL takes 1 minute. I'm not solving the LP, just reading the model and data. The data file is about 82MB. My hardware is comparable to his (1 GB memory), so I don't think its a case of excessive swapping.

Could you please post me your .mod file?

Thank you for the willingness to review the model. I'll need to see if I can post it, as it may contain proprietary information. It was described to me as 'simple', but I am not an expert. I know enough about math programming to understand the abstract model, but this is my first time with either AMPL or MathProg.

Perhaps this bit of example will shed some light. The constraint B took longest to generate. This should give some idea about the dimensionality...

set C;
set L;
set T;
set D;
set LC within {L,C};
set LTD within {L,T,D};
set LTDC within {L,T,D,C};
set DM within {LTD,L};
set LM within {LTD,LTD,C};
set EM within {LTD,LTD,C};

param AC{LTDC};
param DC{LTDC};

var LOAD{(i,j,k,l,m,n,c) in LM};
var EMPTY{(i,j,k,l,m,n,c) in EM};

# . . .

subject to B {(i,j,k,c) in LTDC : j <> 168 and c = 'SO' }:
sum{(i,j,k,l,m,n,c) in LM}LOAD[i,j,k,l,m,n,c] + sum{(i,j,k,l,m,n,c) in EM}EMPTY[i,j,k,l,m,n,c] + DC[i,j,k,c] = sum{(l,m,n,i,j,k,c) in LM}LOAD[l,m,n,i,j,k,c] + sum{(l,m,n,i,j,k,c) in EM}EMPTY[l,m,n,i,j,k,c] + AC[i,j,k,c];

Thank you for the help.

Kendall






reply via email to

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