help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] RE: GLPK on 64 bit Linux


From: Hammond, Paul
Subject: [Help-glpk] RE: GLPK on 64 bit Linux
Date: Thu, 25 Mar 2010 18:04:12 +0300

Andrew,

I did not write the original code here I'm debugging, but it's certainly 
intended that there is a constraint that all the input must be allocated. I can 
double check that this is the case.

In terms of presenting a test case, I'm quite new to GLPK, I'd have to read up 
n the formats you have below.

We do make some calls when we're debugging to the following:

                        solver.writeCpxlp(file + ".dat");

.........

                        solver.printSol(file + ".sol");

Would any of these files be sufficient? If not is there a call I can make on 
the solver from Java to give you the problem in the format you would need?

Paul

-----Original Message-----
From: Andrew Makhorin [mailto:address@hidden 
Sent: 25 March 2010 14:37
To: Hammond, Paul (IDEAS)
Cc: address@hidden
Subject: Re: GLPK on 64 bit Linux

> Yes you're right, a given input resource may be allocated
> differently and is the case. But one thing that should remain constant
> though is the totals, what I'm talking about is that the totals of the
> allocations at the end of a given input do not equal that input.

> By way of illustration, take the often quoted example where the
> farmer is allocating his land to grow wheat or barley subject to
> constraints. In the output results, even if there are multiple optima,
> all the land should be allocated to either wheat or barley, but I find
> cases where the total land in the output is less or greater than the
> amount coming in, and it's too great to be a rounding error.

It may happen that it is not profitable to allocate all the land
until you require all the land to be allocated by introducing an
appropriate equiality constraint.

> Now my resource allocation problem is clearly different than the
> simple example above, I have many different resources to be allocated
> subject to more constraints, but the problem I have is essentially the
> same as this analogy.

You can write the solution in a text file with glp_print_sol
and see if the optimality conditions are satisfied. If they are,
probably you missed some essential constraints. If not, please
write your instance in mps or better in glpk lp/mip format and post
it to me. Thanks.




--------------------------------------------------------------------------
NOTICE: If received in error, please destroy, and notify sender. Sender does 
not intend to waive confidentiality or privilege. Use of this email is 
prohibited when received in error. We may monitor and store emails to the 
extent permitted by applicable law.







reply via email to

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