andes.core.service.BaseService#

class andes.core.service.BaseService(name: Optional[str] = None, tex_name: Optional[str] = None, unit: Optional[str] = None, info: Optional[str] = None, vtype: Optional[Type] = None)[source]#

Base class for Service.

Service is a v-provider type for holding internal and temporary values. Subclasses need to implement v as a member attribute or using a property decorator.

Parameters
namestr

Instance name

Attributes
ownerModel

The hosting/owner model instance

__init__(name: Optional[str] = None, tex_name: Optional[str] = None, unit: Optional[str] = None, info: Optional[str] = None, vtype: Optional[Type] = None)[source]#

Methods

assign_memory(n)

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

get_names()

Return name in a list

Attributes

class_name

Return the class name

n

Return the count of values in self.v.