EvtSwitch attributesPowerFactory Switch Event
Every attribute of the PowerFactory Switch Event (EvtSwitch): 32 event parameters, with units and meaning. Copy a name into GetAttribute or SetAttribute.
What EvtSwitch is
A switch event: it opens or closes a breaker, or switches a whole element, at a set time of a simulation.
- Class
EvtSwitch, event class- PowerFactory name
- Switch Event
- Attributes
- 32 event parameters
Most used EvtSwitch attributes
| Attribute | Unit | Description | Where |
|---|---|---|---|
p_target | · | Breaker or Elementbreaker or element | event data |
time | s | Execution time (absolute) | event data |
i_switch | · | Actionopen or close | event data |
i_allph | · | All phases | event data |
outserv | · | Out of Service | event data |
Read and write EvtSwitch in Python
import powerfactory
app = powerfactory.GetApplication() # GetApplicationExt() from outside PowerFactory
inc = app.GetFromStudyCase("ComInc")
events = inc.GetAttribute("p_event") # the event list the simulation reads
line = app.GetCalcRelevantObjects("*.ElmLne")[0]
ev = events.CreateObject("EvtSwitch", "My switch event")
ev.SetAttribute("p_target", line)
app.SetAttributeModeInternal(1) # write the time in seconds, whatever unit the project shows
ev.SetAttribute("time", 1.0)
app.SetAttributeModeInternal(0)
ev.SetAttribute("i_switch", 0) # 0 opens, 1 closes
ev.SetAttribute("i_allph", 1) # all phases
- Times are written in the unit the project shows (some show milliseconds);
SetAttributeModeInternal(1)makes it seconds. A fault is cleared by a secondEvtShcwithi_shc4:i_clearShcdoes not clear it in an RMS or EMT run.
EvtSwitch event parameters
Set these on the event before the simulation runs. Names are typed without the e: shown in variable lists.
| Attribute | Unit | Description |
|---|---|---|
outserv | · | Out of Service |
mtime | min | Execution time (absolute, in minutes) |
hrtime | h | Execution time (absolute, in hours) |
i_switch | · | Action |
i_allph | · | All phases |
i_a | · | Phase a |
i_b | · | Phase b |
i_c | · | Phase c |
i_n | · | Neutral |
i_inst | · | Trigger closing at |
i_phase | · | Trigger on phase |
i_open | · | Trigger opening at |
i_scheme | · | Scheme |
ctrl_type | · | Used in Step |
i_halfw | · | Consider half wave |
i_larlow | · | Larger or lower than threshold |
time | s | Execution time (absolute) |
v_lim | p.u. | Amplitude threshold |
d_2ndph | ms | Second phase trigger |
d_3rdph | ms | Third phase trigger |
d_nph | ms | Neutral delay |
tDateTime | · | Execution Time |
p_target | · | Breaker or ElementObject: StaSwitch,StaCubic,RelFuse,Elm* |
p_from | · | Event defined byObject: Elm* |
dtime | s | Execution time (relative to now) |
tact | s | Now (current simulation time) |
dmtime | min | Execution time (relative to now, in minutes) |
mtact | min | Now (current simulation time, in minutes) |
dhrtime | h | Execution time (relative to now, in hours) |
hrtact | h | Now (current simulation time, in hours) |
Ilim | A | Current threshold (abs.) |
Ulim | kV | Voltage threshold (abs.) |
Related
- All 73 classes in the attribute reference
- RMS and EMT simulation batch runs in Python
- PowerFactory Python API: getting started
← EvtShc Short-Circuit Event · EvtSym Synchronous Machine Event →