itsmekhalidb / PlanesOverTrains

Repo for Planes Over Trains (group 5) of the Fall 2023 section of Pitt's ECE 1140 class
1 stars 1 forks source link

self._time is never greater than train.get_departure_time in CTC.py #20

Closed ldt9 closed 1 year ago

ldt9 commented 1 year ago

https://github.com/itsmekhalidb/PlanesOverTrains/blob/5bfe136c9d455151bce6fe9d1d3bde3a13fe0abe/CTC/CTC.py#L134

        output = {}
        # TODO: Fix sys time and real world time not matching
        for train in self._trains:
            if self._time >= train.get_departure_time():
                output[train.get_train_number()] = train.get_route_info()
        return output
if self._time >= train.get_departure_time():

self._time is never greater than train.get_departure_time

Might not be updated in the schedule for the train

ldt9 commented 1 year ago

Fixed now