Skip to content

OptimizationProcess.IsCompleted

property · OptimizationProcess · cAlgo.API Since 5.9

DesktopCLICloud

Gets a value indicating whether the optimization process is completed.

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

bool IsCompleted {get;}
optimizationProcess.IsCompleted: bool

Returns bool

Examples

Optimization.ProgressChanged += args =>
{
    if (!args.Process.IsCompleted)
        Print("Optimization is still running: {0:F1}%", args.Progress);
};
def on_start(self):
    api.Optimization.ProgressChanged += self.on_progress_changed

def on_progress_changed(self, args):
    if not args.Process.IsCompleted:
        api.Print(f"Optimization is still running: {args.Progress:.1f}%")