Varying solves time for same problem

45 views
Skip to first unread message

Hon Fai Vuong

unread,
Aug 29, 2025, 5:13:00 PMAug 29
to or-tools-discuss
Hi All, I'm using the cp_solver for a problem and getting drastically different solve times on the same exact problem. 

Sometimes it solves in 6 seconds while in others it won't find a solution even after 6 minutes.  Or other times it might fall somewhere in between.  I have 28 workers and know that there's some non-determinism in the heuristics of the solver.  My question is how to get to run consistently faster and what would be causing this behavior in the formulation?  I'm not really sure what to look for.  

Slow log example
Objective bounds     Num
  'initial_domain':    1

Solution repositories    Added  Queried  Synchro
  'feasible solutions':      0        0        0
   'fj solution hints':  3'384        0    3'357
        'lp solutions':  8'702      790    3'816
                'pump':      0        0

Clauses shared                      Num
                'fs_random_no_lp':  254
  'fs_random_quick_restart_no_lp':    1
                     'max_lp_sym':    3
                          'no_lp':    1
                  'probing_no_lp':  244

CpSolverResponse summary:
status: UNKNOWN
objective: 250
best_bound: 250
integers: 13625
booleans: 16191
conflicts: 6604
branches: 616044
propagations: 30655558
integer_propagations: 27271006
restarts: 160583
lp_iterations: 1306694
walltime: 375.6
usertime: 375.6
deterministic_time: 3425.48
gap_integral: 0

Fast log example
Solutions (1)                         Num   Rank
  'fj_lin_restart_compound_perturb':    1  [1,1]

Objective bounds     Num
  'initial_domain':    1

Solution repositories    Added  Queried  Synchro
  'feasible solutions':      1        0        1
   'fj solution hints':    749        0      745
        'lp solutions':    941      305      467
                'pump':      0        0

Clauses shared    Num
   'max_lp_sym':    3

CpSolverResponse summary:
status: OPTIMAL
objective: 250
best_bound: 250
integers: 13625
booleans: 16191
conflicts: 22002
branches: 2725953
propagations: 63488513
integer_propagations: 45254526
restarts: 120101
lp_iterations: 0
walltime: 54.7761
usertime: 54.7761
deterministic_time: 773.91
gap_integral: 0
solution_fingerprint: 0x18b609ab718e06d9

Thanks,
Hon Fai

Laurent Perron

unread,
Aug 29, 2025, 8:00:41 PMAug 29
to or-tools-discuss
Yes, solve is non deterministic 

--Laurent


--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/or-tools-discuss/c520351d-0d55-4b87-9a06-516c2ea3dab9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages