help-glpk
[Top][All Lists]
Advanced

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

RE: [Help-glpk] Linear expressions in the integrands of iteratedexpressi


From: Meketon, Marc
Subject: RE: [Help-glpk] Linear expressions in the integrands of iteratedexpressions
Date: Sun, 22 Oct 2006 20:54:00 -0400

Can you replace

  s.t. blrMax:max{i in I, j in J} x[i,j] = 1;

with just putting an upper bound "x[i,j] <= 1" where you define the
variable?

"max" isn't a linear operator.

-Marc

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf
Of Barry Rountree
Sent: Sunday, October 22, 2006 20:41
To: address@hidden
Subject: [Help-glpk] Linear expressions in the integrands of
iteratedexpressions

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 mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-glpk
---------------------------------------------------------------------------- 
This e-mail and any attachments may be confidential or legally privileged.  If 
you received this message in error or are not the intended recipient, you 
should destroy the e-mail message and any attachments or copies, and you are 
prohibited from retaining, distributing, disclosing or using any information 
contained herein.  Please inform us of the erroneous delivery by return e-mail. 

Thank you for your cooperation.
---------------------------------------------------------------------------- 





reply via email to

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