Skip to content

Mosaik-Powerfactory provides an interface between DIgSILENT PowerFactory and Mosaik co-simulation framework.

License

Notifications You must be signed in to change notification settings

hesstobi/mosaik-powerfactory

Repository files navigation

Mosaik-Powerfactory

Mosaik-Powerfactory provides an interface for Mosaik co-simulation framework.

Installation

Mosaik-Powerfactory requires Python >= 3.3. Use pip to install it, preferably into a virtualenv

pip install -e git+https://github.com/hesstobi/mosaik-powerfactory.git#egg=mosaik-powerfacotry

Quickstart

This is small example how tho use mosiak-powerfacotory to run a load flow simulation with mosaik.

import mosiak_powerfacotry
import mosaik

SIM_CONFIG = {
   'PFSim': { 'python': 'mosaik_powerfactory:PowerFactoryLDFSimulator' }
}
world = mosaik.world(SIM-CONFIG)
pfsim = world.start('PFSim', project_name='PROJECTNAME',options={})
Netz = pfsim.ElmNet(loc_name='Netz')
world.run(unit=1800)

The main steps to use PowerFactory with mosaik are:

  1. Add the desired Powerfactory Simulator to your simulation config. Avaible simulators are:
  • PowerFactoryLDFSimulator: Load flow simulations
  • PowerFactoryRMSSimulator: RMS simulations

You can use the simulator as python module or as cmd:

  • 'python': 'mosaik_powerfactory:PowerFactoryLDFSimulator'
  • 'cmd': 'mosaik-powerfactory-ldf %(addr)s'
  1. Start the simulator with world.start which cals the init method of the simulator: :pymosaik_powerfactory.PowerFactoryLDFSimulator.init or :pymosaik_powerfactory.PowerFactoryRMSSimulator.init. Define the desierd project in the attribute :pyproject_name
  2. Connect your PowerFoctory ElmNet with mosaik by creating it with its loc_name, e.g: pfsim.ElmNet(loc_name='Netz')
  3. Connecting Grid elements with other simulators in mosaik. To get the desierd elements you can use this methods:
  • Last = Netz.child_with_eid('Netz\\Last1.ElmLod'): get the element with the given Path
  • terminals = Netz.children_of_model('ElmTerm'): get the elements of the given model
  1. Run the simulation!

A detailed documentation of mosaik is avaible here: Mosiak documentation.

Documentation

To read the full documentation of this project follow these steps:

git clone https://github.com/hesstobi/mosaik-powerfactory.git
cd mosaik-powerfactory/docs
make html

Open the file .\_build\html\index.html in your browser

About

Mosaik-Powerfactory provides an interface between DIgSILENT PowerFactory and Mosaik co-simulation framework.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages