Coder Social home page Coder Social logo

ie3-institute / powersystemdatamodel Goto Github PK

View Code? Open in Web Editor NEW
17.0 4.0 5.0 37.83 MB

Provides an elaborated data model to model energy systems with a high granularity e.g. for bottom-up simulations. Additionally, useful functionalities to handle the model i/o are provided as well.

License: BSD 3-Clause "New" or "Revised" License

Java 59.75% Groovy 40.25%
simulation datamodel powersystem

powersystemdatamodel's People

Contributors

avgprog avatar baszach avatar ckittl avatar cmahr93 avatar codacy-badger avatar danielfeismann avatar denstre avatar dependabot-preview[bot] avatar dependabot[bot] avatar eikesan avatar jo-bao avatar johanneshiry avatar lararou avatar mia-krause avatar muradiodev avatar ngl04 avatar pierrepetersmeier avatar sebastian-peter avatar sensarmad avatar staudtmarius avatar t-ober avatar utkarsha-dev05 avatar vickybung1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

powersystemdatamodel's Issues

Replace usage of Optional<> in constructors and fields

Currently we are using Optional as constructor and filed parameters in some places. While this isn't cause a problem for now (and we already discussed that this makes sense in our case), I just discovered that this prevents the classes using it from being Serializable. As we will depend on serialization in several places this might become a problem in the future. Hence, finding another solution might be unavoidable.

Implement .csv writer capabilities for result models

With the introduction of the revised data model structure, the old .csv writer won't work anymore. Hence, we need new ones. Based on newly introduced and currently being reviewed model processors, implementing a .csv writer for at least the result models should be very straight forward.

Proper implementation of toString() for Entities

Currently, a lot of the entities (e.g. LoadInput, PvResult, ...) are missing their own implementation of toString(). Would be nice if we could provide a proper implementation of them to make them easier to be printed in logs and exceptions.

Lower requirements in ValidationUtils

Currently, the phase-to-ground elements in lines and transformers are required to non-zero. However, as this is a typical assumption, we will lower this burden.

Discussion: move class files to sub package datamodel

Currently all classes of the data model are located @ edu.ie3. In previous versions we had all data model related stuff located @edu.ie3.datamodel. Is there any specific reason that we don't do this anymore?
Otherwise I would suggest the following:

  • move everything into sub-package edu.ie3.datamodel
  • move ValidationTools -> edu.ie3.datamodel.utils and rename it to ValidationUtils
  • move InvalidEntityExceptionand UnsafeEntityException into new to create edu.ie3.datamodel.exceptions
  • delete edu.ie3.datamodel.validation

Extractor for nested Models into their own collections for persistence

Some of our models are nested e.g. a 2 winding transformer holds an instance of its node, while in a database or a file only the primary key is referenced in the corresponding field. For simplification and to avoid missing elements when persisting a model, it would be nice to have an extractor class that ensures that all nested models are extracted in their own collection to be passed to the persistence unit.

e.g a collection of Transformer2W can be "extracted" into collections of Transformer2W, OperatorInput and NodeInput

New ChpTypeInput might require new factory

I looks like the new changes introduced by @ckittl break the SystemParticipantTypeInputFactory in the sense that the factory no longer can produce ChpTypeInput entities at it requires not a simple, but a complex factory.

@sebastian-peter please consult @ckittl or me when you're back in office so that we can talk about this asap or add any suggestions for a solution below.

AggregatedGridInput does not use VoltageLevel but NodeInput does

I just discovered, that AggregatedGridInput as a setVoltLvl()-method that allows setting a string. In contrast, NodeInput also contains a field voltLvl which is of type VoltageLevel. @mia-krause can you explain me why we distinguish between this and why this isn't harmonized? I think this is a little bit confusing or even not correctly implemented?!

Factories need to be able to parse PostGIS Format

The old implementation of the reader was able to read data in PostGIS format, the new factories are now only supporting geoJSON. This is totally fine for file based stuff, but not if it comes to databases with PostGIS support. Hence, the capabilities of the factories need to be extended to also support the old PostGIS standard beside the new geoJSON standard.

Replace Quantity<> by ComparableQuantity<>

All classes in edu.ie3.datamodel.models.input.system.type are using Quantity<> instead of ComparableQuantity<>. That causes type-issues at the moment you call them within edu.ie3.simona.model.participants. Thats because there is type of ComparableQuantity<> required.

Are grid models divided correctly?

In former versions of the algorithm splitting a total grid model into galvanically separated sub grids, the transformer models have been duplicated as well as their corresponding nodes in other sub grids.

As we intend to make objects immutable (especially with 64e7629), I think that this is not necessary anymore. Therefore, if some freaky things happen, we may have to alter this once again.

Extend result factories with field to value mapping methods

Currently, the result factories are only able to build a ResultEntity based on a fieldName -> valueMapping which allows reading and creating of POJOs and can be used to read data into the data model from the outside. The other way around e.g. for writing operations is not supported yet. Hence to support writing, the factories need to be extended to allow for a creating a mapping based on a POJO.

Fix not-working (?) tests using GridTestData

