[Top][All Lists]

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

[Help-glpk] Re: Linear Programming in Java using GLPK and MathProg

From: Ivo van Baren
Subject: [Help-glpk] Re: Linear Programming in Java using GLPK and MathProg
Date: Sat, 8 Dec 2007 01:43:26 -0800 (PST)
User-agent: G2/1.0

Hi Benson,

As the MathProg parser in GLPK creates its own internal identifiers
for the MathProg parameters, variables and index sets without a clear
trace to the original name and index sets, it almost impossible to
access the internal data structures.

You can better spend your effort to cleverly set up the MathProg code
and the naming of the variables in order to effectively parse the
output file for the items you need.

Another idea is to create an xml file as output of the MathProg code.
Take an existing xml file as example and view it with a text editor.
Createappropriate tags for the output items and a tree structure. I
can remember me an initiative for a generic xml interface for solvers
similar to COIN.

The tree structure of the xml files gives you the opportunity to
easiliy access parts of the solution including the objective function.
The JAVA environment offers many (parser) tools to handle these files.

I shall post your question to address@hidden   I guess you get the
same answer. I remember me a discussion thread about this subject.

Best regards,

Ivo van Baren

On 6 dec, 22:36, "address@hidden"
<address@hidden> wrote:
> Hi,
> I am writing a university timetabling language and solver in Java and
> I want to use the linear programming approach. I want to use a free
> solver and GLPK seems to be a good candidate. I intend the program to
> translate the timetabling problem into MathProg format and let the
> solver solves it. It seems that readModel in GlpkSolver allows me to
> do this, however it seems to output the result of the calculation in a
> file, is it possible to access parts of the solution without going to
> the file? Can I access the values, e.g. the value of the objective
> function in some ways?
> Thanks for your help in advance.
> Regards,
> Benson

reply via email to

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