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.

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.

Perspectives :

  • Add other constraints (max variation in production for each power plant) ;
  • 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, 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 retest.py.

List of classes and directories :

  • MixSimulator : System basis (Adaptation of the Nevergrad optimizers to the project and auto-parameterization) ;
  • nevergradBased/Optimizer : Instance of the optimizer (Receives the indications on the optimizer to choose and the parameters);
  • centrals/* : Gathers all the common specifications of the control units (central) ;
  • Evaluation : Class for evaluating mix based on performance indicators on several optimizers ;
  • data/ : Groups the available datasets.

Official documentation will accompany the first release version.

DataSet

The dataset "data/dataset_RI_Toamasina" is for the test and it comes from the Inter-connected energy mix of Toamasina Madagascar (2018) 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.

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

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!

Here is a list of available optimizers:

['cGA', 'SplitOptimizer', 'RecombiningPortfolioOptimisticNoisyDiscreteOnePlusOne', 'RecES', 'RealSpacePSO', 'RandomSearchPlusMiddlePoint', 'QrDE', 'QORandomSearch', 'OptimisticNoisyOnePlusOne', 'OptimisticDiscreteOnePlusOne', 'ORandomSearch', 'NoisyOnePlusOne', 'NoisyDiscreteOnePlusOne', 'NoisyDE', 'NoisyBandit', 'NelderMead', 'NaiveTBPSA', 'NaiveIsoEMNA', 'LhsDE', 'FCMA', 'ES', 'DoubleFastGADiscreteOnePlusOne', 'DiscreteOnePlusOne', 'CauchyOnePlusOne', 'CM', 'AlmostRotationInvariantDE', 'TwoPointsDE', 'RandomSearch', 'OnePlusOne', 'DE', 'CMA', 'PSO', 'TBPSA','NGOpt','LHSSearch', 'CauchyLHSSearch','CauchyScrHammersleySearch']

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.2.9.9.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

mixsimulator-0.2.9.9-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mixsimulator-0.2.9.9.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.6.12

File hashes

Hashes for mixsimulator-0.2.9.9.tar.gz
Algorithm Hash digest
SHA256 13182ea0b87a4844a9fe98b70a2b8cb076ca4a3d5f7b66d8d8df12daf6a7e3db
MD5 948c5dfda3101c1b7992c689c6ea266f
BLAKE2b-256 8fde919687917bc1197b162187038c06722d68e37e1e39083c501c26b72c137f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mixsimulator-0.2.9.9-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.6.12

File hashes

Hashes for mixsimulator-0.2.9.9-py3-none-any.whl
Algorithm Hash digest
SHA256 ecf121abadec5fc01643c4fec426ed4e44a9b685e23e1414a79288e78ce92942
MD5 3f419e7116a3437f08e9459655fcfdd1
BLAKE2b-256 5e8cde0af1b9014bd620b8d49b9eaace7919b03117122dec78f364df068af6dc

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