Solved

Calculating Non-zero Average

  • 8 February 2021
  • 1 reply
  • 25 views

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
icon

Best answer by mohansx 8 February 2021, 20:38

@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

View original

1 reply

Userlevel 5

@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