AGTControlMechanism¶
Contents¶
Overview¶
An AGTControlMechanism is a ControlMechanism that uses an ObjectiveMechanism with a DualAdaptiveIntegrator
Function to regulate its control_allocation. When used with an LCControlMechanism
to regulate the mode parameter of its FitzHughNagumoIntegrator Function, it implements a form of the
Adaptive Gain Theory of the locus
coeruleus-norepinephrine (LC-NE) system.
Creating an AGTControlMechanism¶
An AGTControlMechanism can be created in any of the ways used to create a ControlMechanism.
Like all ControlMechanisms, an AGTControlMechanism it receives its input from an ObjectiveMechanism.
However, unlike standard ControlMechanism, an AGTControlMechanism does not have an objective_mechanism argument in its
constructor. When an AGTControlMechanism is created, it automatically creates an ObjectiveMechanism and assigns a
DualAdaptiveIntegrator Function as its function.
The OutputPorts to be monitored by the AGTControlMechanism’s objective_mechanism are
specified using the monitored_output_ports argument of the AGTControlMechanism’s constructor, using any of the ways to
specify the OutputPorts monitored by ObjectiveMechanism. The
monitored OutputPorts are listed in the LCControlMechanism’s monitored_output_ports
attribute, as well as that of its objective_mechanism.
The parameter(s) controlled by an AGTControlMechanism are specified in the control_signals argument of its constructor, in the standard way for a ControlMechanism.
Structure¶
Input: ObjectiveMechanism and Monitored OutputPorts¶
An AGTControlMechanism has a single (primary) InputPort that receives its input via a
MappingProjection from the OUTCOME OutputPort of an ObjectiveMechanism. The
ObjectiveMechanism is created automatically when the AGTControlMechanism is created, using a DualAdaptiveIntegrator
as its function, and is listed in the AGTControlMechanism’s objective_mechanism attribute. The ObjectiveMechanism aggregates the values of the OutputPorts that it monitors, integrates their aggregated value at two different
rates, and combines those to generate the its output, which is used by the AGTControlMechanism as its input. The
OutputPorts monitored by the ObjectiveMechanism, listed in its monitored_output_ports attribute, are also listed in the AGTControlMechanism’s
monitored_output_ports attribute. They can be displayed using
the AGTControlMechanism’s show method.
Function¶
An AGTControlMechanism uses the default function for a ControlMechanism (a default Linear Function), that simply passes
its input to its output. Thus, it is the output of the AGTControlMechanism’s objective_mechanism that determines its control_allocation
and the allocation of its ControlSignal(s).
Output¶
An AGTControlMechanism has a ControlSignal for each parameter specified in its control_signals attribute, that sends a ControlProjection to the ParameterPort for the
corresponding parameter. ControlSignals are a type of OutputPort, and so they are also listed in the
AGTControlMechanism’s output_ports attribute. The parameters modulated by an
AGTControlMechanism’s ControlSignals can be displayed using its show method. By default,
all of its ControlSignals are assigned the result of the AGTControlMechanism’s function, which is
the input it receives from its objective_mechanism.
above). The allocation is used by the ControlSignal(s) to determine
their intensity, which is then assigned as the value of the
ControlSignal’s ControlProjection. The value of the ControlProjection is used by the
ParameterPort to which it projects to modify the value of the parameter it controls (see
Modulation for description of how a ControlSignal modulates the value of a parameter).
Execution¶
An AGTControlMechanism’s function takes as its input the value
of its OUTCOME input_port, and uses that to determine its control_allocation which specifies the value assigned to the allocation of each of
its ControlSignals. An AGTControlMechanism assigns the same value (the input it receives from its objective_mechanism to
all of its ControlSignals. Each ControlSignal uses that value to calculate its intensity,
which is used by its ControlProjection(s) to modulate the value of the ParameterPort(s) for the
parameter(s) it controls, which are then used in the subsequent TRIAL of execution.
Note
A ParameterPort that receives a ControlProjection does not update its value until its owner Mechanism executes (see Lazy Evaluation for an explanation of “lazy” updating). This means that even if a ControlMechanism has executed, a parameter that it controls will not assume its new value until the Mechanism to which it belongs has executed.
Class Reference¶
- class psyneulink.library.components.mechanisms.modulatory.control.agt.agtcontrolmechanism.AGTControlMechanism(monitored_output_ports=None, function=None, control_signals=None, modulation=None, params=None, name=None, prefs=None)¶
Subclass of ControlMechanism that modulates the multiplicative_param of the
functionof one or more Mechanisms. See ControlMechanism for additional arguments and attributes.- Parameters:
monitored_output_ports (List[OutputPort, Mechanism, str, value, dict,
MonitoredOutputPortsOption] or Dict) – specifies the OutputPorts to be monitored by theobjective_mechanism(seemonitored_output_portsfor details of specification).control_signals (List[ParameterPort, tuple[str, Mechanism] or dict]) – specifies the parameters to be controlled by the AGTControlMechanism; a ControlSignal is created for each (see Specifying ControlSignals for details of specification).
- objective_mechanism¶
ObjectiveMechanism that monitors and evaluates the values specified in the ControlMechanism’s objective_mechanism argument, the output of which is used as input to the AGTControlMechanism. It is created automatically when AGTControlMechanism is created, and uses as a
DualAdaptiveIntegratoras isfunction.- Type:
- monitored_output_ports¶
each item is an OutputPort monitored by the
objective_mechanism; it is the same as the ObjectiveMechanism’smonitored_output_portsattribute. Thevalueof the OutputPorts listed are used by the ObjectiveMechanism to generate the AGTControlMechanism’s input.- Type:
List[OutputPort]
- monitored_output_ports_weights_and_exponents¶
each tuple in the list contains the weight and exponent associated with a corresponding item of
monitored_output_ports; these are the same as those in themonitored_output_ports_weights_and_exponentsattribute of theobjective_mechanism, and are used by the ObjectiveMechanism’sfunctionto parametrize the contribution made to its output by each of the values that it monitors (see ObjectiveMechanism Function).- Type:
List[Tuple(float, float)]
- _validate_params(request_set, target_set=None, context=None)¶
Validate SYSTEM, MONITOR_FOR_CONTROL and CONTROL_SIGNALS
Check that all items in MONITOR_FOR_CONTROL are Mechanisms or OutputPorts for Mechanisms in self.system Check that every item in
modulated_mechanismsis a Mechanismand that its function has a multiplicative_param
- show()¶
Display the OutputPorts monitored by the AGTControlMechanism’s
objective_mechanismand the multiplicative_params modulated by the AGTControlMechanism.
- exception psyneulink.library.components.mechanisms.modulatory.control.agt.agtcontrolmechanism.AGTControlMechanismError(message, data=None)¶