mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
skip exception for services
This commit is contained in:
parent
7d11224bcd
commit
3dd92ccd7e
1 changed files with 5 additions and 4 deletions
|
|
@ -115,7 +115,9 @@ public class TourActivities {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes job AND belonging activity from tour.
|
* Removes job AND belonging activity from tour. Note that if job is a Service, it is assumed that there is only one belonging activity,
|
||||||
|
* thus, it stops trying to remove activities once the first is found.
|
||||||
|
* If you want to always look for belonging activities to be removed in the entire route, use removeJob(Job job, boolean enforceEntireRoute)
|
||||||
*
|
*
|
||||||
* @param job to be removed
|
* @param job to be removed
|
||||||
* @return true if job has been removed, otherwise false.
|
* @return true if job has been removed, otherwise false.
|
||||||
|
|
@ -136,9 +138,6 @@ public class TourActivities {
|
||||||
if (job.equals(underlyingJob)) {
|
if (job.equals(underlyingJob)) {
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
activityRemoved = true;
|
activityRemoved = true;
|
||||||
if (underlyingJob instanceof Service) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -146,6 +145,8 @@ public class TourActivities {
|
||||||
return activityRemoved;
|
return activityRemoved;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes activity from this activity sequence. Removes its corresponding job as well, if there are no other activities
|
* Removes activity from this activity sequence. Removes its corresponding job as well, if there are no other activities
|
||||||
* related to this job.
|
* related to this job.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue