Skip to main content

Gurobi dynamic probem

Awaiting user input

Comments

6 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Jaromił Najman
    • Gurobi Staff

    Hi Daniel,

    The code snippet you provided is not reproducible. There are definitions missing of multiple objects, e.g., \(\texttt{C_buy, dt, ...}\).

    If you cannot or don't want to share your model/code, could you please at least share the log files of a run with 10 times in T and a run with more times where Gurobi does not converge?

    Best regards, 
    Jaromił

    0
  • Daniel Fernández
    • Gurobi-versary
    • First Comment
    • First Question

    They are not important, it can be run with several values. However, the issue is that for T<=15 it is able to solve it. However if I increase this, the problem is that it is not able to assimilate the number of variables, it crashes. There is no important message to display because it just crashes. The key is that the variable T_ST_BMS_list becomes a longer and longer expression that it is not able to handle, at least that's the feeling I get. 

    Thank you for your answer

    0
  • Jaromił Najman
    • Gurobi Staff

    It is hard to help without anything to reproduce the issue.

    It might be that your machine runs out of memory because your model gets too big. Is this possible?

    Could you show the statistics for a model that can be solved, i.e., show the first ~20 lines of the log file / console output?

    0
  • Daniel Fernández
    • Gurobi-versary
    • First Comment
    • First Question
    Gurobi Optimizer version 9.5.2 build v9.5.2rc0 (win64)
    Thread count: 2 physical cores, 4 logical processors, using up to 4 threads
    Optimize a model with 76 rows, 40 columns and 400 nonzeros
    Model fingerprint: 0xa0bc8b29
    Model has 171 quadratic objective terms
    Coefficient statistics:
      Matrix range     [1e-02, 3e+00]
      Objective range  [5e-02, 4e+01]
      QObjective range [1e-01, 2e+01]
      Bounds range     [0e+00, 0e+00]
      RHS range        [5e-01, 8e+01]
    Presolve removed 52 rows and 22 columns
    Presolve time: 0.02s
    Presolved: 24 rows, 25 columns, 234 nonzeros
    Presolved model has 171 quadratic objective terms
    Ordering time: 0.00s

    Barrier statistics:
     Free vars  : 17
     AA' NZ     : 8.200e+02
     Factor NZ  : 8.610e+02
     Factor Ops : 2.382e+04 (less than 1 second per iteration)
     Threads    : 1

                      Objective                Residual
    Iter       Primal          Dual         Primal    Dual     Compl     Time
       0   4.52999965e+05 -3.56159762e+05  1.96e+03 5.85e+02  1.00e+06     0s
       1   9.56162030e+04 -1.59207143e+05  3.57e+02 1.07e+02  1.91e+05     0s
       2   1.77304735e+04 -1.17545166e+05  1.16e+01 2.55e+00  6.92e+03     0s
       3   1.28050736e+02 -7.26144742e+04  8.55e-06 2.55e-06  1.23e+03     0s
       4   1.18687411e+02 -7.13284325e+03  8.34e-07 2.49e-07  1.23e+02     0s
       5   3.64250867e+01 -1.16016288e+03  8.34e-13 2.89e-13  2.03e+01     0s
       6   1.25892198e+01 -4.86305732e+01  5.73e-14 1.72e-13  1.04e+00     0s
       7   8.54939679e+00  3.36948617e+00  1.91e-14 1.41e-13  8.78e-02     0s
       8   7.01563133e+00  5.98596671e+00  9.99e-16 2.35e-14  1.75e-02     0s
       9   6.77770116e+00  6.70701827e+00  7.03e-16 2.02e-14  1.20e-03     0s
      10   6.72505043e+00  6.71408466e+00  4.44e-16 2.42e-14  1.86e-04     0s
      11   6.72173994e+00  6.72082450e+00  2.22e-16 4.63e-14  1.55e-05     0s
      12   6.72147390e+00  6.72140848e+00  2.08e-16 3.95e-13  1.11e-06     0s
      13   6.72145295e+00  6.72144928e+00  2.22e-16 3.41e-14  6.22e-08     0s
      14   6.72145033e+00  6.72145011e+00  1.11e-16 3.58e-13  3.81e-09     0s

    Barrier solved model in 14 iterations and 0.04 seconds (0.00 work units)
    Optimal objective 6.72145033e+00


     

    These are the statics I get. Thats the problem the big number of quadratic terms. But, for example, I tried this in matlab and it is able to solve it, there is no other way to express a recurrent equation?

    This is just with 10 times by the way

    0
  • Jaromił Najman
    • Gurobi Staff

    The model is definitely manageable and memory should not be an issue at all.

    Could you show some output or share a screenshot of what exactly goes wrong when you now increase the number of times to let's say 16?

    You said "It just crashes". However, it is almost impossible to help here without seeing any output or without have a code snippet which reproduces the issue. Could you try to isolate the issue and write a minimal working example which results in the crash you see?

    0

Post is closed for comments.