Exemplo n.º 1
0
 def circuit_all_node_vmag_pu_by_phase(self,
                                       argument: int = 1) -> List[float]:
     """Returns array of doubles representing the voltage magnitudes (in per unit) for nodes on the specified phase.
     The phase must be specified in the Argument2."""
     argument = Base.check_int_param(argument,
                                     default=1)  # Phase 1 as default
     return Bridge.VarArrayFunction(self.dss_obj.CircuitV, 15, argument, '')
Exemplo n.º 2
0
 def circuit_all_node_distances_by_phase(self,
                                         argument: int = 1) -> List[float]:
     """Returns array of doubles representing the distances to parent EnergyMeter. Sequence of array corresponds to
     other node ByPhase properties. Argument2 must contain the number of the phase to return."""
     argument = Base.check_int_param(argument,
                                     default=1)  # Phase 1 as default
     return Bridge.VarArrayFunction(self.dss_obj.CircuitV, 16, argument, '')
Exemplo n.º 3
0
    def bus_get_unique_node_number(self, start_number: int = 0) -> int:
        """Returns a unique node number at the active bus to avoid node collisions and adds it to the node list for
        the bus. The start number can be specified in the second parameter.

        :param start_number: The first number corresponding the initial bus node number
        :returns: int
        :rtype: int
        """
        start_number = Base.check_int_param(start_number)
        return self.dss_obj.BUSI(3, start_number)
Exemplo n.º 4
0
 def relays_write_switched_term(self, argument) -> int:
     """Sets the number of terminal of the switched object that will be opened when the relay trips."""
     argument = Base.check_int_param(argument)
     return self.dss_obj.RelaysI(ctypes.c_int32(6),
                                 ctypes.c_int32(argument))
Exemplo n.º 5
0
 def write_npts(self, argument) -> int:
     """Sets the number of points in X-Y curve."""
     argument = Base.check_int_param(argument)
     return self.dss_obj.XYCurveI(ctypes.c_int32(4), ctypes.c_int32(argument))
Exemplo n.º 6
0
 def swtcontrols_write_is_locked(self, argument) -> int:
     """Sets the lock to prevent both manual and automatic switch operation. """
     argument = Base.check_int_param(argument)
     return self.dss_obj.SwtControlsI(ctypes.c_int32(5),
                                      ctypes.c_int32(argument))
Exemplo n.º 7
0
 def generators_write_idx(self, argument: int) -> int:
     """Sets the active generator (argument) by Index into generators list. 1..Count."""
     argument = Base.check_int_param(argument, 1)
     return self.dss_obj.GeneratorsI(ctypes.c_int32(8),
                                     ctypes.c_int32(argument))
Exemplo n.º 8
0
 def linecodes_write_units(self, argument: int) -> int:
     """Sets the units of the active LineCode. The units must be specified as an integer in the argument.
     Please refer to the OpenDSS User manual for more information."""
     argument = Base.check_int_param(argument)
     return self.dss_obj.LineCodesI(ctypes.c_int32(4),
                                    ctypes.c_int32(argument))
Exemplo n.º 9
0
 def settings_write_ckt_model(self, argument) -> int:
     """Sets {dssMultiphase* | dssPositiveSeq} Indicate if the circuit model is positive sequence."""
     argument = Base.check_int_param(argument)
     return self.dss_obj.SettingsI(ctypes.c_int32(5),
                                   ctypes.c_int32(argument))
Exemplo n.º 10
0
 def solution_write_control_iterations(self, argument) -> int:
     """Modifies the current value of the control iteration counter. """
     argument = Base.check_int_param(argument)
     return int(
         self.dss_obj.SolutionI(ctypes.c_int32(23),
                                ctypes.c_int32(argument)))
Exemplo n.º 11
0
 def solution_write_control_mode(self, argument) -> int:
     """Modifies the mode for control devices: {dssStatic (default) | dssEvent | dssTime}. """
     argument = Base.check_int_param(argument)
     return int(
         self.dss_obj.SolutionI(ctypes.c_int32(21),
                                ctypes.c_int32(argument)))
Exemplo n.º 12
0
 def solution_write_algorithm(self, argument) -> int:
     """Modifies the base solution algorithm: {dssNormalSolve | dssNewtonSolve}. """
     argument = Base.check_int_param(argument)
     return int(
         self.dss_obj.SolutionI(ctypes.c_int32(19),
                                ctypes.c_int32(argument)))
Exemplo n.º 13
0
 def solution_write_add_type(self, argument) -> int:
     """Modifies the type of device to add in AutoAdd Mode: {dssGen (default)|dssCap}. """
     argument = Base.check_int_param(argument)
     return int(
         self.dss_obj.SolutionI(ctypes.c_int32(17),
                                ctypes.c_int32(argument)))
Exemplo n.º 14
0
 def solution_write_load_model(self, argument) -> int:
     """Modifies the Load Model: {dssPowerFlow (default)|dssAdmittance}. """
     argument = Base.check_int_param(argument)
     return int(
         self.dss_obj.SolutionI(ctypes.c_int32(15),
                                ctypes.c_int32(argument)))
