Skip to main content

TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'

Answered

Comments

3 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?.
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Julia,

    It might be that the problem becomes infeasible when you optimize over the whole year and then \(\texttt{prob.objective}\) returns a None value. You might want to check the optimization status code before accessing the objective value.

    Best regards,
    Jaromił

    0
  • JC
    Gurobi-versary
    First Comment
    First Question

    Hi Jaromil,

    Thank you for the feedback. I will try that out!

    Julia 

    0

Post is closed for comments.