there should be no problem having different models in the same composition using the same exchange item names, but you would definitely need to differentiate between incoming and outgoing variables on the same model. Qin and Qout would be fine as the intent of the value is obvious to the model and all models in your bucket example could have a Qin and Qout.
if two or more models passed data into one model, however, you would either need to have created enough Qin's to handle them all when writing the code (Q1in, Q2in, ... on each model) or use another simple model (in-between) to aggregate all the Q's and then pass them in/out of the model as a single Qin/Qout (basically, you could adapt the writercsv for this).
so generally, i think you could get away with writing only one model to solve the 10-model problem if they're all doing the same thing ...and as long as you were thinking of this when you first wrote it.
as for multiple instances of the same model, this is certainly not a problem. simply make copies of the xml and omi files and give them each a unique id (in the xml files). as olong as the .omi files each point to the right right xmls file (remember, the model omi file has the reference to the xml file), your composition should work fine.
the big advantage of dioing this would be that each of these 10 models could use the same dlls/exe's. as only one model is running at a time, the composition can use the same binaries for each model.
i use my boundary, reservoir and spill models from the workshop in exactly this way; attached a jpg showing such a composition. if you want to see this for yourself, it's included in the fluidearth repository (File > Import > Fluid Earth Repository > it's the last one on the list, remembering to enable Tools > plugins > all, first. actually, the repository goes one further and has all of the .xml files embedded in the same .exe - this is the whole point of the DataEmbedded folder in the VS Solution).
hope this is some help - if i've missed your point though, just let me know and i'll try again!
good luck with your wrapping and let me know how you get on,
07 June 2010 17:18Subject:
multiple instances of the same model
I am trying to output from one model into another, with both models being the same. To conceptualise: Imagine one bucket leaking into another, which in turn leaks into a third bucket. The bucket in the middle needs a volume in and a volume out. In this example it would be easy to name these values Qin1 and Qout1, Qin2 and Qout2, etc. However say if there were 20 buckets linked to eachother it would take a lot of time to create seperate models. So, is it possible to give the inputs and outputs of a model the same name? ie Q is the input and output of each bucket/model. If not, is there any way around this?