Using variables for initial subscript equation

Use this forum to post Vensim related questions.
Post Reply
Sarah8888
Junior Member
Posts: 16
Joined: Thu Feb 08, 2018 12:46 pm
Vensim version: DSS

Using variables for initial subscript equation

Post by Sarah8888 »

Hello

I would like to set up arrays/subscript. I don't have y entire model arrayed (for a number of reasons). However, I want to array one variable, in the following way:


Subscript: Industries
Equation:
Price Agriculture,Price Construction,Price Energy supply,Price Finance,Price Information,Price Manufacturing high,Price Manufacturing low,Price Other services,Price Reserach,Price Transport, Price Wholesale and retail

ERROR: Operators expected

I added a screenshot for more info.

Thanks
Attachments
Bildschirmfoto 2018-02-22 um 13.50.22.png
Bildschirmfoto 2018-02-22 um 13.50.22.png (1.48 MiB) Viewed 2459 times
tomfid
Administrator
Posts: 3808
Joined: Wed May 24, 2006 4:54 am

Re: Using variables for initial subscript equation

Post by tomfid »

This is the definining equation for a subscriopt, so you need to leave the Subscripts field empty. Remove "Industry cross" and it should work.
Sarah8888
Junior Member
Posts: 16
Joined: Thu Feb 08, 2018 12:46 pm
Vensim version: DSS

Re: Using variables for initial subscript equation

Post by Sarah8888 »

Tom,

My question is different. I use now the model proj1.mdl (extended) as an example.

In the original model is the following variable, using the following equation:

Variant 1):
Variable : max work accomplishment
Equation: 8, 10, 15

I wanted to do the following:

Variant 2):
Variable: max work accomplishment (now defined as auxiliary)
Equation: indication 1,Indication 2,Indication 3

I get an error (operator expected).

I then tried a second way (see test-variable) by using different equations for each subscript element. Specifically, for each different task, I added an equation. This works.
Can I conclude that only the second possibility works, or is there something wrong with the first one?
Attachments
PROJ_subscript variable vs constant.mdl
(3.75 KiB) Downloaded 178 times
Administrator
Super Administrator
Posts: 4589
Joined: Wed Mar 05, 2003 3:10 am

Re: Using variables for initial subscript equation

Post by Administrator »

Only the second way works.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Sarah8888
Junior Member
Posts: 16
Joined: Thu Feb 08, 2018 12:46 pm
Vensim version: DSS

Re: Using variables for initial subscript equation

Post by Sarah8888 »

Thanks!
Post Reply