I'm having a small problem with the data retrieval from an MySQL database over an ODBC link.
When Vensim is compiling the Variable names, I get the following problem.
WARNING: There is no variable - Work Percentage Lookup[Yard1,Cabling,"
","
"] - in the current model.
Since not all my variables have the same amount of subscripts, MySQL reports a NULL in the empty spaces. My guess is that these are translated to " by Vensim.
The most obvious solution would be to put the subscripts also in the Varname column, but still I would like to keep these seperated. Hope someone can tell me another way around this problem
Jeroen
Data input from MySQL database
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
Just glancing at this it looks like MySQL is returning a carriage return on what should be an empty string. Why it would do something like that totally baffles me, but I have not worked with MySQL very much so anything is possible.
There may be a setting in the data definitions of MySQL setup that controls this. I will build in something to deflect this in future Vensim Revs, but there is no Vensim sided workaround I can think of right now.
There may be a setting in the data definitions of MySQL setup that controls this. I will build in something to deflect this in future Vensim Revs, but there is no Vensim sided workaround I can think of right now.
I have a new problem with the MySQL database communication. For a small model it is possible to change database values during simulation, while running vensim as a game reading the data over an ODBC connection.
In my larger model this also works for the first time step, but afterwards this ability is somehow lost. I have also created a Venapp program which orders the use of a .vdi script before running the next step, but this also doesn't work.
Does anyone have any suggestions for a solution, or an idea where the problem might originate.
In my larger model this also works for the first time step, but afterwards this ability is somehow lost. I have also created a Venapp program which orders the use of a .vdi script before running the next step, but this also doesn't work.
Does anyone have any suggestions for a solution, or an idea where the problem might originate.
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
I can't think of any reason that simple size would be causing problems, so I think it must relate to some feature of the model and database that is causing the problem.
Does you simple model have the same subscript character as the more complex model? If not add in additional subscripts on the inputs/outputs and see if it still works.
Does you simple model have the same subscript character as the more complex model? If not add in additional subscripts on the inputs/outputs and see if it still works.