Predicting critical conditions in bicycle sharing systems