Lookups in new equation editor

Use this forum to post Vensim related questions.
Post Reply
BillGrace
Junior Member
Posts: 7
Joined: Mon Nov 06, 2017 4:56 am
Vensim version: PRO

Lookups in new equation editor

Post by BillGrace »

Apologies if this has been previously dealt with. With the new equation editor there seems to be no way to input different equations for subscript sub-ranges for lookup functions. The dialogue box doesn't allow selection of sub-ranges only the subscript family. This seems to only be the case for lookups as it is okay for other variables. I can fix it using the legacy editor and then when I reinstate the new editor I can modify the equations. Seems just to be an issue for new lookups.
tomfid
Administrator
Posts: 3986
Joined: Wed May 24, 2006 4:54 am

Re: Lookups in new equation editor

Post by tomfid »

It works - example:
subscript 2025-05-03_07-37-19.png
subscript 2025-05-03_07-37-19.png (16.64 KiB) Viewed 318 times
Procedure:
Click the Subscripts button the first time you add ranges to set the relevant families
Use the [+] button to add a tab if you need an additional element
Right-click the new tab to set Subranges and Elements (and Exceptions if any)
... or use the Subranges and Elements option in the dropdown menu on the Subscripts button (which otherwise defaults to setting the family)
This takes more clicks than the old way, but it screens out a lot more errors.

Another option - if you're creating lots of elements - is to switch to the text editor, so you can use copy-paste.
BillGrace
Junior Member
Posts: 7
Joined: Mon Nov 06, 2017 4:56 am
Vensim version: PRO

Re: Lookups in new equation editor

Post by BillGrace »

Not sure why but I don't get that screen. My model has a subscript family called "Plant species" with 3 sub-ranges. If I create a new lookup I get the attached screen when I select subscripts which only shows the family. I am not seeing any "+" button.
Attachments
Screenshot 2025-05-04 112506.png
Screenshot 2025-05-04 112506.png (58.24 KiB) Viewed 280 times
tomfid
Administrator
Posts: 3986
Joined: Wed May 24, 2006 4:54 am

Re: Lookups in new equation editor

Post by tomfid »

It's a two-tier process.

First (and only once), set the family associated with the equation:
sub families.png
sub families.png (36.46 KiB) Viewed 155 times
Then, if you need distinct equations for subranges or specific elements, right-click the tab or use the dropdown on the Subscripts button to set those:
sub elements.png
sub elements.png (31.47 KiB) Viewed 155 times
sub element 2.png
sub element 2.png (40.71 KiB) Viewed 155 times
tomfid
Administrator
Posts: 3986
Joined: Wed May 24, 2006 4:54 am

Re: Lookups in new equation editor

Post by tomfid »

Note that the [+] button becomes visible after you make the initial family selection:
sub plus.png
sub plus.png (22.45 KiB) Viewed 155 times
BillGrace
Junior Member
Posts: 7
Joined: Mon Nov 06, 2017 4:56 am
Vensim version: PRO

Re: Lookups in new equation editor

Post by BillGrace »

Got it now. That last step was the issue as this seems to be different that for normal variables. Thx
Post Reply