Re: Fwd: questions about MCSim
Frédéric BOIS <Frederic.BOIS <at> ineris.fr>
2009-04-15 14:08:17 GMT
Dear Cindy,
I actually love the [] syntax, it's one of my most brilliant ideas. That being said, it is also half-baked and
imperfect. In particular you should be aware
of the fact that you will NOT be able to use the vector syntax in your input files... Some of my collaborators
asked me when I will finish that, and I
had to explain to them that it was a large task. But to answer specifically your questions:
The first (sad) answer is no: you cannot dynamically change the size of an array defined in MCSim.
Alternatives may exist:
- Can you work with a maximum length vector and use only part of it in various runs ? (that would assume a
particular structure
for your system) You could combine that with conditional statements for the computation of the
derivatives (for example
dt(Y[1-20]) = (n < 10 ? a*Y[i-1] - b*Y[i] : 0);
That's somewhat wasteful, but not too much, because null derivative states take no time to integrate.
- If you really feel like programming, you can indeed change the code, it's free for all. But honestly, you
would be stretching quite far the syntax
and the code, and I don't even have an idea where you would start, because there is no connection between run
time inputs (defined in input files)
and the precompilation model definition files. You would have to define a mechanism to define dynamic
allocation of space and on the fly ODE
rewriting... sounds impractical to me. You may want to look at a way (scripting) to generate automatically
the model files and a template input file,
recompile the model on the fly and run it. That's would be a way (but slow). Actually, if you are in mood for
programming, the best use of your time
would be to change the mcsim/sim codes to allow the bracket syntax in input files...
- You may also want to look at the latest capability of the code: to use a collection of separate SBML files and
a template transport model to generate
automatically a global model (but still, that would be slow if you wanted to run 1000 different models...).
I haven't explored everything it can be used
(Continue reading)