Solution Class
The routes and assignments for each resource and total solution costs.
Definition
Namespace: VRSolver
Assembly: VRSolver (in VRSolver.dll) Version: 1.15.0+d867f7e856f281547f683ef6449a86e433a2356d
Assembly: VRSolver (in VRSolver.dll) Version: 1.15.0+d867f7e856f281547f683ef6449a86e433a2356d
C#
public class SolutionVB
Public Class SolutionC++
public ref class SolutionF#
type Solution = class end- Inheritance
- Object Solution
Constructors
| Solution | Initialises a new instance of the Solution class. |
Properties
| JobsNotAssignedCount | The number of jobs not assigned to any resources. |
| ObjectiveFunctionValue | The objective function value. |
| Problem | The problem. |
| ResourcesUsedCount | The total number of resources used. |
| TotalDistance | The total distance travelled for all resources. |
| TotalDrivingTime | Total driving time for all resources. |
| TotalWorkTime | Total working time for all resources. |
Methods
| AddJobToRoute | Adds the Job's JobParts to the end of the Resource's current route. This will add the JobParts even if it results in an infeasible solution. To insert the Job's JobParts at the best feasible position in the Resource's current route, use FindBestInsertion(Resource, Job) instead. |
| Clone | Creates a new solution that is a copy of the current instance. |
| CreateNewRoute | Create a new initial route. This can be used for when passing an initial solution to the solver. |
| Equals | (Inherited from Object) |
| Finalize | (Inherited from Object) |
| FindBestInsertion | Finds the best insertion positions for a Job's JobParts within an existing or empty route. It does not do the insertions but returns a JobInsertion result which indicates if a feasible insertion is possible and the solution's change in objective function value if the insertion is done. The insertion can then be done using the DoInsert method. |
| GetDetailedRoute(Resource) | Returns the ordered list of JobParts for the Resource specified. |
| GetDetailedRoute(String) | Returns the ordered list of JobParts for the Resource specified. |
| GetHashCode | (Inherited from Object) |
| GetRouteLength | Returns the number of nodes in the route for this Resource. This includes the start and end nodes. Therefore if no Jobs have been assigned to the Resource then the route length is two. |
| GetRouteMetrics(Resource) | Returns RouteMetrics for the resource specified. |
| GetRouteMetrics(String) | Returns RouteMetrics for the resource specified. |
| GetSolutionMetrics | Returns metrics and feasibility summary for this solution. |
| GetType | (Inherited from Object) |
| InsertJobPart | 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. |
| IsJobAssigned | Looks up whether a Job is assigned to a Resource or not. |
| Load(Problem, String) | Load a Solution from a text file. |
| Load(String, String) | Load a Solution from a text file. |
| MemberwiseClone | (Inherited from Object) |
| Save(String) | Writes the solution to a simple text file format. |
| Save(String, String) | Writes the Solution to a simple text file format. |
| SaveAsByteArray | Save the Solution to a byte array. The Solution is converted to a text format and then the text format is converted to a byte array. |
| SaveAsByteArray(String) | Save the Solution to a byte array. The Solution is converted to a text format and then the text format is converted to a byte array. |
| ToString | (Inherited from Object) |
| UnassignAll | Un-assigns all jobs (including fixed jobs) from all resources in the solution. |
| UnassignJobPart(Resource, Int32) | Un-assigns a JobPart from a Resource's route. The JobPart is the part at the indicated position in the route. The position parameter starts at zero. This means the first node in the route (the Resource's starting location) is position zero. |
| UnassignJobPart(Resource, JobPart) | Un-assigns a JobPart from a Resource's route. |