Skip to main content

Optimize a probability distribution to maximize a sum of coefficients on log-probs

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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.
  • Simranjit Kaur
    • Gurobi Staff

    Hi David,

    Gurobi matrix variables are not yet compatible with the addGenConstrExp method in Gurobi 11.0.3. You can use the tolist function and add the general constraints over the for loop. For the accuracy of the result, please try using the parameter FuncNonLinear=1. With this setting, the general constraints in your model will be handled inside the branch-and-bound tree using a dynamic outer-approximation approach instead of the default piecewise linear approximations.Otherwise, you can control the granularity of the piecewise approximations using the parameters such as FuncPieces and FuncPieceError.

    Best regards,
    Simran

    0
  • David Forman
    • Gurobi-versary
    • First Comment
    • First Question

    Thanks for the quick help!

     

    0

Post is closed for comments.