how to know the period of simulation in which we are

Use this forum to post Vensim related questions.
Post Reply
nika85
Junior Member
Posts: 17
Joined: Sat Jan 17, 2009 10:26 am

how to know the period of simulation in which we are

Post 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]
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
nika85
Junior Member
Posts: 17
Joined: Sat Jan 17, 2009 10:26 am

Post 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
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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
nika85
Junior Member
Posts: 17
Joined: Sat Jan 17, 2009 10:26 am

Post 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
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
nika85
Junior Member
Posts: 17
Joined: Sat Jan 17, 2009 10:26 am

Post 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
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
nika85
Junior Member
Posts: 17
Joined: Sat Jan 17, 2009 10:26 am

Post 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]
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
nika85
Junior Member
Posts: 17
Joined: Sat Jan 17, 2009 10:26 am

Post 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
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Post 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.
nika85
Junior Member
Posts: 17
Joined: Sat Jan 17, 2009 10:26 am

Post 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]
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Post 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.
nika85
Junior Member
Posts: 17
Joined: Sat Jan 17, 2009 10:26 am

Post 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
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
nika85
Junior Member
Posts: 17
Joined: Sat Jan 17, 2009 10:26 am

Post by nika85 »

We have Vensim DSS licence academic, Multicontext DLL is included in or is a different license??

Thank you very much
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

This is a different license.
Post Reply