Module org.cicirello.chips_n_salsa
Class WeightedEarlinessTardiness
java.lang.Object
org.cicirello.search.problems.scheduling.WeightedEarlinessTardiness
- All Implemented Interfaces:
IntegerCostOptimizationProblem<Permutation>,Problem<Permutation>,SingleMachineSchedulingProblem
public final class WeightedEarlinessTardiness
extends Object
implements SingleMachineSchedulingProblem
Implements the scheduling cost function known as weighted earliness plus weighted tardiness. The
lateness L[j] of job j is: L[j] = C[j] - d[j], where C[j] is the time it is completed by the
machine, and d[j] is its due date. The tardiness of job j is: T[j] = max(0, L[j]). That is,
although lateness can be negative, tardiness is never negative (i.e., no reward for a job
completing early). The earliness of a job j is: E[j] = max(0, -L[j]). The weighted earliness plus
weighted tardiness problem involves a pair of weights for each job, a tardiness weight wt[j] and
an earliness weight we[j]. The cost function is the weighted sum over the jobs of: wt[j]T[j] +
we[j]E[j], where w[j] is job j's weight.
-
Constructor Summary
ConstructorsConstructorDescriptionWeightedEarlinessTardiness(SingleMachineSchedulingProblemData instanceData) Constructs a single machine scheduling problem for minimizing weighted earliness plus weighted tardiness. -
Method Summary
Modifier and TypeMethodDescriptionintcost(Permutation candidate) Computes the cost of a candidate solution to the problem instance.Gets an object that encapsulates the data describing the scheduling problem instance, such as number of jobs, and the characteristics of the jobs, such as processing times, setup times, due dates, weights, etc.intminCost()A lower bound on the minimum theoretical cost across all possible solutions to the problem instance, where lower cost implies better solution.intvalue(Permutation candidate) Computes the value of the candidate solution within the usual constraints and interpretation of the problem.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cicirello.search.problems.IntegerCostOptimizationProblem
costAsDouble, getSolutionCostPair, isMinCost
-
Constructor Details
-
WeightedEarlinessTardiness
Constructs a single machine scheduling problem for minimizing weighted earliness plus weighted tardiness.- Parameters:
instanceData- An encapsulation of the job characteristics, such as processing times, etc.- Throws:
IllegalArgumentException- if instanceData.hasDueDates() returns false.
-
-
Method Details
-
getInstanceData
Description copied from interface:SingleMachineSchedulingProblemGets an object that encapsulates the data describing the scheduling problem instance, such as number of jobs, and the characteristics of the jobs, such as processing times, setup times, due dates, weights, etc.- Specified by:
getInstanceDatain interfaceSingleMachineSchedulingProblem- Returns:
- an encapsulation of the data describing the scheduling problem instance
-
cost
Description copied from interface:IntegerCostOptimizationProblemComputes the cost of a candidate solution to the problem instance. The lower the cost, the more optimal the candidate solution.- Specified by:
costin interfaceIntegerCostOptimizationProblem<Permutation>- Parameters:
candidate- The candidate solution to evaluate.- Returns:
- The cost of the candidate solution. Lower cost means better solution.
-
value
Description copied from interface:IntegerCostOptimizationProblemComputes the value of the candidate solution within the usual constraints and interpretation of the problem.- Specified by:
valuein interfaceIntegerCostOptimizationProblem<Permutation>- Parameters:
candidate- The candidate solution to evaluate.- Returns:
- The actual optimization value of the candidate solution.
-
minCost
public int minCost()Description copied from interface:IntegerCostOptimizationProblemA lower bound on the minimum theoretical cost across all possible solutions to the problem instance, where lower cost implies better solution. The default implementation returns Integer.MIN_VALUE.- Specified by:
minCostin interfaceIntegerCostOptimizationProblem<Permutation>- Returns:
- A lower bound on the minimum theoretical cost of the problem instance.
-