Skip to content

OptimizationProcess

Summary

Represents an optimization process with methods and properties to monitor its status and results.

Signature

1
public abstract interface OptimizationProcess

Namespace

cAlgo.API

See Also

Methods

Terminate

Summary

Terminates the optimization process.

Signature

1
public abstract void Terminate()

Return Value

void

Properties

OptimizationError

Summary

Gets the error information if the optimization process failed.

Signature

1
public abstract OptimizationError OptimizationError {get;}

Return Value

OptimizationError

IsCompleted

Summary

Gets a value indicating whether the optimization process is completed.

Signature

1
public abstract bool IsCompleted {get;}

Return Value

bool

JsonReport

Summary

Gets the optimization result as JSON (the .optres content): configuration plusevery pass with its statistics. Returns null if the optimization is not finished or anerror occurred. The format matches the desktop optimization "Save results", so the JSONcan be opened or imported by the desktop optimization UI.

Signature

1
public abstract string JsonReport {get;}

Return Value

string

Passes

Summary

Gets the passes completed so far, ordered by pass id. While running this grows as passesfinish; on completion it holds every pass.

Signature

1
public abstract IReadOnlyList<OptimizationPass> Passes {get;}

Return Value

IReadOnlyList

BestPass

Summary

Gets the best pass by the configured criteria or custom fitness, or null if no pass hascompleted.

Signature

1
public abstract OptimizationPass BestPass {get;}

Return Value

OptimizationPass

Events

ProgressChanged

Summary

Occurs when the optimization progress changes.

Signature

1
public abstract event Action<OptimizationProgressChangedEventArgs> ProgressChanged;

PassCompleted

Summary

Occurs when an individual optimization pass completes.

Signature

1
public abstract event Action<OptimizationPassCompletedEventArgs> PassCompleted;

Completed

Summary

Occurs when the optimization process is completed.

Signature

1
public abstract event Action<OptimizationCompletedEventArgs> Completed;