pympcc.multistart¶
- pympcc.multistart(problem, *, n_starts=16, perturb_scale=0.1, seed=0, n_jobs=1, **solve_kwargs)[source]¶
Solve problem from n_starts perturbed initial points.
- Parameters:
problem (MPCCProblem or StructuredMPCC) – Source problem.
problem.x0is the centre of the perturbation distribution and is restored on return (the function does not leave the problem mutated).n_starts (int, default 16) – Number of starting points. Must be
>= 1. Start 0 always usesproblem.x0verbatim, son_starts=1is equivalent to a plainpympcc.solve()call.perturb_scale (float, default 0.1) – Standard deviation of the Gaussian perturbation applied to each coordinate, expressed as a fraction of
max(|x0|, 1).seed (int, default 0) – RNG seed for reproducible perturbations.
n_jobs (int, default 1) – Worker count for parallel execution.
1(default) runs sequentially in-process;-1resolves toos.cpu_count(); any other positive integer fans out across that many processes viaProcessPoolExecutorwith thespawnstart method. Whenn_jobs != 1all problem callables must be picklable (no bare lambdas / local closures).**solve_kwargs – Forwarded verbatim to
pympcc.solve()(strategy,backend,ipopt_options,presolve,autoscale, strategy options, etc.).
- Return type: