moead_framework.problem.Problem

class moead_framework.problem.Problem(objective_number=2)[source]

Bases: abc.ABC

Abstract class to implement a new Problem in the framework.

https://moead-framework.github.io/framework/html/tuto.html#implement-your-own-problem

__init__(objective_number=2)[source]

Constructor of the problem

Parameters

objective_number – {integer}

Methods

__init__([objective_number])

Constructor of the problem

evaluate(x)

Evaluate the given solution for the current problem and store the outcome

f(function_id, decision_vector)

Evaluate the decision_vector for the objective function_id

generate_random_solution()

Generate a random solution for the current problem

dtype

alias of builtins.float

evaluate(x: Union[moead_framework.solution.base.Solution, Sequence]) → moead_framework.solution.one_dimension_solution.OneDimensionSolution[source]

Evaluate the given solution for the current problem and store the outcome

Parameters

x – A {Solution} containing all decision variables

Returns

OneDimensionSolution

abstract f(function_id, decision_vector)[source]

Evaluate the decision_vector for the objective function_id

Parameters
  • function_id – {integer} index of the objective

  • decision_vector – {OneDimensionSolution} solution to evaluate

Returns

{float} fitness value

abstract generate_random_solution()[source]

Generate a random solution for the current problem

Returns

{OneDimensionSolution}