Hi Mathieu,
scheduling is very hard for MIP technology, because the main work-horse (the LP
relaxation) is pretty much useless for scheduling. This is because the LP
relaxation can just squeeze jobs together in some fractional form, which makes
it easy to find feasible LP solutions that have very good objective values, even
though there is no feasible integer solution in the neighborhood of these LP
solutions.
If this is really a pure scheduling problem, then you might be better off using
a CP solver. Scheduling is the one problem class (maybe the only one?) where CP
is better suited than MIP (for the above reasons). But if you have other
constraints (like the assignment to the machines), then it can already be better
to use MIP.
In your particular model, does the problem decompose? I.e., can you just solve
the scheduling problems for each of the machines separately? If so, you should
do it. Even though Gurobi will detect and exploit this structure, it is still
better to solve three individual problems than one with three blocks.
Finally, I would be very interested in your problem instance, if you are willing
to share it. You could also contribute it to the new MIPLIB 2017:
https://miplibsubmissions.zib.de/
Best regards,
Tobias
On 03/31/17 11:28, Mathieu Vandenberghe wrote:
> Hello,
>
> I'm doing research into a scheduling problem and using Gurobi to solve it, but
> I'm seeing a very low level of performance that doesn't really make sense to me.
>
> The scheduling problem I have consists of determining the optimal order of M
> tasks that are scheduled on N machines. The tasks come pre-assigned to machines,
> so the model just has to figure out an optimal order for the M/N tasks assigned
> to it.
> To simplify the model down to what I think is useful:
> - The main decision variable is a _binary precedence matrix Y_, and Y_{ij}
> determines whether operation i is scheduled before j. As scheduling order only
> has meaning within a particular room, the Y matrix is a block diagonal matrix
> that has N blocks with information (each room's schedule) and 0 elsewhere.
> - The set of precedence relations Y is 'multiplied' by their respective
> durations and place in the schedule, which leads to a set of completion times C_i.
> - The objective function is something of the form: minimize C_j - C_i for all
> i,j; i.e. minimise the largest interval between completion times. (In my problem
> some i,j are excluded due to various criteria, but that will take us rather far
> afield.)
>
> I'm testing out a small problem now (3 machines, which have 5 tasks each; 15
> total), and Gurobi has a really hard time dealing with it.
> I find this strange because there are only 5!*5!*5! (=1.7 million) possible
> schedules to consider, which is relatively limited. As I'm typing now, Gurobi
> has been searching for over an hour and is nearing 2 million explored nodes. I
> think that a brute force search would have finished calculating all the possible
> permutations by now, so I'm confused why GUROBI seems to be overcomplicating things.
>
> Here's the final part of the log:
>
> |
> ExplUnexpl| Obj DepthIntInf|Incumbent BestBd Gap|It/NodeTime
>
> 164632544201infeasible 90 25.13500 18.10467 28.0% 40.23500s
> 164743443785 18.10467 36 77 25.13500 18.10467 28.0% 40.23506s
> 165182944232infeasible 67 25.13500 18.10467 28.0% 40.23510s
> 165266743721infeasible 83 25.13500 18.10467 28.0% 40.23516s
> 165506344149infeasible 44 25.13500 18.10467 28.0% 40.23520s
> 165765244660 18.10467 57 72 25.13500 18.10467 28.0% 40.23526s
> 166009044957infeasible 82 25.13500 18.10467 28.0% 40.23530s
> 166242744807infeasible 78 25.13500 18.10467 28.0% 40.23535s
> 166312044458 18.10467 62 75 25.13500 18.10467 28.0% 40.23540s
> 166556744558infeasible 66 25.13500 18.10467 28.0% 40.23546s
> 166781644584infeasible 52 25.13500 18.10467 28.0% 40.23550s
> 167043544650 18.10467 62 70 25.13500 18.10467 28.0% 40.23555s
> 167110744396 18.10467 66 41 25.13500 18.10467 28.0% 40.23560s
> 167381144494infeasible 85 25.13500 18.10467 28.0% 40.23565s
> 167446944206 18.10467 70 54 25.13500 18.10467 28.0% 40.33570s
> 167768944392 18.10700 87 57 25.13500 18.10467 28.0% 40.23575s
> 168096544644 18.10467 54 59 25.13500 18.10467 28.0% 40.23581s
> 168424444234infeasible 98 25.13500 18.10467 28.0% 40.23586s
> 168688844543infeasible 71 25.13500 18.10467 28.0% 40.23590s
> 168933744441infeasible 50 25.13500 18.10467 28.0% 40.23595s
> 169012043938infeasible 75 25.13500 18.10467 28.0% 40.23600s
> |
>
> My observations:
>
> 1) Gurobi probably found the optimal solution already (25.135) but is having
> trouble terminating. While in this particular case I could manually terminate, I
> want to be able to solve larger instances than this so I actually want to get to
> optimality (or a good chance of it).
> 2) Gurobi seems obsessed with finding solutions that are very close to the
> theoretically possible lower bound that I gave him (18.104), but he seems to
> waste a lot of time on nodes which are either infeasible, or reach the
> theoretical lower bound but violate lots of (54, 57, 59) integrality constraints
> while doing so. I'm assuming these integrality constraints are mainly values of Y.
> 3) The bound is not moving at all, but I guess this is because of the way the
> problem is structured (it's hard to put a tight lower bound on C_j - C_i without
> going through all the possible combinations...).\
>
> My sense is that with some more detailed instructions, Gurobi could solve things
> much faster. Something like: "O is the critical decision variable; don't violate
> too many integrality constraints because it's pointless" etc.
> I've tried experimenting with different solver variables (MIPFocus, VarBranch,
> Heuristics) and assigning a higher BranchPriority to Y, but I'm not sure what
> else to try.
>
> Suggestions greatly appreciated!
>
> Cheers,
> Mathieu
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Gurobi Optimization" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to
gurobi+un...@googlegroups.com <mailto:
gurobi+un...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.