libs/automated-control.nls

Routines for the manual and automated control.  Experiments for the Jasss-paper included three procedures, implementing soft, strong and combined mode of governance: soft mode: automated-control-soft-car strong mode: automated-control-strong-car combined mode: automated-control-soft-strong-car

Summary
libs/automated-control.nlsRoutines for the manual and automated control.
automated-controlTriggers a control algorithm specified via GUI-switch “control-algorithm” (can be used in behaviour space experiments as well).
automated-control-soft-carAutomated control algorithm, increasing the costs of car usage (as long as value does not raise over soft-control-max-value) if any short time limit is about <global->percentage-soft-automated-control>, decreasing otherwise (as long as value does not fall below soft-control-min-value).
automated-control-strong-carAutomated control algorithm, banning technology car from edges and nodes if any short time limit is about <global->percentage-strong-automated-control>, re-allowing the car if limit falls below <global->percentage-strong-automated-control> again.
automated-control-soft-strong-carAutomated control algorithm, combining automated-control-soft-car and automated-control-strong-car Used in basic Jasss experiments.
automated-control-softAutomated control algorithm, increasing the costs of usage of all technologies (as long as value does not raise over soft-control-max-value) if any short time limit is about <global->percentage-soft-automated-control>, decreasing otherwise (as long as value does not fall below soft-control-min-value)
automated-control-strongAutomated control algorithm, banning most harming technology from edges and nodes if any short time limit is about <global->percentage-strong-automated-control>, re-allowing the usage of the respective technology if limit falls below <global->percentage-strong-automated-control> again.
automated-control-strong-splittedAutomated control algorithm, banning most harming (out of all) technologies in case of exceeding capacity limits, banning the car only in case of emission problems.
automated-control-soft-car+strong-splittedAutomated control algorithm, soft intervention on cars in case of any short time limit problems, strong intervention in case of capacity problems for all technologies, for the car in case of emission problems.
automated-control-standardRuns the standard version ofautomated-control, which can basically be split to two sorts of intervention a) Soft control: If degree of usage reaches <global->percentage-soft-atomated-control>, costs of that technology influencing the respective dimension of degree most negatively will be increased.
automated-control-luebkeRuns the automated-control which can basically be split to two sorts of intervention.
automated-control-edgesHandles automated control (soft and strong) on edges, based on edge->edge-limits-short-time/edge->edge-degree-short-time.
automated-control-nodesHandles automated control (soft and strong) on nodes, based on short-time-limits/degrees
increase-technology-valueIncreases technology-type->technology-type-factor value of the given dimensionen by 0.1.
decrease-technology-valueDecreases technology-type->technology-type-factor value of the given dimensionen by 0.1.
set-technology-valueSets technology-type->technology-type-factor value of the given dimensionen to input value.
set-technology-speed-factorSets technology speed factor for a technology on an edge-type to the given value
worst-value-positionReport the position of the worst (i.e.
worst-technologyReports that technology (actually not banned) showing most negative impact with respect to the given dimension
best-technologyReports that technology (actually banned) showing least negative impact with respect to the given dimension
ban-technologyBans the given technology, reports true if technology was not banned before
allow-technologyAllows the given technology (set item 1 to true), , reports true if technology was banned before
change-technology-stateChange technology-available-state of my-technology to my-state, report true if state was changed to a new value
increase-control-factor-edgeIncreases the edge’s control factor (used to calculate payoffs, manipulated by soft-control-interventions)
decrease-control-factor-edgeDecreases the edge’s control factor (used to calculate payoffs, manipulated by soft-control-interventions)
increase-control-factor-nodeIncreases the node’s control factor (used to calculate payoffs, manipulated by soft-control-interventions)
decrease-control-factor-nodeDecreases the node’s control factor (used to calculate payoffs, manipulated by soft-control-interventions)
get-dimension-to-controlReports the worst function in terms of degree or the one indicated by the string given as “my-dimension”
activate-low-emission-zoneImplements a low-emission zone with taxes for agents using technology car in a specified area-
build-low-emission-zoneBuilds rucursively the low emission zone as specified in function activate-low-emission-zone
combineMoneyComfortHelper function to be used in behaviour space, allows to specify experiments with two technology factors to be influenced easily (helping to reduce number of combinatorial options)

automated-control

to automated-control

Triggers a control algorithm specified via GUI-switch “control-algorithm” (can be used in behaviour space experiments as well).

automated-control-soft-car

to automated-control-soft-car

Automated control algorithm, increasing the costs of car usage (as long as value does not raise over soft-control-max-value) if any short time limit is about <global->percentage-soft-automated-control>, decreasing otherwise (as long as value does not fall below soft-control-min-value).  Triggers changes on edges only, as nodes are used in present base scenarios to payout money to agents instead of asking them to pay fees.  Used in basic Jasss experiments.

automated-control-strong-car

to automated-control-strong-car

Automated control algorithm, banning technology car from edges and nodes if any short time limit is about <global->percentage-strong-automated-control>, re-allowing the car if limit falls below <global->percentage-strong-automated-control> again.  Used in basic Jasss experiments.

automated-control-soft-strong-car

to automated-control-soft-strong-car

Automated control algorithm, combining automated-control-soft-car and automated-control-strong-car Used in basic Jasss experiments.

automated-control-soft

to automated-control-soft

Automated control algorithm, increasing the costs of usage of all technologies (as long as value does not raise over soft-control-max-value) if any short time limit is about <global->percentage-soft-automated-control>, decreasing otherwise (as long as value does not fall below soft-control-min-value)

automated-control-strong

to automated-control-strong

Automated control algorithm, banning most harming technology from edges and nodes if any short time limit is about <global->percentage-strong-automated-control>, re-allowing the usage of the respective technology if limit falls below <global->percentage-strong-automated-control> again.

automated-control-strong-splitted

to automated-control-strong-splitted

Automated control algorithm, banning most harming (out of all) technologies in case of exceeding capacity limits, banning the car only in case of emission problems.

automated-control-soft-car+strong-splitted

to automated-control-soft-car+strong-splitted

Automated control algorithm, soft intervention on cars in case of any short time limit problems, strong intervention in case of capacity problems for all technologies, for the car in case of emission problems.

automated-control-standard

to automated-control-standard

Runs the standard version ofautomated-control, which can basically be split to two sorts of intervention a) Soft control: If degree of usage reaches <global->percentage-soft-atomated-control>, costs of that technology influencing the respective dimension of degree most negatively will be increased. b) Strong control: If degree of usage reaches <global->percentage-strong-automated-control>, that technology influencing the respective dimension of degree will be banned from the respective infrastructure element.

