Page 1 of 1

how to know the period of simulation in which we are

Posted: Sat Jan 17, 2009 10:30 am
by nika85
Hello, someone tell me can I know the period of simulation in which we are? There is some command that tell me that??

And how can i tell to vensim the period we want to simulate??

Thank you very much!

[Edited on 1-17-2009 by nika85]

Posted: Sat Jan 17, 2009 11:16 am
by bob@vensim.com
The time range for a simulation is controlled from Model>Settings. there is a variable called Time that is the current time for the simulation.

Posted: Sat Jan 17, 2009 12:38 pm
by nika85
like this??

int tiempo=1;
vensimCommand = "SIMULATE>SETVAL|Time = " +tiempo;
r = vensim.command(vensimCommand);

This give me problems

Someone can help me?
Thank you

Posted: Mon Jan 19, 2009 12:14 pm
by bob@vensim.com
To specify the start time change the constant INITIAL TIME, the ending time the constant FINAL TIME as in

SIMULATE>SETVAL|INITIAL TIME=1900
SIMULATE>SETVAL|FINAL TIME=2100

Posted: Mon Jan 19, 2009 3:02 pm
by nika85
Ok, and there is no way to tell it what is the period we want to simulate later??

For example, we are in 6º period and we want to simulate again 3º period and then continue the simulation (4, 5, 6, 7...)

Thank you very much

Posted: Tue Jan 20, 2009 10:51 am
by bob@vensim.com
I don't really understand what you are asking but you should look into RESUME and GAME - check the index in the online help on these two names.

Posted: Tue Jan 20, 2009 11:10 am
by nika85
We load a model and we want to simulate two simulations at the same time and they will be independent, the problem is that the periods mix......

PD sorry but my english isn´t very good

Thank you very much

Posted: Tue Jan 20, 2009 3:48 pm
by bob@vensim.com
you will need to execute the two simulations in sequence. Set the start and end time for the first, then simulate it. Then change the run name, set a new start and end time, and simulate again. After both simulations have been made you can use the runs to look at and retrieve results.

Posted: Wed Jan 21, 2009 9:03 am
by nika85
There is no possible to do differents simulations with the same model at the same time???

We are trying to do this but the periods of simulation appear mixed.

[Edited on 1-21-2009 by nika85]

Posted: Wed Jan 21, 2009 9:09 am
by bob@vensim.com
The idea of running two simulations that do not have any intercommunication between them at the same time does not make any sense to me, unless you are simply trying to do parallel computing. This would require the multicontext DLL.

I am afraid I will not be able to access the boards for a while but if you can describe why you are trying to do this someone may be able to offer some help. You can also try contacting me by email.

Posted: Wed Jan 21, 2009 9:51 am
by nika85
We are doing an interface for a Vensim model, with the interface we can change the values of the variables and we display results of the simulations.
With a button we communicate with Vensim to load the model, send datas of variables, simulate(assigning a name to simulate different in each case) and to get the results to show them again in interface.
But the problem arises when we try to run multiple interfaces at once.
Using RUNNAME, it save the results in the .vdf correspondent, but not simulate the period that has to be simulated, it do a mix between periods that are in the open interfaces.

I hope you understand something!

Thank you so much

Posted: Wed Jan 21, 2009 3:17 pm
by Administrator
Can you email anything to me to demonstrate the problem?

It sounds like you have one Vensim DLL and are trying to access it from two different places. But this is just a guess.

Tony.

Posted: Wed Jan 21, 2009 3:26 pm
by nika85
This is exactly what we want to do. This is possible??

We first load the library and then we load the model and then we trying to access it from two different places but it mix the periods.


Thank you

[Edited on 1-21-2009 by nika85]

Posted: Wed Jan 21, 2009 4:13 pm
by Administrator
You only have one copy of the DLL loaded, so only one model. It doesn't matter where you access it from, you are accessing the same model.

To get around this you would need the Vensim multi context DLL.

Are you trying to create some sort of web based simulation?

Tony.

Posted: Wed Jan 21, 2009 4:17 pm
by nika85
Yes, we are tryng to create some sort of web based simulation.

What is the Vensim multi context DLL???

Thank you very much

Posted: Thu Jan 22, 2009 4:05 pm
by bob@vensim.com
The Multi Context DLL is a separately licensed software product intended to support web and application services. To use it you need to add a context for each separate interaction you wish to have with a model (using the VensimContextAdd function) then perform the simulations in those separate contexts.

For information on purchasing a license for the Multicontext DLL please contact us. The DLL that installs with Vensim DSS is not licensed for this type of use.

Posted: Thu Jan 22, 2009 4:25 pm
by nika85
We have Vensim DSS licence academic, Multicontext DLL is included in or is a different license??

Thank you very much

Posted: Sat Jan 24, 2009 6:48 am
by bob@vensim.com
This is a different license.