8000 routing-solver / constraint-solver: `profile_propagation` crashes (on official example) · Issue #3912 · google/or-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
routing-solver / constraint-solver: profile_propagation crashes (on official example) #3912
Open
@sschnug

Description

@sschnug

What version of OR-Tools and what language are you using?
Version: 9.7 (shown) + 9.6.
Language: C++ (bazel)

Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
Routing Solver

What operating system (Linux, Windows, ...) and version?
Linux Ubuntu 22 LTS

I'm interested in some propagation-related timings similar to the output of print_local_search_profile which is very helpful. I don't know what to expect howewer as i did not succeed yet.

Let's use 9.7 + some official example and turn this on:

diff --git a/ortools/constraint_solver/samples/vrp_time_windows.cc b/ortools/constraint_solver/samples/vrp_time_windows.cc
index e69d3a4230..becb76eca8 100644
--- a/ortools/constraint_solver/samples/vrp_time_windows.cc
+++ b/ortools/constraint_solver/samples/vrp_time_windows.cc
@@ -121,7 +121,12 @@ void VrpTimeWindows() {
 
   // Create Routing Model.
   // [START routing_model]
-  RoutingModel routing(manager);
+
+  auto params = operations_research::DefaultRoutingModelParameters();
+  params.mutable_solver_parameters()->set_profile_propagation(true);
+  params.mutable_solver_parameters()->set_profile_file("profile_propagation");
+
+  RoutingModel routing(manager, params);
   // [END routing_model]
 
   // Create and register a transit callback.

This crashes with:

sascha@jimny:~/Dev/or_tools_vanilla/or-tools$ bazel-bin/ortools/constraint_solver/samples/vrp_time_windows_cc
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1694002316.168684   93886 constraint_solver.cc:2311] Exporting profile to profile_propagation
I0000 00:00:1694002316.171353   93886 constraint_solver.cc:2311] Exporting profile to profile_propagation
F0000 00:00:1694002316.171671   93886 demon_profiler.cc:351] Check failed: *demons == demons_per_constraint_[constraint].size() (1 vs. 2) 
*** Check failure stack trace: ***
    @     0x55a471afe7cd  absl::lts_20230125::log_internal::LogMessageFatal::~LogMessageFatal()
    @     0x55a47194f7fe  operations_research::DemonProfiler::ExportInformation()
    @     0x55a47194fbd7  operations_research::DemonProfiler::PrintOverview()
    @     0x55a471441beb  operations_research::Solver::EndSearch()
    @     0x55a47191cdaf  operations_research::Solver::Solve()
    @     0x55a47148f5d0  operations_research::RoutingModel::AppendAssignmentIfFeasible()
    @     0x55a4714aaaf4  operations_research::RoutingModel::SolveFromAssignmentsWithParameters()
    @     0x55a4714aad4b  operations_research::RoutingModel::SolveFromAssignmentWithParameters()
    @     0x55a471463158  operations_research::VrpTimeWindows()
    @     0x55a47145a9dd  main
    @     0x7fcf21153d90  (unknown)
Aborted

Remarks:

  • The actual assertion-cardinalities failing also can look different (for my full size problem)
  • Also turning on trace_propagation does not help
  • File profile_propagation is created, but empty

Are there any special considerations on how to use this feature?

Metadata

Metadata

Assignees

Labels

BugLang: C++Native implementation issueSolver: RoutingUses the Routing library and the original CP solver

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0