Optimization

Interface

The interface that has to be implemented for an optimization algorithm.

ComputableDAGs.fixpoint_reachedMethod
fixpoint_reached(optimizer::AbstractOptimizer, graph::DAG)

Interface function that can be implemented by optimization algorithms that can reach a fixpoint, returning as a Bool whether it has been reached. The default implementation returns false.

See also: optimize_to_fixpoint!

source
ComputableDAGs.optimize!Method
optimize!(optimizer::AbstractOptimizer, graph::DAG, n::Int)

Function calling the given optimizer n times, muting the graph. Returns true if the requested number of operations has been applied, false if not, usually when a fixpoint of the algorithm has been reached.

If a more efficient method exists, this can be overloaded for a specific optimizer.

source
ComputableDAGs.optimize_step!Function
optimize_step!(optimizer::AbstractOptimizer, graph::DAG)

Interface function that must be implemented by implementations of AbstractOptimizer. Returns true if an operations has been applied, false if not, usually when a fixpoint of the algorithm has been reached.

It should do one smallest logical step on the given DAG, muting the graph and, if necessary, the optimizer's state.

source
ComputableDAGs.optimize_to_fixpoint!Function
optimize_to_fixpoint!(optimizer::AbstractOptimizer, graph::DAG)

Interface function that can be implemented by optimization algorithms that can reach a fixpoint. The algorithm will be run until that fixpoint is reached, at which point fixpoint_reached should return true.

A usual implementation might look like this:

    function optimize_to_fixpoint!(optimizer::MyOptimizer, graph::DAG)
        while !fixpoint_reached(optimizer, graph)
            optimize_step!(optimizer, graph)
        end
        return nothing
    end
source

Random Walk Optimizer

Implementation of a random walk algorithm.

Reduction Optimizer

Implementation of a an optimizer that reduces as far as possible.

Split Optimizer

Implementation of an optimizer that splits as far as possible.

Greedy Optimizer

Implementation of a greedy optimization algorithm.

ComputableDAGs.GreedyOptimizerType
GreedyOptimizer

An implementation of the greedy optimization algorithm, simply choosing the best next option evaluated with the given estimator.

The fixpoint is reached when any leftover operation would increase the graph's total cost according to the given estimator.

source