Skip to main content

Python application with nevergrad optimization model for calculating and simulating the least cost of an energy Mix under constraints.

Project description

MixSimulator

MixSimulator is an application with an optimization model for calculating and simulating the least cost of an energy mix under certain constraints. The optimizers used are based on the Nevergrad Python 3.6+ library.

The primary objective of the simulator is to study the relevance of an energy mix connected to each Inter-connected Grid through the coefficient of usage of each unit in the production cost.

Version 0.4

The current version is a multi-agent system (MAS) approach but keeps the previous classic optimization approach available. Check test_mas.py for more details. (Available events are : powerplant shutdown and powerplant power_on).

An experiment on evaluating both method is available in Experiments/Scenario_type.py or Open In Colab

Note

This project is a work in progress so it can not yet used in production (Many changes are on their way). Feedbacks are welcome!

Specifications :

  • Generic simulator, compatible with data from Madagascar and those from abroad (but may require data pre-processing beforehand);
  • Optimization of duty cycle (or usage coefficient) under constraints ;
  • Get the production cost and various performance indicators (CO2 emission, unsatisfied demand);
  • Estimate of the costs of a mix or a power plant over the long term ;
  • Comparison of the performance indicators on different optimizers. (see EvaluationBudget method)

Perspectives :

  • Add other constraints ;
  • Long-term Optimization ;
  • Pair with a transmission and distribution power grid simulator (MixSimulator can provide input data).

Suggestions are welcome!

How to install

It can be installed with :

pip install mixsimulator

MixSimulator is written in Python 3.6 and requires the following Python packages : nevergrad, prophet, typing, numpy, pandas and matplotlib.

How to run

As MixSimulator is a python package, it can be called and used as we can see in test_classic.py and test_mas.py.

Official documentation will accompany the first release version.

Datasets

Power plants dataset

The dataset "dataset_RI_Toamasina_v2.csv" is for the test and it comes from the Inter-connected energy mix of Toamasina Madagascar (2017) and Some information from the dataset is estimated.

Dataset features needed:

  • tuneable (boolean): is the control unit controllable or not?
  • green (boolean): is it a renewable energy plant?
  • hydro (boolean): is it a hydro power plant?
  • fuel (boolean): is it a thermal power plant?
  • centrals : identification
  • fuel_consumption (g/MWh): fuel consumption (in the case of a fossil fuel power plant)
  • availability (%): plant availability
  • fuel_cost ($/g): price of fuel used
  • init_value ($): initial investment in setting up the plant
  • lifetime (years): plant lifetime
  • carbon_production (g/MWh): emission rate of CO2 from the power plant
  • raw_power (MW): nominal power of the plant
  • nb_employees: number of employees at the central level
  • mean_salary ($): average salary of plant employees
  • demand (MWh): electricity demand
  • lost (MWh): electrical loss at another level (ie: transport network)

Hydro specification :

  • height (meter): height of the stream ;
  • flow : flow of the stream ;
  • stock_available : water reservoir ;
  • capacity : max water reservoir.

nb_employees * mean_salary can be used as a variable cost of the plant if you want to directly use other informations as variable cost.

Demand and Variation datas

There is also "DIR-TOAMASINA_concat.csv" about Consumption data (in kwh, more details in demand/) and "dataset_RI_Toamasina_variation_template.csv" about limits in variation of power plants load following (WIP).

If you have datasets of any region in the world that can be used to evaluate our model, please contact us.

Contact

For questions and feedbacks related to the project, please send an email to r.andry.rasoanaivo@gmail.com or soloforahamefy@gmail.com or tokyandriaxel@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mixsimulator-0.4.4.tar.gz (345.5 kB view details)

Uploaded Source

Built Distribution

mixsimulator-0.4.4-py3-none-any.whl (81.4 kB view details)

Uploaded Python 3

File details

Details for the file mixsimulator-0.4.4.tar.gz.

File metadata

  • Download URL: mixsimulator-0.4.4.tar.gz
  • Upload date:
  • Size: 345.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for mixsimulator-0.4.4.tar.gz
Algorithm Hash digest
SHA256 d97838460b3e0edd39fb33a0128c19de2891d0299ebf55547dc736ca0da32758
MD5 493b5b5bd317b97ca50a7361e0639b46
BLAKE2b-256 6a505b01c6bfa0d4beefc983f49d0264e39b609879e8ab40f515b7b478b842ff

See more details on using hashes here.

File details

Details for the file mixsimulator-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: mixsimulator-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 81.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for mixsimulator-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fe9f03367428e9513c59c826b84003ec374c8ad2ae0be7b2ec15c7c3f982698b
MD5 2e5657a9766037d2b06cc06b709faf81
BLAKE2b-256 64962cb74fcedb27be7510d2b124a35e1c5be2134f1ab28cd78bbef884346f76

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page