transformerCtoG in GridTestData had a wrong node in the test data (was nodeF instead of nodeG). I changed this, but strangely(?) all tests are still passing. This could indicate that a) either one of the tests is not checking grid extraction properly or b) there is something broken with the logic of grid disassembling as this test data is also used for grid disassembling.

This needs to be investigated carefully the ensure that everything works correctly. Additionally, I would recommend to extend the tests that they break if nodes are not set correctly!

Mapping external time series to models

It should be possible to give detailed model parameters as well as fixed provided time series for each model. Therefore, a mapping from model to time series is provided.

Improve NodeInput geoPosition implementation

At the moment, each NodeInput holds a non-optional geoPosition constructor field. This enforces utilization of null entries when no geo information is available. The application of Optional is also a not-that-nice way to go as this would cause issues with serialization. Hence, we need a better solution to address cases, when no geo data is available avoiding while avoiding null and Optional.

Furthermore, LineInput still contains an optional for overhead line monitoring. This should be removed asap as well.

Extend Operator with static field NO_OPERATOR

Currently an OperatorInput is required by all input entities, but it might be the case, that input entities don't have an operator. In that case putting null into the OperatorInput field in the corresponding input entity would be doable, but not indicating what exactly the null stands for (error in entity creation, no operator, ...). Hence, some default fields for the OperatorInput might make sense.

Fix CHPTypeInput + ChpInput

At the moment there are unused constructor parameters in the ChpTypeInput class and ChpInput class.
I'm not sure about their usage/if we need them, hence I cannot address this issue. :-(

If someone could provide more information on this I can try to fix this as well.

Reconsidering characteristics

Remove Characteristic Input Types
Implement OlmCharacteristic as a separate class and replace the previous string in LineInput
Implement qCharacteristic as a separate class and replace the previous string in the corresponding input

Replace existing characteristics available as strings with classes

Storage Input Changes

Removals:
pMin from StorageTypeInput -- not necessary
Deprecated
StorageStrategy.java

Additions:
into StorageTypeInput
cpRate = Charge/Discharge Rate (constant power)

Changes in description:
in StorageTypeInput
dod = Maximum permissible DOD (not minimum)
pMax = Maximum permissible charging/discharging power (also reference power)

AggregatedGridInput & InputEntity Questions

I just started working with the AggregatedGridInput and discovered that there is

  • no default constructor with input parameters
  • fields like gridName, subnet, and voltLvl are writable by setters

Question 1:
I see the point in making grid assets e.g. measurement units, graphics, system participant etc. writable but does this hold true for gridName, subnet, and voltLvl as well? Wouldn't it be better to make these fields final and add a corresponding constructor instead.

Question 2:
Furthermore, I would question that measurement units should be placed in the AggregatedGridInput. Is there any specific reason why this has been placed here instead of AggregatedRawGridInput? Do you have any thoughts on this @ckittl?

Question 3:
@mia-krause maybe you can answer this one: we currently have setters for all our fields in the InputEntity part but we don't have an empty default constructor to make use of the setters (except from modifying objects after creation which might not be reasonable. Is there any reason, why

  • these fields are not final (and correspondingly getters can be removed)?
  • the empty constructor is not there?

I know that setters + empty constructors are needed for JavaBeans and Generic operations but do we want/need this at this place? And if yes, there is still an empty constructor missing. If no, we can get rid of the setters and make the fields final.

Re-Implement FileNamingStrategy

In the old data model implementation we had a so called .csv naming strategy that has been used to map entity classes to a specific output file name. I would suggest that we re-introduce this naming strategy again as it is helpful for several tasks considering file i/o operations.

I will draft a proposal for this asap.

Complex input factories

Several InputEntity, such as AssetInput, require more complex input data types than just native types and Quantities.
A different type of factory may be useful here.

Part of # 16.

Add documentation for StandardUnits

edu.ie3.models.StandardUnits does not contain any documentation. While most fields can be guessed based on their name, it would be helpful to have a javadoc-alike documentation for each field.

Increase of user interaction for time series

Currently, especially the IndividualTimeSeries "only" offers the possibility to query a value at a certain instant in time and giving it back or null, if it not exists. Anyways, the user does not have any possibility to determine, if the query is totally out of scope or what the next available value would be.

Develop a validation strategy

Currently, there are ValidationUtils and validate methods in each model. As of now, the models are (partly) as well validated during instantiation and later during composing to a grid container.

Let's develop a thorough validation strategy. My suggestions:

  1. Validate all single models during instantiation (without their interplay in a bigger grid)
  2. Move validation logic from ValidationUtils to the single classes, as the classes should hold the information on what is valid and what not.
  3. During composition of the single containers, only validate the interplay between the models (are the nodes apparent?, does a line connect different voltage levels? etc.)

Wrong geometry representation in GraphicInput

The graphic input relies on package com.vividsolutions.jts.geom whereas the rest uses org.locationtech.jts.io.geojson. Search for occurences of com.vividsolutions.jts.geom throughout the project.

Pls check if my added StandardUnits make sense

For PR #26 I created two new StandardUnits. It would be amazing if someone could check the naming, the unit, and whether this makes sense in general.

Checking the TODO markers in StandardUnits.java should suffice.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.