GithubHelp home page GithubHelp logo

ie3-institute / simona Goto Github PK

View Code? Open in Web Editor NEW
25.0 4.0 4.0 83.95 MB

simona is an agent-based discrete-event power system simulation model developed @ie3-institute

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

Scala 96.42% Groovy 2.83% Java 0.27% Shell 0.44% Dockerfile 0.03%
simulation powersystem electricity energy agent-based-simulation energy-transition research

simona's Introduction

simona logo

SIMONA

Build Status Quality Gate Status codecov Documentation Status License Maven Central

The agent-based simulation environment SIMONA provides a simulation toolbox to run and implement large-scale agent-based electricity grid simulations with focus on distribution grids. As a result, close-to-reality time series are generated from various system participants and grid assets that can be used to analyze a given power grid. Application cases are for example distribution grid planning purposes but also flexibility analysis or coupled sector interdependency analysis. The framework contains several out-of-the-box available models for a wide variety of grid participants as well as their operational behavior.

More information are provided in the project's documentation.

Usage and Contribution

SIMONA is part of several ongoing research projects and will be part of future research projects. Hence, the codebase is continuously under development from different perspectives, needs and developers.

We invite everyone to use SIMONA for their own research or for usage in a research project. If you use SIMONA for your own projects or research, please provide a reference to this repository. Furthermore, if you publish your scientific work please give appropriate credit by citing one of the introduction papers of SIMONA.

We're also happy for any feedback and contributions. For details on how to contribute, please take a look at the CONTRIBUTING.md file in the root directory of this repository.

Questions

For all SIMONA related questions please feel free to contact people involved in the development and maintenance of SIMONA. For the moment, these people are:

simona's People

Contributors

ckittl avatar danielfeismann avatar dependabot[bot] avatar jo-bao avatar johanneshiry avatar julianhohmann avatar lararou avatar pierrepetersmeier avatar sebastian-peter avatar simonhuette avatar staudtmarius avatar t-ober avatar vickybung1 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

simona's Issues

Simplify SimonaConfig with shared param object

Parameter structures like sqlParams, csvParams are very similar (if not identical) across input types (currently primary and weather).

Shared parameters like timePattern could also be provided by a common trait/superclass.

Depending on carueda/tscfg#126, these can be implemented as optional shared objects.

Support for experiment runs

Currently, we cannot run multiple configuration files in one simulation run. However, it would be nice to sequentially process multiple configurations instead of just one per execution.

