[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Linear expressions in the integrands of iterated expressions
From: |
Barry Rountree |
Subject: |
[Help-glpk] Linear expressions in the integrands of iterated expressions |
Date: |
Sun, 22 Oct 2006 20:41:13 -0400 |
User-agent: |
KMail/1.9.1 |
Hello,
Short version:
I'd like to implement O_MAXIMUM using A_FORMULA, but I need
some help finding where to put the patch.
Long version:
I'm hitting the following error message using glpsol v4.11:
bpp.mod:76: integrand following max{...} has invalid type
Context: ...j ] = 6 ; s.t. blrX : max { i in I , j in J } x [ i , j ] <=
Model processing error
This can be caused, for example, by adding the following line to
the bpp.mod example:
s.t. blrMax:max{i in I, j in J} x[i,j] = 1;
Grepping the error message led to this comment in glpmpl1.c:
/* now the integrand must be of numeric type or linear form
(the latter is only allowed for the sum operator) */
Well, ok, O_MAXIMUM works for A_NUMERIC, and O_SUM works for A_NUMERIC
and A_FORMULA, so I'll just find where in the pseudocode translation
of the summation takes place and implement a similar method to find the
maximum.
And I can't seem to find where that happens. reduce_terms() looked
like the right choice, but the fp_add() doesn't do what I expect.
I've grepped all of the occurances of O_SUM, but I'm just not seeing
the place where the actual summation occurs.
Any pointers would be most appreciated.
Thanks,
Barry Rountree
- [Help-glpk] Linear expressions in the integrands of iterated expressions,
Barry Rountree <=