Problem

class nrv.optim.Problem(cost_function: cost_function = None, optimizer: Optimizer = None, save_problem_results=False, problem_fname='optim.json')[source]

Problem Class

A class to describe problems that should be optimized with the NRV Framework. The problem should be described with a simulation and a cost, using the object cost_function, and various optimization algorithms can be used to find optimal solution.

This class is abstract and is not supposed to be used directly by the end user. NRV can handle two types of problems: - problems where a geometric parameter can be optimized: please refer to … - problems where the waveform can be optimized: please refer to …

Attributes

Problem.costfunction

Cost function of a Problem, the cost function should be a CosFunction object, it should return a scalar.

Problem.optimizer

Optimizer of the problem, the Optimizer should be an Optimizer object.

Problem.optmizer

Optimizer of the problem, the Optimizer should be an Optimizer object.

Methods

Problem.__init__([cost_function, optimizer, ...])

Init method for NRV_class

Problem.autoset_optimizer()

Problem.compute_cost(X)

Problem.context_and_cost(context_func, ...)

Problem.get_parameters()

Generic method returning all the atributes of an NRV_class instance

Problem.load(data[, blacklist])

Generic loading method for NRV_class instance

Problem.save([save, fname, blacklist])

Generic saving method for NRV_class instance.

Problem.set_parameters(**kawrgs)

Generic method to set any attribute of NRV_class instance