Metadata-Version: 2.4
Name: midas-sndata
Version: 2.1.0
Summary: A Midas module for the Smart Nord dataset.
Author-email: Stephan Balduin <stephan.balduin@offis.de>
License-Expression: LGPL-3.0-only
Project-URL: Documentation, https://midas-mosaik.gitlab.io/midas
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: midas_powerseries>=2.1.0
Requires-Dist: pandas
Requires-Dist: tables
Dynamic: license-file

# Midas Smart Nord Data Simulator

This package contains a midas module providing a simulator for the Smart Nord data set. 
Although this package is intended to be used with midas, it can be used in any mosaik simulation scenario.

Version: 2.1

## Installation

This package will usually installed automatically together with `midas-mosaik` if you opt-in for the `base` extra. 
It is available on pypi, so you can install it manually with

```bash
pip install midas-sndata
```

## Usage

The complete documentation is available at https://midas-mosaik.gitlab.io/midas.

### Inside of midas
To use the powergrid inside of midas, just add `sndata` to your modules

```yaml
my_scenario:
  modules:
    - sndata
    - ...
```

and configure it with:

```yaml
  sndata_params:
    my_grid_scope:
      step_size: 900  # <-- Default value
      grid_name: my_grid_scope
      active_mapping: 
        1: [[Land_0, 1.0], [Land_2, 1.5]]
        3: [[House_000, 1.0]]
```

The mapping has to match to the grid that you're using.

### Any mosaik scenario

If you don't use midas, you can add the `sndata` manually to your mosaik scenario file. 
First, the entry in the `sim_config`:

```python
  sim_config = {
    "SmartNordData": {
      "python": "midas_smartnord.simulator:SmartNordDataSimulator"
    },
    # ...
  }
```

Next, you need to start the simulator (assuming a `step_size` of 900):

```python
  sndata_sim = world.start(
      "SmartNordData",
      step_size=900,
      start_date="2020-01-01 00:00:00+0100",
      data_path="/path/to/folder/where/dataset/is/located/",
      filename="smart_nord_profiles.csv",  # this is default
  )
```

Then the models can be started:

```python
  land1 = sndata_sim.CalculatedQTimeSeries(name="Land_0", scaling=1.0)
  land2 = sndata_sim.CalculatedQTimeSeries(name="Land_2", scaling=1.5)
  house1 = sndata_sim.CalculatedQTimeSeries(name="House_000", scaling=1.0)
```

Finally, the modells need to be connected to other entities:

```python
  world.connect(land1, other_entity, "p_mw", "q_mvar")
```

## License

This software is released under the GNU Lesser General Public License (LGPL). 
See the license file for more information about the details.

The data set is a result from the research project [Smart Nord](www.smartnord.de).
