OpenPisco.Optim.Problems.OptimProblemDerived module#
- class OpenPisco.Optim.Problems.OptimProblemDerived.OptimProblemAddAllContributions(other=None, dataDeepCopy=True)[source]#
Bases:
OptimProblemDerived
- class OpenPisco.Optim.Problems.OptimProblemDerived.OptimProblemDerived(other=None, dataDeepCopy=True)[source]#
Bases:
OptimProblemBase
Decorator base class for OptimProblemBase.
- Parameters
other (OptimProblemBase) – The underlying optimisation problem.
dataDeepCopy (bool, optional) – Whether other must be cloned (default is True).
- internalOptimProblem#
The underlying optimisation problem.
- Type
Notes
This class implements a trivial decorator (An instance behaves exactly as the original object). Non-trivial decorators can be created subclassing OptimProblemDerived and overriding its methods.
- class OpenPisco.Optim.Problems.OptimProblemDerived.OptimProblemPenalized(other=None, dataDeepCopy=True)[source]#
Bases:
OptimProblemDerived
- SetPenal(name, penal)[source]#
Set the value of the penalty factor.
- Parameters
penal (scalar or iterable of scalars) – Value of the penalty factor.
nb (int, optional) – The index of the constraint for which a penalty factor is set. If None, the same penalty factor is used for all the constraints when penal is a scalar, or each constraint has its own penalty factor when penal is iterable.
- class OpenPisco.Optim.Problems.OptimProblemDerived.OptimProblemPenaltyL1(other=None, dataDeepCopy=True)[source]#
Bases:
OptimProblemPenalized
L1 penalty function
- class OpenPisco.Optim.Problems.OptimProblemDerived.OptimProblemSquared(other=None, dataDeepCopy=True)[source]#
Bases:
OptimProblemDerived
Replaces an optimization problem by one where constraint violation are squared.