Skip to content

Commit ca3c134

Browse files
authored
Update to v4.8.2
1 parent 1ac8990 commit ca3c134

21 files changed

+133
-99
lines changed

Version.log

+29-1
Original file line numberDiff line numberDiff line change
@@ -2936,4 +2936,32 @@ coef_ext.vda : (3)
29362936
eqactups.vda : (1)
29372937
eqcaflac.vda : (1)
29382938
equ_ext.abs : (1)
2939-
solsetv.v3 : (3)
2939+
solsetv.v3 : (3)
2940+
2941+
-----------------------------------------------------------------------------------------
2942+
TIMES Version 4.8.2
2943+
-----------------------------------------------------------------------------------------
2944+
Date: 19-Aug-2024 [AL]: Minor release
2945+
1) Small performance improvements inspired by the ETSAP code review project
2946+
2) Added IE option -13 for flushing out time series (eg. UCs)
2947+
3) Other subtle improvements
2948+
2949+
initsys.mod : Increased version number to 4.8.2
2950+
initmty.mod : (3)
2951+
setglobs.gms : (1)
2952+
ppmain.mod : (3)
2953+
prepparm.gms : (2)
2954+
pp_lvlpk.mod : (1)
2955+
eqmain.mod : (2)
2956+
cal_stgn.mod : (1)
2957+
cal_ire.mod : (1)
2958+
cal_fflo.mod : (1)
2959+
eqflomrk.mod : (1)
2960+
eqire.mod : (1)
2961+
eqirebnd.mod : (1)
2962+
eqxbnd.mod : (1)
2963+
bnd_ucw.mod : (2)
2964+
pp_qack.mod : (1)
2965+
coef_ext.vda : (2)
2966+
solsetv.v3 : (1)
2967+
prepret.dsc : (3)

