I'm working on a vehicle routing problem, in which a vehicle need to pick up amounts of things in some nodes. I'm trying to solve it by Gurobi optimizer. Except for meeting the time windows of each nodes, it is also required that the capacity of the vehicle is limited, which causes a big problem for me. Every time when the vehicle leaves a node, it checks whether the remaining capacity can load the amount in the next node. If not, the vehicle need to unload first and then go to the next node (the unloading time can be neglected). my model for the capacity constraints are like:
As you can see, there are 4 indicator constraints, each of them has two conditions in "if" line. Does anyone know how to deal with such format of constraints in Gurobi? Or do we have more smarter modeling method to list some constraints that is easier to input in Gurobi optimizer?
Besides, since Gurobi doesn't support strict comparison signs like < and >, how do we deal with such a problem if we find a way to input the above constraint? I mean, if strict comparison sign is not supported then we have constraints like
if x <= 0, y =1; if x >= 0, y = 0, in which the value of
x has some overlap and it may cause problems.