Tags: ame89/PyPSA
Tags
PyPSA Version 0.15.0 Hyperlinked release notes can be found here: file:///home/tom/fias/lib/pypsa/doc/_build/html/release_notes.html#pypsa-0-15-0-8th-november-2019 This release contains new improvements and bug fixes. * The unit commitment (UC) has been revamped to take account of constraints at the beginning and end of the simulated snapshots better. This is particularly u seful for rolling horizon UC. UC now accounts for up-time and down-time in the periods before the snapshots. The generator attribute initial_status has been replaced with two attributes up_time_before and down_time_before to give information about the status before network.snapshots. At the end of the simulated snapshots, minimum up-times and down-times are also enforced. Ramping constraints also look before the simulation at previous results, if there are any. See the unit commitment documentation for full details. The UC example has been updated with a rolling horizon example at the end. * Documentation is now available on readthedocs, with information about functions pulled from the docstrings. * The dependency on cartopy is now an optional extra. * PyPSA now works with pandas 0.25 and above, and networkx above 2.3. * A bug was fixed that broke the Security-Constrained Linear Optimal Power Flow (SCLOPF) constraints with extendable lines. * Network plotting can now plot arrows to indicate the direction of flow. * The objective sense (minimize or maximize) can now be set (default remains minimize). * The network.snapshot_weightings is now carried over when the network is clustered. * Various other minor fixes. We thank colleagues at TERI for assisting with testing the new unit commitment code, Clara Büttner for finding the SCLOPF bug, and all others who contributed issues and pull requests.
PyPSA Version 0.14.1 Hyperlinked release notes can be found here: https://pypsa.org/doc/release_notes.html#pypsa-0-14-1-27th-may-2019 This minor release contains three small bug fixes: * Documentation parses now correctly on PyPI * Python 2.7 and 3.6 are automatically tested using Travis * PyPSA on Python 2.7 was fixed This will also be the first release to be available directly from conda-forge.
PyPSA Version 0.14.0 Hyperlinked release notes can be found here: https://pypsa.org/doc/release_notes.html#pypsa-0-14-0-15th-may-2019 This release contains a new feature and bug fixes. * Network plotting can now use the mapping library cartopy as well as basemap, which was used in previous versions of PyPSA. The basemap developers will be phasing out basemap over the next few years in favour of cartopy (see their end-of-life announcement). PyPSA now defaults to cartopy unless you tell it explicitly to use basemap. Otherwise the plotting interface is the same as in previous versions. * Optimisation now works with the newest version of Pyomo 5.6.2 (there was a Pyomo update that affected the opt.py expression for building linear sums). * A critical bug in the networkclustering sub-library has been fixed which was preventing the capital_cost parameter of conventional generators being handled correctly when networks are aggregated. * Network.consistency_check() now only prints necessary columns when reporting NaN values. * Import from pandapower networks has been updated to pandapower 2.0 and to include non-standard lines and transformers. We thank Fons van der Plas and Fabian Hofmann for helping with the cartopy interface, Chloe Syranidis for pointing out the problem with the Pyomo 5.6.2 update, Hailiang Liu for the consistency check update and Christian Brosig for the pandapower updates.
PyPSA Version 0.13.2 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.
PyPSA Version 0.13.1 Hyperlinked release notes can be found here: https://www.pypsa.org/doc/release_notes.html#pypsa-0-13-1-27th-march-2018 This release contains bug fixes for the new features introduced in 0.13.0. * Export network to netCDF file bug fixed (components that were all standard except their name were ignored). * Import/export network to HDF5 file bug fixed and now works with more than 1000 columns; HDF5 format is no longer deprecated. * When networks are copied or sliced, overridden components (introduced in 0.13.0) are also copied. * Sundry other small fixes. We thank Tim Kittel for pointing out the first and second bugs. We thank Kostas Syranidis for not only pointing out the third issue with copying overridden components, but also submitting a fix as a pull request. For this release we acknowledge funding to Tom Brown from the RE-INVEST project.
PyPSA Version 0.13.0 Hyperlinked release notes can be found here: https://www.pypsa.org/doc/release_notes.html#pypsa-0-13-0-25th-january-2018 This release contains new features aimed at coupling power networks to other energy sectors, fixes for library dependencies and some minor internal API changes. * If you want to define your own components and override the standard functionality of PyPSA, you can now override the standard components by passing pypsa.Network() the arguments override_components and override_component_attrs, see the section on Custom Components. There are examples for defining new components in the git repository in examples/new_components/, including an example of overriding network.lopf() for functionality for combined-heat-and-power (CHP) plants. * The Link component can now be defined with multiple outputs in fixed ratio to the power in the single input by defining new columns bus2, bus3, etc. (bus followed by an integer) in network.links along with associated columns for the efficiencies efficiency2, efficiency3, etc. The different outputs are then proportional to the input according to the efficiency; see sections Link with multiple outputs or inputs and Controllable branch flows: links and the example of a CHP with a fixed power-heat ratio. * Networks can now be exported to and imported from netCDF files with network.export_to_netcdf() and network.import_from_netcdf(). This is faster than using CSV files and the files take up less space. Import and export with HDF5 files, introduced in PyPSA 0.12.0, is now deprecated. * The export and import code has been refactored to be more general and abstract. This does not affect the API. * The internally-used sets such as pypsa.components.all_components and pypsa.one_port_components have been moved from pypsa.components to network, i.e. network.all_components and network.one_port_components, since these sets may change from network to network. * For linear power flow, PyPSA now pre-calculates the effective per unit reactance x_pu_eff for AC lines to take account of the transformer tap ratio, rather than doing it on the fly; this makes some code faster, particularly the kirchhoff formulation of the LOPF. * PyPSA is now compatible with networkx 2.0 and 2.1. * PyPSA now requires Pyomo version greater than 5.3. * PyPSA now uses the Travis CI continuous integration service to test every commit in the PyPSA GitHub repository. This will allow us to catch library dependency issues faster. We thank Russell Smith of Edison Energy for the pull request for the effective reactance that sped up the LOPF code and Tom Edwards for pointing out the Pyomo version dependency issue. For this release we also acknowledge funding to Tom Brown from the RE-InVEST project.
PyPSA Version 0.12.0 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.
PyPSA Version 0.11.0 Hyperlinked release notes can be found here: https://pypsa.org/doc/release_notes.html#pypsa-0-11-0-21st-october-2017 This release contains new features but no changes to existing APIs. * There is a new function network.iplot() which creates an interactive plot in Jupyter notebooks using the plotly library. This reveals bus and branch properties when the mouse hovers over them and allows users to easily zoom in and out on the network. See the SciGRID example for a showcase of this feature and also the (sparse) documentation Plotting Networks. * There is a new function network.madd() for adding multiple new components to the network. This is significantly faster than repeatedly calling network.add() and uses the functions network.import_components_from_dataframe() and network.import_series_from_dataframe() internally. Documentation and examples can be found at Adding multiple components. * There are new functions network.export_to_hdf5() and network.import_from_hdf5() for exporting and importing networks as single files in the Hierarchical Data Format. * In the network.lopf() function the KKT shadow prices of the branch limit constraints are now outputted as series called mu_lower and mu_upper. We thank Bryn Pickering for introducing us to plot 9CBE ly and helping to hack together the first working prototype using PyPSA.
PyPSA Version 0.10.0 Hyperlinked release notes can be found here: https://pypsa.org/doc/release_notes.html#pypsa-0-10-0-7th-august-2017 This release contains some minor new features and a few minor but important API changes. * There is a new component Global Constraints for implementing constraints that effect many components at once (see also the LOPF subsection Global constraints). Currently only constraints related to primary energy (i.e. before conversion with losses by generators) are supported, the canonical example being CO2 emissions for an optimisation period. Other primary-energy-related gas emissions also fall into this framework. Other types of global constraints will be added in future, e.g. “final energy” (for limits on the share of renewable or nuclear electricity after conversion), “generation capacity” (for limits on total capacity expansion of given carriers) and “transmission capacity” (for limits on the total expansion of lines and links). This replaces the ad hoc network.co2_limit attribute. If you were using this, instead of network.co2_limit = my_cap do network.add("GlobalConstraint", "co2_limit", type="primary_energy", carrier_attribute="co2_emissions", sense="<=", constant="my_cap"). The shadow prices of the global constraints are automatically saved in network.global_constraints.mu. * The LOPF output network.buses_t.marginal_price is now defined differently if network.snapshot_weightings are not 1. Previously if the generator at the top of the merit order had marginal_cost c and the snapshot weighting was w, the marginal_price was cw. Now it is c, which is more standard. See also Nodal power balances. * network.pf() now returns a dictionary of pandas DataFrames, each indexed by snapshots and sub-networks. converged is a table of booleans indicating whether the power flow has converged; error gives the deviation of the non-linear solution; n_iter the number of iterations required to achieve the tolerance. * network.consistency_check() now includes checking for potentially infeasible values in generator.p_{min,max}_pu. * The PyPSA version number is now saved in network.pypsa_version. In future versions of PyPSA this information will be used to upgrade data to the latest version of PyPSA. * network.sclopf() has an extra_functionality argument that behaves like that for network.lopf(). * Component attributes which are strings are now better handled on import and in the consistency checking. * There is a new generation investment screening curve example showing the long-term equilibrium of generation investment for a given load profile and comparing it to a screening curve analysis. * There is a new logging example that demonstrates how to control the level of logging that PyPSA reports back, e.g. error/warning/info/debug messages. * Sundry other bug fixes and improvements. * All examples have been updated appropriately. Thanks to Nis Martensen for contributing the return values of network.pf() and Konstantinos Syranidis for contributing the improved network.consistency_check().
PyPSA Version 0.9.0 Hyperlinked release notes can be found here: https://pypsa.org/doc/release_notes.html#pypsa-0-9-0-29th-april-2017 This release mostly contains new features with a few minor API changes. * Unit commitment as a MILP problem is now available for generators in the Linear Optimal Power Flow (LOPF). If you set committable == True for the generator, an addition binary online/offline status is created. Minimum part loads, minimum up times, minimum down times, start up costs and shut down costs are implemented. See the documentation at Generator unit commitment constraints and the unit commitment example. Note that a generator cannot currently have both unit commitment and capacity expansion optimisation. * Generator ramping limits have also been implemented for all generators. See the documentation at Generator ramping constraints and the unit commitment example. * Different mathematically-equivalent formulations for the Linear Optimal Power Flow (LOPF) are now documented in Passive branch flow formulations and the arXiv preprint paper Linear Optimal Power Flow Using Cycle Flows. The new formulations can solve up to 20 times faster than the standard angle-based formulation. * You can pass the network.lopf function the solver_io argument for pyomo. * There are some improvements to network clustering and graphing. * API change: The attribute network.now has been removed since it was unnecessary. Now, if you do not pass a snapshots argument to network.pf() or network.lpf(), these functions will default to network.snapshots rather than network.now. * API change: When reading in network data from CSV files, PyPSA will parse snapshot dates as proper datetimes rather than text strings. João Gorenstein Dedecca has also implemented a MILP version of the transmission expansion, see https://github.com/jdedecca/MILP_PyPSA, which properly takes account of the impedance with a disjunctive relaxation. This will be pulled into the main PyPSA code base soon.
PreviousNext