Skip to content

Commit

Permalink
Update to v4.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Antti-L authored Aug 19, 2024
1 parent 1ac8990 commit ca3c134
Show file tree
Hide file tree
Showing 21 changed files with 133 additions and 99 deletions.
30 changes: 29 additions & 1 deletion Version.log
Original file line number Diff line number Diff line change
Expand Up @@ -2936,4 +2936,32 @@ coef_ext.vda : (3)
eqactups.vda : (1)
eqcaflac.vda : (1)
equ_ext.abs : (1)
solsetv.v3 : (3)
solsetv.v3 : (3)

-----------------------------------------------------------------------------------------
TIMES Version 4.8.2
-----------------------------------------------------------------------------------------
Date: 19-Aug-2024 [AL]: Minor release
1) Small performance improvements inspired by the ETSAP code review project
2) Added IE option -13 for flushing out time series (eg. UCs)
3) Other subtle improvements

initsys.mod : Increased version number to 4.8.2
initmty.mod : (3)
setglobs.gms : (1)
ppmain.mod : (3)
prepparm.gms : (2)
pp_lvlpk.mod : (1)
eqmain.mod : (2)
cal_stgn.mod : (1)
cal_ire.mod : (1)
cal_fflo.mod : (1)
eqflomrk.mod : (1)
eqire.mod : (1)
eqirebnd.mod : (1)
eqxbnd.mod : (1)
bnd_ucw.mod : (2)
pp_qack.mod : (1)
coef_ext.vda : (2)
solsetv.v3 : (1)
prepret.dsc : (3)
14 changes: 7 additions & 7 deletions bnd_ucw.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* Copyright (C) 2000-2023 Energy Technology Systems Analysis Programme (ETSAP)
* Copyright (C) 2000-2024 Energy Technology Systems Analysis Programme (ETSAP)
* This file is part of the IEA-ETSAP TIMES model generator, licensed
* under the GNU General Public License v3.0 (see file NOTICE-GPLv3.txt).
*=============================================================================*
Expand All @@ -12,12 +12,12 @@ $ SET TMP
$ IF %STAGES%==YES $SET TMP (T-SUC_L(R,UC_N))
CNT=0;
UC_T_EACH(UC_T_SUCC) = YES;
$ BATINCLUDE bnd_ucv.mod %VAR%_UC "" "" "" UC_RHS $UC_R_SUM(R,UC_N) LOOP(R, ); '' '%2' ",'','',''"
$ BATINCLUDE bnd_ucv.mod %VAR%_UCR "," "R" "" UC_RHSR $UC_R_EACH(R,UC_N) '' '' '' '%2' ",'',''" $UC_R_EACH(R,UC_N)
$ BATINCLUDE bnd_ucv.mod %VAR%_UCT "" "" ",TT" UC_RHST $(UC_R_SUM(R,UC_N)*UC_T_EACH(R,UC_N,TT)%1) LOOP(R, ); '' '%2' ",'',''" '' %TMP%
$ BATINCLUDE bnd_ucv.mod %VAR%_UCRT "," "R" ",TT" UC_RHSRT $(UC_R_EACH(R,UC_N)*UC_T_EACH(R,UC_N,TT)%1) '' '' '' '%2' ",''" $UC_T_EACH(R,UC_N,TT) %TMP%
$ BATINCLUDE bnd_ucv.mod %VAR%_UCTS "" "" ",TT" UC_RHSTS $(UC_R_SUM(R,UC_N)*UC_T_EACH(R,UC_N,TT)%1) LOOP(R, ); ,S '%2' ",''" '' %TMP%
$ BATINCLUDE bnd_ucv.mod %VAR%_UCRTS "," "R" ",TT" UC_RHSRTS $(UC_R_EACH(R,UC_N)*UC_T_EACH(R,UC_N,TT)%1) '' '' ,S '%2' "" $UC_T_EACH(R,UC_N,TT) %TMP%
$ BATINCLUDE bnd_ucv.mod %VAR%_UC "" "" "" UC_RHS $UC_ON(R,UC_N) LOOP(R, ); '' '%2' ",'','',''"
$ BATINCLUDE bnd_ucv.mod %VAR%_UCR "," "R" "" UC_RHSR $UC_ON(R,UC_N) '' '' '' '%2' ",'',''" $UC_R_EACH(R,UC_N)
$ BATINCLUDE bnd_ucv.mod %VAR%_UCT "" "" ",TT" UC_RHST $(UC_ON(R,UC_N)*UC_T_EACH(R,UC_N,TT)%1) LOOP(R, ); '' '%2' ",'',''" '' %TMP%
$ BATINCLUDE bnd_ucv.mod %VAR%_UCRT "," "R" ",TT" UC_RHSRT $(UC_ON(R,UC_N)*UC_T_EACH(R,UC_N,TT)%1) '' '' '' '%2' ",''" $UC_T_EACH(R,UC_N,TT) %TMP%
$ BATINCLUDE bnd_ucv.mod %VAR%_UCTS "" "" ",TT" UC_RHSTS $(UC_ON(R,UC_N)*UC_T_EACH(R,UC_N,TT)%1) LOOP(R, ); ,S '%2' ",''" '' %TMP%
$ BATINCLUDE bnd_ucv.mod %VAR%_UCRTS "," "R" ",TT" UC_RHSRTS $(UC_ON(R,UC_N)*UC_T_EACH(R,UC_N,TT)%1) '' '' ,S '%2' "" $UC_T_EACH(R,UC_N,TT) %TMP%
UC_T_EACH(UC_T_SUCC) = NO;
*-------------------------------------------------------------------------------
$IFI %STAGES%==YES IF(SW_PHASE EQ -9,
Expand Down
8 changes: 4 additions & 4 deletions cal_fflo.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ $SET SHP1 "*(%SHFF%X(R,V,T%SHG%)$PRC_VINT(R,P))%SHP1%"
*-----------------------------------------------------------------------------
*V05c 980923 - check that commodity not just capacity related
SUM(TOP(RP_FLO(R,P),C,'%1')$(NOT RPC_EMIS(R,P,C)),
SUM((RTP_VINTYR(R,V,T,P),RTPCS_VARF(R,T,P,C,TS)),
SUM((RTP_VNTBYR(R,T,P,V),RTPCS_VARF(R,T,P,C,TS)),
* equation coarser than variable or equation finer than variable
* consider COM_TS shape too, so both TS_MAP and RS_BELOW embedded
%VAR%_FLO(R,V,T,P,C,TS %SOW%) * RS_FR(R,S,TS)*(1+RTCS_FR(R,T,C,S,TS)) %3)%4
) +
* Handle RPC_EMIS flows separately; They cannot be NOFLO
SUM(TOP(RPC_EMIS(RP_FLO(R,P),C),'%1')%4,
SUM((FS_EMIT(R,P,C,CG3,COM2),RTPCS_VARF(R,T,P,COM2,TS))$RS_FR(R,S,TS),
SUM(RTP_VINTYR(R,V,T,P),%VAR%_FLO(R,V,T,P,COM2,TS %SOW%) *
SUM(RTP_VNTBYR(R,T,P,V),%VAR%_FLO(R,V,T,P,COM2,TS %SOW%) *
COEF_PTRAN(R,V,P,CG3,COM2,C,TS) %SHP1% %3) *
RS_FR(R,S,TS)*(1+RTCS_FR(R,T,COM2,S,TS)))) +
$EXIT
Expand All @@ -36,15 +36,15 @@ $LABEL REDUCE
* [UR] model reduction %REDUCE% is set in *.run
* Sum over non-vintaged processes
SUM(TOP(RP_FLO(R,P),C,'%1')$(NOT PRC_VINT(R,P)),
SUM((RTP_VINTYR(R,V(T),T,P),RTPCS_VARF(R,T,P,C,TS)),
SUM(RTPCS_VARF(R,V(T),P,C,TS),
$ BATINCLUDE cal_red.red C COM TS P T '' T
* equation coarser than variable or equation finer than variable
* RS_FR(R,S,TS)*(1+RTCS_FR(R,T,C,S,TS)) %3)%4
) +

* Sum over vintaged processes
SUM((TOP(PRC_VINT(RP_FLO(R,P)),C,'%1'),RTPCS_VARF(R,T,P,C,TS))%4,
$ BATINCLUDE cal_red.red C COM TS P T '' V SUM 'RTP_VINTYR(R,V,T,P),' %3
$ BATINCLUDE cal_red.red C COM TS P T '' V SUM 'RTP_VNTBYR(R,T,P,V),' %3
* equation coarser than variable or equation finer than variable
* RS_FR(R,S,TS)*(1+RTCS_FR(R,T,C,S,TS))
) +
11 changes: 5 additions & 6 deletions cal_ire.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* Copyright (C) 2000-2023 Energy Technology Systems Analysis Programme (ETSAP)
* Copyright (C) 2000-2024 Energy Technology Systems Analysis Programme (ETSAP)
* This file is part of the IEA-ETSAP TIMES model generator, licensed
* under the GNU General Public License v3.0 (see file NOTICE-GPLv3.txt).
*=============================================================================*
Expand All @@ -21,11 +21,10 @@ $IF '%1%2' == 'EXPOUT' $GOTO AUXONLY
$IF '%1%2' == 'IMPIN' $GOTO AUXONLY
* actual exchange
*V05c 981016 - change RTPCS_VARFs to ts
SUM((RPC_IRE(%6R,P%7,C,'%1'),RTPCS_VARF(R,T,P,C,TS))$RS_FR(R,S,TS),
SUM(RTP_VINTYR(R,V,T,P),
SUM((RPC_IRE(%6R,P%7,C,'%1'),RTP_VNTBYR(R,T,P,V)),
SUM(RTPCS_VARF(R,T,P,C,TS)$RS_FR(R,S,TS),
(%VAR%_IRE(R,V,T,P,C,TS,'%1'%SOW%)$(NOT RPC_AIRE(R,P,C))+(%VAR%_ACT(R,V,T,P,TS%SOW%)*PRC_ACTFLO(R,V,P,C))$RPC_AIRE(R,P,C)
)%4
) * RS_FR(R,S,TS)*(1+RTCS_FR(R,T,C,S,TS))
)%4 * RS_FR(R,S,TS)*(1+RTCS_FR(R,T,C,S,TS)))
) +

$IF SET IREAUXBAL %IREAUXBAL% %2 %5
Expand All @@ -35,7 +34,7 @@ $LABEL AUXONLY
*V0.9 022100 - do IN/OUT explicitly
SUM((RPC_IRE(%6R,P%7,COM,%IE%),RTPCS_VARF(R,T,P,COM,TS))$(IRE_FLOSUM(R,T,P,COM,TS,%IE%,C,'%2')$RS_FR(R,S,TS)),
IRE_FLOSUM(R,T,P,COM,TS,%IE%,C,'%2') *
SUM(RTP_VINTYR(R,V,T,P), %MX%
SUM(RTP_VNTBYR(R,T,P,V), %MX%
(%VAR%_IRE(R,V,T,P,COM,TS,%IE%%SOW%)$(NOT RPC_AIRE(R,P,COM))+(%VAR%_ACT(R,V,T,P,TS%SOW%)*PRC_ACTFLO(R,V,P,COM))$RPC_AIRE(R,P,COM)
)%4
) * RS_FR(R,S,TS)*(1+RTCS_FR(R,T,COM,S,TS))
Expand Down
4 changes: 2 additions & 2 deletions cal_stgn.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* Copyright (C) 2000-2023 Energy Technology Systems Analysis Programme (ETSAP)
* Copyright (C) 2000-2024 Energy Technology Systems Analysis Programme (ETSAP)
* This file is part of the IEA-ETSAP TIMES model generator, licensed
* under the GNU General Public License v3.0 (see file NOTICE-GPLv3.txt).
*=============================================================================*
Expand All @@ -15,7 +15,7 @@
*-----------------------------------------------------------------------------
*V05c 980923 - check that commodity not just capacity related
SUM((TOP(RPC_STG(R,P,C),'%1'),RPCS_VAR(R,P,C,TS))$%5,
SUM(RTP_VINTYR(R,V,T,P),
SUM(RTP_VNTBYR(R,T,P,V),
(%VAR%_S%1(R,V,T,P,C,TS %SOW%)%3-%4%VAR%_S%2(R,V,T,P,C,TS %SOW%)$RPC_STGN(R,P,C,'%2'))%6)$(NOT RPC_STGN(R,P,C,'%1')) *
* equation coarser than variable or finer than variable
RS_FR(R,S,TS)
Expand Down
4 changes: 4 additions & 0 deletions coef_ext.vda
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ $ IFI NOT %STSFLX%==YES RP_STL(RP_STS,TSL,BD)=0;
RTCS_VARC(R,T,C,S)$((NOT RHS_COMPRD(R,T,C,S))$TRACKC(R,C)) = NO;
TOP_IRE('IMPEXP',C,TRACKC,P) = NO;
OPTION CLEAR=TRACKC,CLEAR=TRACKP,CLEAR=RCS;
* Filter out UC constraints
IF(CARD(UC_TIME),OPTION R_UC<UC_TIME;
LOOP(R_UC(R,UCN)$(ROUND(UC_TIME(UCN,R,'0'))=-13),UC_ON(R_UC)=NO; IF(UC_R_SUM(R_UC),UC_ON(UC_R_SUM(REG,UCN))=NO));
UC_TIME(UCN,R,T)$((NOT UC_ON(R,UCN))$R_UC(R,UCN))=0; OPTION CLEAR=R_UC);
*-----------------------------------------------------------------------------
* Add singleton ACT_EFFs to COEF_PTRANS or ACT_FLO
RP_CGC(RPG_1ACE) = YES; OPTION TRACKPC < RPG_1ACE, RP_GRP < RP_CGC;
Expand Down
8 changes: 4 additions & 4 deletions eqflomrk.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* Copyright (C) 2000-2023 Energy Technology Systems Analysis Programme (ETSAP)
* Copyright (C) 2000-2024 Energy Technology Systems Analysis Programme (ETSAP)
* This file is part of the IEA-ETSAP TIMES model generator, licensed
* under the GNU General Public License v3.0 (see file NOTICE-GPLv3.txt).
*==================================================================================================*
Expand Down Expand Up @@ -69,7 +69,7 @@ $SETLOCAL SIGO "(PRC_MARK(R,T,P,ITEM,COM,'%2') GE 0)" SETLOCAL SIGI "(PRC_MARK(R

* Sum over all flow variables related to balance timeslice
(SUM(RTPCS_VARF(R,T,P,C,TS)$RS_FR(R,SL,TS),
SUM(RTP_VINTYR(R,V,T,P),
SUM(RTP_VNTBYR(R,T,P,V),
$ BATINCLUDE %cal_red% C COM1 TS P T
) *
* Balance coarser than variable or balance finer than variable
Expand All @@ -78,15 +78,15 @@ $ BATINCLUDE %cal_red% C COM1 TS P T

* Inter-regional trade contribution
+ SUM(RTPCS_VARF(R,T,P,C,TS)$RS_FR(R,SL,TS),
SUM(RTP_VINTYR(R,V,T,P),
SUM(RTP_VNTBYR(R,T,P,V),
((%VAR%_IRE(R,V,T,P,C,TS,'IMP'%SOW%)%IRED%)*(1+IRE_FLOSUM(R,T,P,C,S,'IMP',C,'OUT'))*COM_IE(R,T,C,SL))$(%SIGO%$RPC_IRE(R,P,C,'IMP'))-
((%VAR%_IRE(R,V,T,P,C,TS,'EXP'%SOW%)%IRED%)*(1+IRE_FLOSUM(R,T,P,C,S,'EXP',C,'IN')))$(%SIGI%$RPC_IRE(R,P,C,'EXP'))) *
* Balance coarser than variable or balance finer than variable
RS_FR(R,SL,TS)*(1+RTCS_FR(R,T,C,SL,TS)))$RP_IRE(R,P)

* Storage contribution
+ SUM(RPCS_VAR(RPC_STG(R,P,C),TS)$RS_FR(R,SL,TS),
SUM(RTP_VINTYR(R,V,T,P),
SUM(RTP_VNTBYR(R,T,P,V),
((%VAR%_SOUT(R,V,T,P,C,TS %SOW%)*STG_EFF(R,V,P)*COM_IE(R,T,C,SL))$%SIGO%-%VAR%_SIN(R,V,T,P,C,TS %SOW%)$%SIGI%)) *
* Balance coarser than variable or balance finer than variable
RS_FR(R,SL,TS)*(1+RTCS_FR(R,T,C,SL,TS)))$PRC_MAP(R,'STG',P)
Expand Down
10 changes: 5 additions & 5 deletions eqire.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* Copyright (C) 2000-2023 Energy Technology Systems Analysis Programme (ETSAP)
* Copyright (C) 2000-2024 Energy Technology Systems Analysis Programme (ETSAP)
* This file is part of the IEA-ETSAP TIMES model generator, licensed
* under the GNU General Public License v3.0 (see file NOTICE-GPLv3.txt).
*=============================================================================*
Expand All @@ -15,13 +15,13 @@


* the imports/exports of commodity COM into REG at timeslice S
SUM(RTP_VINTYR(REG,V,T,P)$RTPCS_VARF(REG,T,P,COM,S),
SUM(RTP_VNTBYR(REG,T,P,V)$RTPCS_VARF(REG,T,P,COM,S),
%VAR%_IRE(REG,V,T,P,COM,S,IE%SOW%)$(NOT RPC_AIRE(REG,P,COM))+(%VAR%_ACT(REG,V,T,P,S%SOW%)*PRC_ACTFLO(REG,V,P,COM))$RPC_AIRE(REG,P,COM)
) * (1-2*XPT(IE))
+
* sum also the imports in other regions in case of market-based equation
SUM(TOP_IRE(REG,COM1,R,C,P)$((NOT SAMEAS(REG,R))$RPC_MARKET(REG,P,COM1,'EXP')),
SUM((RTP_VINTYR(R,V,T,P),RTPCS_VARF(R,T,P,C,TS),RS_TREE(R,ALL_TS,TS))$IRE_TSCVT(R,ALL_TS,REG,S),
SUM((RTP_VNTBYR(R,T,P,V),RTPCS_VARF(R,T,P,C,TS),RS_TREE(R,ALL_TS,TS))$IRE_TSCVT(R,ALL_TS,REG,S),
(%VAR%_IRE(R,V,T,P,C,TS,'IMP'%SOW%)$(NOT RPC_AIRE(R,P,C))+(%VAR%_ACT(R,V,T,P,TS%SOW%)*PRC_ACTFLO(R,V,P,C))$RPC_AIRE(R,P,C))
* IRE_CCVT(R,C,REG,COM1) * IRE_TSCVT(R,ALL_TS,REG,S)
* RS_FR(R,ALL_TS,TS)*(1+RTCS_FR(R,T,C,ALL_TS,TS))
Expand All @@ -30,7 +30,7 @@
+
* sum also the imports in other regions in case of market-based equation: EXP case
SUM(TOP_IRE(REG,COM,R,C,P),
SUM((RTP_VINTYR(R,V,T,P),RTPCS_VARF(R,T,P,C,TS),RS_TREE(R,ALL_TS,TS))$IRE_TSCVT(R,ALL_TS,REG,S),
SUM((RTP_VNTBYR(R,T,P,V),RTPCS_VARF(R,T,P,C,TS),RS_TREE(R,ALL_TS,TS))$IRE_TSCVT(R,ALL_TS,REG,S),
(%VAR%_IRE(R,V,T,P,C,TS,'IMP'%SOW%)$(NOT RPC_AIRE(R,P,C))+(%VAR%_ACT(R,V,T,P,TS%SOW%)*PRC_ACTFLO(R,V,P,C))$RPC_AIRE(R,P,C))
/ IRE_FLO(REG,V,P,COM,R,C,TS) * IRE_TSCVT(R,ALL_TS,REG,S)
* RS_FR(R,ALL_TS,TS)*(1+RTCS_FR(R,T,C,ALL_TS,TS))
Expand All @@ -41,7 +41,7 @@

* sum the associated exports
SUM((TOP_IRE(R,C,REG,COM,P),ALL_TS)$IRE_TSCVT(R,ALL_TS,REG,S),
SUM((RTP_VINTYR(R,V,T,P),RTPCS_VARF(R,T,P,C,TS))$RS_FR(R,ALL_TS,TS),
SUM((RTP_VNTBYR(R,T,P,V),RTPCS_VARF(R,T,P,C,TS))$RS_FR(R,ALL_TS,TS),
(%VAR%_IRE(R,V,T,P,C,TS,'EXP'%SOW%)$(NOT RPC_AIRE(R,P,C))+(%VAR%_ACT(R,V,T,P,TS%SOW%)*PRC_ACTFLO(R,V,P,C))$RPC_AIRE(R,P,C))
* [AL] IRE_TSCVT converts from ALL_TS to S, and RTCS_TSFR from TS to ALL_TS:
* IRE_FLO(R,V,P,C,REG,COM,S) * IRE_TSCVT(R,ALL_TS,REG,S)
Expand Down
10 changes: 5 additions & 5 deletions eqirebnd.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* Copyright (C) 2000-2023 Energy Technology Systems Analysis Programme (ETSAP)
* Copyright (C) 2000-2024 Energy Technology Systems Analysis Programme (ETSAP)
* This file is part of the IEA-ETSAP TIMES model generator, licensed
* under the GNU General Public License v3.0 (see file NOTICE-GPLv3.txt).
*=============================================================================*
Expand All @@ -22,7 +22,7 @@
* For imports from internal non-marketplace region, sum the associated exports
SUM(TOP_IRE(REG(ALL_REG),COM,R,C,P)$RPC_EQIRE(R,P,C,'IMP'),
SUM(SL$(RTPCS_VARF(R,T,P,C,SL)*RS_TREE(R,S,SL)),
SUM((RTP_VINTYR(REG,V,T,P),RTPCS_VARF(REG,T,P,COM,TS),RS_TREE(REG,ALL_TS,TS))$IRE_TSCVT(REG,ALL_TS,R,SL),
SUM((RTP_VNTBYR(REG,T,P,V),RTPCS_VARF(REG,T,P,COM,TS),RS_TREE(REG,ALL_TS,TS))$IRE_TSCVT(REG,ALL_TS,R,SL),
(%VAR%_IRE(REG,V,T,P,COM,TS,'EXP'%SOW%)$(NOT RPC_AIRE(REG,P,COM))+(%VAR%_ACT(REG,V,T,P,TS%SOW%)*PRC_ACTFLO(REG,V,P,COM))$RPC_AIRE(REG,P,COM))
* IRE_FLO(REG,V,P,COM,R,C,SL) * IRE_CCVT(REG,COM,R,C) * IRE_TSCVT(REG,ALL_TS,R,SL)
* RS_FR(REG,ALL_TS,TS)*(1+RTCS_FR(REG,T,COM,ALL_TS,TS))
Expand All @@ -33,7 +33,7 @@
+
* For imports from external regions or marketplace, sum the flows directly in region R
SUM(RPC_IRE(R,P,C,IE)$((NOT RPC_EQIRE(R,P,C,'IMP'))*SUM(TOP_IRE(ALL_REG,COM,R,C,P),1)),
SUM((RTP_VINTYR(R,V,T,P),RTPCS_VARF(R,T,P,C,TS))$RS_TREE(R,S,TS),
SUM((RTP_VNTBYR(R,T,P,V),RTPCS_VARF(R,T,P,C,TS))$RS_TREE(R,S,TS),
(%VAR%_IRE(R,V,T,P,C,TS,IE%SOW%)$(NOT RPC_AIRE(R,P,C))+(%VAR%_ACT(R,V,T,P,TS%SOW%)*PRC_ACTFLO(R,V,P,C))$RPC_AIRE(R,P,C))
* bound coarser than variable or bound finer than variable
* (1$TS_MAP(R,S,TS) + (G_YRFR(R,S)/G_YRFR(R,TS))$RS_BELOW(R,TS,S))
Expand All @@ -44,7 +44,7 @@
(
* For exports from market region to internal region REG, sum the associated imports into REG
SUM((RPC_MARKET(R,P,C,'EXP'),TOP_IRE(R,C,REG(ALL_REG),COM,P)),
SUM((RTP_VINTYR(REG,V,T,P),RTPCS_VARF(REG,T,P,COM,TS),RS_TREE(REG,ALL_TS,TS))$IRE_TSCVT(REG,ALL_TS,R,S),
SUM((RTP_VNTBYR(REG,T,P,V),RTPCS_VARF(REG,T,P,COM,TS),RS_TREE(REG,ALL_TS,TS))$IRE_TSCVT(REG,ALL_TS,R,S),
(%VAR%_IRE(REG,V,T,P,COM,TS,'IMP'%SOW%)$(NOT RPC_AIRE(REG,P,COM))+(%VAR%_ACT(REG,V,T,P,TS%SOW%)*PRC_ACTFLO(REG,V,P,COM))$RPC_AIRE(REG,P,COM))
* IRE_CCVT(REG,COM,R,C) * IRE_TSCVT(REG,ALL_TS,R,S)
* RS_FR(REG,ALL_TS,TS)*(1+RTCS_FR(REG,T,COM,ALL_TS,TS))
Expand All @@ -54,7 +54,7 @@
* For all other exports, sum the flows directly in region R
*UR* /12/09/99 commodity names can be different in the two regions
SUM(RPC_IRE(R,P,C,IE)$((NOT RPC_MARKET(R,P,C,'EXP'))*SUM(TOP_IRE(R,C,ALL_REG,COM,P),1)),
SUM((RTP_VINTYR(R,V,T,P),RTPCS_VARF(R,T,P,C,TS))$RS_TREE(R,S,TS),
SUM((RTP_VNTBYR(R,T,P,V),RTPCS_VARF(R,T,P,C,TS))$RS_TREE(R,S,TS),
(%VAR%_IRE(R,V,T,P,C,TS,IE%SOW%)$(NOT RPC_AIRE(R,P,C))+(%VAR%_ACT(R,V,T,P,TS%SOW%)*PRC_ACTFLO(R,V,P,C))$RPC_AIRE(R,P,C))
* bound coarser than variable or bound finer than variable
* (1$TS_MAP(R,S,TS) + (G_YRFR(R,S)/G_YRFR(R,TS))$RS_BELOW(R,TS,S))
Expand Down
5 changes: 3 additions & 2 deletions eqmain.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ $ BATINCLUDE eqactflo.%1
*-----------------------------------------------------------------------------
* Bound of vintage process activity or TS-level above PRC_TS
*-----------------------------------------------------------------------------
*V0.5b 980902 - avoid equations if LO=0/UP=INF
*V0.5b avoid equations if LO=0/UP=INF
$ BATINCLUDE eqactbnd.%1 G LO "(ACT_BND(R,T,P,S,'LO') NE 0)"
$ BATINCLUDE eqactbnd.%1 E FX YES
$ BATINCLUDE eqactbnd.%1 L UP "(ACT_BND(R,T,P,S,'UP') NE INF)"
Expand Down Expand Up @@ -148,7 +148,7 @@ $ BATINCLUDE eqire.%1
*-----------------------------------------------------------------------------
* Bound on exchange between internal regions
*-----------------------------------------------------------------------------
*V0.5b 980902 - avoid equations if LO=0/UP=INF
*V0.5b avoid equations if LO=0/UP=INF
$ BATINCLUDE eqirebnd.%1 G LO "(IRE_BND(R,T,C,S,ALL_REG,IE,'LO') NE 0)"
$ BATINCLUDE eqirebnd.%1 E FX YES
$ BATINCLUDE eqirebnd.%1 L UP "(IRE_BND(R,T,C,S,ALL_REG,IE,'UP') NE INF)"
Expand Down Expand Up @@ -194,6 +194,7 @@ $ BATINCLUDE eqbndcst.%1
*-----------------------------------------------------------------------------
* User-constraints
*-----------------------------------------------------------------------------
$ IFE CARD(UC_TIME)+CARD(UC_UCN)>0 $SETGLOBAL VAR_UC YES
* Commissioning periods for UCs
SET RVPT(R,ALLYEAR,P,T);
LOOP(OBJ_2A(R,T,P)$(NOT RTP_OFF(R,T,P)),F=B(T)+NCAP_ILED(R,T,P); Z=SUM(VNT(T,TT)$(F>E(TT)+0.5),1);
Expand Down
Loading

0 comments on commit ca3c134

Please sign in to comment.