In this folder we have all the python scripts used to compute the value losses shown in numerical section of the paper Value Loss in Allocation Systems with Provider Guarantees.

There are two types of instances generated, those based on synthetic data and those based on all the 2016 Yellow Taxi trips (dataset available in https://data.cityofnewyork.us/Transportation/2016-Yellow-Taxi-Trip-Data/k67s-dv2t [last accessed, April 13, 2020]). 

To generate the synthetic instances, run the two scripts "Value_loss_SyntheticData.py" and "Value_Loss_SyntheticData_fixedLen.py". The second one generates instances with fixed length intervals.

In order to generate the instances based on the taxi trip data, you must first clean the data using the "data_cleaning_general.py" script. This script filters the data to one sector of NYC and removes the outliers from the data.

Once the data is filtered, there are three scripts that compute the value loss for instances generated using this data. The first "Value_loss_Average.py" computes the average value loss. The second script, "Value_loss_Average-withNonSymmetricProv.py" computes the same average value losses, but with non symmetric providers. The third script, "Value_loss_Average-Geog-Const.py" computes the average value loss adding the geographical constraints described in the numerical Appendix B. 