I have some Fortran code I'd like to implement in Simile, but I am a bit stuck on how to handle a Do ... Until loop. What I'm actually doing is sorting out an allocation across array elements, so it all has to happen within a single timestep. I'm sure Robert sent me an example a few years ago using a conditional instance submodel, but I can't access my old email archive at the mo. Ideas welcome. Thanks, Ed.
Hi Ed. A multinstance
Hi Ed.
A multinstance submodel, probably conditional is often needed in situations loops are used in programming and influences have a special property "Use values in the same time step" (double-click on the influence arrow. This property indicates how the ambiguity associated with a circular loop of influences is to be resolved.
If you attach the code for the you want to implement we could be more specific
Jonathan
Example iterative submodel to implement a repeat... until loop
Have only one 'increment' variable as in the attached model, and get the initial value from StartValue which has a value defined without reference to the dashed influence at the start of the iteration.
I've copied this from an email from Jasper.
Jonathan