Repository navigation
Conversation
…ber of its modules, tested as an xlsx case of the sweep
…teger design too, the number of its modules, and solves it with the BundleSolver of InvestmentBlock/BSPar-int.txt
…AC network into a transport model without Kirchhoff's voltage law
… no capital cost, was fixed at a large capacity before the merge, accepts a preset or a list of presets, and the merged links are read back also per scenario
…ltage law since the lines have their susceptance, is left out where the solver is a released SMS++, whose DCNetworkBlock finds it infeasible
…e scenarios are in the InnerSolution of the InvestmentBlock, and its design goes to every scenario of the asset; tested against PyPSA on a TSSB and an MSSB
…arginal_cost, Cost being a price on the net injection
…ing bounded by its levels and by the Links around it, and the turbine of a StorageUnit with ExactFlowToPower, so that the model of SMS++ is the one of PyPSA
…tive_constant, whose default PyPSA warns about, the FutureWarnings being errors since SPSUnipi#67
…build of SMS++ has not the Solver of its configuration, which asks for GUROBI
…es' into feature/store-and-hydro-as-pypsa
…ro-as-pypsa # Conflicts: # pypsa2smspp/data/smspp_parameters.xlsx
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes the linear program that SMS++ solves for a PyPSA network the same as the one PyPSA gives Gurobi, by writing two components as PyPSA states them. It builds on #62 and needs SMS++ develop (UCBlock 390e5605 and ff5c1706, pySMSpp #116 6696b4a), hence it is to be merged after the next release of SMS++ reaches conda-forge.
A Store has no power limit of its own in PyPSA, its power being bounded by its levels and by the Links around it. pypsa2smspp wrote it as a BatteryUnitBlock with
MaxPower = 1andMinPower = -1per unit of the design (i.e., |p| <= e_nom), which the levels already imply, and withConverterInvestmentCost = 1e-12, i.e., a converter design that PyPSA does not have, together with its rows and its path in the first stage. A Store is now written withMaxPower = +inf,MinPower = -inf, no converter design andConverterMaxPower = 0(no converter limit); with UCBlock ff5c1706 an infinite power bound gives no row in the design, as an infinite level already did.The turbine of a hydro StorageUnit produces exactly
efficiency_dispatchtimes its flow in PyPSA, the water released without producing being the spillage, a flow of its own. Since UCBlock 297d41b4 HydroUnitBlock writes such a turbine as the inequality p <= rho f unless its spillway can take all the water of the turbine, which is not the case here (the spillage of PyPSA is bounded by the inflow), so that SMS++ solved a relaxation of the model of PyPSA. The turbine is now written withExactFlowToPower = 1(UCBlock 390e5605), which keeps the equality;smspp_parameters.xlsxhas the new variable.On th_24c24_demand_{3,20} of power-IT-noUC (20 nodes, stochastic demand, linear program, Gurobi 13 with the barrier options of PyPSA-Eur), the model after the presolve of Gurobi and its work units are
i.e., the model of SMS++ is now that of PyPSA after the presolve (a little smaller on 20 scenarios), with the same value. The tests pass (53 passed, 16 skipped) with SMS++ develop.