help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Conversion of AMPL model defect #1


From: Andrew Makhorin
Subject: Re: [Help-glpk] Conversion of AMPL model defect #1
Date: Wed, 08 Aug 2012 18:59:57 +0400

> The param fix for effective_MDQ worked very well, and there were a
> number of other instances of assignment for params using '=' instead of
> ':='.
> 
> The fix for the BP variable is still causing issues. I have used your
> version:
> 
>   param BP >= 0, := sum {t in DAYS, Cid in BANKING_CONTRACTS}
>   (DBQ[t,Cid] + DWQ[t,Cid]) * 0.0001;
> 
> and I get a compilation error: "expression following := has invalid
> type".
> 
> DBQ and DWQ are both variables defined as:
> 
>   var DBQ{DAYS, BANKING_CONTRACTS} >= 0;
>   var DWQ{DAYS, BANKING_CONTRACTS} >= 0;
> 
> Apart from this issue, everything else is running now.

Since BP depends on variables, it is also a variable. Thus, you might
use the following modeling:

var BP >= 0;

s.t. foo: BP = sum {t in DAYS, Cid in BANKING_CONTRACTS}
                      (DBQ[t,Cid] + DWQ[t,Cid]) * 0.0001;

This does not complicate the instance, because BP will be removed by the
lp preprocessor.





reply via email to

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