Class TypeQualification

java.lang.Object
com.dna.jopt.member.unit.condition.type.TypeQualification
All Implemented Interfaces:
IQualification, Serializable

public class TypeQualification extends Object implements IQualification
TypeQualification can be added to IResource so it can provide its service to an INode that is constrained to Resources that have said qualification.

Implementation example:


 //Defining a Node
 CapacityResource jack = new CapacityResource(
             "JackEssenQualified",
             51.45,
             7.01667,
             Duration.ofHours(10),
             Quantities.getQuantity(1200, KILO(METRE)),
             workingHours);
     rep1.setCost(100, 1, 1);

 // Defining a qualification and giving it to the Node
     TypeQualification typeQualification1 = new TypeQualification();
     typeQualification1.addType("plumbing");
     jack.addQualification(typeQualification1);

     opti.addElement(jack);

 // Defining a Constraint
 IConstraint typeConstraint = new TypeConstraint();
 ((TypeConstraint) typeConstraint).addType("plumbing");
 typeConstraint.setIsHard(true);

 Duration visitDuration = Duration.ofMinutes(20);

 // Defining a Node and giving it the Constraint
 TimeWindowGeoNode aachen =
 new TimeWindowGeoNode("Aachen", 50.775346, 6.083887, weeklyOpeningHours, visitDuration, 1);
 aachen.addConstraint(typeConstraint);
 this.addElement(aachen);
 
Since:
02/08/2019
Version:
09/09/2019
Author:
DNA
See Also:
  • Constructor Details

    • TypeQualification

      public TypeQualification()
  • Method Details