Dear all,

I created a model to solve a linear programming capital budgeting problem with 
Ruby (OPL):
Maximize NPV of projects (x1…x5) by taking into account Budget and Resource 
constraints (c1, c2). Solution can only be 0 or 1.
 
Example:
Maximize: 928 x1 + 908 x2 + 801 x3 + 543 x4 + 944 x5
Constraints:
c1: 398 x1 + 151 x2 + 129 x3 + 275 x4 + 291 x5 <= 800
c2: 111 x1 + 139 x2 + 56 x3 + 54 x4 + 123 x5 <= 200
Result is binary (0 or 1): x1 x2 x3 x4 x5

My code works correctly until a certain number of projects (maximum 29). If I 
use more than 29 Projects (x1 + x2 + .. + x30) the code crashes with the 
following result:
glp_set_row_name: i = 1; row name too long
Error detected in file glpapi01.c at line 441
Abort trap: 6

Since I would like to process a lot more in order to solve the problem I need 
to somehow change my setup. I can’t really imagine that this is a given 
maximum. 

Does anybody have encountered a similar problem and could point me into the 
right direction? 

Many thanks and best regards,

Lukas


_______________________________________________
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to