Skip to content

Commit 83b9d2e

Browse files
authored
Update to v4.7.9
1 parent b488fb0 commit 83b9d2e

10 files changed

+68
-45
lines changed

Version.log

+21-1
Original file line numberDiff line numberDiff line change
@@ -2846,4 +2846,24 @@ eqpeak.mod : (3)
28462846
cal_fflo.mod : (3)
28472847
pp_qack.mod : (1)
28482848
init_ext.vda : (2)
2849-
pp_prelv.vda : (3)
2849+
pp_prelv.vda : (3)
2850+
2851+
-----------------------------------------------------------------------------------------
2852+
TIMES Version 4.7.9
2853+
-----------------------------------------------------------------------------------------
2854+
Date: 25-Feb-2024 [AL]: Maintenance QA release
2855+
1) Added support for shaping NCAP_OCOM based on COEF_CPT
2856+
2) Fixed performance bug within IRE_FLO levelizing
2857+
3) Improved QA checks for ACT_EFF default shadow group
2858+
4) Cosmetic improvements
2859+
2860+
Modified files: (reason)
2861+
initsys.mod : Increased version number to 4.7.9
2862+
ppmain.mod : (1)
2863+
setglobs.gms : (1)
2864+
preshape.gms : (4)
2865+
pp_lvlif.mod : (2)
2866+
pp_reduce.red : (4)
2867+
coef_nio.mod : (1)
2868+
coef_shp.mod : (1)
2869+
ppm_ext.vda : (3)

coef_nio.mod

+9-12
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
*=============================================================================*
@@ -11,8 +11,7 @@
1111
*[AL] Corrected bugs in the end of commodity flows in the OCOM case
1212
*-----------------------------------------------------------------------------
1313
* commodity flows tied to new capacity
14-
*V0.5b 980828 re-adjust v,t handling to capture enclosed periods & condition to
15-
* handle period of length 1
14+
*V0.5b 980828 re-adjust v,t handling to capture enclosed periods & condition to handle period of length 1
1615
RPC_CAPFLO(R,V,P,C)$(NOT RTP(R,V,P)) = 0;
1716
FIL(V) = YEARVAL(V) GE MIYR_V1;
1817
*V05c 980923 - use the capacity flow control set
@@ -33,26 +32,24 @@
3332
);
3433

