Description of the issue
My current gams script is:
Set
t time
tc contract type
et Time scenery
set PI(t) Initial period;
PI(t) = t.first
set PFI(t) final period;
PFI(t) = t.last;
set TIM(et,t) time loop
set CD_T(t) Set Dynamic time;
CD_T(t) = Sum(et,TIM(et,t))
loop(et,
loop(CD_T(t),
PFI(t)= yes;
PFI(t-1) = no;
PSF(t) = yes;
)
My issue is with the loop over CD_T(t), I am translating in gamspy as
for idx, et_ in enumerate(et.tolist())
for idx2,CD_Tt_ in enumerate(CD_T.toList())
PFI[t] = True
PFI[t.lag(1,“linear”)] = False
PSF[t] = True
But I am not getting the same results
Error message and stack trace
Error message and stack trace goes here.
GAMSPy version
This information can be retrieved with:
gamspy -v