Such a multi-configuration support should:

  • be configurable (point to exact location with one config per line)
  • create new logs in the corresponding config folder + disable console logging automatically and point to the log location to avoid a too clumsy console (e.g. "Started simulation XYZ. Full log can be found here: <PATH_TO_LOG>)
  • Optionally (by config arg) aggregate results

Fix unique generation of ActorNames

On very large datasets the current implementation of the actor naming uuid tends to be not unique anymore. Therefore we need to find an alternative for the unique name generation.

Possible approaches:

  • remove substring(0,8) (might clutter logs...)
  • find another method to generate unique identifiers (maybe hash values?

Affected line:
Clipboard - 19  Januar 2022 17_03

Fix ConfigFailFastSpec:throw an exception if an influxDb1x is configured, but not accessible

The ConfigFailFastSpec for influxDb1x is currently disabled as it seems there is an dependency issue with a kotlin package (kotlin-stdlib) which is used in PSDM and subsequently in influxDB-java connector. This may also affect the functionality of the influxDb functionality in simona as well and is therefore considered as a major issue.

To solve this issue I assume solving the dependency issue should be sufficient. As this may kills simona's influxDB1x capabilities it is assumed to be a high priority bug and should be addressed asap!

I disabled the test for now.

Tasks:

  • solve issue
  • enable test again(!)

Synchronous test for grid agent in center position

As of #111, the GridAgent resp. DBFSAlgorithm uses the dispatcher from actor context. For execution of power flow calculation.

However, using the TestFSMRef for synchronous testing, the configured dispatcher is explicitly overridden to `CallingThreadDispatcher' utilizing only the calling thread. However, this poses the risk of dead locks, which we obviously fell in.

Synchronous test currently is disabled, as we intend to refactor to akka typed and therefore the test also needs refactoring. However, if that is done, re-implement a synchronous test!

Setup shadow jar release deployment

In contrast to your other projects, simona is a "standalone" application which cannot be run effortless as "light" jar. Therefore we need to find a way to not only release simona @ maven central, but also to release fat/shadow jars here on github. Currently, the CI/CD pipeline does not support such a feature. Therefore such a setup, maybe even in conjuction with a docker deployment to ship the simona jar inside a docker container, is required.

This task includes a proper version management of shadow jars of main and dev branches - which means normal or snapshot shadow jar version naming and must also enable the currently ignored DeploySpec.scala

Tasks

  • fix and enable DeploySpec.scala

Switch to scala 3 + java 17

Scala 3 has several improvements over the currently used scala version. Even more, in the mid-term I expect that we will run into several problems if we stick to scala 2.

We may consider using this version change to also switch to the latest java LTS which is currently java 17.

For a full switch, we depend on updates of the following tools to support scala 3

We should also consider using this change for a new, actually the first public, release.
Therefore it might make sense to solve #17 before.

Implement agent for combined heat and power plants

Model is ready yet, but there is no specific agent for it.

As the ChpModel produces electric and thermal heat output at the same time, please take special care of the scaling factor. This is not yet considered in the existing other agents.

Add config for transformer control groups

Configuration has to comprise for each control group:

  • List of controlled transformers (by uuid)
  • List of measurement devices to account for (by uuid)
  • Specification of control scheme (e.g. limit violation prevention vs. preventive control)
  • Parameters for control scheme (thresholds, dead bands etc.)

Fix MavenCentral deployment credits

Jenkins complains about insecure string interpolation when deploying to maven central. While the credentials are masked and therefore this should be safe to use, we should investigate another way to pass in the credentials there.

Should be doable fast forward, as we use credentials beforehand already and therefore one may just apply the concept of an existing credentials implementation.

If you start working on this, feel free to contact me for details.

Introduce distributed simulation

As part of my master's thesis, implement the capability to run SIMONA as a distributed simulation. Local execution should still be possible.

Change transformer calculation

As of PowerSystemDataModel > 3.0 the no load susceptance of transformers (both two and three winding) will come negative. The automatic negation here should be adapted.

PlantUML logging of messages for easy debugging

@johanneshiry made me aware of the following:

Within the Beam project they log messages in a PlantUML format including states of the agents and ticks of their change.
This seems to be a genius way for easy debugging of complex message protocols.

Here are their corresponding docs and here is the corresponding PR

This might be a worthy feature if our message protocols get more complex. As of Johannes' quick assessment it seems like the code and concept can be relatively easily applied to SIMONA

Consider setting java version to 11

We currently depend on an outdated and possibly insecure version of jGraphT (1.4) as with jGraphT 1.5 java 11 is required. Therefore, as this should not change much, we should consider setting the projects java version from 1.8 to 11

May be considered in conjunction with PSDM#307

Implement agent for biomass power plants

Model is ready yet, but there is no specific agent for it.

As the BmModel produces electric and thermal heat output at the same time, please take special care of the scaling factor. This is not yet considered in the existing other agents.

Transferring model documentation from internal wiki

Some documentation has not been transferred from internal simona wiki yet.
Information should be checked for up-to-dateness and adapted for readthedocs.

  • PvModel
  • BmModel
  • LoadModel: Move to Models section
  • Transformer/3W Transformer
  • LoadProfiles

Properly account for scaling factors in participants

Currently, the scaling factor is not properly accounted for. It should be checked, where it can be integrated best and what logic is best (first scaling active power and then calculate reactive power based on that one or scaling both results?)

Simplify initialization of PrimaryServiceWorker

PrimaryServiceProxy#toInitData unpacks source-related primary config and re-packages it into an InitPrimaryServiceStateData, which is then unpacked in PrimaryServiceWorker#init again. This seems a bit unnecessary.

One could take WeatherSource#apply as an example, where configs are turned into WeatherSourceWrappers directly.

This becomes more relevant once #34 is implemented.

Switch to akka typed

The current implementation relies on akka classic which does not include type safety for message passing between actors. In the mid-term it would be very helpful to have akka typed support in order to have a more safe and stable protocol handling. This also might require some protocol adaptions and it may be helpful to have a documentation of the existing protocols available beforehand.

Tasks

  • add documentation for existing agent and actor communication protocols
  • adapt existing protocols for akka typed
  • adapt the code to support akka typed

Fix invalid thread allocation in GridAgent

The current implementation of the GridAgent uses its own implementation of an ExecutionContext. However, this is a) not needed and b) leads to a huge amount of allocated Threads when an extensive grid is simulated on a large computational machine. Therefore, either the custom ExecutionContext should be replace by the dispatcher context OR the (somehow unrequired) Future should be removed from this actor as well.

Participants write out results

... that have be messaged to the grid agents and therefore have been part of the power flow calculation.

The power flow is carried out in a fixed time resolution, whereas the participant act on different time scales. Therefore, for power flow calculation, the participant averages the simulation results over a certain time frame and messages it back to the grid agent. This result is not yet enclosed within the output data.

Upgrade to Java 17

In order to re-enable SonarQube analysis during CI, Java needs to be upgraded.
As part of #53

Re-organizing test resources to packages

Test data can be moved to the respective packages that it is needed in. This way, it is more obvious to which test the data belongs and vice versa. Also, getClass.getResource() works well with this, as only the path relative to the own package path needs to be stated.

For example, the contents of it-data/primaryService can be moved into some directory in edu/ie3/simona/service/primary. The full path then does not need to be stated when using getClass.getResource().

As discussed with @t-ober, and @johanneshiry @ckittl you are welcome to give your opinion about this as well.

Fix bad groovy formatting

Spotless groovy formatting leads to weird results with multiline field definitions (here from RandomLoadModelTest):

	def loadInput =
	new LoadInput(
	UUID.fromString("4eeaf76a-ec17-4fc3-872d-34b7d6004b03"),
	"testLoad",
	OperatorInput.NO_OPERATOR_ASSIGNED,
	OperationTime.notLimited(),
	new NodeInput(
	UUID.fromString("e5c1cde5-c161-4a4f-997f-fcf31fecbf57"),
	"TestNodeInputModel",
	OperatorInput.NO_OPERATOR_ASSIGNED,
	OperationTime.notLimited(),
	Quantities.getQuantity(1d, PU),
	false,
	NodeInput.DEFAULT_GEO_POSITION,
	GermanVoltageLevelUtils.LV,
	-1
	),
	new CosPhiFixed("cosPhiFixed:{(0.0,0.95)}"),
	H0,
	false,
	Quantities.getQuantity(3000d, KILOWATTHOUR),
	Quantities.getQuantity(282.74d, VOLTAMPERE),
	0.95
	)

Could be solved by playing around with the formatting settings and enabling them in spotless.gradle.

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.