bnd_ucw.mod

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2-
* Copyright (C) 2000-2023 Energy Technology Systems Analysis Programme (ETSAP)
2+
* Copyright (C) 2000-2024 Energy Technology Systems Analysis Programme (ETSAP)
33
* This file is part of the IEA-ETSAP TIMES model generator, licensed
44
* under the GNU General Public License v3.0 (see file NOTICE-GPLv3.txt).
55
*=============================================================================*
@@ -12,12 +12,12 @@ $ SET TMP
1212
$ IF %STAGES%==YES $SET TMP (T-SUC_L(R,UC_N))
1313
CNT=0;
1414
UC_T_EACH(UC_T_SUCC) = YES;
15-
$ BATINCLUDE bnd_ucv.mod %VAR%_UC "" "" "" UC_RHS $UC_R_SUM(R,UC_N) LOOP(R, ); '' '%2' ",'','',''"
16-
$ BATINCLUDE bnd_ucv.mod %VAR%_UCR "," "R" "" UC_RHSR $UC_R_EACH(R,UC_N) '' '' '' '%2' ",'',''" $UC_R_EACH(R,UC_N)
17-
$ 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%
18-
$ 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%
19-
$ 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%
20-
$ 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%
15+
$ BATINCLUDE bnd_ucv.mod %VAR%_UC "" "" "" UC_RHS $UC_ON(R,UC_N) LOOP(R, ); '' '%2' ",'','',''"
16+
$ BATINCLUDE bnd_ucv.mod %VAR%_UCR "," "R" "" UC_RHSR $UC_ON(R,UC_N) '' '' '' '%2' ",'',''" $UC_R_EACH(R,UC_N)
17+
$ 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%
18+
$ 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%
19+
$ 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%
20+
$ 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%
2121
UC_T_EACH(UC_T_SUCC) = NO;
2222
*-------------------------------------------------------------------------------
2323
$IFI %STAGES%==YES IF(SW_PHASE EQ -9,

cal_fflo.mod

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ $SET SHP1 "*(%SHFF%X(R,V,T%SHG%)$PRC_VINT(R,P))%SHP1%"
1919
*-----------------------------------------------------------------------------
2020
*V05c 980923 - check that commodity not just capacity related
2121
SUM(TOP(RP_FLO(R,P),C,'%1')$(NOT RPC_EMIS(R,P,C)),
22-
SUM((RTP_VINTYR(R,V,T,P),RTPCS_VARF(R,T,P,C,TS)),
22+
SUM((RTP_VNTBYR(R,T,P,V),RTPCS_VARF(R,T,P,C,TS)),
2323
* equation coarser than variable or equation finer than variable
2424
* consider COM_TS shape too, so both TS_MAP and RS_BELOW embedded
2525
%VAR%_FLO(R,V,T,P,C,TS %SOW%) * RS_FR(R,S,TS)*(1+RTCS_FR(R,T,C,S,TS)) %3)%4
2626
) +
2727
* Handle RPC_EMIS flows separately; They cannot be NOFLO
2828
SUM(TOP(RPC_EMIS(RP_FLO(R,P),C),'%1')%4,
2929
SUM((FS_EMIT(R,P,C,CG3,COM2),RTPCS_VARF(R,T,P,COM2,TS))$RS_FR(R,S,TS),
30-
SUM(RTP_VINTYR(R,V,T,P),%VAR%_FLO(R,V,T,P,COM2,TS %SOW%) *
30+
SUM(RTP_VNTBYR(R,T,P,V),%VAR%_FLO(R,V,T,P,COM2,TS %SOW%) *
3131
COEF_PTRAN(R,V,P,CG3,COM2,C,TS) %SHP1% %3) *
3232
RS_FR(R,S,TS)*(1+RTCS_FR(R,T,COM2,S,TS)))) +
3333
$EXIT
@@ -36,15 +36,15 @@ $LABEL REDUCE
3636
* [UR] model reduction %REDUCE% is set in *.run
3737
* Sum over non-vintaged processes
3838
SUM(TOP(RP_FLO(R,P),C,'%1')$(NOT PRC_VINT(R,P)),
39-
SUM((RTP_VINTYR(R,V(T),T,P),RTPCS_VARF(R,T,P,C,TS)),
39+
SUM(RTPCS_VARF(R,V(T),P,C,TS),
4040
$ BATINCLUDE cal_red.red C COM TS P T '' T
4141
* equation coarser than variable or equation finer than variable
4242
* RS_FR(R,S,TS)*(1+RTCS_FR(R,T,C,S,TS)) %3)%4
4343
) +
4444

4545
* Sum over vintaged processes
4646
SUM((TOP(PRC_VINT(RP_FLO(R,P)),C,'%1'),RTPCS_VARF(R,T,P,C,TS))%4,
47-
$ BATINCLUDE cal_red.red C COM TS P T '' V SUM 'RTP_VINTYR(R,V,T,P),' %3
47+
$ BATINCLUDE cal_red.red C COM TS P T '' V SUM 'RTP_VNTBYR(R,T,P,V),' %3
4848
* equation coarser than variable or equation finer than variable
4949
* RS_FR(R,S,TS)*(1+RTCS_FR(R,T,C,S,TS))
5050
) +

cal_ire.mod

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2-
* Copyright (C) 2000-2023 Energy Technology Systems Analysis Programme (ETSAP)
2+
* Copyright (C) 2000-2024 Energy Technology Systems Analysis Programme (ETSAP)
33
* This file is part of the IEA-ETSAP TIMES model generator, licensed
44
* under the GNU General Public License v3.0 (see file NOTICE-GPLv3.txt).
55
*=============================================================================*
@@ -21,11 +21,10 @@ $IF '%1%2' == 'EXPOUT' $GOTO AUXONLY
2121
$IF '%1%2' == 'IMPIN' $GOTO AUXONLY
2222
* actual exchange
2323
*V05c 981016 - change RTPCS_VARFs to ts
24-
SUM((RPC_IRE(%6R,P%7,C,'%1'),RTPCS_VARF(R,T,P,C,TS))$RS_FR(R,S,TS),
25-
SUM(RTP_VINTYR(R,V,T,P),
24+
SUM((RPC_IRE(%6R,P%7,C,'%1'),RTP_VNTBYR(R,T,P,V)),
25+
SUM(RTPCS_VARF(R,T,P,C,TS)$RS_FR(R,S,TS),
2626
(%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)
27-
)%4
28-
) * RS_FR(R,S,TS)*(1+RTCS_FR(R,T,C,S,TS))
27+
)%4 * RS_FR(R,S,TS)*(1+RTCS_FR(R,T,C,S,TS)))
2928
) +
3029

3130
$IF SET IREAUXBAL %IREAUXBAL% %2 %5
@@ -35,7 +34,7 @@ $LABEL AUXONLY
3534
*V0.9 022100 - do IN/OUT explicitly
3635
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)),
3736
IRE_FLOSUM(R,T,P,COM,TS,%IE%,C,'%2') *
38-
SUM(RTP_VINTYR(R,V,T,P), %MX%
37+
SUM(RTP_VNTBYR(R,T,P,V), %MX%
3938
(%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)
4039
)%4
4140
) * RS_FR(R,S,TS)*(1+RTCS_FR(R,T,COM,S,TS))

cal_stgn.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2-
* Copyright (C) 2000-2023 Energy Technology Systems Analysis Programme (ETSAP)
2+
* Copyright (C) 2000-2024 Energy Technology Systems Analysis Programme (ETSAP)
33
* This file is part of the IEA-ETSAP TIMES model generator, licensed
44
* under the GNU General Public License v3.0 (see file NOTICE-GPLv3.txt).
55
*=============================================================================*
@@ -15,7 +15,7 @@
1515
*-----------------------------------------------------------------------------
1616
*V05c 980923 - check that commodity not just capacity related
1717
SUM((TOP(RPC_STG(R,P,C),'%1'),RPCS_VAR(R,P,C,TS))$%5,
18-
SUM(RTP_VINTYR(R,V,T,P),
18+
SUM(RTP_VNTBYR(R,T,P,V),
1919
(%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')) *
2020
* equation coarser than variable or finer than variable
2121
RS_FR(R,S,TS)

coef_ext.vda

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ $ IFI NOT %STSFLX%==YES RP_STL(RP_STS,TSL,BD)=0;
5050
RTCS_VARC(R,T,C,S)$((NOT RHS_COMPRD(R,T,C,S))$TRACKC(R,C)) = NO;
5151
TOP_IRE('IMPEXP',C,TRACKC,P) = NO;
5252
OPTION CLEAR=TRACKC,CLEAR=TRACKP,CLEAR=RCS;
53+
* Filter out UC constraints
54+
IF(CARD(UC_TIME),OPTION R_UC<UC_TIME;
55+
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));
56+
UC_TIME(UCN,R,T)$((NOT UC_ON(R,UCN))$R_UC(R,UCN))=0; OPTION CLEAR=R_UC);
5357
*-----------------------------------------------------------------------------
5458
* Add singleton ACT_EFFs to COEF_PTRANS or ACT_FLO
5559
RP_CGC(RPG_1ACE) = YES; OPTION TRACKPC < RPG_1ACE, RP_GRP < RP_CGC;

eqflomrk.mod

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2-
* Copyright (C) 2000-2023 Energy Technology Systems Analysis Programme (ETSAP)
2+
* Copyright (C) 2000-2024 Energy Technology Systems Analysis Programme (ETSAP)
33
* This file is part of the IEA-ETSAP TIMES model generator, licensed
44
* under the GNU General Public License v3.0 (see file NOTICE-GPLv3.txt).
55
*==================================================================================================*
@@ -69,7 +69,7 @@ $SETLOCAL SIGO "(PRC_MARK(R,T,P,ITEM,COM,'%2') GE 0)" SETLOCAL SIGI "(PRC_MARK(R
6969

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

7979
* Inter-regional trade contribution
8080
+ SUM(RTPCS_VARF(R,T,P,C,TS)$RS_FR(R,SL,TS),
81-
SUM(RTP_VINTYR(R,V,T,P),
81+
SUM(RTP_VNTBYR(R,T,P,V),
8282
((%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'))-
8383
((%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'))) *
8484
* Balance coarser than variable or balance finer than variable
8585
RS_FR(R,SL,TS)*(1+RTCS_FR(R,T,C,SL,TS)))$RP_IRE(R,P)
8686

8787
* Storage contribution
8888
+ SUM(RPCS_VAR(RPC_STG(R,P,C),TS)$RS_FR(R,SL,TS),
89-
SUM(RTP_VINTYR(R,V,T,P),
89+
SUM(RTP_VNTBYR(R,T,P,V),
9090
((%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%)) *
9191
* Balance coarser than variable or balance finer than variable
9292
RS_FR(R,SL,TS)*(1+RTCS_FR(R,T,C,SL,TS)))$PRC_MAP(R,'STG',P)

eqire.mod

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2-
* Copyright (C) 2000-2023 Energy Technology Systems Analysis Programme (ETSAP)
2+
* Copyright (C) 2000-2024 Energy Technology Systems Analysis Programme (ETSAP)
33
* This file is part of the IEA-ETSAP TIMES model generator, licensed
44
* under the GNU General Public License v3.0 (see file NOTICE-GPLv3.txt).
55
*=============================================================================*
@@ -15,13 +15,13 @@
1515

1616

1717
* the imports/exports of commodity COM into REG at timeslice S
18-
SUM(RTP_VINTYR(REG,V,T,P)$RTPCS_VARF(REG,T,P,COM,S),
18+
SUM(RTP_VNTBYR(REG,T,P,V)$RTPCS_VARF(REG,T,P,COM,S),
1919
%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)
2020
) * (1-2*XPT(IE))
2121
+
2222
* sum also the imports in other regions in case of market-based equation
2323
SUM(TOP_IRE(REG,COM1,R,C,P)$((NOT SAMEAS(REG,R))$RPC_MARKET(REG,P,COM1,'EXP')),
24-
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),
24+
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),
2525
(%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))
2626
* IRE_CCVT(R,C,REG,COM1) * IRE_TSCVT(R,ALL_TS,REG,S)
2727
* RS_FR(R,ALL_TS,TS)*(1+RTCS_FR(R,T,C,ALL_TS,TS))
@@ -30,7 +30,7 @@
3030
+
3131
* sum also the imports in other regions in case of market-based equation: EXP case
3232
SUM(TOP_IRE(REG,COM,R,C,P),
33-
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),
33+
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),
3434
(%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))
3535
/ IRE_FLO(REG,V,P,COM,R,C,TS) * IRE_TSCVT(R,ALL_TS,REG,S)
3636
* RS_FR(R,ALL_TS,TS)*(1+RTCS_FR(R,T,C,ALL_TS,TS))
@@ -41,7 +41,7 @@
4141

4242
* sum the associated exports
4343
SUM((TOP_IRE(R,C,REG,COM,P),ALL_TS)$IRE_TSCVT(R,ALL_TS,REG,S),
44-
SUM((RTP_VINTYR(R,V,T,P),RTPCS_VARF(R,T,P,C,TS))$RS_FR(R,ALL_TS,TS),
44+
SUM((RTP_VNTBYR(R,T,P,V),RTPCS_VARF(R,T,P,C,TS))$RS_FR(R,ALL_TS,TS),
4545
(%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))
4646
* [AL] IRE_TSCVT converts from ALL_TS to S, and RTCS_TSFR from TS to ALL_TS:
4747
* IRE_FLO(R,V,P,C,REG,COM,S) * IRE_TSCVT(R,ALL_TS,REG,S)

eqirebnd.mod

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2-
* Copyright (C) 2000-2023 Energy Technology Systems Analysis Programme (ETSAP)
2+
* Copyright (C) 2000-2024 Energy Technology Systems Analysis Programme (ETSAP)
33
* This file is part of the IEA-ETSAP TIMES model generator, licensed
44
* under the GNU General Public License v3.0 (see file NOTICE-GPLv3.txt).
55
*=============================================================================*
@@ -22,7 +22,7 @@
2222
* For imports from internal non-marketplace region, sum the associated exports
2323
SUM(TOP_IRE(REG(ALL_REG),COM,R,C,P)$RPC_EQIRE(R,P,C,'IMP'),
2424
SUM(SL$(RTPCS_VARF(R,T,P,C,SL)*RS_TREE(R,S,SL)),
25-
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),
25+
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),
2626
(%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))
2727
* IRE_FLO(REG,V,P,COM,R,C,SL) * IRE_CCVT(REG,COM,R,C) * IRE_TSCVT(REG,ALL_TS,R,SL)
2828
* RS_FR(REG,ALL_TS,TS)*(1+RTCS_FR(REG,T,COM,ALL_TS,TS))
@@ -33,7 +33,7 @@
3333
+
3434
* For imports from external regions or marketplace, sum the flows directly in region R
3535
SUM(RPC_IRE(R,P,C,IE)$((NOT RPC_EQIRE(R,P,C,'IMP'))*SUM(TOP_IRE(ALL_REG,COM,R,C,P),1)),
36-
SUM((RTP_VINTYR(R,V,T,P),RTPCS_VARF(R,T,P,C,TS))$RS_TREE(R,S,TS),
36+
SUM((RTP_VNTBYR(R,T,P,V),RTPCS_VARF(R,T,P,C,TS))$RS_TREE(R,S,TS),
3737
(%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))
3838
* bound coarser than variable or bound finer than variable
3939
* (1$TS_MAP(R,S,TS) + (G_YRFR(R,S)/G_YRFR(R,TS))$RS_BELOW(R,TS,S))
@@ -44,7 +44,7 @@
4444
(
4545
* For exports from market region to internal region REG, sum the associated imports into REG
4646
SUM((RPC_MARKET(R,P,C,'EXP'),TOP_IRE(R,C,REG(ALL_REG),COM,P)),
47-
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),
47+
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),
4848
(%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))
4949
* IRE_CCVT(REG,COM,R,C) * IRE_TSCVT(REG,ALL_TS,R,S)
5050
* RS_FR(REG,ALL_TS,TS)*(1+RTCS_FR(REG,T,COM,ALL_TS,TS))
@@ -54,7 +54,7 @@
5454
* For all other exports, sum the flows directly in region R
5555
*UR* /12/09/99 commodity names can be different in the two regions
5656
SUM(RPC_IRE(R,P,C,IE)$((NOT RPC_MARKET(R,P,C,'EXP'))*SUM(TOP_IRE(R,C,ALL_REG,COM,P),1)),
57-
SUM((RTP_VINTYR(R,V,T,P),RTPCS_VARF(R,T,P,C,TS))$RS_TREE(R,S,TS),
57+
SUM((RTP_VNTBYR(R,T,P,V),RTPCS_VARF(R,T,P,C,TS))$RS_TREE(R,S,TS),
5858
(%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))
5959
* bound coarser than variable or bound finer than variable
6060
* (1$TS_MAP(R,S,TS) + (G_YRFR(R,S)/G_YRFR(R,TS))$RS_BELOW(R,TS,S))

eqmain.mod

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $ BATINCLUDE eqactflo.%1
4343
*-----------------------------------------------------------------------------
4444
* Bound of vintage process activity or TS-level above PRC_TS
4545
*-----------------------------------------------------------------------------
46-
*V0.5b 980902 - avoid equations if LO=0/UP=INF
46+
*V0.5b avoid equations if LO=0/UP=INF
4747
$ BATINCLUDE eqactbnd.%1 G LO "(ACT_BND(R,T,P,S,'LO') NE 0)"
4848
$ BATINCLUDE eqactbnd.%1 E FX YES
4949
$ BATINCLUDE eqactbnd.%1 L UP "(ACT_BND(R,T,P,S,'UP') NE INF)"
@@ -148,7 +148,7 @@ $ BATINCLUDE eqire.%1
148148
*-----------------------------------------------------------------------------
149149
* Bound on exchange between internal regions
150150
*-----------------------------------------------------------------------------
151-
*V0.5b 980902 - avoid equations if LO=0/UP=INF
151+
*V0.5b avoid equations if LO=0/UP=INF
152152
$ BATINCLUDE eqirebnd.%1 G LO "(IRE_BND(R,T,C,S,ALL_REG,IE,'LO') NE 0)"
153153
$ BATINCLUDE eqirebnd.%1 E FX YES
154154
$ BATINCLUDE eqirebnd.%1 L UP "(IRE_BND(R,T,C,S,ALL_REG,IE,'UP') NE INF)"
@@ -194,6 +194,7 @@ $ BATINCLUDE eqbndcst.%1
194194
*-----------------------------------------------------------------------------
195195
* User-constraints
196196
*-----------------------------------------------------------------------------
197+
$ IFE CARD(UC_TIME)+CARD(UC_UCN)>0 $SETGLOBAL VAR_UC YES
197198
* Commissioning periods for UCs
198199
SET RVPT(R,ALLYEAR,P,T);
199200
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);

0 commit comments

Comments
 (0)