Venapp Questions

Use this forum to post Vensim related questions.
Post Reply
maxin454
Member
Posts: 35
Joined: Tue Jul 13, 2010 3:17 am

Venapp Questions

Post by maxin454 »

Hi. I have the following questions regarding to Venapp, and hopefully I could get some help here. Thanks.

1. I use WORKBENCH>GRAPH tool to display the variable. When showing multiple runs, the line color with respect to each run keeps changing, i.e., the newest run is always "blue". Is there any way to avoid this? Specifically, I want one color to stick with each run.

2. This might be related to question 1. I use RUNNAME (txt: *1) to show the run name of my first run. However, it actually shows the newest run, not the first run. Is there anyway I could avoid this?

3. I use WORKBENCH>CAUSES TREE to show causes tree. When I double click on any variable on the tree, it should use that variable as a starting point and trace back (just like the function in Vensim). However, It does not work in my Venapp. I saw some examples and I did exactly what they did, theirs worked but mine didn't. Is there any setting I should make to make it work?

Thanks.
tomfid
Administrator
Posts: 3808
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

1 & 2: The RUNNAME display and graph coloring are both tied to the order in which datasets are loaded. The default when you use the MENU>RUN command is to load new runs last, which should preserve stable coloring. MENU>RUN1 loads new datasets first - my guess is that you're using RUN1 and switching to RUN will solve your problem.

3: Do you have a SETWB command on your screen to capture the workbench variable selection event?

Tom
maxin454
Member
Posts: 35
Joined: Tue Jul 13, 2010 3:17 am

Post by maxin454 »

Thanks, Tom.

For Issue 3, it is working now after I set SETWB command.

For Issue 1&2, I cannot get it work still. Interestingly, no matter I use Menu>Run or Menu>Run1, they gave me the same results. The color Blue always sticks to my newest (current) run. Any ideas?

Thanks in advance.
maxin454
Member
Posts: 35
Joined: Tue Jul 13, 2010 3:17 am

Post by maxin454 »

Hi.

In addition to that, I am trying to show the value of a lookup variable. I'm using SHOWVAR, but it does not show anything. Could you tell me what should I do to make it work? Specifically, suppose that the unit of my lookup variable is (kg, year). Ideally, I want to show the value (kg) of a certain year of a specific run.

Many thanks.
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

The MODTABLE control is used to change inputs to a Lookup table and will display the table. A strip graph will do the same.

If you want to show a specific Y value just set a model variable to it as in

var = lookup(interesting x value)

and then use SHOWVAR on var.
maxin454
Member
Posts: 35
Joined: Tue Jul 13, 2010 3:17 am

Post by maxin454 »

Thank you, Bob. That's exactly an alternative way to do it. However, I was looking for a way to show the value of a lookup variable without adding the new variable as you suggested. Is it possible to do that?

Also, any suggestions regarding to issue 1&2 above?

Thanks in advance.
tomfid
Administrator
Posts: 3808
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

Is there a SPECIAL>LOADRUN| command on your screen that might be rearranging the runs?

You could try a MENU>LOAD_RUN right after your MENU>RUN or MENU>RUN1 to (a) see whether the new run gets loaded in the order expected and (b) reorder the runs and see if that fixes your color problem.

Tom
maxin454
Member
Posts: 35
Joined: Tue Jul 13, 2010 3:17 am

Post by maxin454 »

Thanks, Tom.

No. I did not have a SPECIAL>LOADRUN| command on my screen.

I tested it using MENU>LOAD_RUN with both MENU>RUN or MENU>RUN1. The run order in the left-hand-side of the Dataset Control dialogue box shows exactly the same order for both. I guess one should have the reverse order of the order, just don't know what's going on? Any further suggestions?

Thanks in advance!!
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

There is no way to get an x value from a Lookup in a venapp.

For 1 and 2 it sounds like you are using MENU>RUN1 (not what you want) or that MENU>RUN may be paying attention to the options in Tools>Options>Settings around which position to load a run. You might set that to last to see if it works better. You will need a SPECIAL>READINI to make this stick with your Venapp.
maxin454
Member
Posts: 35
Joined: Tue Jul 13, 2010 3:17 am

Post by maxin454 »

Thank you very much, Bob. Using MENU>RUN + setting the load run position to "Last" work exactly as I want. However, I did not apply SPECIAL>READINI yet and still its working. Is the step SPECIAL>READINI necessary? If so, which initialization file should it read?

Again, thank a million.
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

The READINI command will be needed if you want to send the Venapp to someone else or package it for the model reader. The line is

[vensim]
raw_scaling_flag=0,0,0,0

it is actually the second 0 that needs to be set. You can have that as the entire content of the ini file.
maxin454
Member
Posts: 35
Joined: Tue Jul 13, 2010 3:17 am

Post by maxin454 »

Thank you very much, Bob.
Post Reply