Error "Check failed: heuristics.fixed_search != nullptr" during search in the cpsolver?

74 views
Skip to first unread message

YINXIONG CHEN

unread,
Oct 8, 2025, 12:38:08 AM (9 days ago) Oct 8
to or-tools-discuss
Dear all,

I am using ortools 9.14.6206. I created a cpmodel to resolve job scheduling problem with hinter solution. 
The hinter solution succeed in preload. It also looks good during the first few searches, but soon it throws me the error of "heuristics.fixed_search != nullptr". Do you know what problem will cause this issue and how to fix it? 

Thanks. 

""""""""""""
Preloading model.
#Bound   2.72s best:inf   next:[61650,4000830] initial_domain
#1       2.72s best:924900 next:[61650,924885] complete_hint
#Model   2.73s var:8333/8333 constraints:12695/12695

Starting search at 2.73s with 8 workers.
6 full problem subsolvers: [core, default_lp, max_lp_sym, no_lp, quick_restart, reduced_costs]
2 first solution subsolvers: [fj, fs_random_no_lp]
13 interleaved subsolvers: [feasibility_pump, graph_arc_lns, graph_cst_lns, graph_dec_lns, graph_var_lns, ls, rins/rens, rnd_cst_lns, rnd_var_lns, scheduling_intervals_lns, scheduling_precedences_lns, scheduling_resource_windows_lns, scheduling_time_window_lns]
3 helper subsolvers: [neighborhood_helper, synchronization_agent, update_gap_integral]
1 ignored subsolver: [fixed]

#2       2.95s best:922320 next:[61650,922305] rnd_cst_lns (d=5.00e-01 s=7 t=0.10 p=0.00 stall=0 h=base)
#3       5.16s best:801825 next:[61650,801810] graph_arc_lns (d=5.00e-01 s=9 t=0.10 p=0.00 stall=0 h=base)
#4       6.06s best:770775 next:[61650,770760] graph_cst_lns (d=5.00e-01 s=10 t=0.10 p=0.00 stall=0 h=base) [combined with: graph_arc_lns (d=5.0...]
#5       6.44s best:723330 next:[61650,723315] scheduling_time_window_lns (d=5.00e-01 s=13 t=0.10 p=0.00 stall=0 h=base)
#6       6.98s best:710295 next:[61650,710280] scheduling_resource_windows_lns (d=5.00e-01 s=14 t=0.10 p=0.00 stall=0 h=base)
#7      10.37s best:626130 next:[61650,626115] scheduling_intervals_lns (d=5.00e-01 s=12 t=0.10 p=0.00 stall=0 h=base)
#8      12.13s best:622830 next:[61650,622815] rnd_var_lns (d=7.07e-01 s=18 t=0.10 p=1.00 stall=1 h=base)
#9      14.20s best:567885 next:[61650,567870] rnd_cst_lns (d=7.07e-01 s=24 t=0.10 p=1.00 stall=0 h=base)
#10     14.35s best:567855 next:[61650,567840] ls_restart_decay_compound_perturb(batch:1 lin{mvs:0 evals:12} gen{mvs:40 evals:1'044} comp{mvs:6 btracks:17} #w_updates:0 #perturb:0)
Check failed: heuristics.fixed_search != nullptr
*** Check failure stack trace: ***

""""""""""""

Laurent Perron

unread,
Oct 8, 2025, 3:33:55 AM (9 days ago) Oct 8
to or-tools-discuss
Can you attach the model ?

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


--
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/d1a370b3-61e6-4229-ade0-9f73792e868dn%40googlegroups.com.

YINXIONG CHEN

unread,
Oct 8, 2025, 9:00:22 AM (8 days ago) Oct 8
to or-tools-discuss
Hi Laurrent

Sure. I am attaching two models. One with hinter, another one without. And their related log files.

error_when_hinting.txt
model_step_3_with_hints.pb
ok_when_not_hinting.txt
model_step_3_without_hints.pb

YINXIONG CHEN

unread,
Oct 8, 2025, 9:02:37 AM (8 days ago) Oct 8
to or-tools-discuss
Hi Laurent,

Also the test_model_crash.py. Maybe this can be helpful for debug.

Thanks.

On Wednesday, October 8, 2025 at 3:33:55 PM UTC+8 Laurent Perron wrote:
test_model_crash.py

Laurent Perron

unread,
Oct 9, 2025, 8:17:23 AM (7 days ago) Oct 9
to or-tools...@googlegroups.com
Thanks. I found the bug.

Can you not use repair_hint in the meantime ?

Thanks
Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


YINXIONG CHEN

unread,
Oct 9, 2025, 11:29:31 AM (7 days ago) Oct 9
to or-tools-discuss
hi Laurent

Thanks a lot! I removed the solver parameters repair_hint and it worked. 

Can you explain why the repair_hint will cause the error here?

Thanks.

Laurent Perron

unread,
Oct 9, 2025, 11:53:04 AM (7 days ago) Oct 9
to or-tools-discuss
Because the function that runs this code fails if the modified model (that tries to repair the hint) in unsat.

This happens in a lns worker. 

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00

YINXIONG CHEN

unread,
Oct 9, 2025, 12:07:09 PM (7 days ago) Oct 9
to or-tools-discuss
Does it mean even if the hinter solution is valid, the solver will try to repair the hint at the same time during searching when the repair_hint = True?

Laurent Perron

unread,
Oct 9, 2025, 12:31:15 PM (7 days ago) Oct 9
to or-tools-discuss
This is only useful if the hint is not valid/not complete

--Laurent


YINXIONG CHEN

unread,
Oct 9, 2025, 11:41:57 PM (7 days ago) Oct 9
to or-tools-discuss
Thanks a lot for the help, Laurent.

YINXIONG CHEN

unread,
Oct 10, 2025, 12:24:20 AM (7 days ago) Oct 10
to or-tools-discuss
Hi Laurent,

Can I ask you a different question? 

We notice that the feasible solution is different in every run. The bad thing is sometimes the output solution is really good, but sometimes not.

It is hard to explain to our users about the performance inconsistency. Do you have any suggestion?

Thanks.

Reply all
Reply to author
Forward
0 new messages