Skip to content

Use estimated_departure instead of departure in SessionInfo.remaining_time#124

Draft
Copilot wants to merge 3 commits into
masterfrom
copilot/update-algorithms-departure-value
Draft

Use estimated_departure instead of departure in SessionInfo.remaining_time#124
Copilot wants to merge 3 commits into
masterfrom
copilot/update-algorithms-departure-value

Conversation

Copy link
Copy Markdown

Copilot AI commented Jan 25, 2026

Algorithms were inadvertently using actual departure times via SessionInfo.remaining_time, contradicting the design intent that scheduling decisions should be based on estimated/predicted data available in real-world scenarios.

Changes

  • SessionInfo.remaining_time now calculates using estimated_departure instead of departure

    # Before
    remaining = min(self.departure - self.arrival, self.departure - self.current_time)
    
    # After  
    remaining = min(self.estimated_departure - self.arrival, self.estimated_departure - self.current_time)
  • Test expectations updated to reflect new behavior when estimated_departure ≠ departure

Impact

The remaining_time property is used by preprocessing logic to sort sessions (e.g., by laxity, remaining processing time). This change ensures sorting decisions align with the already-correct behavior in earliest_deadline_first() and least_laxity_first(), which use estimated_departure directly.

Original prompt

This section details on the original issue you should resolve

<issue_title>ENH: Algorithms should use estimated_departure instead of departure.</issue_title>
<issue_description>Is your feature request related to a problem? Please describe.
Currently algorithms within ACN-Sim use the real departure of the EV. However, this value is not always known perfectly, so instead we should use estimated_departure which can be provided based on real data taken from the user OR predicted in some other way.

Describe the solution you'd like
Replace departure with estimated_departure in ACN-Sim algorithms.
</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 25, 2026 04:58
- Modified SessionInfo.remaining_time property to use estimated_departure instead of departure
- Updated all related tests to match the new behavior
- All tests pass successfully

Co-authored-by: zach401 <9185874+zach401@users.noreply.github.com>
Co-authored-by: zach401 <9185874+zach401@users.noreply.github.com>
Copilot AI changed the title [WIP] Update algorithms to use estimated_departure instead of departure Use estimated_departure instead of departure in SessionInfo.remaining_time Jan 25, 2026
Copilot AI requested a review from zach401 January 25, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: Algorithms should use estimated_departure instead of departure.

2 participants