Skip to main content

quicksum() and sum()

Answered

Comments

1 comment

  • Maliheh Aramon
    • Gurobi Staff

    Hi, 

    Yes, the \(\texttt{quicksum}\) is a gurobipy global function and the \(\texttt{sum}\) is a python function. The \(\texttt{quicksum}\) is a version of the \(\texttt{sum}\) function and it is faster for building large Gurobi expressions (see the documentation of the \(\texttt{quicksum}\) function for mode details)

    The difference between the\(\texttt{quicksum}\) and \(\texttt{sum}\) functions affects the time it takes to build the model. It has no impact on the time it takes to optimize the model or the values of feasible/optimal solutions.

    Best regards,

    Maliheh

    1

Please sign in to leave a comment.