uo.target_problem package

Submodules

uo.target_problem.target_problem module

:no-index:The problem module describes the class Problem.

class uo.problem.problem.Problem(name: str, is_minimization: bool, is_multi_objective: bool)

Bases: object

The Problem class represents a target problem for optimization. It is an abstract base class that provides a common interface for defining and manipulating target problems.

name

The name of the target problem.

Type:

str

is_minimization

Indicates whether the problem is a minimization problem.

Type:

bool

is_multi_objective

Indicates whether the problem is a multi-objective optimization problem.

Type:

bool

__init__(name

str = “”, is_minimization: Optional[bool] = None, is_multi_objective: Optional[bool] = None) -> None: Initializes a new Problem instance with the specified name, minimization flag, and multi-objective flag.

__copy__() Problem

Creates a deep copy of the current target problem instance.

copy() Problem

Creates a copy of the current target problem instance.

name() str

Returns the name of the target problem.

is_minimization() bool

Returns whether the problem is a minimization problem.

is_multi_objective() bool

Returns whether the problem is a multi-objective optimization problem.

string_rep(delimiter

str, indentation: int = 0, indentation_symbol: str = ‘’, group_start: str = ‘{’, group_end: str = ‘}’) -> str: Returns a string representation of the target problem instance.

__str__() str

Returns a string representation of the target problem instance.

__repr__() str

Returns a string representation of the target problem instance.

__format__(spec

str) -> str: Returns a formatted string representation of the target problem instance.

abstract copy()

Copy the current target problem

Returns:

new Problem instance with the same properties

Return type:

Problem

property is_minimization: bool

Property getter for the info if problem optimization is minimization

Returns:

bool – if minimization takes place

property is_multi_objective: bool

Property getter for the info if problem optimization is multi objective

Returns:

bool – if optimization is multi objective

property name: str

Property getter for the name of the target problem

Returns:

name of the target problem instance

Return type:

str

string_rep(delimiter: str, indentation: int = 0, indentation_symbol: str = '', group_start: str = '{', group_end: str = '}') str

String representation of the target problem instance

Parameters:
  • delimiter (str) – delimiter between fields

  • indentation (int, optional, default value 0) – level of indentation

  • indentation_symbol (str, optional, default value '') – indentation symbol

  • group_start (str, optional, default value '{') – group start string

  • group_end (str, optional, default value '}') – group end string

Returns:

string representation of instance that controls output

Return type:

str

Module contents