Skip to main content

ACO

Module: opytimizer.optimizers.single_objective.swarm.aco

An ACO class, inherited from Optimizer.

References: M. Dorigo, V. Maniezzo and A. Colorni, "Ant system: optimization by a colony of cooperating agents," in IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics), vol. 26, no. 1, pp. 29-41, Feb. 1996, doi: 10.1109/3477.484436.

Constructor​

ACO(params: Optional[Dict[str, Any]] = None) -> None

Parameters​

ParameterTypeDefaultDescription
paramsOptional[Dict[str, Any]]None—

Methods​

compile​

compile(self, space: opytimizer.spaces.graph._SingleObjectiveGraphSpace) -> None

Compiles additional information that is used by this optimizer.

Parameters​

ParameterTypeDefaultDescription
spaceopytimizer.spaces.graph._SingleObjectiveGraphSpaceA non-tensorized, single-objective GraphSpace object.

evaluate​

evaluate(self, space: opytimizer.spaces.graph._SingleObjectiveGraphSpace, function: opytimizer.core.function.Function) -> None

Evaluates the search space according to the objective function.

Parameters​

ParameterTypeDefaultDescription
spaceopytimizer.spaces.graph._SingleObjectiveGraphSpaceA GraphSpace object that will be evaluated.
functionopytimizer.core.function.FunctionA Function object that will be used as the objective function.

update​

update(self, space: opytimizer.spaces.graph._SingleObjectiveGraphSpace) -> None

Wraps Ant System over the whole colony: evaporates/deposits pheromone based on the --current-- generation's graphs, then has every ant construct a new graph for the next one.

Parameters​

ParameterTypeDefaultDescription
spaceopytimizer.spaces.graph._SingleObjectiveGraphSpaceGraphSpace containing agents and update-related information.