automated-control-luebke

to automated-control-luebke

Runs the automated-control which can basically be split to two sorts of intervention.  This is a special version implemented to be used within the bachelor thesis of Kai Luebke. a) Soft control: If short-time-degree of usage reaches <global->percentage-soft-automated-control>, costs of that technology influencing the respective dimension of degree most negative will be increased. b) Strong control: If long-time-degree of usage reaches <global->percentage-strong-automated-control>, that technology influencing the respective dimension of degree will be banned from the respective infrastructure element.

automated-control-edges

to automated-control-edges [my-mode my-time my-dimension my-technology-name]

Handles automated control (soft and strong) on edges, based on edge->edge-limits-short-time/edge->edge-degree-short-time.

Parameters

my-modea string (“strong”, “soft” or “both”, indicating which type of intervention shall be triggered.)
my-timestring, “short” or “long”, indicating wether short- or long-time values shall be used to calculate “worst-degree”
my-dimensiona string, indicating wether a distinct dimension (given by name) or all (“all”) dimensions available shall be used to calculate “worst degree”
my-technology-namea string, indicating wether a distinct technology (given by name) or all (“all”) technologies shall be considered for controlling interventions.

automated-control-nodes

to automated-control-nodes [my-mode my-time my-dimension my-technology-name]

Handles automated control (soft and strong) on nodes, based on short-time-limits/degrees

Parameters

