メインコンテンツへスキップ

Gurobi too slow & not enough memory

回答済み

コメント

3件のコメント

  • Riley Clement
    • Gurobi Staff

    Hi LC,

    I doubt parameters are going to be able to come to the rescue in this instance.  Time indexed models for machine scheduling grow pseudo-polynomially in size and soon become intractable.

    Alternative reformulation will be the best approach here.  If your units (a.k.a "machines") are identical, and each process is executed once, and once only, then you can use a formulation which does not require binary variables, or constraints, to be indexed by unit which will cut down the size significantly since you have M=10 units.

    \begin{eqnarray}
    \sum_t w_{it}=1, \forall i\\
    \sum_i \sum_{s = t-l_i+1}^t w_{is} \leq M, \forall t\\
    \end{eqnarray}

    Once the solve is finished you won't have an assignment of process to unit, but you are guaranteed to be able to construct a valid one trivially by iterating through processes in order of start time and assigning them to idle units.   I'd try this approach first as I suspect it would require little modification to your existing code.

    Another alternative is to try a disjunctive model, where variables are indexed by unit, but not time.  An example for job-shop problem (which is similar to identical parallel machine scheduling) can be found in this paper https://tidel.mie.utoronto.ca/pubs/JSP_CandOR_2016.pdf.  You would have to adapt it for your specific problem.

    - Riley

     

     

    0
  • LC
    • Gurobi-versary
    • First Comment
    • First Question

    Hi Riley,

    Thank you for the answer!

    I totally agree that reformulating the problem is the best approach here, but I'm not sure I can adapt my problem to the formulation you are proposing. My scenario has two particularities:

    1. The execution time of each process/task depends on the machine/unit it is executed.
    2. Not all machines can be utilized simultaneously. I have specific constraints saying that specific machines cannot be used simultaneously as other specific machines. For example, in a scenario with machines A, B and C, I could have constraints like:

                     -  A cannot be used at the same time as B
                     - A cannot be used at the same time as C
                        (but B and C can be used simultaneously)
      
    I will check the paper you mention and see if I can formulate my problem like a disjuctive model.

    Thank you again for the answer!

    Bests

      Luis

    0
  • Riley Clement
    • Gurobi Staff

    Hi Luis,

    I see, this does complicate things, although without fleshing out the details I think a disjunctive model could work with some tweaking. 

    Perhaps it may help to think of machines that cannot be simultaneously used as one unit with different processing times (and surely we'd always choose whichever machine gives the smallest processing time for that task).

    If the problem extends to "no more than n machines can be concurrently running amongst this set M of machines" then that will complicate it further and then I think disjunctive model would not be appropriate.

    - Riley

    0

サインインしてコメントを残してください。