> I am new to MathProg, and a former user of Ampl. I have been trying to
> create an auxiliary variable that has nothing to do the model, but to
> use for reporting output. For example, I am roughly trying to do the
> following:
> 
> define variable named counter
> counter=0
> for (i in Relevant Set)
>    if (i > 100) counter = counter+1
> 
> This way, I want to report how many of the variables exceed 100.
> 
> In Ampl, I was able to define a variable as usual ( var counter,
> integer;) and update its value via let command (let counter:=counter
> +1).
> 
> I will appreciate if you could help me on this.

param counter := sum{i in Relevant Set: i > 100} 1;




_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to