Combine variable

Use this forum to post Vensim related questions.
Post Reply
husnafezaahmad
Senior Member
Posts: 80
Joined: Sun Feb 02, 2020 5:10 am
Vensim version: DSS

Combine variable

Post by husnafezaahmad »

Hello there,

I have this problem. I tried to combine these two variables, marginal cost coal and marginal cost gas.

Presentation4.png
Presentation4.png (32.77 KiB) Viewed 1395 times

I want the output for "combine marginal cost" to be like this;
Presentation3.png
Presentation3.png (122.74 KiB) Viewed 1397 times

I tried using the;

combine marginal cost = IF THEN ELSE( marginal cost gas[gas unit]<0 , IF THEN ELSE( marginal cost gas[gas unit] <0 , marginal cost coal[coal unit]:AND:marginal cost gas[gas unit] , 0 ), 0 )

but it didn't give me the output that i want. This thing has been bothering me for a week :(
I really hope anyone can help me on this.

Thanks in advance!
Attachments
combine.mdl
(4.53 KiB) Downloaded 151 times
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Combine variable

Post by Administrator »

I see now what you want (I think).

You would need to combine the subscript ranges into a single one. See the attached model.
Attachments
combine.mdl
(4.93 KiB) Downloaded 166 times
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
husnafezaahmad
Senior Member
Posts: 80
Joined: Sun Feb 02, 2020 5:10 am
Vensim version: DSS

Re: Combine variable

Post by husnafezaahmad »

Administrator wrote: Fri Oct 02, 2020 7:01 am I see now what you want (I think).

You would need to combine the subscript ranges into a single one. See the attached model.
Oh my goodness!
Thank you so so much! Finally i got the answer on how to do that.

I owe you big time, Admin!<3
Post Reply