BlockScience / rideshare-model

0 stars 0 forks source link

State Recording #42

Open SeanMcOwen opened 4 days ago

SeanMcOwen commented 4 days ago

From DIPR:

The simulation records the state of the system at each time step, capturing metrics such as completed rides, total distance traveled, and total cost. These metrics are used to evaluate the performance of the system and compare different routing strategies.

Notes from Sean:

Tasks:

SeanMcOwen commented 4 days ago

Also some code:

def record_state(self, current_time):
    completed_rides = len(self.completed_rides)
    total_distance = sum([ride.metadata['distance_km'] for ride in self.completed_rides])
    total_cost = sum([ride.metadata['cost_usd'] for ride in self.completed_rides])
    self.state_map.record_state(current_time, completed_rides, total_distance, total_cost)