:orphan: behavior_cost ************* Specifies the cost for behaviors, used in the updating of v- and w-values. See :ref:`the-mechanisms`. The parameter ``behavior_cost`` can be set to certain values for certain particular behaviors. It can also be specified as a single value, in which case the same cost is used for all behaviors. Wildcards (*) may be used to set several values at once. Syntax ------ :: behavior_cost = e1: v1, e2: v2, ..., en: vn, default: d behavior_cost = v1 behavior_cost = *:v1 # Same as above where ``v1,v2,...,vn`` and ``d`` are :ref:`scalar expressions`. Description ----------- ``behavior_cost = b1: v1, b2: v2, ..., bn->vn: vn, default: d`` sets the behavior cost for - b1 to v1, - b2 to v2, ..., - bn to vn, and the behavior cost for all other behaviors to d. - The specification is independent of the list order: ``behavior_cost = b1:v1, b2:v2, default:d`` is the same as ``behavior_cost = b2:v2, default:d, b1:v1``. - ``default`` need not be specified if all behaviors are present in the list. For example, :: behaviors = b1, b2 behavior_cost = b1:v1, b2:v2 ---- ``behavior_cost = v1`` sets the behavior cost for all behaviors to v1. - ``behavior_cost = v1`` is the same as ``behavior_cost = default: v1``. Dependencies ------------ - The property ``behaviors`` must be specified before ``behavior_cost``. - Each behavior used in the specification of ``behavior_cost`` must be present in the parameter ``behavior_cost``. Examples -------- :: @variables x = 1 behavior_cost = behavior1: x, behavior2: x+1, behavior3:x+2 sets the behavior cost for behavior1 to 1 and for behavior2 to 2, and for the remaining behaviors to 3. :: behavior_cost = behavior1: 0.5, default:0 sets the behavior cost for behavior1 to 0.5, and for the remaining behaviors to 3. :: behavior_cost = 0.1 sets the behavior cost for all behaviors to 0.1.