ams.routines.RoutineModel#
- class ams.routines.RoutineModel(system=None, config=None)[source]#
Class to hold descriptive routine models and data mapping.
Methods
addConstrs(name, e_str[, info, type])Add Constraint to the routine.
addRParam(name[, tex_name, info, src, unit, ...])Add RParam to the routine.
addService(name, value[, tex_name, unit, ...])Add ValueService to the routine.
addVars(name[, model, shape, tex_name, ...])Add a variable to the routine.
dc2ac(**kwargs)Convert the DC-based results with ACOPF.
disable(name)Disable a constraint by name.
doc([max_width, export])Retrieve routine documentation as a string.
enable(name)Enable a constraint by name.
export_csv([path])Export dispatch results to a csv file.
get(src, idx[, attr, horizon])Get the value of a variable or parameter.
get_load(horizon, src[, attr, idx, model, ...])Get the load value by applying zonal scaling factor defined in
Horizon.igmake([directed])Build an igraph object from the system.
igraph([input, ytimes, decimal, directed, ...])Plot a system uging g.plot() of igraph, with optional input.
init([force, no_code])Initialize the routine.
prepare()Prepare the routine.
run([force_init, no_code])Run the routine.
set(src, idx[, attr, value])Set the value of an attribute of a routine parameter.
solve(**kwargs)Solve the routine optimization model.
summary(**kwargs)Summary interface
unpack(**kwargs)Unpack the results.
update([params, mat_make])Update the values of Parameters in the optimization model.
Attributes