Skip to main content

How to round up in gurobi python?

Ongoing

Comments

2 comments

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi,

    What values can your continuous-time parameters take? Is it possible that \(\texttt{tp[s]+twg[s]}\geq 2\) for some \(s\)? If yes, then you have to somehow limit \(s\) even further to, e.g., \(\texttt{0 <= s <= 20}\).

    A different approach would be to compute the value of \(\texttt{math.ceil(s+p[s]+twg[s])}\) before adding the constraint and then adjust it appropriately such that it fits within the slot bounds.

    Best regards,
    Jaromił

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    This is a cross-post from https://stackoverflow.com/questions/63775312/how-to-round-up-in-gurobi-python

    0

Please sign in to leave a comment.