OptimizationPass.ProfitFactor
property · OptimizationPass · cAlgo.API Since 5.9
DesktopCLICloud
Gets the profit factor of the pass.
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
double ProfitFactor {get;}
optimizationPass.ProfitFactor: float
Returns double
Examples
Optimization.PassCompleted += args =>
{
if (args.Pass.ProfitFactor > 1.5)
Print("Pass {0} has a good profit factor: {1}", args.Pass.Id, args.Pass.ProfitFactor);
};
def on_start(self):
api.Optimization.PassCompleted += self.on_pass_completed
def on_pass_completed(self, args):
if args.Pass.ProfitFactor > 1.5:
api.Print(f"Pass {args.Pass.Id} has a good profit factor: {args.Pass.ProfitFactor}")