Hi,
I'm having issues getting the "array.sum(int, dimension)" function to work properly.
My source array is made of 10 rows and 4 columns and I'd like to sum each of the columns to get a 1 row 4 column array.
Help would be appreciated.
Regards,
Peter
Patrick — 16.02.10
Hi Peter,
you should call array.sum(INDEX_CAN_VARY, 0) .... sum(INDEX_CAN_VARY, 3) for each of the columns in the resulting array.
This is documented in the API of the class HyperArray.
Regards,
Patrick
Peter Shi — 16.02.10
Thanks for your help Patrick, that solved the problem.
I'm quite new to Anylogic and didn't realise you were meant to substitute "INDEX_CAN_VARY" for the index.
Cheers