Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/control signal/add control arg #2272

Merged
merged 252 commits into from
Jan 3, 2022
Merged

Conversation

jdcpni
Copy link
Collaborator

@jdcpni jdcpni commented Jan 2, 2022

• controlsignal.py:

  • init(): replace modulates with control as arg (though still allow modulates)
  • allow CONTROL as alias for PROJECTIONS in ControlSignal spec

• gatingsignal.py:
  - init(): replace modulates with gate as arg

• gating mechanism.py:

  • add output_ports Parameter that allows GATE as alias for PROJECTIONS in specification dictionary

• test_projection_specifications.py:

  • add test_control_signal_projections_arg
  • add test_gating_signal_projections_arg
  • test_multiple_modulatory_projection_specs: add tests for gating specs

jdcpni added 30 commits April 30, 2021 17:20
  added feature_input_ports attribute and num_feature_input_ports property
  added feature_input_ports attribute and num_feature_input_ports property

• parameterestimationcomposition.py: fixed misplacement of its Parameters() attribute
  added feature_input_ports attribute and num_feature_input_ports property

• parameterestimationcomposition.py: fixed misplacement of its Parameters() attribute

• optimizationfunctions.py: made num_estimates a Parameter
  - _instantiate_control_signals: random_seeds -> random_seed_mod_values
  - _add_controller:  modifying to instantiate feature_input_ports if none are specified
  - add_controller:  now adds feature_input_ports for Compostion INPUT nodes if not state_features not specified
  - _add_controller:  modifying to instantiate feature_input_ports if none are specified
  - add_controller:  assign simulation_input_ports
  - feature_input_ports -> state_input_ports
  - _instantiate_input_ports():
      state_features only allowed to specifying state_input_ports if
      agent_rep is a CompositionFunctionApproximator (i.e., model-free optimization)

• composition.py:
  - add_controller: adds state_input_ports to shadow INPUT Nodes of Composition
    if controller.agent_rep is Composition (model-based optimziation)
    or state_features have not been specified (for model-free optimizaton)
  _instantiate_input_ports:
     reinstate allowance of state_features specification if agent_rep is a Composition
     (i.e., model-based optimization) as long as they are all INPUT Nodes of agent_rep
@github-actions
Copy link

github-actions bot commented Jan 2, 2022

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