my-modea string (“strong”, “soft” or “both”, indicating which type of intervention shall be triggered.)
my-timestring, “short” or “long”, indicating wether short- or long-time values shall be used to calculate “worst-degree”
my-dimensiona string, indicating wether a distinct dimension (given by name) or all (“all”) dimensions available shall be used to calculate “worst degree”
my-technology-namea string, indicating wether a distinct technology (given by name) or all (“all”) tachnologies shall be considered for controlling interventions.

increase-technology-value

to increase-technology-value [my-technology-type-name my-dimension-name]

Increases technology-type->technology-type-factor value of the given dimensionen by 0.1.  Will be used to influence technologie’s relative costs/benefits within the GUI using the button “Increase Value”

Parameters

my-technology-type-name<technology-type-name> of that technology-type whose value shall be changed.
my-dimension-namestring, name of dimension to be influenced

decrease-technology-value

to decrease-technology-value [my-technology-type-name my-dimension-name]

Decreases technology-type->technology-type-factor value of the given dimensionen by 0.1.  Will be used to influence technologie’s relative costs/benefits within the GUI using the button “Decrease Value”

Parameters

my-technology-type-name<technology-type-name> of that technology-type whose value shall be changed.
my-dimension-namestring, name of dimension to be influenced

set-technology-value

to set-technology-value [my-technology-type-name my-dimension-name my-value]

Sets technology-type->technology-type-factor value of the given dimensionen to input value.  Will be used to influence technologie’s relative costs/benefits mainly in behaviour space experiments (to be used together with global variable “technology value”)

Parameters

my-technology-type-name<technology-type-name> of that technology-type whose value shall be changed.
my-dimension-namestring, name of dimension to be influenced
my-valueint, value to be set.

set-technology-speed-factor

to set-technology-speed-factor [my-technology-type-name my-edge-type my-value]

Sets technology speed factor for a technology on an edge-type to the given value

Parameters

my-technology-type-name<technology-type-name> of that technology-type whose value shall be changed.
my-edge-typename of the edge type to be altered
my-valuenew value to be stored

worst-value-position

to-report worst-value-position [my-vector]

Report the position of the worst (i.e. showing greatest to “0”) degree value in the given vector.  Used for automated control

Parameters

my-vectora vector of degree values

Returns

intThe position of the value with greatest distance to “0”

worst-technology

to-report worst-technology-allowed [my-dimension]

Reports that technology (actually not banned) showing most negative impact with respect to the given dimension

Parameters

my-dimensionthe dimension which shall be used to compare technologies

Returns

stringthe <technology-type->technology-tape-name> of the technology-type showing most negative impact

best-technology

to-report best-technology [my-dimension]

Reports that technology (actually banned) showing least negative impact with respect to the given dimension

Parameters

my-dimensionthe dimension which shall be used to compare technologies

Returns

stringthe <technology-type->technology-tape-name> of the technology-type showing least negative impact
nobodyif there was no technology banned

ban-technology

to-report ban-technology [my-technology]

Bans the given technology, reports true if technology was not banned before

Parameters

my-technologytechnology to ban

Returns

boolif state was changed to a new value

allow-technology

to-report allow-technology [my-technology]

Allows the given technology (set item 1 to true), , reports true if technology was banned before

Parameters

my-technologytechnology to allow

Returns

boolif state was changed to a new value

change-technology-state

to-report change-technology-state [my-technology my-state]

Change technology-available-state of my-technology to my-state, report true if state was changed to a new value

Parameters

my-technologytechnology to use
my-statestate to set

Returns

booltrue, if state was changed to a new value

increase-control-factor-edge

to increase-control-factor-edge [my-dimension my-factor my-max my-technology-name]

Increases the edge’s control factor (used to calculate payoffs, manipulated by soft-control-interventions)

Parameters

my-dimensionthe number of dimension which shall be altered
my-factorold-value * factor = new-factor, if old-value = 1, addition must be used instead of muliplication
my-maxnow-factor won’t exceed my-max
my-technology-namename of technology whose value shall be altered

decrease-control-factor-edge

