Getting the y-axis value

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

Getting the y-axis value

Post by husnafezaahmad »

Hello community :)

There is one (i hope) simple question from me.

I have an auxiliary ouput and i would like to use the y-axis value of the output into my next step of modelling.
I thought i can use GET DATA AT TIME function, but it seems like it can only be use for data variable.

Can anyone help me?

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

Re: Getting the y-axis value

Post by tomfid »

You can use SAMPLE IF TRUE or a stock to store the value of a variable at a particular time.

You can't access values in the future.
husnafezaahmad
Senior Member
Posts: 80
Joined: Sun Feb 02, 2020 5:10 am
Vensim version: DSS

Re: Getting the y-axis value

Post by husnafezaahmad »

tomfid wrote: Tue Aug 25, 2020 3:54 pm You can use SAMPLE IF TRUE or a stock to store the value of a variable at a particular time.

You can't access values in the future.

Hi Tom,

I couldn't find way to use the SAMPLE IF TRUE function to continue with my model.
Attached is the example of sub-model that i'm working on now. I want to trace the value of the marginal cost (RM/MWh) at each T, which i named it as component 1 - component 4.

The T1-T4 variables is taken from the date i import from excel. Why i did this is because Vensim didn't permit the x-axis to be any other than time. So, i'm making a long way to get to the value that i want. I hope u get what i'm trying to say.

Really hope that u can help me once again. Thanks in advance, Tom :)
Attachments
Cummulative MWnew.xls
(22.5 KiB) Downloaded 144 times
test.mdl
(9.69 KiB) Downloaded 165 times
husnafezaahmad
Senior Member
Posts: 80
Joined: Sun Feb 02, 2020 5:10 am
Vensim version: DSS

Re: Getting the y-axis value

Post by husnafezaahmad »

.
Last edited by husnafezaahmad on Fri Aug 28, 2020 5:09 pm, edited 1 time in total.
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Getting the y-axis value

Post by tomfid »

I don't think I understand what this is trying to do. Is T time, or a time segment, like base/mid/peak? Or is it the time at which a given capacity level is reached?

Either way, the condition in your SAMPLE equation is dimensionally inconsistent - you have Marginal Cost Curve=T1, but T1 is in years and Marginal Cost Curve is in RM/MWH. Maybe this is the issue?
husnafezaahmad
Senior Member
Posts: 80
Joined: Sun Feb 02, 2020 5:10 am
Vensim version: DSS

Re: Getting the y-axis value

Post by husnafezaahmad »

tomfid wrote: Fri Aug 28, 2020 5:03 pm I don't think I understand what this is trying to do. Is T time, or a time segment, like base/mid/peak? Or is it the time at which a given capacity level is reached?

Either way, the condition in your SAMPLE equation is dimensionally inconsistent - you have Marginal Cost Curve=T1, but T1 is in years and Marginal Cost Curve is in RM/MWH. Maybe this is the issue?
Oh my god, i forgot to change the unit. The unit should follow.
Anyway, i've the same model with the same idea. Attached is it.
But in this Pool Market model, i got my marginal cost from imported excel data.

But this time around, my marginal cost isn't from excel file. Did u get what i mean?
I'm so sorry, i'm so bad in explaining.
Attachments
Pool Market (Base).mdl
(47.21 KiB) Downloaded 164 times
husnafezaahmad
Senior Member
Posts: 80
Joined: Sun Feb 02, 2020 5:10 am
Vensim version: DSS

Re: Getting the y-axis value

Post by husnafezaahmad »

Sorry, i forgot to attach the excel files.
Attachments
MarginalCostNew.xls
(22.5 KiB) Downloaded 138 times
Cummulative MWnew.xls
(22.5 KiB) Downloaded 141 times
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Getting the y-axis value

Post by tomfid »

Don't worry, we'll get there.

I'm still not sure what T and components 1..4 represent though.
husnafezaahmad
Senior Member
Posts: 80
Joined: Sun Feb 02, 2020 5:10 am
Vensim version: DSS

Re: Getting the y-axis value

Post by husnafezaahmad »

tomfid wrote: Fri Aug 28, 2020 6:16 pm Don't worry, we'll get there.

I'm still not sure what T and components 1..4 represent though.
Thanks Tom :)

So, in "test.mdl", i used T1-T4 as the variable that will find the value of X-axis at MW1-MW4 according to accummulative MW graph.

And this value will then be used in component1..4, in order for me to get the y-value axis in marginal cost's graph.

For example;
in my accumulative MW graph, i have

MW1 = 8323 MW

Then in T1, i would like to know at which year does MW1 appears.

Let say, 8323MW appears at year 9.17.

Again, i want to know in marginal cost graph, at year 9.17, what is the value of marginal cost.

Did i make myself clearer? :oops: :cry:
husnafezaahmad
Senior Member
Posts: 80
Joined: Sun Feb 02, 2020 5:10 am
Vensim version: DSS

Re: Getting the y-axis value

Post by husnafezaahmad »

I hope i can get some enlightment to solve my problem :(
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Getting the y-axis value

Post by tomfid »

Ok ... I think I understand what the cost curve is doing. But why go to all the trouble of constructing the curve, when you can simply observe the marginal cost at time 9.17 directly?
husnafezaahmad
Senior Member
Posts: 80
Joined: Sun Feb 02, 2020 5:10 am
Vensim version: DSS

Re: Getting the y-axis value

Post by husnafezaahmad »

tomfid wrote: Tue Sep 01, 2020 3:16 pm Ok ... I think I understand what the cost curve is doing. But why go to all the trouble of constructing the curve, when you can simply observe the marginal cost at time 9.17 directly?

How can i do that, Tom?
I mean, i am totally lost at the moment. I tried IF THEN ELSE but idk, it didn't turn out as what i expect.
I also tried SAMPLE IF TRUE, and the result is the same.
husnafezaahmad
Senior Member
Posts: 80
Joined: Sun Feb 02, 2020 5:10 am
Vensim version: DSS

Re: Getting the y-axis value

Post by husnafezaahmad »

I'm still hoping that i can get some enlighten bout my problem :(
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Getting the y-axis value

Post by tomfid »

You could use something like
sampled marginal cost = SAMPLE IF TRUE( Time<=desired time, marginal cost, marginal cost )
desired time = 9.17
At or after time 9.17, this will show the marginal cost at time 9.17.

However, I'm still not clear on how this is being used, so this may not be useful.
Post Reply