Menu

How to control spefic loads by using Python API

Beginners
2021-02-18
2021-02-19
  • IN KWON PARK

    IN KWON PARK - 2021-02-18

    Hello there,

    Would you allow me to ask this question?

    In my openDSS file, a series of loads were added to a 3-phase bus (or collection of nodes) in this way:

    New Load.671 Bus1=671.1.2.3 Phases=3 Conn=Delta Model=1 kV=4.16 kW=1155 kvar=660
    New Load.671a Bus1=671.1 Phases=1 Conn=Wye Model=1 kV=4.16 kW=1 kvar=1
    New Load.671b Bus1=671.2 Phases=1 Conn=Wye Model=1 kV=4.16 kW=1 kvar=1
    New Load.671c Bus1=671.3 Phases=1 Conn=Wye Model=1 kV=4.16 kW=1 kvar=1

    Then, if I run these lines through the Python interface, what would happen?

    dssCircuit.SetActiveBus('671.1') 
    dssCircuit.Loads.kW     = 1000.0;
    dssCircuit.Loads.kvar   = 500.0;
    

    What I wanted to do is control 'Load.671a' only, but in the codewise, I cannot find the necessary distinction between 'Load.671' and 'Load.671a'.

    Best Regards,

    In Kwon Park

     
    • Davis Montenegro

      Hello,

      Well, that's because you are doing it incorrectly. To select a load, you have to activate the load, not the bus, buses are not objects and are only used as a reference across the model. So, if you want to control load 671, do as follows:

      dssCircuit.Loads.Name = '671'; 
      dssCircuit.Loads.kW     = 1000.0;
      dssCircuit.Loads.kvar   = 500.0;
      

      To go for load 671a, do as follows:

       dssCircuit.Loads.Name = '671a'; 
      dssCircuit.Loads.kW     = 1000.0;
      dssCircuit.Loads.kvar   = 500.0;
      

      Please check the COM help file.

      Best regards

      Davis

       
  • IN KWON PARK

    IN KWON PARK - 2021-02-18

    Hello,

    Thank you for your answers!
    Certainly, I'll check the COM help file.

    Best Regards,

    In Kwon Park

     
  • Roger Dugan

    Roger Dugan - 2021-02-19

    You have the wrong voltage for the three 1-phase loads. Should be kV=2.4.

     
  • IN KWON PARK

    IN KWON PARK - 2021-02-19

    Yes. You are absolutely right. It was my mistake, a result from careless copy and paste.

    In Kwon Park

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.