Skip to content

OptimizationProgressChangedEventArgs

record cAlgo.API Since 5.9

DesktopCLICloud

Provides data for the optimization progress changed event.

Environment behaviour

CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.

Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.

Definition

public class OptimizationProgressChangedEventArgs

Namespace: cAlgo.API · Group: Optimization

Examples

protected override void OnStart()
{
    Optimization.ProgressChanged += OnProgressChanged;
}

private void OnProgressChanged(OptimizationProgressChangedEventArgs args)
{
    Print("{0}: {1:F1}%, completed: {2}", args.Operation, args.Progress, args.Process.IsCompleted);
}
def on_start(self):
    api.Optimization.ProgressChanged += self.on_progress_changed

def on_progress_changed(self, args):
    api.Print(f"{args.Operation}: {args.Progress:.1f}%, completed: {args.Process.IsCompleted}")

Constructors

Name Description
OptimizationProgressChangedEventArgsDesktopCLICloud

Properties

Name Description
OperationDesktopCLICloudstring Gets the description of the current operation.
ProcessDesktopCLICloudOptimizationProcess Gets the optimization process that reported progress.
ProgressDesktopCLIClouddouble Gets the progress percentage of the current operation.

See also