Skip to main content

How to give the initial solution

Answered

Comments

3 comments

  • Simranjit Kaur
    Gurobi Staff Gurobi Staff

    Hi Kanato,

    It seems you are missing the m.optimize() command after the mip start file is read (m.read(file_name). For details on how to provide a mip start to a model, please see the article: How do I use MIP starts?

    Best regards,
    Simran

    0
  • Kanato IMURA
    First Comment
    First Question

    Thank you for your reply.

    The initial values ​​were loaded correctly and MIPstart was executed.

    However, the calculation time is longer than expected, and the purpose of shortening the calculation time by specifying initial values ​​has not been achieved. Initial values ​​were specified for 21 days, 25 days, etc.

    If the goal is to shorten the calculation time, is ① this kind of process useless?

    Or, ② are the initial values ​​specified incorrectly? Regarding ②, when I ran the program, I received a warning like this: Warning: Completing partial solution with 12204 unfixed non-continuous variables out of 12829. Could this be the cause?

    Below is the console screen when it was executed. I would appreciate any advice, no matter how trivial. Thank you in advance.

     

    Optimize a model with 20434 rows, 12829 columns and 97539 nonzeros
    Model fingerprint: 0x05057b09
    Variable types: 0 continuous, 12829 integer (12750 binary)
    Coefficient statistics:
      Matrix range     [1e+00, 8e+00]
      Objective range  [1e+00, 1e+02]
      Bounds range     [1e+00, 1e+00]
      RHS range        [1e+00, 2e+02]

    Warning: Completing partial solution with 12204 unfixed non-continuous variables out of 12829
    Processing user MIP start: 0 nodes explored in subMIP, total elapsed time 5s
    Processing user MIP start: 0 nodes explored in subMIP, total elapsed time 10s
    Processing user MIP start: 0 nodes explored in subMIP, total elapsed time 15s
    Processing user MIP start: 0 nodes explored in subMIP, total elapsed time 20s
    Processing user MIP start: 0 nodes explored in subMIP, total elapsed time 25s
    Processing user MIP start: 0 nodes explored in subMIP, total elapsed time 30s
    Processing user MIP start: 0 nodes explored in subMIP, total elapsed time 35s
    Processing user MIP start: 57 nodes explored in subMIP, total elapsed time 40s
    Processing user MIP start: 195 nodes explored in subMIP, total elapsed time 45s
    User MIP start produced solution with objective 408 (48.87s)
    Processing user MIP start: 424 nodes explored in subMIP, total elapsed time 50s
    Loaded user MIP start with objective 408
    Processed MIP start in 52.25 seconds (51.53 work units)

    Presolve removed 12131 rows and 10182 columns
    Presolve time: 0.35s
    Presolved: 8303 rows, 2647 columns, 38135 nonzeros
    Variable types: 0 continuous, 2647 integer (2584 binary)

    Root simplex log...

    Iteration    Objective       Primal Inf.    Dual Inf.      Time
           0    1.0500000e+02   2.493500e+03   0.000000e+00     53s
        8554    1.0700000e+02   0.000000e+00   0.000000e+00     55s

    Root relaxation: objective 1.070000e+02, 8554 iterations, 2.21 seconds (1.73 work units)
    Total elapsed time = 56.51s (DegenMoves)

        Nodes    |    Current Node    |     Objective Bounds      |     Work
     Expl Unexpl |  Obj  Depth IntInf | Incumbent    BestBd   Gap | It/Node Time

         0     0  107.00000    0  662  408.00000  107.00000  73.8%     -   59s
         0     0  107.00000    0  884  408.00000  107.00000  73.8%     -   60s

    0
  • Simranjit Kaur
    Gurobi Staff Gurobi Staff

    Hi Kanato,

    Providing a good start solution can potentially help in speeding the solve time (but there is no guarantee).

    Your model has 12829 integer variables. The warning in the log

    Warning: Completing partial solution with 12204 unfixed non-continuous variables out of 12829

    means that your partial mip start fixes only 625 integer variables out of 12829, leading to a challenging subproblem that is almost as difficult as the original model. As you can see in the log, the solver had to explore 424 nodes and spend almost 50 seconds to complete your partial mip start and find a feasible solution. If possible, please provide a more complete solution in the MIP start by fixing a larger portion of the integer variables.

    Best regards,
    Simran

    0

Please sign in to leave a comment.