Skip to main content

Gurobi.GRBException:“Element 0 of a double array is Nan.”

Awaiting user input

Comments

2 comments

  • Official comment
    Simranjit Kaur
    Gurobi Staff 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 why not try our AI Gurobot?.
  • Eli Towle
    Gurobi Staff Gurobi Staff

    Can you please post a minimal, self-contained code example that reproduces the issue?

    How are you modeling the Napierian logarithm? Note that Gurobi can handle general quadratic constraints, but it is not a general nonlinear solver (see What types of models can Gurobi solve?). However, Gurobi supports modeling certain nonlinear functions, which are then translated internally to piecewise-linear approximations of these functions. So, you could model the Napierian logarithm using GRBModel.AddGenConstrLog() as a starting point. Alternatively, you could build your own piecewise-linear approximation of the Napierian logarithm.

    0

Post is closed for comments.