3534
* commodity flows tied to decommissioning of capacity
36-
*V05c 980921 - include the PASTInvestments, was looping over MILESTONYR
37-
*V05c 980923 - use the capacity flow control set
35+
*V05c 980923 - use the capacity flow control set, including PASTInvestments
3836
LOOP(RPC_CAPFLO(R,V,P,C)$NCAP_OCOM(R,V,P,C),
39-
F = NCAP_ILED(R,V,P); MY_F = NCAP_TLIFE(R,V,P);
37+
F = NCAP_ILED(R,V,P)+NCAP_DLAG(R,V,P); MY_F = NCAP_TLIFE(R,V,P);
4038
Z = MAX(1,NCAP_DLIFE(R,V,P)); DFUNC = COEF_RPTI(R,V,P);
4139
IF(DFUNC GT 1,
4240
FOR(CNT = 1 TO CEIL(DFUNC),
4341
COEF_OCOM(R,V,T,P,C)$(YEARVAL(T) >= YEARVAL(V)) =
4442
COEF_OCOM(R,V,T,P,C) + MIN(1,DFUNC-CNT+1) *
45-
(MAX(0,(MIN(B(V)+F+(CNT*MY_F)+NCAP_DLAG(R,V,P)+Z,E(T)+1) -
46-
MAX(B(V)+F+(CNT*MY_F)+NCAP_DLAG(R,V,P),B(T))
43+
MAX(0,(MIN(B(V)+F+(CNT*MY_F)+Z,E(T)+1) -
44+
MAX(B(V)+F+(CNT*MY_F),B(T))
4745
) / FPD(T)
48-
) * (NCAP_OCOM(R,V,P,C) / Z)
49-
)
46+
) * (NCAP_OCOM(R,V,P,C) / Z)
5047
)
5148
ELSE
5249
COEF_OCOM(R,V,T,P,C)$(YEARVAL(T) >= YEARVAL(V)) =
5350
* some part of release in T
54-
MAX(0,(MIN(B(V)+F+MY_F+NCAP_DLAG(R,V,P)+Z,E(T)+1) -
55-
MAX(B(V)+F+MY_F+NCAP_DLAG(R,V,P),B(T))
51+
MAX(0,(MIN(B(V)+F+MY_F+Z,E(T)+1) -
52+
MAX(B(V)+F+MY_F,B(T))
5653
) / FPD(T)
5754
) * (NCAP_OCOM(R,V,P,C) / Z)
5855
);

coef_shp.mod

+10-3
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
*=============================================================================*
@@ -43,7 +43,7 @@
4343
RTP_FFCX(RTP_CAPYR,'CAPFLO',CG) = 0;
4444
* Option for non-vintaged FLO_FUNC multipliers
4545
RTP_FFCX(RTP_VINTYR(R,V,T,P),CG,CG2)$((FLO_FUNC(R,V,P,CG,CG2,'ANNUAL')>0)$RTP_CGC(R,V,P,CG,CG2))=FLO_FUNC(R,T,P,CG,CG2,'ANNUAL')/FLO_FUNC(R,V,P,CG,CG2,'ANNUAL')-1;
46-
OPTION CLEAR=RTP_CGC,CLEAR=TRACKP,CLEAR=RVPRL,CLEAR=RP_GRP;
46+
OPTION CLEAR=TRACKP,CLEAR=RVPRL,CLEAR=RP_GRP;
4747
*------------------------------------------------------------------------------
4848
* Shaping of COEF_CPT
4949
*------------------------------------------------------------------------------
@@ -72,4 +72,11 @@
7272
);
7373
OPTION RTP_CPX <= COEF_CAP;
7474
COEF_CPT(R,V,T,P)$COEF_CAP(R,V,T,P) = COEF_CPT(R,V,T,P)*(COEF_CAP(R,V,T,P)+1);
75-
OPTION CLEAR=PRC_YMIN,CLEAR=PRC_YMAX,CLEAR=TRACKP,CLEAR=COEF_CAP,CLEAR=RVPRL;
75+
76+
* Override COEF_OCOM if conditions met for using capacity transfer
77+
RTP_CGC(RTP(R,V,P),CG('CAPFLO'),C)$((MAX(NCAP_ILED(RTP),NCAP_DLIFE(RTP),NCAP_DLAG(RTP))<=0)$(FLO_FUNCX(R,'0',P,CG,C)=2)$NCAP_OCOM(RTP,C))=YES;
78+
OPTION TRACKPG <= RTP_CGC;
79+
LOOP(TRACKPG(R,P,CG('CAPFLO')),
80+
COEF_OCOM(R,VNT(V,T),P,C)$RTP_CGC(R,V,P,CG,C) = (MAX(0,1-COEF_CPT(R,V,T,P))*NCAP_OCOM(R,V,P,C)/FPD(T))$VNT(T,V);
81+
COEF_OCOM(R,V,TT(T+1),P,C)$(RTP_CPTYR(R,V,T,P)$NCAP_OCOM(R,V,P,C)$RTP_CGC(R,V,P,CG,C))=MAX(0,COEF_CPT(R,V,T,P)-COEF_CPT(R,V,TT,P))*NCAP_OCOM(R,V,P,C)/FPD(TT));
82+
OPTION CLEAR=PRC_YMIN,CLEAR=PRC_YMAX,CLEAR=TRACKP,CLEAR=TRACKPG,CLEAR=RTP_CGC,CLEAR=COEF_CAP,CLEAR=RVPRL;

initsys.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$TITLE TIMES -- VERSION 4.7.8
1+
$TITLE TIMES -- VERSION 4.7.9
22
*==========================================================================================*
33
* INITSYS.MOD has all the fixed system declarations for ETSAP TIMES *
44
*==========================================================================================*

pp_lvlif.mod

+15-21
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
*=============================================================================*
@@ -14,32 +14,26 @@
1414
OPTION CLEAR=UNCD7; PUTGRP = 0;
1515
*-----------------------------------------------------------------------------
1616
LOOP((REG,V,P,COM,R,C,S)$IRE_FLO(REG,V,P,COM,R,C,S),
17-
IF(NOT RPCS_VAR(R,P,C,S),
18-
IF(NOT UNCD7(REG,P,COM,R,C,'0','0'), UNCD7(REG,P,COM,R,C,'0','0') = YES;
19-
IF(NOT RPC_IRE(R,P,C,'IMP'),
20-
$ BATINCLUDE pp_qaput.%1 PUTOUT PUTGRP 02 'IRE_FLO import commodity not in TOP_IRE'
21-
PUT QLOG ' WARNING - R=',%RL%,' P=',%PL%,' C=',C.TL ;
22-
);
23-
IF((NOT SUM((RS_BELOW(R,S,TS),MODLYEAR),IRE_FLO(REG,MODLYEAR,P,COM,R,C,S)))$SAMEAS('ANNUAL',S),
24-
* No values below an ANNUAL level value: inherit value down
25-
UNCD7(REG,P,COM,R,C,S,'') = YES;
26-
ELSE UNCD7(REG,P,COM,R,C,TS,'')$RPCS_VAR(R,P,C,TS) = YES;))));
17+
IF((NOT RPCS_VAR(R,P,C,S))$STOA(S),
18+
IF(NOT UNCD7(REG,V,P,COM,R,C,'N'),
19+
IF(NOT RPC_IRE(R,P,C,'IMP'),TRACKPC(R,P,C)=YES;
20+
ELSE UNCD7(REG,V,P,COM,R,C,'N') = YES))));
21+
LOOP(TRACKPC(R,P,C),
22+
$ BATINCLUDE pp_qaput.%1 PUTOUT PUTGRP 02 'IRE_FLO import commodity not in TOP_IRE'
23+
PUT QLOG ' WARNING - R=',%RL%,' P=',%PL%,' C=',C.TL );
2724
*-----------------------------------------------------------------------------
2825
* Aggregation/inheritance to target timeslices
2926
*-----------------------------------------------------------------------------
30-
LOOP(UNCD7(REG,P,COM,R,C,TS,''),
31-
IF(RPCS_VAR(R,P,C,TS),
32-
* Leveling by simultaneous aggregation/inheritance; but only if target level value is not present
33-
LOOP(RTP(REG,V,P), TS_ARRAY(S) = IRE_FLO(REG,V,P,COM,R,C,S);
34-
IRE_FLO(REG,V,P,COM,R,C,TS)$(NOT TS_ARRAY(TS)) $=
27+
LOOP(UNCD7(REG,V,P,COM,R,C,L),
28+
* Leveling by simultaneous aggregation/inheritance; but only if target level value not present
29+
TS_ARRAY(S) = IRE_FLO(REG,V,P,COM,R,C,S);
30+
IRE_FLO(REG,V,P,COM,R,C,TS)$((NOT TS_ARRAY(TS))$PRC_TS(R,P,TS)) $=
3531
SUM(RS_TREE(FINEST(R,S),TS), G_YRFR(R,S) * (TS_ARRAY(S) +
3632
SUM(RS_BELOW(R,ALL_TS,S)$((NOT SUM(TS_MAP(R,SL,S)$RS_BELOW(R,ALL_TS,SL),TS_ARRAY(SL)))$TS_ARRAY(ALL_TS)),
3733
TS_ARRAY(ALL_TS))))/G_YRFR(R,TS));
38-
ELSE MY_ARRAY(V) = IRE_FLO(REG,V,P,COM,R,C,TS);
39-
* Simple direct inheritance down
40-
IRE_FLO(RTP(REG,V,P),COM,R,C,S)$(RS_BELOW(R,TS,S)$RPCS_VAR(R,P,C,S)) $= MY_ARRAY(V);));
4134
*-----------------------------------------------------------------------------
42-
OPTION CLEAR=UNCD7;
35+
* Simple direct inheritance down
36+
IRE_FLO(RTP(REG,V,P),COM,R,C,S)$((NOT IRE_FLO(REG,V,P,COM,R,C,S))$PRC_TS(R,P,S)) $= IRE_FLO(REG,V,P,COM,R,C,'ANNUAL');
37+
OPTION CLEAR=TRACKPC, CLEAR=UNCD7;
4338

4439
*$OFFLISTING
45-

pp_reduce.red

+2-1
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
*-----------------------------------------------------------------------------
@@ -19,6 +19,7 @@ $IF %REDUCE% == NO $GOTO REDDONE
1919
*-----------------------------------------------------------------------------
2020
* determining processes that need capacity variables
2121
PRC_CAP(RP) = NO;
22+
$IF DEFINED PRC_DSCNCAP PRC_CAP(PRC_DSCNCAP) = YES;
2223
LOOP((R,UC_N,P)$UC_GMAP_P(R,UC_N,'CAP',P), PRC_CAP(R,P) = YES);
2324
LOOP((R,UC_N,P)$UC_GMAP_P(R,UC_N,'NCAP',P), PRC_CAP(R,P) = YES);
2425
LOOP((RTP(R,PYR,P))$NCAP_PASTI(R,PYR,P), PRC_CAP(R,P) = YES);

ppm_ext.vda

+6-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
*=============================================================================*
@@ -82,7 +82,11 @@ $IF NOT DEFINED RP_FFSGG $GOTO DONEFUNC
8282
$LABEL DONEFUNC
8383
*-----------------------------------------------------------------------------
8484
* Add singleton ACT_EFFs to RPC_FFUNC
85-
OPTION TRACKPC < RPG_1ACE; RPC_NOFLO(TRACKPC) = NO;
85+
OPTION TRACKPC < RPG_1ACE; RPC_NOFLO(TRACKPC) = NO; PUTGRP=0;
86+
LOOP(TRACKPC(KEEP_FLOF(R,P,C)),
87+
IF(RPC_FFUNC(R,P,C)+TRACKPG(R,P,C),RPG_1ACE(R,P,CG,C) = NO; ELSE
88+
$ BATINCLUDE pp_qaput.mod PUTOUT PUTGRP 01 'ACT_EFF shadow group contains only an auxiliary flow'
89+
PUT ' WARNING - ACT_EFF is applied to the auxiliary flow: R.P.C= 'TRACKPC.TE(TRACKPC)));
8690
TRACKPC(KEEP_FLOF) = NO; PUTGRP=0;
8791
LOOP(RPC_FFUNC(TRACKPC),
8892
$ BATINCLUDE pp_qaput.mod PUTOUT PUTGRP 09 'Inconsistent/spurious process transformation parameters'

ppmain.mod

+1-1
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
*=============================================================================*

preshape.gms

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2-
* Copyright (C) 2023 IEA-ETSAP. Licensed under GPLv3 (see file NOTICE-GPLv3.txt).
2+
* Copyright (C) 2024 IEA-ETSAP. Licensed under GPLv3 (see file NOTICE-GPLv3.txt).
33
*******************************************************************************
44
* PRESHAPE : Prepare SHAPE parameters for preprocessing
55
* Description: Interpolation of X parameter on user request
@@ -42,7 +42,7 @@ LOOP(%6(%2,'%DFLBL%'%TAIL%%4),
4242
DFUNC=DFUNC-10);
4343
IF(DFUNC GE 2,
4444
* Do back/forward extrapolate
45-
IF(DFUNC=4, Z = INF; ELSEIF DFUNC=5, F = 0);
45+
IF(DFUNC=4, Z = INF; ELSEIF DFUNC=5, F = 0; ELSEIF DFUNC=(2-F), LAST_VAL=EPS; Z=0);
4646
%1(%2,%5%TAIL%)$%7 $= FIRST_VAL$(YEARVAL(%5)<F) + LAST_VAL$(YEARVAL(%5)>Z);
4747
);
4848
);

setglobs.gms

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ $ LABEL SYSD
9696
SET RVP(R,ALLYEAR,P) 'ALIAS(RTP) for Process/time' //;
9797
SET RTP_CAPYR(R,YEAR,YEAR,P) 'Capacity vintage years' //;
9898
SET RTP_ISHPR(REG,ALLYEAR,PRC)'Attribute existence indicator' //;
99-
SET RTP_CGC(REG,YEAR,P,CG,CG) 'Multi-purpose work set' //;
99+
SET RTP_CGC(R,YEAR,P,CG,CG) 'Multi-purpose work set' //;
100100
SET RTPS_BD(R,ALLYEAR,P,S,BD) 'Multi-purpose work set' //;
101101
SET CG_GRP(REG,PRC,CG,CG) 'Multi-purpose work set' //;
102102
SET FSCK(REG,PRC,CG,C,CG) 'Multi-purpose work set' //;

0 commit comments

Comments
 (0)