Skip to content

Commit

Permalink
Changed to the newer dpsim python api
Browse files Browse the repository at this point in the history
Signed-off-by: SystemsPurge <[email protected]>
  • Loading branch information
SystemsPurge committed Nov 7, 2024
1 parent e3a2ded commit 1888fa6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions villas/controller/components/simulators/dpsim.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dpsim
import dpsimpy
import os

from villas.controller.components.simulator import Simulator
Expand All @@ -22,7 +22,8 @@ def headers(self):

def load_cim(self, fp):
if fp is not None:
self.sim = dpsim.load_cim(fp.name)
reader = dpsimpy.CIMReader(fp)
self.sim = reader.loadCIM(50, list([fp]), dpsimpy.Domain.SP, dpsimpy.PhaseType.Single, dpsimpy.GeneratorType.PVNode)
self.logger.info(self.sim)
os.unlink(fp.name)

Expand Down

0 comments on commit 1888fa6

Please sign in to comment.