diff -r docs-base/ControlSignal.html docs-head/ControlSignal.html
254c254
< controlled in the <strong>projections</strong> argument or <em>PROJECTIONS</em> entry, respectively, using any of the forms below.
---
> controlled are specified in the <strong>control</strong> argument or <em>CONTROL</em> entry, respectively, using any of the forms below.
314,315c314,315
< the <strong>projections</strong> argument of its constructor, or in an entry of a dictionary assigned to the <strong>params</strong> argument
< with the key <em>PROJECTIONS</em>.  These will be assigned to its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute.  See
---
> the <strong>control</strong> argument of its constructor, or in an entry of a dictionary assigned to the <strong>params</strong> argument
> with the key <em>CONTROL</em>.  These are assigned to its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute.  See
317c317
< creating a Port.</p>
---
> creating a Port, including <a class="reference internal" href="Port.html#port-modulatory-projections-examples"><span class="std std-ref">examples</span></a> of ControlProjection specification.</p>
497c497
< <span class="gp">... </span>                              <span class="n">control_signals</span><span class="o">=</span><span class="n">ControlSignal</span><span class="p">(</span><span class="n">modulates</span><span class="o">=</span><span class="p">(</span><span class="n">INTERCEPT</span><span class="p">,</span><span class="n">mech</span><span class="p">),</span>
---
> <span class="gp">... </span>                              <span class="n">control_signals</span><span class="o">=</span><span class="n">ControlSignal</span><span class="p">(</span><span class="n">control</span><span class="o">=</span><span class="p">(</span><span class="n">INTERCEPT</span><span class="p">,</span><span class="n">mech</span><span class="p">),</span>
540c540
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.ports.modulatorysignals.controlsignal.</span></span><span class="sig-name descname"><span class="pre">ControlSignal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_allocation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">defaultControlAllocation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">TransferWithCosts</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">costs_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Exponential</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">adjustment_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Linear</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">IntegratorFunction</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">combine_costs_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Reduce(operation=SUM)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allocation_samples</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">self.class_defaults.allocation_samples</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">modulates</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">projections</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.ports.modulatorysignals.controlsignal.ControlSignal" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.ports.modulatorysignals.controlsignal.</span></span><span class="sig-name descname"><span class="pre">ControlSignal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_allocation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">defaultControlAllocation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">TransferWithCosts</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">costs_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Exponential</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">adjustment_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Linear</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">IntegratorFunction</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">combine_costs_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Reduce(operation=SUM)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allocation_samples</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">self.class_defaults.allocation_samples</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">control</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">projections</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.ports.modulatorysignals.controlsignal.ControlSignal" title="Permalink to this definition">¶</a></dt>
561c561
< <li><p><strong>modulates</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="ControlProjection.html"><span class="doc">ControlProjection(s)</span></a> to be assigned to the ControlSignal, and that will be
---
> <li><p><strong>control</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="ControlProjection.html"><span class="doc">ControlProjection(s)</span></a> to be assigned to the ControlSignal, and that will be
diff -r docs-base/OptimizationControlMechanism.html docs-head/OptimizationControlMechanism.html
652a653,663
> <blockquote>
> <div><div class="admonition note">
> <p class="admonition-title">Note</p>
> <p>If a <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> other than an <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested</span></a>
> Composition is <a class="reference internal" href="ControlMechanism.html#controlmechanism-monitor-for-control"><span class="std std-ref">specified to be monitored</span></a>, it is assigned as a <a class="reference internal" href="Composition.html#id18" title="psyneulink.core.compositions.composition.NodeRole.PROBE"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PROBE</span></code></a> of that nested Composition. Although <a class="reference internal" href="Composition.html#id18" title="psyneulink.core.compositions.composition.NodeRole.PROBE"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PROBE</span></code></a> Nodes are generally treated
> like <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> Nodes (since they project out of the Composition to which they belong), their
> <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.value" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a> is not included in the <a class="reference internal" href="Composition.html#id0" title="psyneulink.core.compositions.composition.Composition.output_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">output_values</span></code></a> or <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.results" title="psyneulink.core.compositions.composition.Composition.results"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">results</span></code></a> attributes of the Composition for which the OptimizationControlMechanism is the
> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.controller" title="psyneulink.core.compositions.composition.Composition.controller"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">controller</span></code></a>, unless that Composition’s <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.include_probes_in_output" title="psyneulink.core.compositions.composition.Composition.include_probes_in_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">include_probes_in_output</span></code></a> attribute is set to True (see <code class="xref any docutils literal notranslate"><span class="pre">Composition_Probes</span></code> for additional
> information).</p>
> </div>
> </div></blockquote>
diff -r docs-base/Port.html docs-head/Port.html
744c744
< <span class="o">&gt;</span> <span class="n">MY</span> <span class="n">DDM</span> <span class="n">DRIFT</span> <span class="n">RATE</span> <span class="n">AND</span> <span class="n">THREHOLD</span> <span class="n">CONTROL</span> <span class="n">SIGNAL</span>
---
> <span class="o">&gt;</span> <span class="n">MY</span> <span class="n">DDM</span> <span class="n">DRIFT</span> <span class="n">RATE</span> <span class="n">AND</span> <span class="n">THRESHOLD</span> <span class="n">CONTROL</span> <span class="n">SIGNAL</span>
750,752c750,754
< uses <code class="xref any docutils literal notranslate"><span class="pre">ControlSignal</span></code> for its <a class="reference internal" href="OutputPort.html"><span class="doc">OutputPorts</span></a>.  In the example above,
< both ControlProjections are assigned to a single ControlSignal.  However, they could each be assigned to their own by
< specifying them in separate itesm of the <strong>control_signals</strong> argument:</p>
---
> uses <code class="xref any docutils literal notranslate"><span class="pre">ControlSignal</span></code> for its <a class="reference internal" href="OutputPort.html"><span class="doc">OutputPorts</span></a>.  Note also that, for specifying Projections
> of a ControlSignal (i.e., its ControlProjections), the keyword <em>CONTROL</em> can be used in place of the more generic
> <em>PROJECTIONS</em> keyword (as shown in the example below).</p>
> <p>In the example above, both ControlProjections are assigned to a single ControlSignal.  However, they could each be
> assigned to their own by specifying them in separate items of the <strong>control_signals</strong> argument:</p>
755c757
<                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">PROJECTIONS</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">DRIFT_RATE</span><span class="p">]]},</span>
---
>                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">CONTROL</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">DRIFT_RATE</span><span class="p">]]},</span>
757c759
<                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">PROJECTIONS</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">THRESHOLD</span><span class="p">]]}])</span>
---
>                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">CONTROL</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">THRESHOLD</span><span class="p">]]}])</span>
diff -r docs-base/searchindex.js docs-head/searchindex.js
1c1
< Search.setIndex({docnames:["AGT","AGTControlMechanism","AutoAssociativeLearningMechanism","AutoAssociativeProjection","AutodiffComposition","BasicsAndPrimer","BotvinickConflictMonitoringModel","BustamanteStroopXORLVOCModel","Cohen_HustonModel","CombinationFunctions","ComparatorMechanism","Compilation","Component","Components","Composition","CompositionFunctionApproximator","CompositionInterfaceMechanism","Compositions","Condition","Context","ContrastiveHebbianMechanism","ContributorsGuide","ControlMechanism","ControlMechanisms","ControlProjection","ControlProjections","ControlSignal","ConventionsAndDefinitions","Core","DDM","DefaultControlMechanism","Defaults","DistributionFunctions","EVC","EVCAuxiliary","EVCControlMechanism","EpisodicMemoryMechanism","Function","Functions","GatingMechanism","GatingMechanisms","GatingProjection","GatingProjections","Ga
...

See CI logs for the full diff.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 2, 2022

This pull request introduces 3 alerts when merging 9b47e1d into 9e88ae4 - view on LGTM.com

new alerts:

  • 3 for Unused import

  - __init__: replace modulates arg with gate
@github-actions
Copy link

github-actions bot commented Jan 2, 2022

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

diff -r docs-base/ControlSignal.html docs-head/ControlSignal.html
254c254
< controlled in the <strong>projections</strong> argument or <em>PROJECTIONS</em> entry, respectively, using any of the forms below.
---
> controlled are specified in the <strong>control</strong> argument or <em>CONTROL</em> entry, respectively, using any of the forms below.
314,315c314,315
< the <strong>projections</strong> argument of its constructor, or in an entry of a dictionary assigned to the <strong>params</strong> argument
< with the key <em>PROJECTIONS</em>.  These will be assigned to its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute.  See
---
> the <strong>control</strong> argument of its constructor, or in an entry of a dictionary assigned to the <strong>params</strong> argument
> with the key <em>CONTROL</em>.  These are assigned to its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute.  See
317c317
< creating a Port.</p>
---
> creating a Port, including <a class="reference internal" href="Port.html#port-modulatory-projections-examples"><span class="std std-ref">examples</span></a> of ControlProjection specification.</p>
497c497
< <span class="gp">... </span>                              <span class="n">control_signals</span><span class="o">=</span><span class="n">ControlSignal</span><span class="p">(</span><span class="n">modulates</span><span class="o">=</span><span class="p">(</span><span class="n">INTERCEPT</span><span class="p">,</span><span class="n">mech</span><span class="p">),</span>
---
> <span class="gp">... </span>                              <span class="n">control_signals</span><span class="o">=</span><span class="n">ControlSignal</span><span class="p">(</span><span class="n">control</span><span class="o">=</span><span class="p">(</span><span class="n">INTERCEPT</span><span class="p">,</span><span class="n">mech</span><span class="p">),</span>
540c540
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.ports.modulatorysignals.controlsignal.</span></span><span class="sig-name descname"><span class="pre">ControlSignal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_allocation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">defaultControlAllocation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">TransferWithCosts</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">costs_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Exponential</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">adjustment_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Linear</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">IntegratorFunction</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">combine_costs_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Reduce(operation=SUM)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allocation_samples</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">self.class_defaults.allocation_samples</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">modulates</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">projections</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.ports.modulatorysignals.controlsignal.ControlSignal" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.ports.modulatorysignals.controlsignal.</span></span><span class="sig-name descname"><span class="pre">ControlSignal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_allocation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">defaultControlAllocation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">TransferWithCosts</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">costs_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Exponential</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">adjustment_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Linear</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">IntegratorFunction</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">combine_costs_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Reduce(operation=SUM)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allocation_samples</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">self.class_defaults.allocation_samples</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">control</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">projections</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.ports.modulatorysignals.controlsignal.ControlSignal" title="Permalink to this definition">¶</a></dt>
561c561
< <li><p><strong>modulates</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="ControlProjection.html"><span class="doc">ControlProjection(s)</span></a> to be assigned to the ControlSignal, and that will be
---
> <li><p><strong>control</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="ControlProjection.html"><span class="doc">ControlProjection(s)</span></a> to be assigned to the ControlSignal, and that will be
diff -r docs-base/GatingSignal.html docs-head/GatingSignal.html
437a438,440
> <li><p><strong>gate</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="GatingProjection.html"><span class="doc">GatingProjection(s)</span></a> to be assigned to the GatingSignal, and that will be
> listed in its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute (see <a class="reference internal" href="#gatingsignal-projections"><span class="std std-ref">Projections</span></a> for additional
> details).</p></li>
diff -r docs-base/OptimizationControlMechanism.html docs-head/OptimizationControlMechanism.html
652a653,663
> <blockquote>
> <div><div class="admonition note">
> <p class="admonition-title">Note</p>
> <p>If a <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> other than an <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested</span></a>
> Composition is <a class="reference internal" href="ControlMechanism.html#controlmechanism-monitor-for-control"><span class="std std-ref">specified to be monitored</span></a>, it is assigned as a <a class="reference internal" href="Composition.html#id18" title="psyneulink.core.compositions.composition.NodeRole.PROBE"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PROBE</span></code></a> of that nested Composition. Although <a class="reference internal" href="Composition.html#id18" title="psyneulink.core.compositions.composition.NodeRole.PROBE"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PROBE</span></code></a> Nodes are generally treated
> like <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> Nodes (since they project out of the Composition to which they belong), their
> <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.value" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a> is not included in the <a class="reference internal" href="Composition.html#id0" title="psyneulink.core.compositions.composition.Composition.output_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">output_values</span></code></a> or <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.results" title="psyneulink.core.compositions.composition.Composition.results"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">results</span></code></a> attributes of the Composition for which the OptimizationControlMechanism is the
> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.controller" title="psyneulink.core.compositions.composition.Composition.controller"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">controller</span></code></a>, unless that Composition’s <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.include_probes_in_output" title="psyneulink.core.compositions.composition.Composition.include_probes_in_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">include_probes_in_output</span></code></a> attribute is set to True (see <code class="xref any docutils literal notranslate"><span class="pre">Composition_Probes</span></code> for additional
> information).</p>
> </div>
> </div></blockquote>
diff -r docs-base/Port.html docs-head/Port.html
744c744
< <span class="o">&gt;</span> <span class="n">MY</span> <span class="n">DDM</span> <span class="n">DRIFT</span> <span class="n">RATE</span> <span class="n">AND</span> <span class="n">THREHOLD</span> <span class="n">CONTROL</span> <span class="n">SIGNAL</span>
---
> <span class="o">&gt;</span> <span class="n">MY</span> <span class="n">DDM</span> <span class="n">DRIFT</span> <span class="n">RATE</span> <span class="n">AND</span> <span class="n">THRESHOLD</span> <span class="n">CONTROL</span> <span class="n">SIGNAL</span>
750,752c750,754
< uses <code class="xref any docutils literal notranslate"><span class="pre">ControlSignal</span></code> for its <a class="reference internal" href="OutputPort.html"><span class="doc">OutputPorts</span></a>.  In the example above,
< both ControlProjections are assigned to a single ControlSignal.  However, they could each be assigned to their own by
< specifying them in separate itesm of the <strong>control_signals</strong> argument:</p>
---
> uses <code class="xref any docutils literal notranslate"><span class="pre">ControlSignal</span></code> for its <a class="reference internal" href="OutputPort.html"><span class="doc">OutputPorts</span></a>.  Note also that, for specifying Projections
> of a ControlSignal (i.e., its ControlProjections), the keyword <em>CONTROL</em> can be used in place of the more generic
> <em>PROJECTIONS</em> keyword (as shown in the example below).</p>
> <p>In the example above, both ControlProjections are assigned to a single ControlSignal.  However, they could each be
> assigned to their own by specifying them in separate items of the <strong>control_signals</strong> argument:</p>
755c757
<                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">PROJECTIONS</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">DRIFT_RATE</span><span class="p">]]},</span>
---
>                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">CONTROL</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">DRIFT_RATE</span><span class="p">]]},</span>
757c759
<                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">PROJECTIONS</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">THRESHOLD</span><span class="p">]]}])</span>
---
>                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">CONTROL</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">THRESHOLD</span><span class="p">]]}])</span>
diff -r docs-base/searchindex.js docs-head/searchind
...

