remindmodel / remind

REMIND - REgional Model of INvestments and Development
Other
93 stars 123 forks source link

testOneRegi in make test breaks with q37_feedstocksShares #1597

Closed mellamoSimon closed 4 months ago

mellamoSimon commented 4 months ago

It fails with:

(...)
**** ERRORS/WARNINGS IN EQUATION q37_feedstocksShares(2150,EUR,segasyn,fegat,ES)
     1 error(s): All Jacobian elements in the row are very small.

**** ERRORS/WARNINGS IN EQUATION q37_feedstocksShares(2150,EUR,sehe,fehes,other)
     1 error(s): All Jacobian elements in the row are very small.

**** ERRORS/WARNINGS IN EQUATION q37_feedstocksShares(2150,EUR,sehe,fehes,ETS)
     1 error(s): All Jacobian elements in the row are very small.

**** ERRORS/WARNINGS IN EQUATION q37_feedstocksShares(2150,EUR,sehe,fehes,ES)
     1 error(s): All Jacobian elements in the row are very small.

I'm gonna test Renato's recommended solution: @mellamoSimon and @0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q you most probably would only have to limit the equation q37_feedstocksShares to work only in the sameas(emiMkt,"ETS") like you probably do for other feedstocks FE equations.

PS: You should also limit the equation only for valid combinations of se and fe used in feedstocks. Above you clearly see that this is not happening as the equation is being defined for fepet and fedie, which should be transport final energy carriers, and not industrial ones.

Originally posted by @Renato-Rodrigues in https://github.com/remindmodel/remind/issues/1592#issuecomment-1977130139

mellamoSimon commented 4 months ago

https://github.com/remindmodel/remind/pull/1599 restricts the sets but won't make testOneRegi work

Renato-Rodrigues commented 4 months ago

You are probably going to need a new calibration run to make the testoneregi work, or test it using as input.gdx of a NPi scenario run.

As you are forcing specific fe shares in the equation q37_feedstocksShares , if you don't have a "free" run before for the model to adjust to be compatible with these forced shares, only by mere luck you would have the case that the original input.gdx file is compatible with your newly forced shares.

mellamoSimon commented 4 months ago

I see, thank you! @0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q did you run a calibration after introducing that restriction?

Renato-Rodrigues commented 4 months ago

I would say that even if he did, it wouldn't matter as before it was including the wrong dimensions by having the sets free. If the NPi run works, you can go ahead and merge the fix in my opnion.

mellamoSimon commented 4 months ago

true, then I would also start new calibration runs to update the gdxs

LaviniaBaumstark commented 4 months ago

I will start new calibration runs anyway for the next validation scenarios

orichters commented 4 months ago

FYI: make test is working again.

mellamoSimon commented 4 months ago

oh yeah, thanks, it works after this: https://github.com/remindmodel/remind/pull/1599