Mixed integer programming for emission and flow time reduction for locks in sequence