Shortcuts

API

Modules description

Macop offers the following main and basic features:

  • algorithms: generic and implemented optimisation research algorithms;

  • callbacks: callbacks to automatically keep track of the search space advancement and restart from previous state if nedded;

  • evaluator: stores problem instance data and implements a compute method in order to evaluate a solution;

  • operators: mutators, crossovers operators to update and obtain new solution;

  • policies: the way you choose the available operators (might be using reinforcement learning);

  • solutions: representation of the solution;

  • validator: such as constraint programming, a validator is a function which is used to validate or not a solution data state;

Common and base modules

The modules presented in this section are common to all types of optimisation problems. The abstract classes proposed here form the basis of the package’s structure.

macop.algorithms

macop.algorithms.base

Basic Algorithm class

macop.algorithms.mono

Mono-objective available algorithms

macop.algorithms.multi

Multi-objetive classes algorithm

macop.callbacks

macop.callbacks.base

Abstract Checkpoint classes for callback process

macop.callbacks.classicals

Classical Checkpoints classes implementations

macop.callbacks.multi

Multi-objective Checkpoints classes implementations

macop.callbacks.policies

UCB policy Checkpoint class implementation

macop.evaluators

macop.evaluators.base

Abstract Evaluator class for computing fitness score associated to a solution

macop.operators

macop.operators.base

Abstract Operator classes

macop.policies

macop.policies.base

Abstract classes for Operator Selection Strategy

macop.policies.classicals

Classical policies classes implementations

macop.policies.reinforcement

Reinforcement learning policy classes implementations for Operator Selection Strategy

macop.solutions

macop.solutions.base

Abstract solution class

macop.utils

macop.utils.progress

Utils progress macop module when verbose enable

Discrete Optimisation

Some implementations of discrete optimisation problem functionalities are available. They can be used as example implementations or can simply be used by the user.

macop.evaluators

macop.evaluators.discrete.mono

Mono-objective evaluators classes for discrete problem

macop.evaluators.discrete.multi

Multi-objective evaluators classes for discrete problem

macop.operators

macop.operators.discrete.mutators

Mutation implementations for discrete solution

macop.operators.discrete.crossovers

Crossover implementations for discrete solutions kind

macop.solutions

macop.solutions.discrete

Discrete solution classes implementations

Continuous Optimisation

Although continuous optimization is not the priority of this package, the idea is to leave the possibility to any user to implement or even propose implementations related to this kind of problem. The modules are here for the moment nearly empty (only with Zdt functions example) but present to establish the structure relative to these types of implementations.

If a user wishes to propose these developments so that they can be added in a future version of the package, he can refer to the guidelines for contributions of the package.

macop.evaluators

macop.evaluators.continuous.mono

Mono-objective evaluators classes for continuous problem

macop.evaluators.continuous.multi

Multi-objective evaluators classes for continuous problem

macop.operators

macop.operators.continuous.mutators

Mutation implementations for continuous solution

macop.operators.continuous.crossovers

Crossover implementations for continuous solutions kind

macop.solutions

macop.solutions.continuous

Continuous solution classes implementation