How sogno-platform/dpsim works
DPsim is a C++ power-system simulation library with EMT and dynamic-phasor simulation, power-flow solving, Python access, CIM/CGMES model loading, and real-time/protocol interfaces. The principal workflow is to define or import a network, configure a simulation, solve it over time, and expose results or exchange values externally. The graph combines README-documented capabilities with sampled source; several solver and model internals were not sampled, so their detailed links are omitted.
Main entry points: Simulation.h Simulation control · MNASolverFactory.h Solver selection · Reader.cpp CIM reader · InterfaceWorker.h Interface worker
Components 16
Network models
- Grid components
dpsim-models/include/dpsim-models/Components.h - System topology
dpsim-models/src/SystemTopology.cpp - VSI controllers
dpsim-models/src/Signal/PowerControllerVSI.cpp - Voltage control
dpsim-models/src/Signal/VoltageControllerVSI.cpp
Simulation runtime
- Simulation control
dpsim/include/dpsim/Simulation.h - Solver selection
dpsim/include/dpsim/MNASolverFactory.h - MNA solver
dpsim/src/MNASolver.cpp - State-space coupling
dpsim/src/MNAStateSpaceContributor.cpp - Power-flow solver
dpsim/src/PFSolver.cpp - Simulation results
dpsim/include/dpsim/Simulation.h
Import and interfaces
- CIM reader
dpsim-models/src/CIM/Reader.cpp - Interface worker
dpsim/include/dpsim/InterfaceWorker.h - VILLAS interface
dpsim-villas/src/InterfaceWorkerVillas.cpp
Python API
- MATPOWER reader
python/src/dpsim/matpower.py - Python bindings
dpsim/src/pybind/main.cpp
Other components
- Simulation user
Connections 15
- Simulation user → Simulation control: configures and runs
README.md - Simulation user → CIM reader: loads network
README.md - CIM reader → System topology: builds topology
- Simulation user → MATPOWER reader: imports case
python/src/dpsim/matpower.py - MATPOWER reader → Python bindings: uses components
python/src/dpsim/matpower.py - Simulation control → Solver selection: creates solvers
dpsim/include/dpsim/Simulation.h - Solver selection → MNA solver: selects solver
- Simulation control → Power-flow solver: initializes by power flow
- Simulation control → State-space coupling: extracts state space
- Simulation control → Simulation results: logs results
dpsim/include/dpsim/Simulation.h - Simulation control → Interface worker: exchanges values
- Interface worker → VILLAS interface: specializes interface
dpsim-villas/src/InterfaceWorkerVillas.cpp - Simulation user → VILLAS interface: connects protocols
README.md - VSI controllers → Grid components: models inverter control
- Voltage control → Grid components: models voltage control