ams.core.service.ZonalSum#

class ams.core.service.ZonalSum(u: Callable, zone: str, name: str = None, tex_name: str = None, unit: str = None, info: str = None, vtype: Type = None, rfun: Callable = None, rargs: dict = None, no_parse: bool = False, sparse: bool = False)[source]#

Build zonal sum matrix for a vector in the shape of collection model, Area or Region. The value array is in the shape of (nr, nc), where nr is the length of rid instance idx, and nc is the length of the cid value.

In an IEEE-14 Bus system, we have the zonal definition by the Region model. Suppose in it we have two regions, "ZONE1" and "ZONE2".

Follwing it, we have a zonal SFR requirement model SFR that defines the zonal reserve requirements for each zone.

All 14 buses are classified to a zone by the IdxParam zone, and the 5 generators are connected to buses (idx): [2, 3, 1, 6, 8], and the zone of these generators are thereby: ['ZONE1', 'ZONE1', 'ZONE2', 'ZONE2', 'ZONE1'].

In the RTED model, we have the Vars pru and prd in the shape of generators.

Then, the Region model has idx ['ZONE1', 'ZONE2'], and the gsm value will be [[1, 1, 0, 0, 1], [0, 0, 1, 1, 0]].

Finally, the zonal reserve requirements can be formulated as constraints in the optimization problem: "gsm @ pru <= du" and "gsm @ prd <= dd".

See gsm definition in ams.routines.rted.RTEDModel for more details.

Parameters:
uCallable

Input.

zonestr

Zonal model name, e.g., "Area" or "Region".

namestr

Instance name.

tex_namestr

TeX name.

unitstr

Unit.

infostr

Description.

vtypeType

Variable type.

modelstr

Model name.

sparse: bool, optional

True to return output as scipy csr_matrix.

__init__(u: Callable, zone: str, name: str = None, tex_name: str = None, unit: str = None, info: str = None, vtype: Type = None, rfun: Callable = None, rargs: dict = None, no_parse: bool = False, sparse: bool = False)[source]#

Methods

assign_memory(n)

Assign memory for self.v and set the array to zero.

get_names()

Return name in a list

parse()

Parse the parameter.

update()

Update the Parameter value.

Attributes

class_name

Return the class name

n

Return the count of values in self.v.

shape

Return the shape of the service.

size

Return the size.

v

Value of the service.

v0

v1