daily pastebin goal
90%
SHARE
TWEET

Untitled

a guest May 16th, 2018 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. buses = app.GetCalcRelevantObjects("*.ElmTerm")
  2.    
  3.    
  4. events_folder = app.GetFromStudyCase('IntEvt');  # to get events folder
  5.    
  6. evt1 = events_folder.CreateObject('EvtShc', 'short circuit');  # generator switch event is created here
  7. evt1[0].p_target = buses[1]   # event target is the 1 bus
  8. evt1[0].time = 1.0 # short circuit starts at t=1 s
  9. evt1[0].i_shc = 0
  10.  
  11. evt2 = events_folder.CreateObject('EvtShc', 'clear short circuit');  # generator switch event is created here
  12. evt2[0].p_target = buses[1]   # event target is the 1 bus
  13. evt2[0].time = 1.0 + 0.1 # short circuit is cleared at t=1.1 s
  14. evt2[0].i_shc = 4
RAW Paste Data
Top