Problem Class

The problem definition. It contains the Jobs to be assigned and the Resources available to assign them to.

Definition

Namespace: VRSolver
Assembly: VRSolver (in VRSolver.dll) Version: 1.15.0+d867f7e856f281547f683ef6449a86e433a2356d
C#
public class Problem
Inheritance
Object    Problem

Constructors

ProblemInitializes a new instance of the Problem class

Properties

JobPartsCount The total number of JobParts (not the number of Jobs).
LeaveStartLocationAsLateAsPossible If true then resources leave their starting locations so as to minimise any idle time at the first job i.e. leave later (start location windows permitting). If false then the resource leaves the starting location when the start location window opens. NB work time starts when the resource leaves the starting location.
MaxDrivingTime The maximum driving time for each resource. (Set to less than zero to ignore this constraint). This is a global setting and applies to all resources. To set a value for an individual resource use MaxDrivingTime in the Resource class. This is a hard constraint that will always be satisfied.
MaxWorkTime The maximum work time for each resource. The work time is the time from when the resource leaves the start location until it returns to its end location. (To ignore this constraint set it to a value less than zero). This is a global setting and applies to all resources. To set a value for an individual resource use MaxWorkTime in the Resource class. This is a hard constraint that will always be satisfied.
TotalDistanceWeight The weight for minimising total distance traveled by all resources. The weight is per the unit of distance that is set in the TravelTime matrix.
TotalLatenessWeight The weight for minimising Lateness for jobs that have soft windows. The weight is per minute.
TotalWorkTimeWeight The weight for minimising the total working time for all resources. The working time for a resource is the time from when the resource leaves the start location until it returns to its end location. This is a global setting which applies to all resources. To set a weight for an individual resource use MaxWorkTimeSoftConstraintWeight in the Resource class. The weight is per minute of work time.

Methods

AddJob Adds a Job to the problem.
AddResource Adds a Resource to the problem.
Equals
(Inherited from Object)
Finalize
(Inherited from Object)
GetHashCode
(Inherited from Object)
GetJob Gets a Job using a Job ID.
GetJobPart Gets a JobPart using a JobPart ID.
GetResource Gets a Resource using a Resource ID.
GetType
(Inherited from Object)
Load Load a problem from a file.
MemberwiseClone
(Inherited from Object)
Save(String) Save the Problem to a file.
Save(String, Boolean) Save the Problem to a file.
SaveAsByteArray Save the Problem to a byte array. The Problem is converted to a JSON format and then the JSON format is converted to a byte array.
SaveAsByteArray(Boolean) Save the Problem to a byte array. The Problem is converted to a JSON format and then the JSON format is converted to a byte array.
SetAllowAssign(Job, Resource) Allows the Job to be assigned to the selected Resource if it was previously not allowed by calling SetNotAssign.
SetAllowAssign(String, String) Allows the Job to be assigned to the selected Resource if it was previously not allowed by calling SetNotAssign.
SetFixAssign(Job, Resource) Fix a Job assignment to the selected Resource i.e. the solver will ensure this assignment is made and the Job is not assigned to a different resource.
SetFixAssign(String, String) Fix a job assignment to the selected resource i.e. the solver will ensure this assignment is made and the job is not assigned to a different resource.
SetNotAssign(Job, Resource) Ensures the solver will not assign the Job to the selected resource.
SetNotAssign(String, String) Ensures the solver will not assign the job to the selected resource.
SetTravelTimes Sets the TravelTime matrix.
ToString
(Inherited from Object)

Fields

Jobs The Jobs that have been added to the problem. To add new Jobs use the AddJob(Job) method.
Resources The Resources that have been added to the problem. To add new Resources use the AddResource(Resource) method.

See Also