Exemplo n.º 15
0
 def fuses_write_idx(self, argument: int) -> int:
     """Sets the active fuse by index into the list of fuses. 1 based: 1..count."""
     argument = Base.check_int_param(argument, default=1)
     return self.dss_obj.FusesI(ctypes.c_int32(11), ctypes.c_int32(argument))
Exemplo n.º 16
0
 def settings_write_allowd_uplicates(self, argument) -> int:
     """Sets if OpenDSS allows duplicate names of objects: {1 allow, 0 not allow}."""
     argument = Base.check_int_param(argument)
     return self.dss_obj.SettingsI(ctypes.c_int32(1),
                                   ctypes.c_int32(argument))
Exemplo n.º 17
0
 def settings_write_zone_lock(self, argument) -> int:
     """Sets the status of Lock zones on energy meters to prevent rebuilding if a circuit change occurs: {1= true,
     0= False}. """
     argument = Base.check_int_param(argument)
     return self.dss_obj.SettingsI(ctypes.c_int32(3),
                                   ctypes.c_int32(argument))
Exemplo n.º 18
0
 def solution_write_maxcontrol_iterations(self, argument) -> int:
     """Modifies the maximum allowable control iterations. """
     argument = Base.check_int_param(argument)
     return int(
         self.dss_obj.SolutionI(ctypes.c_int32(25),
                                ctypes.c_int32(argument)))
Exemplo n.º 19
0
 def settings_write_trapezoidal(self, argument) -> int:
     """Sets {True (1) | False (0)} value of trapezoidal integration flag in Energy Meters."""
     argument = Base.check_int_param(argument)
     return self.dss_obj.SettingsI(ctypes.c_int32(7),
                                   ctypes.c_int32(argument))
Exemplo n.º 20
0
 def solution_write_converged(self, argument) -> int:
     """Modifies the converged flag (1 converged | 0 not converged). """
     argument = Base.check_int_param(argument)
     return int(
         self.dss_obj.SolutionI(ctypes.c_int32(39),
                                ctypes.c_int32(argument)))
Exemplo n.º 21
0
 def generators_write_phases(self, argument: int) -> int:
     """Sets the number of phases (argument) of the active generator."""
     argument = Base.check_int_param(argument, 1)  # Phase 1 as default
     return self.dss_obj.GeneratorsI(ctypes.c_int32(5),
                                     ctypes.c_int32(argument))
Exemplo n.º 22
0
 def solution_write_control_actions_done(self, argument) -> int:
     """Modifies the flag to indicate that the control actions are done: {1 done, 0 not done}. """
     argument = Base.check_int_param(argument)
     return int(
         self.dss_obj.SolutionI(ctypes.c_int32(43),
                                ctypes.c_int32(argument)))
Exemplo n.º 23
0
 def swtcontrols_write_action(self, argument) -> int:
     """Sets open (1) or close (2) the switch. No effect if switch is locked. However,
     reset removes any lock and then closes the switch (shelf state). 0 = none action (see manual for details). """
     argument = Base.check_int_param(argument)
     return self.dss_obj.SwtControlsI(ctypes.c_int32(3),
                                      ctypes.c_int32(argument))
Exemplo n.º 24
0
 def solution_write_year(self, argument) -> int:
     """Modifies the present Year (See DSS help). """
     argument = Base.check_int_param(argument)
     return int(
         self.dss_obj.SolutionI(ctypes.c_int32(6),
                                ctypes.c_int32(argument)))
Exemplo n.º 25
0
 def swtcontrols_write_switched_term(self, argument) -> int:
     """Sets the terminal number where the switch is located on the SwitchedObj. """
     argument = Base.check_int_param(argument)
     return self.dss_obj.SwtControlsI(ctypes.c_int32(7),
                                      ctypes.c_int32(argument))
Exemplo n.º 26
0
 def solution_write_max_iterations(self, argument) -> int:
     """Modifies the Maximum number of iterations used to solve the circuit. """
     argument = Base.check_int_param(argument)
     return int(
         self.dss_obj.SolutionI(ctypes.c_int32(9),
                                ctypes.c_int32(argument)))
Exemplo n.º 27
0
 def relays_write_monitored_term(self, argument) -> int:
     """Sets the number of terminal of monitored element that this relay is monitoring."""
     argument = Base.check_int_param(argument)
     return self.dss_obj.RelaysI(ctypes.c_int32(4),
                                 ctypes.c_int32(argument))
Exemplo n.º 28
0
 def solution_write_number(self, argument) -> int:
     """Modifies the number of solutions to perform for MonteCarlo and time series simulations. """
     argument = Base.check_int_param(argument)
     return int(
         self.dss_obj.SolutionI(ctypes.c_int32(11),
                                ctypes.c_int32(argument)))
Exemplo n.º 29
0
 def relays_write_idx(self, argument) -> int:
     """Sets the active relay by index into the Relay list. 1..Count."""
     argument = Base.check_int_param(argument)
     return self.dss_obj.RelaysI(ctypes.c_int32(8),
                                 ctypes.c_int32(argument))
Exemplo n.º 30
0
 def solution_write_random(self, argument) -> int:
     """Modifies the randomization mode for random variables "Gaussian" o "Uniform". """
     argument = Base.check_int_param(argument)
     return int(
         self.dss_obj.SolutionI(ctypes.c_int32(13),
                                ctypes.c_int32(argument)))