How to build a share constraint? Antti-L Super Moderator Posts: 402 Threads: 18 Joined: May 2010 04-12-2020, 05:37 PM (This post was last modified: 05-12-2020, 11:23 PM by Antti-L. Edit Reason: fixed sign ) Fabio> I say this because when I analyze the constraint with VEDA-FE I see that the percentage is set for each region. Antti>  Yes, and so what?  The UC_COMPRD coefficients must be defined in each region if the share is to be calculated from the sum of VAR_COMPRD over all regions. In the equation above I used Share(t) for simplicity. But of course there will be the UC_COMPRD coefficient(s).   SUM((r,p,c), VAR_FLO(r,t,p,c))  ≥  SUM((r,c), Share(t) × VAR_COMPRD(r,t,c))   SUM((r,p,c), VAR_FLO(r,t,p,c))  ≥  SUM((r,c), −UC_COMPRD(r,t,c) × VAR_COMPRD(r,t,c)) Can you not see how this simple constraint works? It imposes a minimum share only on the sum over regions, leaving the distribution of renewable electricity among the regions to the optimization. Fabio> It doesn't work like the first one that I built (with abosolute value of production). Antti>  Yes, a share constraint is mathematically different from an absolute bound. So what is your point here? Do I need to make a demo model for you to demonstrate the share constraint, to convince you? BTW, you can see the constraint formulation yourself in the GAMS listing file if you put LIMROW=999999. Additional remark: Note also that, depending on your model and what you mean by "production", using just VAR_COMPRD in the equation may not be what you want after all.  Although VAR_COMPRD represents the total commodity production, it may well include also outputs from storage processes and import processes, if the model includes such for the commodity in question. Should those flows be excluded from the total production, you would need to adjust the constraint definition accordingly (either by subtracting/eliminating any unwanted flows from the VAR_COMPRD totals, or by formulating the whole constraint on the basis of VAR_FLO variables, whichever seems more convenient). « Next Oldest | Next Newest »

 Messages In This Thread How to build a share constraint? - by fabio.lanati - 03-12-2020, 07:15 PM RE: How to build a share constraint? - by Antti-L - 03-12-2020, 07:31 PM RE: How to build a share constraint? - by fabio.lanati - 03-12-2020, 07:43 PM RE: How to build a share constraint? - by Antti-L - 03-12-2020, 07:50 PM RE: How to build a share constraint? - by fabio.lanati - 03-12-2020, 09:18 PM RE: How to build a share constraint? - by Antti-L - 03-12-2020, 09:55 PM RE: How to build a share constraint? - by fabio.lanati - 04-12-2020, 03:59 PM RE: How to build a share constraint? - by Antti-L - 04-12-2020, 04:11 PM RE: How to build a share constraint? - by fabio.lanati - 04-12-2020, 05:14 PM RE: How to build a share constraint? - by Antti-L - 04-12-2020, 05:37 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)