opt.single_objective.comb.min_ones_count_problem package

Submodules

opt.single_objective.comb.min_ones_count_problem.min_ones_count_problem module

class opt.single_objective.comb.min_ones_count_problem.min_ones_count_problem.MinOnesCountProblem(dim: int)

Bases: Problem

copy()

Copy the MinOnesCountProblem problem

Returns:

new MinOnesCountProblem instance with the same properties

Return type:

MinOnesCountProblem

property dimension: int

Property getter for dimension of the ones count min problem.

Returns:

dimension of the target problem instance

Return type:

int

classmethod from_dimension(dimension: int)

Additional constructor. Create new MinOnesCountProblem instance when dimension is specified

Parameters:

dimension (int) – dimension of the problem

classmethod from_input_file(input_file_path: str, input_format: str)

Additional constructor. Create new MinOnesCountProblem instance when input file and input format are specified

Parameters:
  • input_file_path (str) – path of the input file with problem data

  • input_format (str) – format of the input

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

String representation of the MaxOneProblem 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