SolutionInsert Job Part Method
Inserts a JobPart into a Resource's route directly after the node indicated by the position
parameter. The position parameter starts at zero. This means the first node in the route
(the Resource's starting location) is position zero.
This will insert the JobParts even if it results in an infeasible solution.
Definition
Namespace: VRSolver
Assembly: VRSolver (in VRSolver.dll) Version: 1.15.0+d867f7e856f281547f683ef6449a86e433a2356d
False if the insertion could not be completed. True otherwise.
Assembly: VRSolver (in VRSolver.dll) Version: 1.15.0+d867f7e856f281547f683ef6449a86e433a2356d
C#
public bool InsertJobPart(
Resource resource,
JobPart jobPart,
int position
)VB
Public Function InsertJobPart (
resource As Resource,
jobPart As JobPart,
position As Integer
) As BooleanC++
public:
bool InsertJobPart(
Resource^ resource,
JobPart^ jobPart,
int position
)F#
member InsertJobPart :
resource : Resource *
jobPart : JobPart *
position : int -> bool Parameters
- resource Resource
- The Resource to assign the JobPart to.
- jobPart JobPart
- The JobPart to be inserted.
- position Int32
- The position to insert the JobPart directly after (the first position i.e. the locations starting point is position zero).
Return Value
BooleanFalse if the insertion could not be completed. True otherwise.
Exceptions
| ArgumentNullException | Resource is null. |
| ArgumentNullException | JobPart is null. |
| ArgumentException | Resource does not exist in the Problem. |
| ArgumentException | Position in not valid for Resource's route. |
| ArgumentException | JobPart cannot be inserted after the Resource's end location. |