Then to verify the status of the switch is opened, I used these commands.
circ = dssCircuit.CktElements(obj_name) # Obj_name is the SwitchedObject i.e., Name of circuit element #switch that the SwtControl operates.
dssCircuit.SetActiveElement(obj_name)
Openstate1 = circ.IsOpen(1, 0)
print('Openstate1 Term1',Openstate1)
In some cases, the lines are opened. and in some cases do not.
Is this the correct method of doing it? Could you please guide?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This one can be tricky. Control actions occur after a simulation step, this is, if you command a control to open using its "action" property this will not act until a new solve command is executed. Otherwise, you'll get the same state as before.
That could be the cause. Otherwise, for getting the action applied at once, additional to the control action you can try by using the command "Open" (Open myclass.myobj 1 !the terminal number), and that will produce the effect right away for the next simulation step.
Best,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Team,
I am using these commands to manually open the switches.
dssText.Command = f"{switchControlname}.action=open"
Then to verify the status of the switch is opened, I used these commands.
circ = dssCircuit.CktElements(obj_name) # Obj_name is the SwitchedObject i.e., Name of circuit element #switch that the SwtControl operates.
dssCircuit.SetActiveElement(obj_name)
Openstate1 = circ.IsOpen(1, 0)
print('Openstate1 Term1',Openstate1)
In some cases, the lines are opened. and in some cases do not.
Is this the correct method of doing it? Could you please guide?
Thanks.
Hello,
This one can be tricky. Control actions occur after a simulation step, this is, if you command a control to open using its "action" property this will not act until a new solve command is executed. Otherwise, you'll get the same state as before.
That could be the cause. Otherwise, for getting the action applied at once, additional to the control action you can try by using the command "Open" (Open myclass.myobj 1 !the terminal number), and that will produce the effect right away for the next simulation step.
Best,
Thank you.