File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11## 0.18.0 (unreleased)
22
3- - Fixed error with ` set_allowed_vehicles_for_index ` method
3+ - Fixed error with ` apply_locks ` and ` set_allowed_vehicles_for_index ` methods
44- Dropped support for Ruby < 3.3
55
66## 0.17.1 (2026-02-19)
Original file line number Diff line number Diff line change @@ -458,7 +458,11 @@ void init_routing(Rice::Module& m) {
458458 throw std::runtime_error{" Unknown solver status" };
459459 }
460460 })
461- .define_method (" apply_locks" , &RoutingModel::ApplyLocks)
461+ .define_method (
462+ " apply_locks" ,
463+ [](RoutingModel& self, const std::vector<int64_t >& locks) {
464+ return self.ApplyLocks (locks);
465+ })
462466 .define_method (" apply_locks_to_all_vehicles" , &RoutingModel::ApplyLocksToAllVehicles)
463467 .define_method (" pre_assignment" , &RoutingModel::PreAssignment)
464468 .define_method (" mutable_pre_assignment" , &RoutingModel::MutablePreAssignment)
Original file line number Diff line number Diff line change @@ -914,4 +914,10 @@ def test_set_allowed_vehicles_for_index
914914 routing = ORTools ::RoutingModel . new ( manager )
915915 assert_nil routing . set_allowed_vehicles_for_index ( [ 0 ] , 0 )
916916 end
917+
918+ def test_apply_locks
919+ manager = ORTools ::RoutingIndexManager . new ( 1 , 1 , 0 )
920+ routing = ORTools ::RoutingModel . new ( manager )
921+ assert_nil routing . apply_locks ( [ ] )
922+ end
917923end
You can’t perform that action at this time.
0 commit comments