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

ChargeBattery task with finish_time earlier than start_time #29

Closed
Yadunund opened this issue Jul 28, 2021 · 0 comments · Fixed by #30
Closed

ChargeBattery task with finish_time earlier than start_time #29

Yadunund opened this issue Jul 28, 2021 · 0 comments · Fixed by #30
Labels
bug Something isn't working

Comments

@Yadunund
Copy link
Member

The task planner uses A* search to find a set of assignments for all robots such that an overall cost is minimized. The cost here is the sum of the differences of the estimated finish_time and given earliest_start_time for each task. Every time a new node is evaluated, ie, an unassigned task is assigned to an agent, we check if a ChargeBattery task should be added before/after. It is expected that anytime a task is added, the total cost of the node will increase as the finish_time for any task will always be greater or equal to the earliest_start_time.
However, this is violated in an edge cases due to a bug in the implementation of ChargeBattery::estimate_finish(). Here, when determining the time to recharge the battery, we first compute the battery_soc after the robot has reached its charger. Then the required increase in soc from the current value to the agent's recharge_soc is determined. However, if the user set the recharge_soc to a small value such that it is below the soc of the agent at the charger, a negative duration for recharging gets computed. There is an assert in place but it doesn't have any effect in release builds.

As a result the finish_time could end up earlier than the earliest_start_time. When this happens, adding a ChargeBattery task to the node actually lowers the cost. Hence this assignment will remain in place while other requests get allocated accordingly.

@Yadunund Yadunund added the bug Something isn't working label Jul 28, 2021
@Yadunund Yadunund added this to Issues in Research & Development via automation Jul 28, 2021
Research & Development automation moved this from Issues to Done Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

1 participant