I am using VB to control a game (really a simulation with discrete time stops) so that I can process data/results from the current time step. I then will rewrite the .cin/.gin file and run the next time step. I have some complex decision processes that are much easier to code and run in VB. My issue is that I can't figure out how to read a single variable value from my current time step without dumping the .vdf file and picking out my single value.
I have no user interface with the game, I am only using VB to control it.
Reading a single variable during a game
-
- Junior Member
- Posts: 7
- Joined: Tue May 12, 2009 10:18 pm
-
- Super Administrator
- Posts: 4838
- Joined: Wed Mar 05, 2003 3:10 am
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
You can also use the vensim_start_simulation, vensim_continue_simulation and vensim_finish_simulation instead of sending the command MENU>GAME- this will be faster and probably easier to code. No need to use .gin files in this case just use SIMULATE>SETVAL (the variables being set do need to be gaming variables, and the simulation needs to be a game.
Faster still would be to write your logic as an external function, though this is trickier than calling the Venapp if you are working in VB.
Faster still would be to write your logic as an external function, though this is trickier than calling the Venapp if you are working in VB.