@@ -283,26 +283,26 @@ class NodeDisjunctionFilter : public IntVarLocalSearchFilter {
283
283
(current_inactive_nodes + inactive_nodes_delta) -
284
284
max_inactive_cardinality;
285
285
if (inactive_nodes_above_limit > 0 && penalty < 0 ) {
286
- // Nodes are mandatory, i.e. exactly max_cardinality nodes must be
287
- // performed, so the move is not acceptable.
288
- return false ;
289
- }
286
+ // Nodes are mandatory, i.e. exactly max_cardinality nodes must be
287
+ // performed, so the move is not acceptable.
288
+ return false ;
289
+ }
290
290
const RoutingModel::PenaltyCostBehavior penalty_cost_behavior =
291
291
routing_model_.GetDisjunctionPenaltyCostBehavior (disjunction_index);
292
292
switch (penalty_cost_behavior) {
293
293
case RoutingModel::PenaltyCostBehavior::PENALIZE_ONCE:
294
294
if (inactive_nodes_above_limit > 0 ) { // penalty cost to update
295
- if (current_inactive_nodes <= max_inactive_cardinality) {
295
+ if (current_inactive_nodes <= max_inactive_cardinality) {
296
296
// Add penalty if there were not too many inactive nodes before
297
297
// the move.
298
- CapAddTo (penalty, &accepted_objective_value_);
299
- }
298
+ CapAddTo (penalty, &accepted_objective_value_);
299
+ }
300
300
} else { // no more penalty cost
301
301
if (current_inactive_nodes > max_inactive_cardinality) {
302
- // Remove penalty if there were too many inactive nodes before the
302
+ // Remove penalty if there were too many inactive nodes before the
303
303
// move.
304
- accepted_objective_value_ =
305
- CapSub (accepted_objective_value_, penalty);
304
+ accepted_objective_value_ =
305
+ CapSub (accepted_objective_value_, penalty);
306
306
}
307
307
}
308
308
break ;
@@ -322,12 +322,12 @@ class NodeDisjunctionFilter : public IntVarLocalSearchFilter {
322
322
if (current_inactive_nodes > max_inactive_cardinality) {
323
323
// Remove penalty if there were too many inactive nodes before the
324
324
// move.
325
- const int current_inactive_nodes_above_limit =
326
- current_inactive_nodes - max_inactive_cardinality;
327
- accepted_objective_value_ =
328
- CapSub (accepted_objective_value_,
329
- penalty * current_inactive_nodes_above_limit);
330
- }
325
+ const int current_inactive_nodes_above_limit =
326
+ current_inactive_nodes - max_inactive_cardinality;
327
+ accepted_objective_value_ =
328
+ CapSub (accepted_objective_value_,
329
+ penalty * current_inactive_nodes_above_limit);
330
+ }
331
331
}
332
332
break ;
333
333
}
@@ -374,11 +374,11 @@ class NodeDisjunctionFilter : public IntVarLocalSearchFilter {
374
374
if (inactive_nodes_above_limit > 0 && penalty > 0 ) {
375
375
switch (penalty_cost_behavior) {
376
376
case RoutingModel::PenaltyCostBehavior::PENALIZE_ONCE:
377
- CapAddTo (penalty, &synchronized_objective_value_);
377
+ CapAddTo (penalty, &synchronized_objective_value_);
378
378
break ;
379
379
case RoutingModel::PenaltyCostBehavior::PENALIZE_PER_INACTIVE:
380
- CapAddTo (penalty * inactive_nodes_above_limit,
381
- &synchronized_objective_value_);
380
+ CapAddTo (penalty * inactive_nodes_above_limit,
381
+ &synchronized_objective_value_);
382
382
break ;
383
383
}
384
384
}
0 commit comments