See CI logs for the full diff.

@github-actions
Copy link

github-actions bot commented Jan 2, 2022

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

diff -r docs-base/ControlSignal.html docs-head/ControlSignal.html
254c254
< controlled in the <strong>projections</strong> argument or <em>PROJECTIONS</em> entry, respectively, using any of the forms below.
---
> controlled are specified in the <strong>control</strong> argument or <em>CONTROL</em> entry, respectively, using any of the forms below.
314,315c314,315
< the <strong>projections</strong> argument of its constructor, or in an entry of a dictionary assigned to the <strong>params</strong> argument
< with the key <em>PROJECTIONS</em>.  These will be assigned to its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute.  See
---
> the <strong>control</strong> argument of its constructor, or in an entry of a dictionary assigned to the <strong>params</strong> argument
> with the key <em>CONTROL</em>.  These are assigned to its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute.  See
317c317
< creating a Port.</p>
---
> creating a Port, including <a class="reference internal" href="Port.html#port-modulatory-projections-examples"><span class="std std-ref">examples</span></a> of ControlProjection specification.</p>
497c497
< <span class="gp">... </span>                              <span class="n">control_signals</span><span class="o">=</span><span class="n">ControlSignal</span><span class="p">(</span><span class="n">modulates</span><span class="o">=</span><span class="p">(</span><span class="n">INTERCEPT</span><span class="p">,</span><span class="n">mech</span><span class="p">),</span>
---
> <span class="gp">... </span>                              <span class="n">control_signals</span><span class="o">=</span><span class="n">ControlSignal</span><span class="p">(</span><span class="n">control</span><span class="o">=</span><span class="p">(</span><span class="n">INTERCEPT</span><span class="p">,</span><span class="n">mech</span><span class="p">),</span>
540c540
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.ports.modulatorysignals.controlsignal.</span></span><span class="sig-name descname"><span class="pre">ControlSignal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_allocation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">defaultControlAllocation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">TransferWithCosts</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">costs_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Exponential</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">adjustment_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Linear</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">IntegratorFunction</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">combine_costs_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Reduce(operation=SUM)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allocation_samples</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">self.class_defaults.allocation_samples</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">modulates</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">projections</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.ports.modulatorysignals.controlsignal.ControlSignal" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.ports.modulatorysignals.controlsignal.</span></span><span class="sig-name descname"><span class="pre">ControlSignal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_allocation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">defaultControlAllocation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">TransferWithCosts</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">costs_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Exponential</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">adjustment_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Linear</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">IntegratorFunction</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">combine_costs_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Reduce(operation=SUM)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allocation_samples</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">self.class_defaults.allocation_samples</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">control</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">projections</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.ports.modulatorysignals.controlsignal.ControlSignal" title="Permalink to this definition">¶</a></dt>
561c561
< <li><p><strong>modulates</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="ControlProjection.html"><span class="doc">ControlProjection(s)</span></a> to be assigned to the ControlSignal, and that will be
---
> <li><p><strong>control</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="ControlProjection.html"><span class="doc">ControlProjection(s)</span></a> to be assigned to the ControlSignal, and that will be
diff -r docs-base/GatingSignal.html docs-head/GatingSignal.html
437a438,440
> <li><p><strong>gate</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="GatingProjection.html"><span class="doc">GatingProjection(s)</span></a> to be assigned to the GatingSignal, and that will be
> listed in its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute (see <a class="reference internal" href="#gatingsignal-projections"><span class="std std-ref">Projections</span></a> for additional
> details).</p></li>
diff -r docs-base/OptimizationControlMechanism.html docs-head/OptimizationControlMechanism.html
652a653,663
> <blockquote>
> <div><div class="admonition note">
> <p class="admonition-title">Note</p>
> <p>If a <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> other than an <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested</span></a>
> Composition is <a class="reference internal" href="ControlMechanism.html#controlmechanism-monitor-for-control"><span class="std std-ref">specified to be monitored</span></a>, it is assigned as a <a class="reference internal" href="Composition.html#id18" title="psyneulink.core.compositions.composition.NodeRole.PROBE"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PROBE</span></code></a> of that nested Composition. Although <a class="reference internal" href="Composition.html#id18" title="psyneulink.core.compositions.composition.NodeRole.PROBE"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PROBE</span></code></a> Nodes are generally treated
> like <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> Nodes (since they project out of the Composition to which they belong), their
> <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.value" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a> is not included in the <a class="reference internal" href="Composition.html#id0" title="psyneulink.core.compositions.composition.Composition.output_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">output_values</span></code></a> or <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.results" title="psyneulink.core.compositions.composition.Composition.results"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">results</span></code></a> attributes of the Composition for which the OptimizationControlMechanism is the
> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.controller" title="psyneulink.core.compositions.composition.Composition.controller"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">controller</span></code></a>, unless that Composition’s <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.include_probes_in_output" title="psyneulink.core.compositions.composition.Composition.include_probes_in_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">include_probes_in_output</span></code></a> attribute is set to True (see <code class="xref any docutils literal notranslate"><span class="pre">Composition_Probes</span></code> for additional
> information).</p>
> </div>
> </div></blockquote>
diff -r docs-base/Port.html docs-head/Port.html
744c744
< <span class="o">&gt;</span> <span class="n">MY</span> <span class="n">DDM</span> <span class="n">DRIFT</span> <span class="n">RATE</span> <span class="n">AND</span> <span class="n">THREHOLD</span> <span class="n">CONTROL</span> <span class="n">SIGNAL</span>
---
> <span class="o">&gt;</span> <span class="n">MY</span> <span class="n">DDM</span> <span class="n">DRIFT</span> <span class="n">RATE</span> <span class="n">AND</span> <span class="n">THRESHOLD</span> <span class="n">CONTROL</span> <span class="n">SIGNAL</span>
750,752c750,754
< uses <code class="xref any docutils literal notranslate"><span class="pre">ControlSignal</span></code> for its <a class="reference internal" href="OutputPort.html"><span class="doc">OutputPorts</span></a>.  In the example above,
< both ControlProjections are assigned to a single ControlSignal.  However, they could each be assigned to their own by
< specifying them in separate itesm of the <strong>control_signals</strong> argument:</p>
---
> uses <code class="xref any docutils literal notranslate"><span class="pre">ControlSignal</span></code> for its <a class="reference internal" href="OutputPort.html"><span class="doc">OutputPorts</span></a>.  Note also that, for specifying Projections
> of a ControlSignal (i.e., its ControlProjections), the keyword <em>CONTROL</em> can be used in place of the more generic
> <em>PROJECTIONS</em> keyword (as shown in the example below).</p>
> <p>In the example above, both ControlProjections are assigned to a single ControlSignal.  However, they could each be
> assigned to their own by specifying them in separate items of the <strong>control_signals</strong> argument:</p>
755c757
<                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">PROJECTIONS</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">DRIFT_RATE</span><span class="p">]]},</span>
---
>                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">CONTROL</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">DRIFT_RATE</span><span class="p">]]},</span>
757c759
<                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">PROJECTIONS</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">THRESHOLD</span><span class="p">]]}])</span>
---
>                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">CONTROL</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">THRESHOLD</span><span class="p">]]}])</span>
diff -r docs-base/searchindex.js docs-head/searchind
...

See CI logs for the full diff.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 3, 2022

This pull request introduces 3 alerts when merging 5a72125 into 9e88ae4 - view on LGTM.com

new alerts:

  • 3 for Unused import

@coveralls
Copy link

coveralls commented Jan 3, 2022

Coverage Status

Coverage increased (+0.004%) to 84.329% when pulling 2176cc1 on feat/control_signal/add_control_arg into 9e88ae4 on devel.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 3, 2022

This pull request introduces 3 alerts when merging f1b67fb into 9e88ae4 - view on LGTM.com

new alerts:

  • 3 for Unused import

@github-actions
Copy link

github-actions bot commented Jan 3, 2022

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

diff -r docs-base/ControlSignal.html docs-head/ControlSignal.html
254c254
< controlled in the <strong>projections</strong> argument or <em>PROJECTIONS</em> entry, respectively, using any of the forms below.
---
> controlled are specified in the <strong>control</strong> argument or <em>CONTROL</em> entry, respectively, using any of the forms below.
314,315c314,315
< the <strong>projections</strong> argument of its constructor, or in an entry of a dictionary assigned to the <strong>params</strong> argument
< with the key <em>PROJECTIONS</em>.  These will be assigned to its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute.  See
---
> the <strong>control</strong> argument of its constructor, or in an entry of a dictionary assigned to the <strong>params</strong> argument
> with the key <em>CONTROL</em>.  These are assigned to its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute.  See
317c317
< creating a Port.</p>
---
> creating a Port, including <a class="reference internal" href="Port.html#port-modulatory-projections-examples"><span class="std std-ref">examples</span></a> of ControlProjection specification.</p>
497c497
< <span class="gp">... </span>                              <span class="n">control_signals</span><span class="o">=</span><span class="n">ControlSignal</span><span class="p">(</span><span class="n">modulates</span><span class="o">=</span><span class="p">(</span><span class="n">INTERCEPT</span><span class="p">,</span><span class="n">mech</span><span class="p">),</span>
---
> <span class="gp">... </span>                              <span class="n">control_signals</span><span class="o">=</span><span class="n">ControlSignal</span><span class="p">(</span><span class="n">control</span><span class="o">=</span><span class="p">(</span><span class="n">INTERCEPT</span><span class="p">,</span><span class="n">mech</span><span class="p">),</span>
540c540
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.ports.modulatorysignals.controlsignal.</span></span><span class="sig-name descname"><span class="pre">ControlSignal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_allocation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">defaultControlAllocation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">TransferWithCosts</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">costs_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Exponential</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">adjustment_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Linear</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">IntegratorFunction</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">combine_costs_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Reduce(operation=SUM)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allocation_samples</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">self.class_defaults.allocation_samples</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">modulates</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">projections</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.ports.modulatorysignals.controlsignal.ControlSignal" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.ports.modulatorysignals.controlsignal.</span></span><span class="sig-name descname"><span class="pre">ControlSignal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_allocation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">defaultControlAllocation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">TransferWithCosts</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">costs_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Exponential</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">adjustment_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Linear</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">IntegratorFunction</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">combine_costs_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Reduce(operation=SUM)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allocation_samples</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">self.class_defaults.allocation_samples</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">control</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">projections</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.ports.modulatorysignals.controlsignal.ControlSignal" title="Permalink to this definition">¶</a></dt>
561c561
< <li><p><strong>modulates</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="ControlProjection.html"><span class="doc">ControlProjection(s)</span></a> to be assigned to the ControlSignal, and that will be
---
> <li><p><strong>control</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="ControlProjection.html"><span class="doc">ControlProjection(s)</span></a> to be assigned to the ControlSignal, and that will be
diff -r docs-base/GatingSignal.html docs-head/GatingSignal.html
437a438,440
> <li><p><strong>gate</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="GatingProjection.html"><span class="doc">GatingProjection(s)</span></a> to be assigned to the GatingSignal, and that will be
> listed in its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute (see <a class="reference internal" href="#gatingsignal-projections"><span class="std std-ref">Projections</span></a> for additional
> details).</p></li>
diff -r docs-base/OptimizationControlMechanism.html docs-head/OptimizationControlMechanism.html
652a653,663
> <blockquote>
> <div><div class="admonition note">
> <p class="admonition-title">Note</p>
> <p>If a <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> other than an <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested</span></a>
> Composition is <a class="reference internal" href="ControlMechanism.html#controlmechanism-monitor-for-control"><span class="std std-ref">specified to be monitored</span></a>, it is assigned as a <a class="reference internal" href="Composition.html#id18" title="psyneulink.core.compositions.composition.NodeRole.PROBE"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PROBE</span></code></a> of that nested Composition. Although <a class="reference internal" href="Composition.html#id18" title="psyneulink.core.compositions.composition.NodeRole.PROBE"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PROBE</span></code></a> Nodes are generally treated
> like <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> Nodes (since they project out of the Composition to which they belong), their
> <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.value" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a> is not included in the <a class="reference internal" href="Composition.html#id0" title="psyneulink.core.compositions.composition.Composition.output_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">output_values</span></code></a> or <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.results" title="psyneulink.core.compositions.composition.Composition.results"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">results</span></code></a> attributes of the Composition for which the OptimizationControlMechanism is the
> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.controller" title="psyneulink.core.compositions.composition.Composition.controller"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">controller</span></code></a>, unless that Composition’s <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.include_probes_in_output" title="psyneulink.core.compositions.composition.Composition.include_probes_in_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">include_probes_in_output</span></code></a> attribute is set to True (see <code class="xref any docutils literal notranslate"><span class="pre">Composition_Probes</span></code> for additional
> information).</p>
> </div>
> </div></blockquote>
diff -r docs-base/Parameters.html docs-head/Parameters.html
285c285,286
< <li><p>as with <em>q</em>, specifying an explicit instance of the Parameter class allows you to modify the <a class="reference internal" href="#parameter-attributes-table"><span class="std std-ref">Parameter attributes</span></a></p></li>
---
> <li><p>as with <em>q</em>, specifying an explicit instance of the Parameter class allows you to modify the
> <a class="reference internal" href="#parameter-attributes-table"><span class="std std-ref">Parameter attributes</span></a></p></li>
290c291,292
< <li><p>if you want assignments to parameter <em>p</em> to be validated, add a method _validate_p(value), that returns None if value is a valid assignment, or an error string if value is not a valid assignment</p></li>
---
> <li><p>if you want assignments to parameter <em>p</em> to be validated, add a method _validate_p(value),
> that returns None if value is a valid assignment, or an error string if value is not a valid assignment</p></li>
diff -r docs-base/Port.html docs-head/Port.html
744c744
< <span class="o">&gt;</span> <span class="n">MY</span> <span class="n">DDM</span> <span class="n">DRIFT</span> <span class="n">RATE</span> <span class="n">AND</span> <span class="n">THREHOLD</span> <span class="n">CONTROL</span> <span class="n">SIGNAL</span>
---
> <span class="o">&gt;</span> <span class="n">MY</span> <span class="n">DDM</span> <span class="n">DRIFT</span> <span class="n">RATE</span> <span class="n">AND</span> <span class="n">THRESHOLD</span> <span class="n">CONTROL</span> <span class="n">SIGNAL</span>
750,752c750,754
< uses <code class="xref any docutils literal notranslate"><span class="pre">ControlSignal</span></code> for its <a class="reference internal" href="OutputPort.html"><span class="doc">OutputPorts</span></a>.  In the example above,
< both ControlProjections are assigned to a single ControlSignal.  However, they could each be assigned to their own by
< specifying them in separate itesm of the <strong>control_signals</strong> argument:</p>
---
> uses <code class="xref any docutils literal notranslate"><span class="pre">ControlSignal</span></code> for its <a class="reference internal" href="OutputPort.html"><span class="doc">OutputPorts</span></a>.  Note also that, for specifying Projections
> of a ControlSignal (i.e., its ControlProjections), the keyword <em>CONTROL</em> can be used in place of the more generic
> <em>PROJECTIONS</em> keyword (as shown in the example below).</p>
> <p>In the example above, both ControlProjections are assigned to a single ControlSignal.  However, they could each be
> assigned to their own by specifying them in separate items of the <strong>control_signals</strong> argument:</p>
755c757
<                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">PROJECTIONS</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">DRIFT_RATE</span><span class="p">]]},</span>
---
>                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">CONTROL</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span c
...

