ams.opt.optzbase.OptzBase#

class ams.opt.optzbase.OptzBase(name: str | None = None, info: str | None = None, unit: str | None = None, model: str | None = None)[source]#

Base class for optimization elements. Ensure that symbols are generated before calling the parse method. Parsing before symbol generation can lead to incorrect results.

Parameters:
namestr, optional

Name of the optimization element.

infostr, optional

Descriptive information about the optimization element.

unitstr, optional

Unit of measurement for the optimization element.

Attributes:
rtnams.routines.Routine

The owner routine instance.

__init__(name: str | None = None, info: str | None = None, unit: str | None = None, model: str | None = None)[source]#

Methods

evaluate(*args, **kwargs)

get_all_idxes()

Return all the indexes of this item.

get_idx()

parse(*args, **kwargs)

Attributes

class_name

Return the class name

n

Return the number of elements.

shape

Return the shape.

size

Return the size.