help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Help Urgent


From: Andrew Makhorin
Subject: [Help-glpk] Help Urgent
Date: Fri, 1 Mar 2002 02:25:16 +0300

>I have been using GLPK/L, to solve a optimization problem with the number
>of variable between 100 and 300, that is a 100 X 100, 300 X 300 matrix.
>
>But when I use a number of variables bigger 100, the glpsol doesnot solve
>the problem. Then the following error is showed:
>
>load_model: reading model from `modeldesc1.lpm'...
>modeldesc1.lpm:11: too many columns
>glp_read_lpm1: processing terminated due to errors
>Model description processing error
>
>There is a limit of the number of columns that can be used in GLPK/L?

Yes, you reached a limit, because the glpk/l translator limits number of
columns in the table built-in function by 100. You may consider writing
your numeric material by using the data built-in function (i.e. in the
sparse format), which has no such limit.

NEVERTHELESS, you can enlarge this limit in the following way:

1. Be sure you have glpk-3.0.5.

2. Copy the file 'glplan5.c' into your working directory.

2. Replace the line 593, which looks like

      #define MAX_COLS 100

   by a line you need, for example:

      #define MAX_COLS 500

3. Compile your program explicitly specifying the changed version of
   'glplan5.c', i.e.

      gcc main.c glplan5.c ... -lglpk ...

This limit was introduced quite arbitrarily, because it's difficult to
imagine a *full* table that has greater than 100 columns, isn't it :+)






reply via email to

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