ams.core.service.MinDur#

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

Build the coefficient matrix for minimum online/offline constraints used in UC.

Note: inherits from NumOpDual for parameter plumbing only. The parent's fun/rfun/args machinery is unused; this class fully overrides .v to build the duration matrix from u (a horizon-bearing Var) and u2 (a RParam carrying the minimum duration in time units).

Parameters:
uCallable

Input, should be a Var with horizon.

u2Callable

Input2, should be a RParam.

namestr, optional

Instance name.

tex_namestr, optional

TeX name.

unitstr, optional

Unit.

infostr, optional

Description.

vtypeType, optional

Variable type.

no_parse: bool, optional

True to skip parsing the service.

sparse: bool, optional

True to return output as scipy csr_matrix.

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

Methods

assign_memory(n)

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

evaluate(*args, **kwargs)

get_all_idxes()

Return all the indexes of this item.

get_idx()

get_names()

Return name in a list

parse(*args, **kwargs)

update()

Update the Parameter value.

Attributes

class_name

Return the class name

e

Return the calculated numerical value of the underlying expression.

formulation_source

Where the live CVXPY object for this item came from.

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