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
NumOpDualfor parameter plumbing only. The parent'sfun/rfun/argsmachinery is unused; this class fully overrides.vto build the duration matrix fromu(a horizon-bearingVar) andu2(aRParamcarrying the minimum duration in time units).- Parameters:
- uCallable
Input, should be a
Varwith 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 for
self.vand set the array to zero.evaluate(*args, **kwargs)Return all the indexes of this item.
get_idx()Return name in a list
parse(*args, **kwargs)update()Update the Parameter value.
Attributes
Return the class name
Return the calculated numerical value of the underlying expression.
Where the live CVXPY object for this item came from.
Return the count of values in
self.v.Return the shape of the service.
Return the size.
Value of the service.