pingspice.circuit.av.AV_Maker(object)
class documentation
Part of pingspice.circuit.av
(View In Hierarchy)
Known subclasses: pingspice.circuit.elements.Elements
Abstract base class for things that want to be able to use an instance
of AV_Manager
to
generate AV objects.
I provide a convenient method call av
, which
constructs a new AV
object and appends it to the list unless it is a child copy.
Method | __init__ | Undocumented |
Method | av | Call this to set a device value, or device or parameter value, to an alterable value you will later identify by its name, the first (and possibly only) argument. |
Call this to set a device value, or device or parameter value, to an alterable value you will later identify by its name, the first (and possibly only) argument.
Arguments can be supplied as follows:
name
A special case is when you call this with just a name and haven't already defined an AV parent object with that name. The result is an orphan AV object that will get replaced once the parent is finally defined with its default or min, max arguments.
name, default
You can supply a default value with a single argument after the name. This is usually only useful if that single additional argument is a sequence. Then the alterable value has a range of 0-1 with equal-width subranges that are mapped to the sequence values during fitness evaluation. Otherwise, the AV object just has a single known value.
name, lower, upper
Typically, you will specify an acceptable range of values with two arguments after the name, lower and upper. Then the default will be considered the midpoint of that range.
name, lower, upper, seq, k
If the AV represents an alterable value inside a list (possibly with other AVs elsewhere in the list), follow the range lower and upper bounds with a reference seq to the list and an index k of where this AV object is in the list.
In any of these cases, the string 'log' can be included as a trailing argument to have the value considered to be in logarithmic space. Its value will be converted to 10^value during fitness evlution. (This is the "common" base-10 logarithm, not the natural logarithm. You can use the string 'log10' if it really makes you happy; it results in the same thing.)
Another possible trailing argument (with or without 'log', before or after) is 'hard'. Include that to indicate that lower and upper are hard limits that cannot be redefined expansively. If the 'hard' string is included, trying to redefine lower as a smaller value than original, or redefining upper as larger than originally, will raise an exception.
The return value of this method is an instance of AV
constructed to
uniquely identify this device value or device or parameter value.
All arguments but the name are ignored for a repeated call with the same name, which results in a child AV object (or a real value if known).