Constraint Generation Time: pywraplp, model_builder, mathopt

34 views
Skip to first unread message

Li Mike

unread,
Apr 30, 2026, 9:36:33 PM (12 days ago) Apr 30
to or-tools-discuss
For the same model implemented using the pywraplp, model_builder, and mathopt​ interfaces, I tested the time taken to generate the same set of constraints:
  • pywraplp: 7s
  • model_builder: 5s
  • mathopt: 20s
model_builder​ was the fastest at only 5s, while mathopt​ was the slowest at 20s. Is this performance difference normal?

Considering Migration for HiGHS Support
I am currently using OR-Tools 9.14 with the pywraplp interface. My original plan was to migrate to mathopt​ to use the HiGHS solver, but the slow constraint generation time (20s) is making me hesitant.
I am now considering migrating to model_builder​ instead. Does the model_builder interface in OR-Tools 9.14 and 9.15 support the HiGHS solver and support hints to Highs?

Li Mike

unread,
May 1, 2026, 1:03:18 AM (12 days ago) May 1
to or-tools-discuss
I tried, it seems   pywraplp  and  model_builder interface in OR-Tools 9.14 and 9.15 support the HiGHS solver, but they didn't support   hints to Highs. Am I right?

Ross Anderson

unread,
May 7, 2026, 7:56:21 AM (5 days ago) May 7
to or-tools-discuss
I am assuming you the same person as in this github comment?

https://github.com/google/or-tools/pull/4737#issuecomment-4396872081

I have replied there.
Reply all
Reply to author
Forward
0 new messages