Agent
Package defining agent related functionality.
ResourceManagementActuator
¶
Bases: Actuator
Actuator class that will be part of a ScheduledAgent
or any other agent that controls the evolution of the resource management task.
Source code in matbii\tasks\resource_management\resource_management.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
|
burn_fuel(target, burn)
¶
Burns a given amount of fuel in the target
tank, if the tank is empty this has no effect.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target |
int | Literal['a', 'b']
|
target tank |
required |
burn |
float
|
amount of fuel to burn. |
required |
Returns:
Name | Type | Description |
---|---|---|
BurnFuelAction |
BurnFuelAction
|
the action |
Source code in matbii\tasks\resource_management\resource_management.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
pump_fuel(target, flow)
¶
Pumps the given amount of fuel via the given pump.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target |
int | Literal['ab', 'ba', 'ca', 'ec', 'ea', 'db', 'fd', 'fb']
|
target pump (this will determine which tanks are pumped to/from). |
required |
flow |
float
|
amount of fuel to pump. |
required |
Returns:
Name | Type | Description |
---|---|---|
PumpFuelAction |
PumpFuelAction
|
the action |
Source code in matbii\tasks\resource_management\resource_management.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
|
toggle_pump(target)
¶
Toggle pump state (on -> off, off -> on).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target |
int | Literal['ab', 'ba', 'ca', 'ec', 'ea', 'db', 'fd', 'fb']
|
target pump. |
required |
Returns:
Name | Type | Description |
---|---|---|
TogglePumpFailureAction |
TogglePumpAction
|
the action |
Source code in matbii\tasks\resource_management\resource_management.py
158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
|
toggle_pump_failure(target)
¶
Toggle a pump failure (on/off -> failure, failure -> off).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target |
int | Literal['ab', 'ba', 'ca', 'ec', 'ea', 'db', 'fd', 'fb']
|
target pump. |
required |
Returns:
Name | Type | Description |
---|---|---|
TogglePumpFailureAction |
TogglePumpFailureAction
|
the action |
Source code in matbii\tasks\resource_management\resource_management.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|
SystemMonitoringActuator
¶
Bases: Actuator
Actuator class that will be part of a ScheduledAgent
or any other agent that controls the evolution of the system monitoring task.
Source code in matbii\tasks\system_monitoring\system_monitoring.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
|
off_light(target)
¶
Switch the target
light to the "off" state.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target |
int
|
the integer |
required |
Returns:
Name | Type | Description |
---|---|---|
SetLightAction |
SetLightAction
|
the action |
Source code in matbii\tasks\system_monitoring\system_monitoring.py
146 147 148 149 150 151 152 153 154 155 156 |
|
on_light(target)
¶
Switch the target
light to the "on" state.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target |
int
|
the integer |
required |
Returns:
Name | Type | Description |
---|---|---|
SetLightAction |
SetLightAction
|
the action |
Source code in matbii\tasks\system_monitoring\system_monitoring.py
134 135 136 137 138 139 140 141 142 143 144 |
|
perturb_slider(target)
¶
Perturb the target
slider by +/- 1 slot.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target |
int
|
the integer |
required |
Returns:
Name | Type | Description |
---|---|---|
SetSliderAction |
SetSliderAction
|
the action |
Source code in matbii\tasks\system_monitoring\system_monitoring.py
170 171 172 173 174 175 176 177 178 179 180 181 |
|
toggle_light(target)
¶
Toggle the target
light (on->off, off->on).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target |
int
|
the integer |
required |
Returns:
Name | Type | Description |
---|---|---|
SetLightAction |
SetLightAction
|
the action |
Source code in matbii\tasks\system_monitoring\system_monitoring.py
158 159 160 161 162 163 164 165 166 167 168 |
|
TrackingActuator
¶
Bases: Actuator
Actuator class that will be part of a ScheduledAgent
or any other agent that controls the evolution of the tracking task.
Source code in matbii\tasks\tracking\tracking.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|
move_target(direction, speed)
¶
Move the tracking target in a given direction at a given speed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
direction |
tuple[float, float] | int | float
|
direction to move. |
required |
speed |
float
|
speed to move (svg units per call to this function) # TODO perhaps this should be per second! |
required |
Returns:
Name | Type | Description |
---|---|---|
TargetMoveAction |
TargetMoveAction
|
the action to move the tracking target. |
Source code in matbii\tasks\tracking\tracking.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|
perturb_target(speed)
¶
Move the tracking target in a random direction at a given speed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
speed |
float
|
speed to move (svg units per call to this function) # TODO perhaps this should be per second! |
required |
Returns:
Name | Type | Description |
---|---|---|
TargetMoveAction |
TargetMoveAction
|
the action to move the tracking target. |
Source code in matbii\tasks\tracking\tracking.py
121 122 123 124 125 126 127 128 129 130 131 132 133 |
|