Eric Hack | 18 Aug 22:55

Arrays in MCSim

Dear All,

 

I am having difficulty with a model that was originally written in another language and uses arrays extensively.  Is there a way to use arrays?  Could I modify the model.c file that mod produces and redefine some of my parameters as arrays?  What would I need to change?  This would be very handy to me because there are rather large (20 X 168) multidimensional arrays in the original model language that I cannot quite figure out how to handle in MCSim.

 

I tried using a one-dimensional vector for all elements but I received an error message saying that I had too many parameters.  Now I do not think a one-dim array would have worked anyway because I would have to reference A[row, col] with A[maxrow*(col-1)+row], and mod cannot ‘unroll’ this expression.  It must be done dynamically.

 

Thanks,

Eric

 

_______________________________________________
Help-mcsim mailing list
Help-mcsim <at> gnu.org
http://lists.gnu.org/mailman/listinfo/help-mcsim

Gmane