# Changelog¶

These are new features and improvements of note in each release

## v0.4.0 (April ??, 2020)¶

• something

### New features¶

• Allows having a non equidistant timeindex. By adding the
calculate_timeincrement function to tools/helpers.py a non equidistant timeincrement can be calculated. The EnergySystem will now be defined by the timeindex and the calculated timeincrement.
• Allows non-convex investments for flows and storages.
With this feature, fix investment costs, which do not dependent on the nominal capacity, can be considered.

• something

### Documentation¶

• Improved documentation of ExtractionTurbineCHP

• something

• something

• something

### Other changes¶

• The loss_rate of GenericStorage
is now defined per time increment.
• The parameters’ data type in the docstrings is changed from numeric (sequence or scalar) to numeric (iterable or scalar) (Issue #673).

### Contributors¶

• Caterina Köhl
• Jonathan Amme
• Uwe Krien
• Johannes Röder
• Jann Launer
• Daniel Rank

## v0.3.3 (January 12, 2020)¶

• something

### New features¶

• GenericStorage can now have “fixed_losses”, that are independent from storage content.

• something

### Documentation¶

• Improved documentation of ExtractionTurbineCHP

• something

• something

• something

• something

• Uwe Krien
• Jann Launer

## v0.3.2 (November 29, 2019)¶

### New features¶

• Allow generic limits for integral over weighted flows. (This is a generalised version of <solph.constraints.emission_limit>.)
• Allow time-dependent weights for integrated weighted limit.

### Other changes¶

• The license hase been changed from GPLv3 to the MIT license
• The BaseModel has been revised (test, docstring, warnings, internal naming) (PR #605)
• Style revision to meet pep8 and other pep rules.

### Contributors¶

• Guido Plessmann
• Johannes Röder
• Julian Endres
• Patrik Schönfeldt
• Uwe Krien

## v0.3.1 (June 11, 2019)¶

### Other changes¶

• The API of the GenericStorage changed. Due to the open structure of solph the old parameters are still accepted. Therefore users may not notice that the default value is used instead of the given value after an update from v0.2.x to v0.3.x. With this version an error is raised. We work on a structure to avoid such problems in the future.

### Contributors¶

• Patrik Schönfeldt
• Stephan Günther
• Uwe Krien

## v0.3.0 (June 5, 2019)¶

### API changes¶

• The param_results function does not exist anymore. It has been renamed to parameter_as_dict (Issue #537).
• The storage API has been revised. Please check the API documentation for all details.
• The OffsetTransformer is now a regular oemof.solph component. It has been tested and the documentation has been improved. So it has been move from custom to components. Use oemof.solph.components.OffsetTransformer ( Issue #522).

### New features¶

• Now it is possible to model just one time step. This is important for time step based models and all other models with an outer loop (Issue #519).
• The storage can be used unbalanced now, which means that the level at the end could be different to the level at the beginning of the modeled time period. See the storage documentation for more details.
• NonConvexFlow <oemof.solph.blocks.NonConvexFlow> can now have activity_costs, maximum_startups, and maximum_shutdowns. This helps, to model e.g. terms of maintannace contracts for small CHP plants.
• Namedtuples and tuples as labels work now without problems. This makes it much easier to find objects and results in large energy systems (Issue #507).
• Groups are now fully lazy. This means that groups are only computed when they are accessed. Previously, whenever nodes where added to an energy system, groups where computed for all but the most recently added node. This node was then only grouped upon addition of another node or upon access of the groups property.
• There is now an explicit Edge <oemof.network.Edge> class. This means that an energy system now consists of Buses <oemof.network.Bus>, Components <oemof.network.Component> and Edges <oemof.network.Edge>. For implementation reasons, Edges <oemof.network.Edge> are still Nodes <oemof.network.Node>. If you know a bit of graph theory and this seems strange to you, think of these Edges <oemof.network.Edge> as classical graph theoretic edges, reified as nodes with an in- and outdegree of one.
• Energy systems <oemof.energy_system.EnergySystem> now support blinker signals. The first supported signal gets emitted, whenever a node <oemof.network.node> is added <oemof.energy_system.EnergySystem.add> to an energy system <oemof.energy_system.EnergySystem>. (blinker)

### Documentation¶

• The template for docstrings with equations (docstring of block classes) has been improved.
• A lot of improvements on the documentation

### Bug fixes¶

• The timeincrement attribute of the model is not set to one anymore. In earlier versions the timeincrement was set to one by default. This was a problem if a wrong time index was passed. In that case the timeincrement was set to one without a warning. Now an error is raised if no timeincrement or valid time index is found (Issue #549).

### Testing¶

• Automatic test coverage control was implemented. Now a PR will not be accepted if it decreases the test coverage.
• Test coverage was increased to over 90%. A badge was added to the oemof github page that shows the actual test coverage.
• Test coverage on the groupings and network modules has significantly increased. These modules where historically very weakly tested and are now approaching 90% and 95% respectively with more tests being planned.

### Contributors¶

(alphabetical order)

• ajimenezUCLA
• FranziPl
• Johannes Röder
• Jakob Wolf
• Jann Launer
• Lluis Millet
• Patrik Schönfeldt
• Simon Hilpert
• Stephan Günther
• Uwe Krien

## v0.2.3 (November 21, 2018)¶

### Bug fixes¶

• Some functions did not work with tuples as labels. It has been fixed for the ExtractionTurbineCHP, the graph module and the parameter_as_dict function. (Issue #507)

### Contributors¶

• Simon Hilpert
• Stephan Günther
• Uwe Krien

## v0.2.2 (July 1, 2018)¶

### API changes¶

• The storage API has been revised, even though it is still possible to use the old API. In that case a warning is raised (Issue #491).
• The newly introduced parm_results are not results and therefore renamed to parameter_as_dict. The old name is still valid but raises a warning.

### New features¶

• We added a new attribute existing to the solph.options.Investement class. It will now be possible to run investment optimization based on already installed capacity of a component. Take a look on Using the investment mode for usage of this option. (Issue #489).
• Investement variables for the capacity and the flows are now decoupled to enable more flexibility. It is possible to couple the flows to the capacity, the flows to itself or to not couple anything. The newly added attributes invest_relation_input_output, invest_relation_input_capacity and invest_relation_output_capacity replace the existing attributes nominal_input_capacity_ratio and nominal_input_capacity_ratio for the investment mode. In case of the dispatch mode one should use the nominal_value of the Flow classes. The attributes nominal_input_capacity_ratio and nominal_input_capacity_ratio will be removed in v0.3.0. Please adapt your application to avoid problems in the future (Issue #480).
• We now have experimental support for deserializing an energy system from a tabular data package. Since we have to extend the datapackage format a bit, the specification is not yet finalized and documentation as well as tests range from sparse to nonexistent. But anyone who wishes to help with the code is welcome to check it out in the datapackage module.

### Known issues¶

• It is not possible to model one time step with oemof.solph. You have to model at least two timesteps (Issue #306). Please leave a comment if this bug affects you.

### Bug fixes¶

• Fix file extension check to dump a graph correctly as .graphml-file
• The full constraint set of the ExtractionTurbineCHP class was only build for one object. If more than one object was present the input/output constraint was missing. This lead to wrong results.
• In the solph constraints module the emission constraint did not include the timeincrement from the model which has now be fixed.
• The parameter_as_dict (former: param_results) do work with the views functions now (Issue #494).

### Testing¶

• The test coverage has been increased (>80%). oemof has experimental areas to test new functions. These functions are marked as experimental and will not be tested. Therefore the real coverage is even higher.

### Other changes¶

• Subclasses of Node are no longer optimized using __slots__. The abstract parent class still defines __slots__ so that custom subclasses still have the option of using it.

### Contributors¶

• Fabian Büllesbach
• Guido Plessmann
• Simon Hilpert
• Stephan Günther
• Uwe Krien

## v0.2.1 (March 19, 2018)¶

### API changes¶

• The function create_nx_graph only takes an energysystem as argument, not a solph model. As it is not a major release you can still pass a Model but you should adapt your application as soon as possible. (Issue #439)

### New features¶

• It is now possible determine minimum up and downtimes for nonconvex flows. Check the oemof_examples repository for an exemplary usage.
• Startup and shutdown costs can now be defined time-dependent.
• The graph module has been revised. (Issue #439)
• You can now store a graph to disc as .graphml file to open it in yEd with labels.
• You can add weight to edges.
• Labels are attached to the nodes.
• Two functions get_node_by_name and filter_nodes have been added that allow to get specified nodes or nodes of one kind from the results dictionary. (Issue #426)
• A new function param_results() collects all parameters of nodes and flows in a dictionary similar to the results dictionary. (Issue #445)
• In outputlib.views.node(), an option for multiindex dataframe has been added.

### Documentation¶

• Some small fixes and corrected typos.

### Known issues¶

• It is not possible to model one time step with oemof.solph. You have to model at least two timesteps (Issue #306). Please leave a comment if this bug affects you.

### Bug fixes¶

• Shutdown costs for nonconvex flows are now accounted within the objective which was not the case before due to a naming error.
• Console script oemof_test_installation has been fixed. (Issue #452)
• Adapt solph to API change in the Pyomo package.
• Deserializing a Node leads to an object which was no longer serializable. This is fixed now. Node instances should be able to be dumped and restored an arbitraty amount of times.
• Adding timesteps to index of constraint for component el-line fixes an issue with pyomo.

### Testing¶

• New console script test_oemof has been added (experimental). (Issue #453)

### Other changes¶

• Internal change: Unnecessary list extensions while creating a model are avoided, which leads to a decrease in runtime. (Issue #438)
• The negative/positive gradient attributes are dictionaries. In the constructor they moved from sequences to a new dictionaries argument. (Issue #437)
• License agreement was adapted according to the reuse project (Issue #442)
• Code of conduct was added. (Issue #440)
• Version of required packages is now limited to the most actual version (Issue #464)

### Contributors¶

• Cord Kaldemeyer
• Jann Launer
• Simon Hilpert
• Stephan Günther
• Uwe Krien

## v0.2.0 (January 12, 2018)¶

### API changes¶

• The NodesFromCSV has been removed from the code base. An alternative excel (spreadsheet) reader is provided in the newly created excel example in the oemof_examples repository.
• LinearTransformer and LinearN1Transformer classes are now combined within one Transformer class. The new class has n inputs and n outputs. Please note that the definition of the conversion factors (for N1) has changed. See the new docstring of Transformer class to avoid errors (Issue #351).
• The oemof.solph.network.Storage class has been renamed and moved to oemof.solph.components.GenericStorage.
• As the example section has been moved to a new repository the oemof_example command was removed. Use oemof_installation_test to check your installation and the installed solvers.
• OperationalModel has been renamed to Model. The es parameter was renamed to energysystem parameter.
• Nodes are no longer automatically added to the most recently created energy system. You can still restore the old automatic registration by manually assigning an energy system to Node.registry. On the other hand you can still explicitly add nodes to an energy system. This option has been made a bit more feature rich by the way, but see below for more on this. Also check the oemof_examples repository for more information on the usage.
• The fixed_costs attribute of the nodes has been removed. See (Issue #407) for more information.
• The classes DataFramePlot and ResultsDataFrame have been removed due to the redesign of the outputlib module.

### New features¶

• A new oemof_examples repository with some new examples was created.
• A new outputlib module has been created to provide a convenient data structure for optimization results and enable quick analyses. All decision variables of a Node are now collected automatically which enables an easier development of custom components. See the revised oemof-outputlib documentation for more details or have a look at the oemof_examples repository for information on the usage. Keep your eyes open, some new functions will come soon that make the processing of the results easier. See the actual pull request or issues for detailed information.
• The transformer class can now be used with n inputs and n outputs ( Transformer)
• A new module with useful additional constraints were created with these constraints global emission or investment limits can be set. Furthermore it is possible to connect investment variables. Please add your own additional constraints or let us know what is needed in the future.
• A module to create a networkx graph from your energy system or your optimisation model was added. You can use networkx to plot and analyse graphs. See Graph in the documentation for more information.
• It’s now possible to modify a node's inputs and outputs by inserting and removing nodes to and from the correspoding dictionaries. Outputs where already working previously, but due to an implementation quirk, inputs did not behave as expected. This is now fixed.
• One can now explicitly add nodes to an energy system in bulk using * and ** syntax. For the latter case, the values of the dictionary passed in will be added.
• New components can now be added to the custom.py module. Components in this module are indicated as in a testing state. Use them with care. This lowers the entry barriers to test new components within the solph structure and find other testers.

### New components¶

• The nodes ElectricalLine and ElectricalBus can be used for Linear Optimal Powerflow calculation based on angle formulations. These components have been added to the solph.custom module. Though it should work correctly, it is in a preliminary stage. Please check your results. Feedback is welcome!
• The custom component Link can now be used to model a bidirectional connection within one component. Check out the example in the oemof_examples repository.
• The component GenericCHP can be used to model different CHP types such as extraction or back-pressure turbines and motoric plants. The component uses a mixed-integer linear formulation and can be adapted to different technical layouts with a high level of detail. Check out the example in the oemof_examples repository.
• The component GenericCAES can be used to model different concepts of compressed air energy storage. Technical concepts such as diabatic or adiabatic layouts can be modelled at a high level of detail. The component uses a mixed-integer linear formulation.
• The custom component GenericOffsetTransformer can be used to model components with load ranges such as heat pumps and also uses a mixed-integer linear formulation.

### Documentation¶

• Large parts of the documentation have been proofread and improved since the last developer meeting in Flensburg.
• The solph documentation has got an extra section with all existing components (Solph components).
• The developer documentation has been developed to lower the barriers for new developers. Furthermore, a template for pull request was created.

### Known issues¶

• It is not possible to model one time step with oemof.solph. You have to model at least two timesteps (Issue #306). Please leave a comment if this bug affects you.

### Bug fixes¶

• LP-file tests are now invariant against sign changes in equations, because the equations are now normalized to always have non-negative right hand sides.

### Testing¶

• All known and newly created components are now tested within an independent testing environment which can be found in /tests/.
• Other testing routines have been streamlined and reviewed and example tests have been integrated in the nosetest environment.

### Other changes¶

• The plot functionalities have been removed completely from the outputlib as they are less a necessary part but more an optional tool . Basic plotting examples that show how to quickly create plots from optimization results can now be found in the oemof_examples repository. You can still find the “old” standard plots within the oemof_visio repository as they are now maintained separately.
• A user forum has been created to answer use questions.

### Contributors¶

• Cord Kaldemeyer
• Jens-Olaf Delfs
• Stephan Günther
• Simon Hilpert
• Uwe Krien

## v0.1.4 (March 28, 2017)¶

### Contributors¶

• Uwe Krien
• Stephan Günther

## v0.1.2 (March 27, 2017)¶

### New features¶

• Revise examples - clearer naming, cleaner code, all examples work with cbc solver (issue #238, issue #247).
• Add option to choose solver when executing the examples (issue #247).
• Add new transformer class: VariableFractionTransformer (child class of LinearTransformer). This class represents transformers with a variable fraction between its output flows. In contrast to the LinearTransformer by now it is restricted to two output flows.(issue #248)
• Add new transformer class: N1Transformer (counterpart of LinearTransformer). This class allows to have multiple inputflows that are converted into one output flow e.g. heat pumps or mixing-components.
• Allow to set addtional flow attributes inside NodesFromCSV in solph inputlib
• Add economics module to calculate investment annuities (more to come in future versions)
• Add module to store input data in multiple csv files and merge by preprocessing
• Allow to slice all information around busses via a new method of the ResultsDataFrame
• Add the option to save formatted balances around busses as single csv files via a new method of the ResultsDataFrame

### Documentation¶

• Improve the installation guide.

### Bug fixes¶

• Allow conversion factors as a sequence in the CSV reader

### Other changes¶

• Speed up constraint-building process by removing unnecessary method call
• Clean up the code according to pep8 and pylint

### Contributors¶

• Cord Kaldemeyer
• Guido Plessmann
• Uwe Krien
• Simon Hilpert
• Stephan Günther

## v0.1.1 (November 2, 2016)¶

Hot fix release to make examples executable.

### Bug fixes¶

• Fix copy of default logging.ini (issue #235)
• Add matplotlib to requirements to make examples executable after installation (issue #236)

### Contributors¶

• Guido Plessmann
• Uwe Krien

## v0.1.0 (November 1, 2016)¶

The framework provides the basis for a great range of different energy system model types, ranging from LP bottom-up (power and heat) economic dispatch models with optional investment to MILP operational unit commitment models.

With v0.1.0 we refactored oemof (not backward compatible!) to bring the implementation in line with the general concept. Hence, the API of components has changed significantly and we introduced the new ‘Flow’ component. Besides an extensive grouping functionality for automatic creation of constraints based on component input data the documentation has been revised.

We provide examples to show the broad range of possible applications and the frameworks flexibility.

### API changes¶

• The demandlib is no longer part of the oemof package. It has its own package now: (demandlib)

### New features¶

• Solph’s EnergySystem now automatically uses solph’s GROUPINGS in addition to any user supplied ones. See the API documentation for more information.

• The groupings introduced in version 0.0.5 now have more features, more documentation and should generally be pretty usable:

• They moved to their own module: oemof.groupings and deprecated constructs ensuring compatibility with prior versions have been removed.
• It’s possible to assign a node to multiple groups from one Grouping by returning a list of group keys from key.
• If you use a non callable object as the key parameter to Groupings, the constructor will not make an attempt to call them, but use the object directly as a key.
• There’s now a filter parameter, enabling a more concise way of filtering group contents than using value.

### Documentation¶

• Complete revision of the documentation. We hope it is now more intuitive and easier to understand.

### Testing¶

• Create a structure to use examples as system tests (issue #160)

### Bug fixes¶

• Fix relative path of logger (issue #201)
• More path fixes regarding installation via pip

### Other changes¶

• Travis CI will now check PR’s automatically
• Examples executable from command-line (issue #227)

### Contributors¶

• Stephan Günther
• Simon Hilpert
• Uwe Krien
• Guido Pleßmann
• Cord Kaldemeyer

## v0.0.7 (May 4, 2016)¶

### Bug fixes¶

• Exclude non working pyomo version

## v0.0.6 (April 29, 2016)¶

### New features¶

• It is now possible to choose whether or not the heat load profile generated with the BDEW heat load profile method should only include space heating or space heating and warm water combined. (Issue #130)
• Add possibility to change the order of the columns of a DataFrame subset. This is useful to change the order of stacked plots. (Issue #148)

### Bug fixes¶

• Use of wrong columns in generation of SF vector in BDEW heat load profile generation (Issue #129)
• Use of wrong temperature vector in generation of h vector in BDEW heat load profile generation.

### Contributors¶

• Uwe Krien
• Stephan Günther
• Simon Hilpert
• Cord Kaldemeyer
• Birgit Schachler

## v0.0.5 (April 1, 2016)¶

### New features¶

• There’s now a flexible transformer with two inputs and one output. (Issue #116)
• You now have the option create special groups of entities in your energy system. The feature is not yet fully implemented, but simple use cases are usable already. (Issue #60)

### Documentation¶

• The documentation of the electrical demand class has been cleaned up.
• The API documentation now has its own section so it doesn’t clutter up the main navigation sidebar so much anymore.

### Testing¶

• There’s now a dedicated module/suite testing solph constraints.
• This suite now has proper fixtures (i.e. setup()/teardown() methods) making them (hopefully) independent of the order in which they are run (which, previously, they where not).

### Bug fixes¶

• Searching for oemof’s configuration directory is now done in a platform independent manner. (Issue #122)
• Weeks no longer have more than seven days. (Issue #126)

### Other changes¶

• Oemof has a new dependency: dill. It enables serialization of less common types and acts as a drop in replacement for pickle.
• Demandlib’s API has been simplified.

### Contributors¶

• Uwe Krien
• Stephan Günther
• Guido Pleßmann

## v0.0.4 (March 03, 2016)¶

### New features¶

• Revise the outputlib according to (issue #54)
• Add postheating device to transport energy between two buses with different temperature levels (issue #97)
• Better integration with pandas

### Documentation¶

• Update developer notes

### Testing¶

• Described testing procedures in developer notes
• New constraint tests for heating buses

### Bug fixes¶

• Use of pyomo fast build
• Broken result-DataFrame in outputlib
• Dumping of EnergySystem

• PEP8

### Contributors¶

• Cord Kaldemeyer
• Uwe Krien
• Simon Hilpert
• Stephan Günther
• Clemens Wingenbach
• Elisa Papdis
• Martin Soethe
• Guido Plessmann

## v0.0.3 (January 29, 2016)¶

### New features¶

• Added a class to convert the results dictionary to a multiindex DataFrame (issue #36)
• Added a basic plot library (issue #36)
• Add logging functionalities (issue #28)
• Add entities_from_csv functionality for creating of entities from csv-files
• Add a time-depended upper bound for the output of a component (issue #65)
• Add fast_build functionlity for pyomo models in solph module (issue #68)
• The package is no longer named oemof_base but is now just called oemof.
• The results dictionary stored in the energy system now contains an attribute for the objective function and for objects which have special result attributes, those are now accessible under the object keys, too. (issue #58)

### Documentation¶

• Fixed installation description (issue #38)
• Improved the developer notes.

### Testing¶

• With this release we start implementing nosetests (issue #47
• Tests added to test constraints and the registration process (issue #73).

### Bug fixes¶

• Fix contraints in solph
• Fix pep8

### Contributors¶

• Cord Kaldemeyer
• Uwe Krien
• Clemens Wingenbach
• Simon Hilpert
• Stephan Günther

## v0.0.2 (December 22, 2015)¶

### New features¶

• Adding a definition of a default oemof logger (issue #28)
• Revise the EnergySystem class according to the oemof developing meeting (issue #25)
• Add a dump and restore method to the EnergySystem class to dump/restore its attributes (issue #31)
• Functionality for minimum up- and downtime constraints (oemof.solph.linear_mixed_integer_constraints module)
• Add relax option to simulation class for calculation of linear relaxed mixed integer problems
• Instances of EnergySystem now keep track of Entities via the entities attribute. (issue #20)
• There’s now a standard way of working with the results obtained via a call to OptimizationModel#results. See its documentation, the documentation of EnergySystem#optimize and finally the discussion at issue #33 for more information.
• New class VariableEfficiencyCHP to model combined heat and power units with variable electrical efficiency.
• New methods for VariableEfficiencyCHP inside the solph-module:
• MILP-constraint
• Linear-constraint

### Documentation¶

• missing docstrings of the core subpackage added (issue #9)
• missing figures of the meta-documentation added
• missing content in developer notes (issue #34)

### Bug fixes¶

• a storage automically calculates its maximum output/input if the capacity and the c-rate is given (issue #27)
• Fix error in accessing dual variables in oemof.solph.postprocessing

### Contributors¶

• Uwe Krien
• Simon Hilpert
• Cord Kaldemeyer
• Guido Pleßmann
• Stephan Günther

## v0.0.1 (November 25, 2015)¶

First release by the oemof developing group.