help-mcsim
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Arrays in MCSim


From: Eric Hack
Subject: Arrays in MCSim
Date: Wed, 18 Aug 2004 16:55:49 -0400

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

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]