Skip to content

Commit 1888fa6

Browse files
committed
Changed to the newer dpsim python api
Signed-off-by: SystemsPurge <[email protected]>
1 parent e3a2ded commit 1888fa6

File tree

1 file changed

+3
-2
lines changed
  • villas/controller/components/simulators

1 file changed

+3
-2
lines changed

villas/controller/components/simulators/dpsim.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import dpsim
1+
import dpsimpy
22
import os
33

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

2323
def load_cim(self, fp):
2424
if fp is not None:
25-
self.sim = dpsim.load_cim(fp.name)
25+
reader = dpsimpy.CIMReader(fp)
26+
self.sim = reader.loadCIM(50, list([fp]), dpsimpy.Domain.SP, dpsimpy.PhaseType.Single, dpsimpy.GeneratorType.PVNode)
2627
self.logger.info(self.sim)
2728
os.unlink(fp.name)
2829

0 commit comments

Comments
 (0)