Class LSMOP

java.lang.Object
org.moeaframework.problem.LSMOP.LSMOP
All Implemented Interfaces:
AutoCloseable, Named, Problem
Direct Known Subclasses:
LSMOP1, LSMOP2, LSMOP3, LSMOP4, LSMOP5, LSMOP6, LSMOP7, LSMOP8, LSMOP9, MaF14, MaF15

public abstract class LSMOP extends Object implements Problem
Abstract class for defining LSMOP test problems.
  • Field Details

    • DEFAULT_N_k

      public static final int DEFAULT_N_k
      The default number of subcomponents in each decision variable group.
      See Also:
    • DEFAULT_N_ns

      public static final int DEFAULT_N_ns
      The default multiplier for the number of decision variables.
      See Also:
  • Constructor Details

    • LSMOP

      public LSMOP(int M, int N_k, ShapeFunction g1, ShapeFunction g2, LinkageFunction linkage, CorrelationMatrix correlationMatrix, ParetoFrontGeometry geometry)
      Constructs a new LSMOP problem instance.
      Parameters:
      M - the number of objectives
      N_k - the number of subcomponents in each decision variable group
      g1 - the first shape function (for even indices)
      g2 - the second shape function (for odd indices)
      linkage - the linkage function
      correlationMatrix - the correlation matrix
      geometry - the Pareto front geometry
    • LSMOP

      public LSMOP(int M, int N_k, int N_ns, ShapeFunction g1, ShapeFunction g2, LinkageFunction linkage, CorrelationMatrix correlationMatrix, ParetoFrontGeometry geometry)
      Constructs a new LSMOP problem instance.
      Parameters:
      M - the number of objectives
      N_k - the number of subcomponents in each decision variable group
      N_ns - the number of decision variables split across the groups
      g1 - the first shape function (for even indices)
      g2 - the second shape function (for odd indices)
      linkage - the linkage function
      correlationMatrix - the correlation matrix
      geometry - the Pareto front geometry
  • Method Details

    • getNumberOfVariables

      public int getNumberOfVariables()
      Description copied from interface: Problem
      Returns the number of decision variables defined by this problem.
      Specified by:
      getNumberOfVariables in interface Problem
      Returns:
      the number of decision variables defined by this problem
    • getNumberOfObjectives

      public int getNumberOfObjectives()
      Description copied from interface: Problem
      Returns the number of objectives defined by this problem.
      Specified by:
      getNumberOfObjectives in interface Problem
      Returns:
      the number of objectives defined by this problem
    • getNumberOfConstraints

      public int getNumberOfConstraints()
      Description copied from interface: Problem
      Returns the number of constraints defined by this problem.
      Specified by:
      getNumberOfConstraints in interface Problem
      Returns:
      the number of constraints defined by this problem
    • close

      public void close()
      Description copied from interface: Problem
      Closes any underlying resources used by this problem. Once closed, further invocations of any methods on this problem may throw exceptions.

      While most problems do not use any disposable resources and this method can simply no-op, the best practice is wrapping the constructed problem instance inside a try-with-resources block so it is automatically closed. Java may flag offending code with a warning. Implementations that do require closing should indicate this in any documentation.

      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Problem
    • newSolution

      public Solution newSolution()
      Description copied from interface: Problem
      Returns a new solution for this problem. Implementations must initialize the variables so that the valid range of values is defined, but typically leave the actual value at a default or undefined state.
      Specified by:
      newSolution in interface Problem
      Returns:
      a new solution for this problem
    • getName

      public String getName()
      Description copied from interface: Problem
      Returns the name of this problem. Whenever possible, this name should match the name recognized by ProblemFactory.
      Specified by:
      getName in interface Named
      Specified by:
      getName in interface Problem
      Returns:
      the name of this problem
    • evaluate

      public void evaluate(Solution solution)
      Description copied from interface: Problem
      Evaluates the solution, updating the solution's objectives in place. Algorithms must explicitly call this method when appropriate to evaluate new solutions or reevaluate modified solutions.
      Specified by:
      evaluate in interface Problem
      Parameters:
      solution - the solution to be evaluated