forked from etsap-TIMES/TIMES_model
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eqcaflac.vda
60 lines (51 loc) · 3.32 KB
/
eqcaflac.vda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* Copyright (C) 2000-2021 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 LICENSE.txt).
*=============================================================================*
* EQCAFLAC - implements commodity-specific capacity utilization equations
* %1 - equation declaration type
* %2 - bound type for %1
*=============================================================================*
* Questions/Comments:
* - COEF_CPT/COEF_AF are defined in COEF_CPT.MOD
* - shaping of COEF_AF is possible via NCAP_AFX
*-----------------------------------------------------------------------------
%EQ%%1_CAFLAC(RTP_VINTYR(%R_V_T%,P),S%SWT%)$(AFS(R,T,P,S,%2)$RPS_CAFLAC(R,P,S,%2))..
* Sum over flows in PG
SUM((RPC_PG(R,P,C),COM_TMAP(R,COM_TYPE(CG),C)),
(1/ABS(PRC_ACTFLO(R,V,P,C))) /
(NCAP_AFCS(R,V,P,C,S)+PROD(XPT$NCAP_AFCS(R,V,P,CG,S),NCAP_AFCS(R,V,P,CG,S))$(NOT NCAP_AFCS(R,V,P,C,S))) *
SUM(RPCS_VAR(R,P,C,TS)$RS_FR(R,S,TS),RS_FR(R,S,TS) * (%VAR%_FLO(R,V,T,P,C,TS %SOW%)$RP_STD(R,P) +
(SUM(TOP(RPC_STG(R,P,C),IO)$(NCAP_AFCS(R,V,P,C,S)+NCAP_AFCS(R,V,P,CG,S)),
(%VAR%_SIN(R,V,T,P,C,TS %SOW%)*PROD(RPG_AFCX(R,P,C,IE)$NCAP_AFCS(R,V,P,C,S),(NCAP_AFCS(R,V,P,C,S)/NCAP_AFCS(R,V,P,CG,S))$NCAP_AFCS(R,V,P,CG,S)))$IPS(IO)+
(%VAR%_SOUT(R,V,T,P,C,TS %SOW%)*STG_EFF(R,V,P)*(1+RTCS_FR(R,T,C,S,TS)))$(NOT IPS(IO))) +
SUM(RPC_IRE(R,P,C,IE),%VAR%_IRE(R,V,T,P,C,TS,IE %SOW%)*PROD(RPG_AFCX(R,P,C,IE)$((NCAP_AFCS(R,V,P,C,S)$NCAP_AFCS(R,V,P,CG,S))**1$RP_AIRE(R,P,IE)),
(NCAP_AFCS(R,V,P,C,S)/NCAP_AFCS(R,V,P,CG,S))$NCAP_AFCS(R,V,P,CG,S))+1$0))$(NOT RP_STD(R,P)))))
=%1=
* process capacity - vintaged or not
(SUM(MODLYEAR(K)$(COEF_CPT(R,K,T,P)$(DIAG(V,K)>=1$PRC_VINT(R,P))),COEF_CPT(R,K,T,P) * COEF_AF%4(R,K,T,P,S,%2) *
(%VARM%_NCAP(R,K,P%SWS%)$T(K)+NCAP_PASTI(R,K,P)$PYR(K)%RCAPSBM%))+COEF_AF%4(R,V,T,P,S,%2)*%UPSCAP0%) *
* timeslice fraction of capacity
PRC_CAPACT(R,P) * G_YRFR(R,S)
;
%3 EXIT
*-----------------------------------------------------------------------------
%EQ%L_CAPFLO(RTP_VINTYR(%R_V_T%,P),CG,SL(STL(%RTS%))%SWT%)$(RS_TSLVL(R,S)$NCAP_AFC(R,V,P,CG,STL))..
* Sum over regular flows
SUM(RPC(RP_FLO(R,P),C)$COM_GMAP(R,CG,C),
SUM(RTPCS_VARF(R,T,P,C,TS)$RS_FR(R,S,TS),RS_FR(R,S,TS)*(1+RTCS_FR(R,T,C,S,TS))*
$ BATINCLUDE %cal_red% C COM TS P T
)) +
* storage: for activity multiply by number of storage cycles in a year
SUM(PRC_TS(RP_STG(R,P),TS)$RS_FR(R,TS,S),(%VAR%_ACT(R,V,T,P,TS%SOW%)+VAR_STS(R,V,T,P,TS,%2))*RS_FR(R,TS,S)*EXP(PRC_SC(R,P))/RS_STGPRD(R,TS)*G_YRFR(R,S))$ACTCG(CG) +
SUM(RPC_STG(R,P,C)$COM_GMAP(R,CG,C),
SUM((TOP(R,P,C,IO),RPCS_VAR(R,P,C,TS))$RS_FR(R,S,TS),RS_FR(R,S,TS)*(1+RTCS_FR(R,T,C,S,TS))*
(%VAR%_SIN(R,V,T,P,C,TS%SOW%)$(NOT TOP(R,P,C,'OUT'))$IPS(IO)+%VAR%_SOUT(R,V,T,P,C,TS%SOW%)*STG_EFF(R,V,P)*DIAG(IO,'OUT'))))
=%1=
* process capacity - vintaged or not
(SUM(MODLYEAR(K)$(COEF_CPT(R,K,T,P)$(DIAG(V,K)>=1$PRC_VINT(R,P))),COEF_CPT(R,K,T,P) *
(%VARM%_NCAP(R,K,P%SWS%)$T(K)+NCAP_PASTI(R,K,P)$PYR(K)%RCAPSBM%))+%UPSCAP0%)*NCAP_AFC(R,V,P,CG,STL) *
* timeslice fraction of capacity
PRC_CAPACT(R,P) * G_YRFR(R,S)
;