Metadata-Version: 2.1
Name: mosaik-wind
Version: 0.1.0
Summary: Simulator for Wind Turbines in mosaik
License: LICENSE
Author: Malte Trauernicht
Author-email: mosaik@offis.de
Requires-Python: >=3.9,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: arrow (>=1.3.0,<2.0.0)
Requires-Dist: mosaik-api-v3 (>=3.0.7,<4.0.0)
Requires-Dist: numpy (>=1.25.2,<2.0.0)
Requires-Dist: pandas (>=2.1.0,<3.0.0)
Description-Content-Type: text/x-rst

===========
mosaik-wind
===========

This program allows to simulate wind-turbines inside mosaik. Original from Fernando Penaherrera, modified by
Christoph Stucke and adapted into the mosaik library by Malte Trauernicht.

Installation
============
* To use this project, you have to install at least version 3.2.0 of `mosaik <https://mosaik.offis.de/>`_
* It is recommended, to use the Mosaik-CSV Library to import wind data

You can install this project through pip with the following command::

    pip install mosaik-wind

How to Use
==========
Specify simulators configurations within your scenario script::

    sim_config = {
        'CSV': {
            'python': 'mosaik_csv:CSV',
        },
        'Wind': {
            'python': 'mosaik_components.wind:Simulator'
        },
        ...
    }

Initialize the wind- and csv-simulator::

    windData = world.start("CSV",
                       sim_start='YYYY-MM-DD HH:mm:ss',
                       datafile='path/to/wind/data.csv')

    wind_simulator = world.start('Wind',
                                 power_curve_csv='path/to/power_curve/data.csv',
                                 step_size=60000
                                 gen_neg=True)

Instantiate model entities::

    wind_speed = windData.Wind()
    wind_sim_model = wind_simulator.WT()

Connect wind- with csv-simulator::

    world.connect(wind_speed, wind_sim_model, 'wind_speed')


CSV-Formatting
==============

For the simulator to work correctly, both .csv files have to be specifically formatted!

wind-data
---------
The wind_data.csv is formatted accordingly to the conventions of the `mosaik_csv <https://gitlab.com/mosaik/components/data/mosaik-csv>`_ simulator::

    Wind
    Date,wind_speed
    YYYY-MM-DD HH:mm:ss,v1
    YYYY-MM-DD HH:mm:ss,v2
    ...

* Each entry in the .csv needs a Date in the YYYY-MM-DD HH:mm:ss format and a wind_speed value v, measured in meters per second.

power-curve
-----------
The power_curve.csv does not need the formatting, of the mosaik_csv simulator::

    wind_speed,power_factor
    a1,b1
    a2,b2
    ...

* The Entries for each data point require the wind_speed a in the Beaufort wind force scale, as well as a corresponding power-factor b in megawatt.

Changelog
=========

0.1.0 - 2024-03-06
------------------

- Initial release of the mosaik-wind simulator

Authors
=======

The adapter was initially developed by Fernando Penaherrera, modified by Thomas Raub and extended by Malte Trauernicht.

