Subscripts not working

Use this forum to post Vensim related questions.
Post Reply
pelagikat
Junior Member
Posts: 2
Joined: Mon Feb 08, 2021 5:07 am
Vensim version: DSS

Subscripts not working

Post by pelagikat »

I've been having trouble trying to add subscripts to any of my models. If I try and add them in the equation editor while I'm creating/editing a variable, when I save the variable it will ask me if I want to add the subscript to the model -> click yes, and then when I try and use the subscript it's not there. If I then save the variable and then reopen the equation editor, it'll ask me when I save it again if I want to save the subscripts I added before. If I click yes, then it'll close the equation editor but the variable will remain highlighted as if the formula is incorrect even if it's not. If I try and add subscripts through the Subscript Control window, I'll enter a name, the subscript editor window opens -> click OK and nothing's been added in the Subscript Control.

I upgraded to DSS 8.2.1 this morning after having this happen in 8.1.1 yesterday and it hasn't fixed the problem. Although under 8.1.1 in a model I've been working on for a while, we managed to get some subscripts to save, only to have the model fail to load entirely after it was closed. I managed to retrieve it by editing the model using a text editor and removing the subscript information, which to me clearly points at a fatal problem with subscripts. I have also attempted adding subscripts in a test model and they don't work either - I've attached this test file.
Attachments
Testing.mdl
(1.2 KiB) Downloaded 126 times
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Subscripts not working

Post by tomfid »

In the attached model, you are using subscript elements [one] [two] etc., but you haven't defined any subscript ranges yet, so Vensim doesn't know what those elements relate to.

See https://vensim.com/documentation/21210.html
pelagikat
Junior Member
Posts: 2
Joined: Mon Feb 08, 2021 5:07 am
Vensim version: DSS

Re: Subscripts not working

Post by pelagikat »

Thanks tomfid, that seems to have been the problem.
Post Reply