@syntest/core
Version:
The common core of the SynTest Framework
66 lines • 1.7 kB
TypeScript
import { Budget } from "./Budget";
import { Encoding } from "../Encoding";
import { SearchAlgorithm } from "../metaheuristics/SearchAlgorithm";
import { BudgetListener } from "./BudgetListener";
/**
* Manager for the budget of the search process.
*
* Keeps track how much budget is left before the search process has to be terminated.
*
* @author Mitchell Olsthoorn
*/
export declare class BudgetManager<T extends Encoding> implements BudgetListener<T> {
/**
* List of currently active budgets.
* @protected
*/
protected _budgets: Budget<T>[];
constructor();
/**
* Return the available budget as a value from zero to one.
*
* Loops over all active budgets to find the one with the lowest budget.
*/
getBudget(): number;
/**
* Return whether the budget manager has any budget left.
*/
hasBudgetLeft(): boolean;
/**
* Add budget to the list of active budgets.
*
* @param budget The budget to add
*/
addBudget(budget: Budget<T>): BudgetManager<T>;
/**
* Remove budget from the list of active budgets.
*
* @param budget The budget to remove
*/
removeBudget(budget: Budget<T>): BudgetManager<T>;
/**
* @inheritDoc
*/
initializationStarted(): void;
/**
* @inheritDoc
*/
initializationStopped(): void;
/**
* @inheritDoc
*/
searchStarted(): void;
/**
* @inheritDoc
*/
searchStopped(): void;
/**
* @inheritDoc
*/
iteration(searchAlgorithm: SearchAlgorithm<T>): void;
/**
* @inheritDoc
*/
evaluation(encoding: T): void;
}
//# sourceMappingURL=BudgetManager.d.ts.map