Skip to main content

EV Battery Optimization - hitting processing error?

Answered

Comments

1 comment

  • Simranjit Kaur
    Gurobi Staff Gurobi Staff

    Hi Alison,

    Your screenshot shows a solution count of 2, which means Gurobi found 2 solutions during the solve. Both solutions have the objective value of 217.615 and are at an optimality gap of 0.0282%.

    You may want to solve it to optimality and check if the optimal objective value is as expected. If not, you can take the following steps to find the source of the error:

    • Check that the model is built as per your expectations. One way to do this is to write your model in the LP file format, using \(\texttt{model.write("mymodel.lp")}\), and review the objective, variables and constraints in this file. The LP file can be opened with any text editor.

    • If you know a solution that gives a better objective value than the optimal solution found by the solver, pass it to Gurobi and see what happens. To do this, you can fix the bounds of binary variables in the model to their values in your solution, using \(\texttt{var.UB=your_var_value}\) and \(\texttt{var.LB=your_var_value}\), and solve the fixed model. If the fixed model becomes infeasible, run the computeIIS() method to get the set of constraints and variables that makes it infeasible. To this end, please see our articles How do I determine why my model is infeasible? and How do I use 'compute IIS' to find a subset of constraints that are causing model infeasibility?.

    Best regards,
    Simran

    0

Please sign in to leave a comment.