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

AttributeUnitDescriptionWhere
p_target·Breaker or Elementbreaker or elementevent data
timesExecution time (absolute)event data
i_switch·Actionopen or closeevent data
i_allph·All phasesevent data
outserv·Out of Serviceevent 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 second EvtShc with i_shc 4: i_clearShc does 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.

AttributeUnitDescription
outserv·Out of Service
mtimeminExecution time (absolute, in minutes)
hrtimehExecution 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
timesExecution time (absolute)
v_limp.u.Amplitude threshold
d_2ndphmsSecond phase trigger
d_3rdphmsThird phase trigger
d_nphmsNeutral delay
tDateTime·Execution Time
p_target·Breaker or ElementObject: StaSwitch,StaCubic,RelFuse,Elm*
p_from·Event defined byObject: Elm*
dtimesExecution time (relative to now)
tactsNow (current simulation time)
dmtimeminExecution time (relative to now, in minutes)
mtactminNow (current simulation time, in minutes)
dhrtimehExecution time (relative to now, in hours)
hrtacthNow (current simulation time, in hours)
IlimACurrent threshold (abs.)
UlimkVVoltage threshold (abs.)

Related

← EvtShc Short-Circuit Event · EvtSym Synchronous Machine Event →