to decrease-control-factor-edge [my-dimension my-divisor my-min my-technology-name]

Decreases the edge’s control factor (used to calculate payoffs, manipulated by soft-control-interventions)

Parameters

my-dimensionthe number of dimension which shall be altered
my-divisorold value / my-divisor = new-value
my-minnew-value won’t fall below my-min
my-technology-namename of technology whose value shall be altered

increase-control-factor-node

to increase-control-factor-node [my-dimension my-factor my-max my-technology-name]

Increases the node’s control factor (used to calculate payoffs, manipulated by soft-control-interventions)

Parameters

my-dimensionthe number of dimension which shall be altered
my-factorold-value * factor = new-factor
my-maxnow-factor won’t exceed my-max
my-technology-namename of technology whose value shall be altered

decrease-control-factor-node

to decrease-control-factor-node [my-dimension my-divisor my-min my-technology-name]

Decreases the node’s control factor (used to calculate payoffs, manipulated by soft-control-interventions)

Parameters

my-dimensionthe number of dimension which shall be altered
my-divisorold value / my-divisor = new-value
my-minnew-value won’t fall below my-min
my-technology-namename of technology whose value shall be altered

get-dimension-to-control

to-report get-dimension-to-control [my-dimension my-degree-vector]

Reports the worst function in terms of degree or the one indicated by the string given as “my-dimension”

Parameters

my-dimensiona string, indicating wether a distinct dimension (given by name) or all (“all”) dimensions available shall be used to calculate “worst degree”
my-degree-vectora vector of degree values used to calculate worst dimension in case of “my-dimension = “all””

Returns

intthe number of dimension to be controlled.

activate-low-emission-zone

to activate-low-emission-zone [my-radius my-cost-factor my-dimension]

Implements a low-emission zone with taxes for agents using technology car in a specified area-

Parameters

my-radiusint, indicating the radius of the low-emission-zone (in nodes)
my-cost-factorint, indicating the factor of cost raise for using technology car
my-dimensionstring, indicating which dimension shall be used to calculate the most used edge (e.g. pollution/capacity etc.).

build-low-emission-zone

to-report build-low-emission-zone [my-nodes my-radius]

Builds rucursively the low emission zone as specified in function activate-low-emission-zone

Parameters

my-nodesagentset of nodes actually being marked as part of the low-emission-zone
my-radiusint, indicating the radius of the low-emission-zone (in nodes)

Returns

agentset of <nodes>the nodes actually being marked as part of the low-emission-zone

combineMoneyComfort

to combineMoneyComfort [moneyFactor moneyTechnology comfortFactor comfortTechnology]

Helper function to be used in behaviour space, allows to specify experiments with two technology factors to be influenced easily (helping to reduce number of combinatorial options)

