Posts: 18
Threads: 2
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Oct 2017
I did not find the issue somewhere else, so I am posting my question here:
I want to link two different variables dynamically, in a way that
Code:
Variable1(T) = Factor(T) x Variable2(T-1)
Both variables are actually VAR_FLO, but for different subsets of processes and commodities.
I know that this combines the standard user constraints (linking different variables within one period) and the dynamic growth constraint feature (linking one variable over two periods).
I don't know if this is possible, or if anyone knows a work-around to achieve this type of constraint.
Background: my aim is to implement a new obligation of an Austrian law that obliges suppliers to provide a certain amount of renewable energy based on the amount of non-renewable energy supplied in the previous year.
I am grateful for any suggestions!
Disclaimer: I am still not using Veda2.0 (my bad, I had no time for switching so far), but I am open to solutions based on including DD-files. I would like to avoid programming a TIMES Extension, but I am aware that I might end up doing that.
Posts: 1,057
Threads: 41
Likes Received:
18 in 15 posts
Likes Given: 23
Joined: May 2010
Reputation:
18
The first modeling trick that comes to mind is to have a dummy process with TLIFE=1; NCAP_COM(dummy_comm)=1; NCAP_CLAG=1.
If you link the capacity of this process to the non-renewable energy supplied in year T, then you will get it as the flow of dummy_comm in year T+1. You can then link RE to this flow. Not sure if and how well this will work if you are not running annually.
Posts: 1,956
Threads: 26
Likes Received: 55 in 47 posts
Likes Given: 15
Joined: Jun 2010
15-04-2024, 01:10 AM
(This post was last modified: 15-04-2024, 01:11 AM by Antti-L.)
As far as I can see, the TIMES dynamic UC constraints fully support any constraints of the stated form:
Variable1(T) = Factor(T) x Variable2(T-1)
For any subsets of processes and commodities different for Variable1 and Variable2.
So, I am not able to see what the problem is there, but maybe I am missing something?
Posts: 18
Threads: 2
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Oct 2017
(15-04-2024, 01:10 AM)Antti-L Wrote: As far as I can see, the TIMES dynamic UC constraints fully support any constraints of the stated form:
Variable1(T) = Factor(T) x Variable2(T-1)
For any subsets of processes and commodities different for Variable1 and Variable2.
So, I am not able to see what the problem is there, but maybe I am missing something?
Thank you both for the quick answers!
In this case, the question would be how to implement this kind of constraint using the Veda-Templates.
Or do I need to add the equations using DD-Files?
Posts: 1,956
Threads: 26
Likes Received: 55 in 47 posts
Likes Given: 15
Joined: Jun 2010
15-04-2024, 02:06 PM
(This post was last modified: 15-04-2024, 02:39 PM by Antti-L.)
> the question would be how to implement this kind of constraint using the Veda-Templates
Well, for me it is not quite obvious what would be the problem. Can you elaborate? Anyway, I assume you know Side is supported in the VEDA UC_T tables? And you have:
Variable1(T) = Factor(T) x Variable2(T-1)
The LHS side is Variable1(T) and the RHS side is Factor(T) x Variable2(T-1). Assuming the variables are VAR_FLO, the corresponding TIMES UC constraint would have the form:
SUM(SET1(r,p,c), UC_FLO(uc_n,'LHS',r,t,p,c,s) × VAR_FLO(r,t,p,c,s)) = SUM(SET2(r,p,c), UC_FLO(uc_n,'RHS',r,t-1,p,c,s) × VAR_FLO(r,t-1,p,c,s))
As you can see, basically the only cosmetic difference here is in the period index of the RHS UC_FLO multiplier, which should be set to be UC_FLO(uc_n,'RHS',r,t-1,p,c,s) = Factor(t). If this small cosmetic mapping issue is acceptable, then you are all set. Just use UC_ATTR(FLO,YES) on the RHS to activate the dynamic constraint type (t,t−1). The LHS UC_FLO would be set to 1.
However, if that small mapping issue does cause a problem for you, one could also divide the constraint by Factor(T), and get:
Variable1(T) / Factor(T) = Variable2(T-1)
This modified form would fit perfectly with the TIMES UC constraint formulation, because the multiplier Factor'(T) = 1/Factor(T) now has the same period index as the variable it is applied to. Of course, in this case only non-zero Factor(T) would be supported, but I think the case of Factor(T)=0 would be a trivial case.
Posts: 18
Threads: 2
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Oct 2017
Thank you for the hint, I will try your proposed approach.