Record Class SolveProblem

java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.spi.SolveProblem
Record Components:
context - the facts of this run
candidates - the metros to form portfolios from
objectives - what to measure; each id appears once
constraints - the hard limits
weights - relative weight per objective id (need not sum to 1; missing ids weigh 0)
minMetros - fewest metros in a portfolio, at least 1
maxMetros - most metros in a portfolio, at least minMetros

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 Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • context

      public DesignContext context()
      Returns the value of the context record component.
      Returns:
      the value of the context record component
    • candidates

      public List<MetroFacts> candidates()
      Returns the value of the candidates record component.
      Returns:
      the value of the candidates record component
    • objectives

      public List<Objective> objectives()
      Returns the value of the objectives record component.
      Returns:
      the value of the objectives record component
    • constraints

      public List<Constraint> constraints()
      Returns the value of the constraints record component.
      Returns:
      the value of the constraints record component
    • weights

      public Map<String,Double> weights()
      Returns the value of the weights record component.
      Returns:
      the value of the weights record component
    • minMetros

      public int minMetros()
      Returns the value of the minMetros record component.
      Returns:
      the value of the minMetros record component
    • maxMetros

      public int maxMetros()
      Returns the value of the maxMetros record component.
      Returns:
      the value of the maxMetros record component