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

Infeasibility Issues / Optimal Control of Mixed Logical Dynamical Systems / MIQP

回答済み

コメント

2件のコメント

  • Jaromił Najman
    • Gurobi Staff

    Hi Johannes,

    You could write the model you construct to a human-readable LP file via the write method.

    [...]
    m.update()

    m.write("myModel.lp")

    m.optimize()
    m.printStats()
    [...]

    You can open the file \(\texttt{myModel.lp}\) in any standard Text Editor and analyze whether the model looks as expected.

    One thing that comes to mind is that the default lower bound value for optimization variables in Gurobi is \(0\). If your variables are allowed to take negative values, then you have to explicitly state so when constructing the variables.

    V = m.addMVar(shape=(N*(nu + nd + nz), 1), lb=-GRB.INFINITY, vtype = GRB.CONTINUOUS, name='V')

    You could also share the content of the LP file here if further help is needed.

    Best regards, 
    Jaromił

     

    0
  • Johannes Randenborgh
    • Gurobi-versary
    • First Comment
    • First Question

    Hi Jaromił,

    thanks for the immediate reply.

    **Solution**: I forgot so set lb= - GRB.INFINITY. The system dynamics force the state to alternate between positive and negative values.

    Bests,

    Johannes

    0

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