Record Class SolveProblem
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.spi.SolveProblem
- Record Components:
context- the facts of this runcandidates- the metros to form portfolios fromobjectives- what to measure; each id appears onceconstraints- the hard limitsweights- relative weight per objective id (need not sum to 1; missing ids weigh 0)minMetros- fewest metros in a portfolio, at least 1maxMetros- most metros in a portfolio, at leastminMetros
public record SolveProblem(DesignContext context, List<MetroFacts> candidates, List<Objective> objectives, List<Constraint> constraints, Map<String,Double> weights, int minMetros, int maxMetros)
extends Record
Everything a
Solver needs.-
Constructor Summary
ConstructorsConstructorDescriptionSolveProblem(DesignContext context, List<MetroFacts> candidates, List<Objective> objectives, List<Constraint> constraints, Map<String, Double> weights, int minMetros, int maxMetros) Validates the sizes and makes the collections immutable. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecandidatesrecord component.Returns the value of theconstraintsrecord component.context()Returns the value of thecontextrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxMetrosrecord component.intReturns the value of theminMetrosrecord component.Returns the value of theobjectivesrecord component.final StringtoString()Returns a string representation of this record class.weights()Returns the value of theweightsrecord component.
-
Constructor Details
-
SolveProblem
public SolveProblem(DesignContext context, List<MetroFacts> candidates, List<Objective> objectives, List<Constraint> constraints, Map<String, Double> weights, int minMetros, int maxMetros) Validates the sizes and makes the collections immutable.
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
context
-
candidates
Returns the value of thecandidatesrecord component.- Returns:
- the value of the
candidatesrecord component
-
objectives
Returns the value of theobjectivesrecord component.- Returns:
- the value of the
objectivesrecord component
-
constraints
Returns the value of theconstraintsrecord component.- Returns:
- the value of the
constraintsrecord component
-
weights
-
minMetros
-
maxMetros
-