See CI logs for the full diff.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 3, 2022

This pull request introduces 2 alerts when merging 181ad8c into 9e88ae4 - view on LGTM.com

new alerts:

  • 2 for Unused import

@github-actions
Copy link

github-actions bot commented Jan 3, 2022

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

diff -r docs-base/ControlSignal.html docs-head/ControlSignal.html
254c254
< controlled in the <strong>projections</strong> argument or <em>PROJECTIONS</em> entry, respectively, using any of the forms below.
---
> controlled are specified in the <strong>control</strong> argument or <em>CONTROL</em> entry, respectively, using any of the forms below.
314,315c314,315
< the <strong>projections</strong> argument of its constructor, or in an entry of a dictionary assigned to the <strong>params</strong> argument
< with the key <em>PROJECTIONS</em>.  These will be assigned to its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute.  See
---
> the <strong>control</strong> argument of its constructor, or in an entry of a dictionary assigned to the <strong>params</strong> argument
> with the key <em>CONTROL</em>.  These are assigned to its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute.  See
317c317
< creating a Port.</p>
---
> creating a Port, including <a class="reference internal" href="Port.html#port-modulatory-projections-examples"><span class="std std-ref">examples</span></a> of ControlProjection specification.</p>
497c497
< <span class="gp">... </span>                              <span class="n">control_signals</span><span class="o">=</span><span class="n">ControlSignal</span><span class="p">(</span><span class="n">modulates</span><span class="o">=</span><span class="p">(</span><span class="n">INTERCEPT</span><span class="p">,</span><span class="n">mech</span><span class="p">),</span>
---
> <span class="gp">... </span>                              <span class="n">control_signals</span><span class="o">=</span><span class="n">ControlSignal</span><span class="p">(</span><span class="n">control</span><span class="o">=</span><span class="p">(</span><span class="n">INTERCEPT</span><span class="p">,</span><span class="n">mech</span><span class="p">),</span>
540c540
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.ports.modulatorysignals.controlsignal.</span></span><span class="sig-name descname"><span class="pre">ControlSignal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_allocation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">defaultControlAllocation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">TransferWithCosts</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">costs_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Exponential</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">adjustment_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Linear</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">IntegratorFunction</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">combine_costs_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Reduce(operation=SUM)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allocation_samples</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">self.class_defaults.allocation_samples</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">modulates</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">projections</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.ports.modulatorysignals.controlsignal.ControlSignal" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.ports.modulatorysignals.controlsignal.</span></span><span class="sig-name descname"><span class="pre">ControlSignal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_allocation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">defaultControlAllocation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">TransferWithCosts</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">costs_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Exponential</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">adjustment_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Linear</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">IntegratorFunction</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">combine_costs_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Reduce(operation=SUM)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allocation_samples</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">self.class_defaults.allocation_samples</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">control</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">projections</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.ports.modulatorysignals.controlsignal.ControlSignal" title="Permalink to this definition">¶</a></dt>
561c561
< <li><p><strong>modulates</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="ControlProjection.html"><span class="doc">ControlProjection(s)</span></a> to be assigned to the ControlSignal, and that will be
---
> <li><p><strong>control</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="ControlProjection.html"><span class="doc">ControlProjection(s)</span></a> to be assigned to the ControlSignal, and that will be
diff -r docs-base/GatingSignal.html docs-head/GatingSignal.html
437a438,440
> <li><p><strong>gate</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="GatingProjection.html"><span class="doc">GatingProjection(s)</span></a> to be assigned to the GatingSignal, and that will be
> listed in its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute (see <a class="reference internal" href="#gatingsignal-projections"><span class="std std-ref">Projections</span></a> for additional
> details).</p></li>
diff -r docs-base/OptimizationControlMechanism.html docs-head/OptimizationControlMechanism.html
652a653,663
> <blockquote>
> <div><div class="admonition note">
> <p class="admonition-title">Note</p>
> <p>If a <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> other than an <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested</span></a>
> Composition is <a class="reference internal" href="ControlMechanism.html#controlmechanism-monitor-for-control"><span class="std std-ref">specified to be monitored</span></a>, it is assigned as a <a class="reference internal" href="Composition.html#id18" title="psyneulink.core.compositions.composition.NodeRole.PROBE"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PROBE</span></code></a> of that nested Composition. Although <a class="reference internal" href="Composition.html#id18" title="psyneulink.core.compositions.composition.NodeRole.PROBE"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PROBE</span></code></a> Nodes are generally treated
> like <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> Nodes (since they project out of the Composition to which they belong), their
> <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.value" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a> is not included in the <a class="reference internal" href="Composition.html#id0" title="psyneulink.core.compositions.composition.Composition.output_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">output_values</span></code></a> or <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.results" title="psyneulink.core.compositions.composition.Composition.results"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">results</span></code></a> attributes of the Composition for which the OptimizationControlMechanism is the
> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.controller" title="psyneulink.core.compositions.composition.Composition.controller"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">controller</span></code></a>, unless that Composition’s <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.include_probes_in_output" title="psyneulink.core.compositions.composition.Composition.include_probes_in_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">include_probes_in_output</span></code></a> attribute is set to True (see <code class="xref any docutils literal notranslate"><span class="pre">Composition_Probes</span></code> for additional
> information).</p>
> </div>
> </div></blockquote>
diff -r docs-base/Parameters.html docs-head/Parameters.html
285c285,286
< <li><p>as with <em>q</em>, specifying an explicit instance of the Parameter class allows you to modify the <a class="reference internal" href="#parameter-attributes-table"><span class="std std-ref">Parameter attributes</span></a></p></li>
---
> <li><p>as with <em>q</em>, specifying an explicit instance of the Parameter class allows you to modify the
> <a class="reference internal" href="#parameter-attributes-table"><span class="std std-ref">Parameter attributes</span></a></p></li>
290c291,292
< <li><p>if you want assignments to parameter <em>p</em> to be validated, add a method _validate_p(value), that returns None if value is a valid assignment, or an error string if value is not a valid assignment</p></li>
---
> <li><p>if you want assignments to parameter <em>p</em> to be validated, add a method _validate_p(value),
> that returns None if value is a valid assignment, or an error string if value is not a valid assignment</p></li>
diff -r docs-base/Port.html docs-head/Port.html
744c744
< <span class="o">&gt;</span> <span class="n">MY</span> <span class="n">DDM</span> <span class="n">DRIFT</span> <span class="n">RATE</span> <span class="n">AND</span> <span class="n">THREHOLD</span> <span class="n">CONTROL</span> <span class="n">SIGNAL</span>
---
> <span class="o">&gt;</span> <span class="n">MY</span> <span class="n">DDM</span> <span class="n">DRIFT</span> <span class="n">RATE</span> <span class="n">AND</span> <span class="n">THRESHOLD</span> <span class="n">CONTROL</span> <span class="n">SIGNAL</span>
750,752c750,754
< uses <code class="xref any docutils literal notranslate"><span class="pre">ControlSignal</span></code> for its <a class="reference internal" href="OutputPort.html"><span class="doc">OutputPorts</span></a>.  In the example above,
< both ControlProjections are assigned to a single ControlSignal.  However, they could each be assigned to their own by
< specifying them in separate itesm of the <strong>control_signals</strong> argument:</p>
---
> uses <code class="xref any docutils literal notranslate"><span class="pre">ControlSignal</span></code> for its <a class="reference internal" href="OutputPort.html"><span class="doc">OutputPorts</span></a>.  Note also that, for specifying Projections
> of a ControlSignal (i.e., its ControlProjections), the keyword <em>CONTROL</em> can be used in place of the more generic
> <em>PROJECTIONS</em> keyword (as shown in the example below).</p>
> <p>In the example above, both ControlProjections are assigned to a single ControlSignal.  However, they could each be
> assigned to their own by specifying them in separate items of the <strong>control_signals</strong> argument:</p>
755c757
<                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">PROJECTIONS</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">DRIFT_RATE</span><span class="p">]]},</span>
---
>                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">CONTROL</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span c
...

