Skip to main content

If I have a variable where row A is timeline with index t and B are calculated values, how to calculate Non-zero Average of Values in B?

A 1 2 3 4 5
B 4 0 6 0 7

@vishweshpatil , you can use the $ operator to do that as 

 

Mean$(i, B(i))

or

Mean(i|B(i), B(i))

See Modifying the Sparsity — AIMMS Language Reference


Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator