Page 1 of 1

Getting the y-axis value

Posted: Tue Aug 25, 2020 1:10 pm
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

Re: Getting the y-axis value

Posted: Tue Aug 25, 2020 3:54 pm
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.

Re: Getting the y-axis value

Posted: Fri Aug 28, 2020 4:43 pm
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 :)

Re: Getting the y-axis value

Posted: Fri Aug 28, 2020 4:57 pm
by husnafezaahmad
.

Re: Getting the y-axis value

Posted: Fri Aug 28, 2020 5:03 pm
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?

Re: Getting the y-axis value

Posted: Fri Aug 28, 2020 5:09 pm
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.

Re: Getting the y-axis value

Posted: Fri Aug 28, 2020 5:12 pm
by husnafezaahmad
Sorry, i forgot to attach the excel files.

Re: Getting the y-axis value

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

I'm still not sure what T and components 1..4 represent though.

Re: Getting the y-axis value

Posted: Sat Aug 29, 2020 3:34 am
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:

Re: Getting the y-axis value

Posted: Tue Sep 01, 2020 3:04 pm
by husnafezaahmad
I hope i can get some enlightment to solve my problem :(

Re: Getting the y-axis value

Posted: Tue Sep 01, 2020 3:16 pm
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?

Re: Getting the y-axis value

Posted: Wed Sep 02, 2020 2:44 am
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.

Re: Getting the y-axis value

Posted: Tue Sep 15, 2020 2:54 pm
by husnafezaahmad
I'm still hoping that i can get some enlighten bout my problem :(

Re: Getting the y-axis value

Posted: Tue Sep 15, 2020 5:24 pm
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.