Skip to content

Commit

Permalink
Adjusted start parameters to account for options field
Browse files Browse the repository at this point in the history
Signed-off-by: SystemsPurge <[email protected]>
  • Loading branch information
SystemsPurge committed Nov 18, 2024
1 parent afa1c9f commit 979eb4c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions villas/controller/components/simulators/dpsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,20 @@ def headers(self):
def load_cim(self, fp):
if fp is not None:
name = self.params.get("name",str(os.urandom(6).hex()))
reader = dpsimpy.CIMReader(name)
files = list(map(lambda x: f'{fp}/{x}',os.listdir(fp)))
freq = self.params.get("system-freq",50)
options = self.params.get("options",{
"solver-domain":"SP",
"system-freq":50,
"solver-type":"MNA"
})
freq = options.get("system-freq")
domain_str = options.get("solver-domain")
solver_str = options.get("solver-type")
duration = self.params.get("duration",10)
timestep = self.params.get("timestep",1)
domain_str = self.params.get("solver-domain","SP")
solver_str = self.params.get("solver-type","MNA")

reader = dpsimpy.CIMReader(name)
files = list(map(lambda x: f'{fp}/{x}',os.listdir(fp)))


if domain_str == "SP":
domain = dpsimpy.Domain.SP
Expand Down

0 comments on commit 979eb4c

Please sign in to comment.