atomica.optimization.optimize

atomica.optimization.optimize(project, optimization, parset, progset, instructions, x0=None, xmin=None, xmax=None, hard_constraints=None, baselines=None, optim_args=None)[source]

Main user entry point for optimization

The optional inputs x0, xmin, xmax and hard_constraints are used when performing parallel optimization (implementation not complete yet), in which case they are computed by the parallel wrapper to optimize(). Normally these variables would not be specified by users, because they are computed from the Optimization together with the instructions (because relative constraints in the Optimization are interpreted as being relative to the allocation in the instructions).

Parameters:
  • project – A Project instance

  • optimization – An Optimization instance

  • parset (ParameterSet) – A ParameterSet instance

  • progset (ProgramSet) – A ProgramSet instance

  • instructions (ProgramInstructions) – A ProgramInstructions instance

  • x0 – Not for manual use - override initial values

  • xmin – Not for manual use - override lower bounds

  • xmax – Not for manual use - override upper bounds

  • hard_constraints – Not for manual use - override hard constraints

  • baselines – Not for manual use - override Measurable baseline values (for relative Measurables)

  • optim_args (dict) – Pass a dictionary of keyword arguments to pass to the optimization algorithm (set in optimization.method)

Returns:

A ProgramInstructions instance representing optimal instructions