def bus_zsc_refresh(self) -> int: """Recomputes Zsc for active bus for present circuit configuration. Return 1 if the procedure was successful.""" result = self.dss_obj.BUSI(1, 0) Base.check_assertion_result(result, "Zsc recomputes failed!", "Zsc can not be recomputed!", expected_value=1) return result
def bus_coord_defined(self) -> int: """Returns 1 if a coordinate has been defined for this bus; otherwise, it will return 0.""" result = self.dss_obj.BUSI(2, 0) Base.check_assertion_result(result, "Bus coordinate not defined!", "Bus coordinates not find! The program " "will run normally", expected_value=1) return result
def capacitors_add_step(self) -> int: """Adds one step of the capacitor if available. If successful returns 1.""" result = self.dss_obj.CapacitorsI(7, 0) Base.check_assertion_result(result, "Capacitor step problem detect!", "A problem occur when tried to adds " "step to a capacitor. Check capacitor/" "bank capacitor existence or available " "steps!", expected_value=1) return result
def capacitors_subtract_step(self) -> int: """Subtracts one step of the capacitor if available. If no more steps, returns 0.""" result = self.dss_obj.CapacitorsI(8, 0) Base.check_assertion_result(result, "Capacitor step problem detect!", "A problem occur when tried to subtract " "step to a capacitor. Check capacitor/" "bank capacitor existence or available " "steps!", expected_value=1) return result
def bus_write_y(self, param_coordinate: float) -> int: """Allows to write the Y coordinate for the bus. Returns 0. :param param_coordinate: The Y coordinate, if it's None, Y will be 0.0 """ param_coordinate = Base.check_float_param(param_coordinate) result = self.dss_obj.BUSF(4, ctypes.c_double(param_coordinate)) Base.check_assertion_result( result, "Write Y coordinate failed!", "Something wrong when tried defined the Y " "coordinate!") return result