qaekwy.model.cutoff

This module provides classes for specifying optimization cutoff conditions.

Cutoff

This is the abstract base class for all cutoff conditions.

is_meta()

Returns True if the cutoff condition is a meta-cutoff, False otherwise.

to_json()

Serializes the cutoff condition to a JSON-compatible dictionary.

Standard Cutoffs

  • CutoffConstant(constant_value): A constant cutoff.
  • CutoffFibonacci(): A cutoff based on the Fibonacci sequence.
  • CutoffGeometric(base, scale): A cutoff based on a geometric progression.
  • CutoffLuby(scale): A cutoff based on the Luby sequence.
  • CutoffLinear(scale): A linear cutoff.
  • CutoffRandom(seed, minimum, maximum, round_value): A random cutoff.

Meta Cutoffs

  • MetaCutoffAppender(first_cutoff, number_from_first, second_cutoff): Appends two cutoff conditions.
  • MetaCutoffMerger(first_cutoff, second_cutoff): Merges two cutoff conditions.
  • MetaCutoffRepeater(sub_cutoff, repeat): Repeats a sub-cutoff condition.