Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/pypsa 13 fork #13

Open
wants to merge 149 commits into
base: dev
Choose a base branch
from
Open

Feature/pypsa 13 fork #13

wants to merge 149 commits into from

Conversation

ClaraBuettner
Copy link

No description provided.

bourbl and others added 30 commits August 2, 2017 17:10
First argument changed from "csv_folder_name" to
"import_name". Whether it is a CSV folder or HDF5 is recognised based
on the name.
s_max_pu is the maximum allowed absolute flow per unit of s_nom for
the OPF.

| flow | \leq s_max_pu * s_nom

For lines this can represent an n-1 contingency factor or it can be
time-varying to represent weather-dependent dynamic line rating.
Also add sub-network description so that components.csv renders on
github.
Because for MILP problems under certain circumstances CPLEX records
the "Lower bound" as the relaxed value. "Upper bound" is correctly
recorded as the integer objective value.

See Issue PyPSA#20.
pandas 0.21.0 changes sum() behavior so that the result of applying sum over an
empty DataFrame is NaN. See pandas-dev/pandas#9422 for context.

The work-around introduces a zsum function on pd.Series, which returns 0 on an
empty Series.

Fixes PyPSA#26.
pandas 0.21.0 deprecated reindex_axis.
Pandas 0.21.0 changed the sum of the empty series to nan.
Hyperlinked release notes can be found here:

https://pypsa.org/doc/release_notes.html#pypsa-0-12-0-30th-november-2017

This release contains new features and bug fixes.

* Support for Pyomo’s persistent solver interface, so if you’re making
  small changes to an optimisation model (e.g. tweaking a parameter),
  you don’t have to rebuild the model every time. To enable this,
  network_lopf has been internally split into build_model,
  prepare_solver and solve to allow more fine-grained control of the
  solving steps. Currently the new Pyomo PersistentSolver interface is
  not in the main Pyomo branch, see the pull request; you can obtain
  it with pip install
  git+https://github.com/Pyomo/pyomo@persistent_interfaces

* Lines and transformers (i.e. passive branches) have a new attribute
  s_max_pu to restrict the flow in the OPF, just like p_max_pu for
  generators and links. It works by restricting the absolute value of
  the flow per unit of the nominal rating abs(flow) <=
  s_max_pu*s_nom. For lines this can represent an n-1 contingency
  factor or it can be time-varying to represent weather-dependent
  dynamic line rating.

* The marginal_cost attribute of generators, storage units, stores and
  links can now be time dependent.

* When initialising the Network object, i.e. network =
  pypsa.Network(), the first keyword argument is now import_name
  instead of csv_folder_name. With import_name PyPSA recognises
  whether it is a CSV folder or an HDF5 file based on the file name
  ending and deals with it appropriately. Example usage: nw1 =
  pypsa.Network("my_store.h5") and nw2 =
  pypsa.Network("/my/folder"). The keyword argument csv_folder_name is
  still there but is deprecated.

* The value network.objective is now read from the Pyomo results
  attribute Upper Bound instead of Lower Bound. This is because for
  MILP problems under certain circumstances CPLEX records the Lower
  bound as the relaxed value. Upper bound is correctly recorded as the
  integer objective value.

* Bug fix due to changes in pandas 0.21.0: A bug affecting various
  places in the code, including causing network.lopf to fail with
  GLPK, is fixed. This is because in pandas 0.21.0 the sum of an empty
  Series/DataFrame returns NaN, whereas before it returned zero. This
  is a subtle bug; we hope we’ve fixed all instances of it, but get in
  touch if you notice NaNs creeping in where they shouldn’t be. All
  our tests run fine.

* Bug fix due to changes in scipy 2.0.0: For the new version of scipy,
  csgraph has to be imported explicit.

* Bug fix: A bug whereby logging level was not always correctly being
  seen by the OPF results printout is fixed.

* Bug fix: The storage unit spillage had a bug in the LOPF, whereby it
  was not respecting network.snapshot_weightings properly.

We thank René Garcia Rosas, João Gorenstein Dedecca, Marko Kolenc,
Matteo De Felice and Florian Kühnlenz for promptly notifying us about
issues.
Also fix release notes bug from scipy 2.0.0 to 1.0.0.
The support for freeing the pyomo datastructures during pyomos solving phase was
removed from pypsa in commit #5ac1325, since it proved to be too slow for
productive use.
- Includes conda requirements files
- Loosely based on calliope from https://github.com/calliope-project/calliope
Raise an error, if any types are missing.
Worksaround the terminal problems conda is having with travis.
See also: conda/conda#6468
coroa and others added 27 commits September 4, 2018 17:57
It says "pip install -U pandas" instead of "... pypsa"
Corrected an error in "Upgrading PyPSA"
Especially useful for using the lengths as weight, since the length is not
defined for transformers.
The constant factor 1e5 improves the numerical stability of the interior point
algorithm.
It is called after solving and results are extracted. It can be used
to get the values of shadow prices for constraints not normally
extracted.
unicode is not the same as str in Python 2.7
Also add other examples to website examples list.
For features that are unlikely to be developed in PyPSA directly, we
have linked to comparable software with this functionality.

Scare warning about heavy development has been removed.
…egenerators

p_nom_max has special treatment, in that if it is set to np.min, p_nom_max is
divided by the weighting first.
Hyperlinked release notes can be found here:

https://pypsa.org/doc/release_notes.html#pypsa-0-13-2-10th-january-2019

This minor release contains small new features and fixes.

* Optimisation now works with Pyomo >= 5.6 (there was a Pyomo update
  that affected the opt.py LConstraint object).
* New functional argument can be passed to Network.lopf:
  extra_postprocessing(network,snapshots,duals), which is called after
  solving and results are extracted. It can be used to get the values
  of shadow prices for constraints that are not normally extracted by
  PyPSA.
* In the lopf kirchhoff formulation, the cycle constraint is rescaled
  by a factor 1e5, which improves the numerical stability of the
  interior point algorithm (since the coefficients in the constraint
  matrix were very small).
* Updates and fixes to networkclustering, io, plot.

We thank Soner Candas of TUM for reporting the problem with the most
recent version of Pyomo and providing the fix.
@ClaraBuettner ClaraBuettner self-assigned this Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants