OptimizationProcess.JsonReport
property · OptimizationProcess · cAlgo.API Since 5.9
DesktopCLICloud
Gets the optimization result as JSON (the .optres content): configuration plus every pass with its statistics. Returns null if the optimization is not finished or an error occurred. The format matches the desktop optimization "Save results", so the JSON can be opened or imported by the desktop optimization UI.
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
string JsonReport {get;}
optimizationProcess.JsonReport: str
Returns string
Examples
Optimization.Completed += args =>
{
var report = args.Process.JsonReport;
if (report != null)
LocalStorage.SetString("OptimizationResult", report);
};
def on_start(self):
api.Optimization.Completed += self.on_optimization_completed
def on_optimization_completed(self, args):
report = args.Process.JsonReport
if report is not None:
api.LocalStorage.SetString("OptimizationResult", report)