Ejemplo n.º 1
0
def check_controls():
    """This parameter performs the normal process for sampling and executing Control Actions and Fault Status and rebuilds Y if necessary."""
    return dsslib.SolutionI(ctypes.c_int32(33), ctypes.c_int32(0))
Ejemplo n.º 2
0
def get_load_model():
    """This parameter returns the Load Model: {dssPowerFlow (default)|dssAdmittance}."""
    return dsslib.SolutionI(ctypes.c_int32(14), ctypes.c_int32(0))
Ejemplo n.º 3
0
def get_algorithm():
    """This parameter returns the base solution algorithm: {dssNormalSolve | dssNewtonSolve}."""
    return dsslib.SolutionI(ctypes.c_int32(18), ctypes.c_int32(0))
Ejemplo n.º 4
0
def get_number():
    """This parameter returns the number of solutions to perform for MonteCarlo and time series simulations."""
    return dsslib.SolutionI(ctypes.c_int32(10), ctypes.c_int32(0))
Ejemplo n.º 5
0
def get_random():
    """This parameter returns the randomization mode for random variables "Gaussian" o "Uniform"."""
    return dsslib.SolutionI(ctypes.c_int32(12), ctypes.c_int32(0))
Ejemplo n.º 6
0
def set_year(year):
    """This parameter modifies the present Year (See DSS help)."""
    return dsslib.SolutionI(ctypes.c_int32(6), ctypes.c_int32(year))
Ejemplo n.º 7
0
def get_max_iterations():
    """This parameter returns the Maximum number of iterations used to solve the circuit."""
    return dsslib.SolutionI(ctypes.c_int32(8), ctypes.c_int32(0))
Ejemplo n.º 8
0
def get_converged():
    """This parameter indicates whether the circuit solution converged (1 converged | 0 not converged)."""
    return dsslib.SolutionI(ctypes.c_int32(38), ctypes.c_int32(0))
Ejemplo n.º 9
0
def set_converged(converged=1):
    """This parameter modifies the converged flag (1 converged | 0 not converged)."""
    return dsslib.SolutionI(ctypes.c_int32(39), ctypes.c_int32(converged))
Ejemplo n.º 10
0
def build_y_matrix(whole_matrix=True):
    """This parameter forces building of the System Y matrix according to the argument: {1= series elements only | 2= Whole Y matrix}."""
    if whole_matrix:
        return dsslib.SolutionI(ctypes.c_int32(36), ctypes.c_int32(2))
    else:
        return dsslib.SolutionI(ctypes.c_int32(36), ctypes.c_int32(1))
Ejemplo n.º 11
0
def system_y_changed():
    """This parameter indicates if elements of the System Y have been changed by recent activity. If changed returns 1; otherwise 0."""
    return dsslib.SolutionI(ctypes.c_int32(37), ctypes.c_int32(0))
Ejemplo n.º 12
0
def do_control_actions():
    """This parameter pops control actions off the control queue and dispatches to the proper control element."""
    return dsslib.SolutionI(ctypes.c_int32(35), ctypes.c_int32(0))
Ejemplo n.º 13
0
def sample_control_devices():
    """This parameter executes a sampling of all intrinsic control devices, which push control actions into the control queue."""
    return dsslib.SolutionI(ctypes.c_int32(34), ctypes.c_int32(0))
Ejemplo n.º 14
0
def get_mode():
    """This parameter returns the present solution mode (See DSS help)."""
    return dsslib.SolutionI(ctypes.c_int32(1), ctypes.c_int32(0))
Ejemplo n.º 15
0
def set_hour(hour):
    """This parameter modifies the present hour (See DSS help)."""
    return dsslib.SolutionI(ctypes.c_int32(4), ctypes.c_int32(hour))
Ejemplo n.º 16
0
def total_iterations():
    """This parameter returns the total iterations including control iterations for most recent solution."""
    return dsslib.SolutionI(ctypes.c_int32(40), ctypes.c_int32(0))
Ejemplo n.º 17
0
def get_year():
    """This parameter returns the present Year (See DSS help)."""
    return dsslib.SolutionI(ctypes.c_int32(5), ctypes.c_int32(0))
Ejemplo n.º 18
0
def most_iterations_done():
    """This parameter returns the max number of iterations required to converge at any control iteration of the most recent solution."""
    return dsslib.SolutionI(ctypes.c_int32(41), ctypes.c_int32(0))
Ejemplo n.º 19
0
def iterations():
    """This parameter return the number of iterations taken for the last solution."""
    return dsslib.SolutionI(ctypes.c_int32(7), ctypes.c_int32(0))
Ejemplo n.º 20
0
def get_control_actions_done():
    """This parameter indicates that the control actions are done: {1 done, 0 not done}."""
    return dsslib.SolutionI(ctypes.c_int32(42), ctypes.c_int32(0))
Ejemplo n.º 21
0
def set_max_iterations(max_iterations):
    """This parameter modifies the Maximum number of iterations used to solve the circuit."""
    return dsslib.SolutionI(ctypes.c_int32(9), ctypes.c_int32(max_iterations))
Ejemplo n.º 22
0
def set_mode(mode):
    """This parameter modifies the present solution mode (See DSS help)."""
    return dsslib.SolutionI(ctypes.c_int32(2), ctypes.c_int32(mode))
Ejemplo n.º 23
0
def set_number(number):
    """This parameter modifies the number of solutions to perform for MonteCarlo and time series simulations."""
    return dsslib.SolutionI(ctypes.c_int32(11), ctypes.c_int32(number))
Ejemplo n.º 24
0
def set_control_actions_done(control_actions_done=1):
    """This parameter modifies the flag to indicate that the control actions are done: {1 done, 0 not done}."""
    return dsslib.SolutionI(ctypes.c_int32(43),
                            ctypes.c_int32(control_actions_done))
Ejemplo n.º 25
0
def set_random(random):
    """This parameter modifies the randomization mode for random variables "Gaussian" o "Uniform"."""
    return dsslib.SolutionI(ctypes.c_int32(13), ctypes.c_int32(random))
Ejemplo n.º 26
0
def finish_time_step():
    """This parameter call cleanup, sample monitors, and increment time at end of time step."""
    return dsslib.SolutionI(ctypes.c_int32(44), ctypes.c_int32(0))
Ejemplo n.º 27
0
def set_load_model(load_model):
    """This parameter modifies the Load Model: {dssPowerFlow (default)|dssAdmittance}."""
    return dsslib.SolutionI(ctypes.c_int32(15), ctypes.c_int32(load_model))
Ejemplo n.º 28
0
def cleanup():
    """This parameter update storage, invcontrol, etc., at end of time step."""
    return dsslib.SolutionI(ctypes.c_int32(45), ctypes.c_int32(0))
Ejemplo n.º 29
0
def set_algorithm(algorithm):
    """This parameter modifies the base solution algorithm: {dssNormalSolve | dssNewtonSolve}."""
    return dsslib.SolutionI(ctypes.c_int32(19), ctypes.c_int32(algorithm))
Ejemplo n.º 30
0
def init_snap():
    """This parameter initializes some variables for snap shot power flow. SolveSnap does this automatically."""
    return dsslib.SolutionI(ctypes.c_int32(32), ctypes.c_int32(0))