to automated-control
Triggers a control algorithm specified via GUI-switch “control-algorithm” (can be used in behaviour space experiments as well).
to automated-control-soft-car
Automated control algorithm, increasing the costs of car usage (as long as value does not raise over soft-control-max-value) if any short time limit is about global->percentage-soft-automated-control, decreasing otherwise (as long as value does not fall below soft-control-min-value).
to automated-control-strong-car
Automated control algorithm, banning technology car from edges and nodes if any short time limit is about global->percentage-strong-automated-control, re-allowing the car if limit falls below global->percentage-strong-automated-control again.
to automated-control-soft-strong-car
Automated control algorithm, combining automated-control-soft-car and automated-control-strong-car Used in basic Jasss experiments.
to automated-control-soft
Automated control algorithm, increasing the costs of usage of all technologies (as long as value does not raise over soft-control-max-value) if any short time limit is about global->percentage-soft-automated-control, decreasing otherwise (as long as value does not fall below soft-control-min-value)
to automated-control-strong
Automated control algorithm, banning most harming technology from edges and nodes if any short time limit is about global->percentage-strong-automated-control, re-allowing the usage of the respective technology if limit falls below global->percentage-strong-automated-control again.
to automated-control-strong-splitted
Automated control algorithm, banning most harming (out of all) technologies in case of exceeding capacity limits, banning the car only in case of emission problems.
to automated-control-soft-car+strong-splitted
Automated control algorithm, soft intervention on cars in case of any short time limit problems, strong intervention in case of capacity problems for all technologies, for the car in case of emission problems.
to automated-control-standard
Runs the standard version ofautomated-control, which can basically be split to two sorts of intervention a) Soft control: If degree of usage reaches global->percentage-soft-atomated-control, costs of that technology influencing the respective dimension of degree most negatively will be increased.
Holds the technologies
to automated-control-luebke
Runs the automated-control which can basically be split to two sorts of intervention.
to automated-control-edges [my-mode my-time my-dimension my-technology-name]
Handles automated control (soft and strong) on edges, based on edge->edge-limits-short-time/edge->edge-degree-short-time.
Hold the edges.
ordered list, holds limits for a short time range, each dimension may have an upper and a lower limit, “don’t care” indicated by “e”, Euler’s number
ordered list, holds degree (calculated from limits and payoffs) for a short time range
to automated-control-nodes [my-mode my-time my-dimension my-technology-name]
Handles automated control (soft and strong) on nodes, based on short-time-limits/degrees
to increase-technology-value [my-technology-type-name my-dimension-name]
Increases technology-type->technology-type-factor value of the given dimensionen by 0.1.
used to calculate costs and benefits of the technologies instantiated based on this technology-type, by map-multiplication with cost-benefits-vectors of nodes/edges within calculate-costs-benefits
to decrease-technology-value [my-technology-type-name my-dimension-name]
Decreases technology-type->technology-type-factor value of the given dimensionen by 0.1.
to set-technology-value [my-technology-type-name my-dimension-name my-value]
Sets technology-type->technology-type-factor value of the given dimensionen to input value.
to set-technology-speed-factor [my-technology-type-name my-edge-type my-value]
Sets technology speed factor for a technology on an edge-type to the given value
to-report worst-value-position [my-vector]
Report the position of the worst (i.e.
to-report worst-technology-allowed [my-dimension]
Reports that technology (actually not banned) showing most negative impact with respect to the given dimension
to-report best-technology [my-dimension]
Reports that technology (actually banned) showing least negative impact with respect to the given dimension
to-report ban-technology [my-technology]
Bans the given technology, reports true if technology was not banned before
to-report allow-technology [my-technology]
Allows the given technology (set item 1 to true), , reports true if technology was banned before
to-report change-technology-state [my-technology my-state]
Change technology-available-state of my-technology to my-state, report true if state was changed to a new value
to increase-control-factor-edge [my-dimension my-factor my-max my-technology-name]
Increases the edge’s control factor (used to calculate payoffs, manipulated by soft-control-interventions)
to decrease-control-factor-edge [my-dimension my-divisor my-min my-technology-name]
Decreases the edge’s control factor (used to calculate payoffs, manipulated by soft-control-interventions)
to increase-control-factor-node [my-dimension my-factor my-max my-technology-name]
Increases the node’s control factor (used to calculate payoffs, manipulated by soft-control-interventions)
to decrease-control-factor-node [my-dimension my-divisor my-min my-technology-name]
Decreases the node’s control factor (used to calculate payoffs, manipulated by soft-control-interventions)
to-report get-dimension-to-control [my-dimension my-degree-vector]
Reports the worst function in terms of degree or the one indicated by the string given as “my-dimension”
to activate-low-emission-zone [my-radius my-cost-factor my-dimension]
Implements a low-emission zone with taxes for agents using technology car in a specified area-
to-report build-low-emission-zone [my-nodes my-radius]
Builds rucursively the low emission zone as specified in function activate-low-emission-zone
to combineMoneyComfort [moneyFactor moneyTechnology comfortFactor comfortTechnology]
Helper function to be used in behaviour space, allows to specify experiments with two technology factors to be influenced easily (helping to reduce number of combinatorial options)
Used to hold characteristics of technology types, will be used as base when instantiating agent-individuall objects of type technology.
Hold the nodes.
Close