See CI logs for the full diff.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 3, 2022

This pull request introduces 2 alerts when merging ecf67af into 9e88ae4 - view on LGTM.com

new alerts:

  • 2 for Unused import

@github-actions
Copy link

github-actions bot commented Jan 3, 2022

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

diff -r docs-base/ControlSignal.html docs-head/ControlSignal.html
254c254
< controlled in the <strong>projections</strong> argument or <em>PROJECTIONS</em> entry, respectively, using any of the forms below.
---
> controlled are specified in the <strong>control</strong> argument or <em>CONTROL</em> entry, respectively, using any of the forms below.
314,315c314,315
< the <strong>projections</strong> argument of its constructor, or in an entry of a dictionary assigned to the <strong>params</strong> argument
< with the key <em>PROJECTIONS</em>.  These will be assigned to its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute.  See
---
> the <strong>control</strong> argument of its constructor, or in an entry of a dictionary assigned to the <strong>params</strong> argument
> with the key <em>CONTROL</em>.  These are assigned to its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute.  See
317c317
< creating a Port.</p>
---
> creating a Port, including <a class="reference internal" href="Port.html#port-modulatory-projections-examples"><span class="std std-ref">examples</span></a> of ControlProjection specification.</p>
497c497
< <span class="gp">... </span>                              <span class="n">control_signals</span><span class="o">=</span><span class="n">ControlSignal</span><span class="p">(</span><span class="n">modulates</span><span class="o">=</span><span class="p">(</span><span class="n">INTERCEPT</span><span class="p">,</span><span class="n">mech</span><span class="p">),</span>
---
> <span class="gp">... </span>                              <span class="n">control_signals</span><span class="o">=</span><span class="n">ControlSignal</span><span class="p">(</span><span class="n">control</span><span class="o">=</span><span class="p">(</span><span class="n">INTERCEPT</span><span class="p">,</span><span class="n">mech</span><span class="p">),</span>
540c540
< <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.ports.modulatorysignals.controlsignal.</span></span><span class="sig-name descname"><span class="pre">ControlSignal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_allocation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">defaultControlAllocation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">TransferWithCosts</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">costs_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Exponential</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">adjustment_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Linear</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">IntegratorFunction</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">combine_costs_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Reduce(operation=SUM)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allocation_samples</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">self.class_defaults.allocation_samples</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">modulates</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">projections</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.ports.modulatorysignals.controlsignal.ControlSignal" title="Permalink to this definition">¶</a></dt>
---
> <em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">psyneulink.core.components.ports.modulatorysignals.controlsignal.</span></span><span class="sig-name descname"><span class="pre">ControlSignal</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_allocation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">defaultControlAllocation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">TransferWithCosts</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">costs_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Exponential</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">adjustment_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Linear</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duration_cost_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">IntegratorFunction</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">combine_costs_function</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">Reduce(operation=SUM)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allocation_samples</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">self.class_defaults.allocation_samples</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">control</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">projections</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#psyneulink.core.components.ports.modulatorysignals.controlsignal.ControlSignal" title="Permalink to this definition">¶</a></dt>
561c561
< <li><p><strong>modulates</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="ControlProjection.html"><span class="doc">ControlProjection(s)</span></a> to be assigned to the ControlSignal, and that will be
---
> <li><p><strong>control</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="ControlProjection.html"><span class="doc">ControlProjection(s)</span></a> to be assigned to the ControlSignal, and that will be
diff -r docs-base/GatingSignal.html docs-head/GatingSignal.html
437a438,440
> <li><p><strong>gate</strong> (<em>list of Projection specifications</em>) – specifies the <a class="reference internal" href="GatingProjection.html"><span class="doc">GatingProjection(s)</span></a> to be assigned to the GatingSignal, and that will be
> listed in its <a class="reference internal" href="ModulatorySignal.html#psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents" title="psyneulink.core.components.ports.modulatorysignals.modulatorysignal.ModulatorySignal.efferents"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">efferents</span></code></a> attribute (see <a class="reference internal" href="#gatingsignal-projections"><span class="std std-ref">Projections</span></a> for additional
> details).</p></li>
diff -r docs-base/OptimizationControlMechanism.html docs-head/OptimizationControlMechanism.html
652a653,663
> <blockquote>
> <div><div class="admonition note">
> <p class="admonition-title">Note</p>
> <p>If a <a class="reference internal" href="Composition.html#composition-nodes"><span class="std std-ref">Node</span></a> other than an <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> of a <a class="reference internal" href="Composition.html#composition-nested"><span class="std std-ref">nested</span></a>
> Composition is <a class="reference internal" href="ControlMechanism.html#controlmechanism-monitor-for-control"><span class="std std-ref">specified to be monitored</span></a>, it is assigned as a <a class="reference internal" href="Composition.html#id18" title="psyneulink.core.compositions.composition.NodeRole.PROBE"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PROBE</span></code></a> of that nested Composition. Although <a class="reference internal" href="Composition.html#id18" title="psyneulink.core.compositions.composition.NodeRole.PROBE"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">PROBE</span></code></a> Nodes are generally treated
> like <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.NodeRole.OUTPUT" title="psyneulink.core.compositions.composition.NodeRole.OUTPUT"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">OUTPUT</span></code></a> Nodes (since they project out of the Composition to which they belong), their
> <a class="reference internal" href="Mechanism.html#psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.value" title="psyneulink.core.components.mechanisms.mechanism.Mechanism_Base.value"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">value</span></code></a> is not included in the <a class="reference internal" href="Composition.html#id0" title="psyneulink.core.compositions.composition.Composition.output_values"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">output_values</span></code></a> or <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.results" title="psyneulink.core.compositions.composition.Composition.results"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">results</span></code></a> attributes of the Composition for which the OptimizationControlMechanism is the
> <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.controller" title="psyneulink.core.compositions.composition.Composition.controller"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">controller</span></code></a>, unless that Composition’s <a class="reference internal" href="Composition.html#psyneulink.core.compositions.composition.Composition.include_probes_in_output" title="psyneulink.core.compositions.composition.Composition.include_probes_in_output"><code class="xref any py py-attr docutils literal notranslate"><span class="pre">include_probes_in_output</span></code></a> attribute is set to True (see <code class="xref any docutils literal notranslate"><span class="pre">Composition_Probes</span></code> for additional
> information).</p>
> </div>
> </div></blockquote>
diff -r docs-base/Parameters.html docs-head/Parameters.html
285c285,286
< <li><p>as with <em>q</em>, specifying an explicit instance of the Parameter class allows you to modify the <a class="reference internal" href="#parameter-attributes-table"><span class="std std-ref">Parameter attributes</span></a></p></li>
---
> <li><p>as with <em>q</em>, specifying an explicit instance of the Parameter class allows you to modify the
> <a class="reference internal" href="#parameter-attributes-table"><span class="std std-ref">Parameter attributes</span></a></p></li>
290c291,292
< <li><p>if you want assignments to parameter <em>p</em> to be validated, add a method _validate_p(value), that returns None if value is a valid assignment, or an error string if value is not a valid assignment</p></li>
---
> <li><p>if you want assignments to parameter <em>p</em> to be validated, add a method _validate_p(value),
> that returns None if value is a valid assignment, or an error string if value is not a valid assignment</p></li>
diff -r docs-base/Port.html docs-head/Port.html
744c744
< <span class="o">&gt;</span> <span class="n">MY</span> <span class="n">DDM</span> <span class="n">DRIFT</span> <span class="n">RATE</span> <span class="n">AND</span> <span class="n">THREHOLD</span> <span class="n">CONTROL</span> <span class="n">SIGNAL</span>
---
> <span class="o">&gt;</span> <span class="n">MY</span> <span class="n">DDM</span> <span class="n">DRIFT</span> <span class="n">RATE</span> <span class="n">AND</span> <span class="n">THRESHOLD</span> <span class="n">CONTROL</span> <span class="n">SIGNAL</span>
750,752c750,754
< uses <code class="xref any docutils literal notranslate"><span class="pre">ControlSignal</span></code> for its <a class="reference internal" href="OutputPort.html"><span class="doc">OutputPorts</span></a>.  In the example above,
< both ControlProjections are assigned to a single ControlSignal.  However, they could each be assigned to their own by
< specifying them in separate itesm of the <strong>control_signals</strong> argument:</p>
---
> uses <code class="xref any docutils literal notranslate"><span class="pre">ControlSignal</span></code> for its <a class="reference internal" href="OutputPort.html"><span class="doc">OutputPorts</span></a>.  Note also that, for specifying Projections
> of a ControlSignal (i.e., its ControlProjections), the keyword <em>CONTROL</em> can be used in place of the more generic
> <em>PROJECTIONS</em> keyword (as shown in the example below).</p>
> <p>In the example above, both ControlProjections are assigned to a single ControlSignal.  However, they could each be
> assigned to their own by specifying them in separate items of the <strong>control_signals</strong> argument:</p>
755c757
<                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">PROJECTIONS</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span class="p">[</span><span class="n">pnl</span><span class="o">.</span><span class="n">DRIFT_RATE</span><span class="p">]]},</span>
---
>                                                      <span class="n">pnl</span><span class="o">.</span><span class="n">CONTROL</span><span class="p">:</span> <span class="p">[</span><span class="n">my_mech</span><span class="o">.</span><span class="n">parameter_ports</span><span c
...

See CI logs for the full diff.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Jan 3, 2022

This pull request introduces 2 alerts when merging 2176cc1 into 9e88ae4 - view on LGTM.com

new alerts:

  • 2 for Unused import

@jdcpni jdcpni merged commit 1fdb95d into devel Jan 3, 2022
@jdcpni jdcpni deleted the feat/control_signal/add_control_arg branch January 3, 2022 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants