Skip to main content

Enegy Storage Arbitrage - Penalty function or Linearization

Answered

Comments

1 comment

  • Jaromił Najman
    • Gurobi Staff

    Hi Viktor,

    You could use general constraints to model your nonlinear function. However, given the complexity of your function, I would recommend trying a manual piecewise-linear approximation. You can use the addGenConstrPWL() method for this. An example of how to compute a piecewise-linear approximation is given in the gc_pwl_func.py example.

    Best regards, 
    Jaromił

    0

Please sign in to leave a comment.