-
Notifications
You must be signed in to change notification settings - Fork 0
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
Headlamp #8
base: energy-quality
Are you sure you want to change the base?
Headlamp #8
Conversation
Remove the qualities associated with headlamps and move preconditions to actions
@@ -24,7 +24,7 @@ | |||
"objective": "energyConsumption", | |||
"scaling-const": 0.3, | |||
"min-step-value": 0.0, | |||
"max-step-value": 2525 | |||
"max-step-value": 4185.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to change to cater for added energy along the longest path if the headlamp was turned on.
@@ -28,9 +28,11 @@ | |||
|
|||
private StateVarDefinition<Location> mrLocDef; | |||
private EffectClass mEffectClass; // of rLoc | |||
private StateVarDefinition<HeadlampState> mrHeadlampDef; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Movement probability now depends on the headlamp state, so change this file to add headlamp as a discriminant class and to use it to calculate transition probability.
@@ -34,12 +34,13 @@ | |||
private FormulaActionDescription<MoveToAction> mrLocActionDesc; | |||
|
|||
public RobotLocationActionDescription(ActionDefinition<MoveToAction> moveToDef, | |||
Precondition<MoveToAction> precondition, StateVarDefinition<Location> rLocDef) { | |||
Precondition<MoveToAction> precondition, StateVarDefinition<Location> rLocDef, StateVarDefinition<HeadlampState> rHeadlampDef) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now depend on headlamp state var
@@ -1,44 +1,52 @@ | |||
package examples.mobilerobot.metrics; | |||
|
|||
import examples.mobilerobot.models.HeadlampState; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EnergyConsumption now depends on headlamp state, so add that here.
This pull request shows how to add a headlamp turn on/off action to the robot scenario. The idea is that:
The changes in this PR are broadly described as:
MoveAction
to include the headlamp state of the robot