optimization-0.1.9: Numerical optimization

Safe HaskellNone
LanguageHaskell2010

Optimization.Constrained.Penalty

Contents

Synopsis

Building the problem

data Opt f a Source #

Opt d f gs hs is a Lagrangian optimization problem with objective f equality (g(x) == 0) constraints gs and less-than (h(x) < 0) constraints hs

newtype FU f a Source #

Constructors

FU 

Fields

optimize :: (forall s. Mode s => f (AD s a) -> AD s a) -> Opt f a Source #

constrainEQ :: (forall s. Mode s => f (AD s a) -> AD s a) -> Opt f a -> Opt f a Source #

constrainLT :: (forall s. Mode s => f (AD s a) -> AD s a) -> Opt f a -> Opt f a Source #

constrainGT :: Num a => (forall s. Mode s => f (AD s a) -> AD s a) -> Opt f a -> Opt f a Source #

Optimizing the problem

minimize Source #

Arguments

:: (Functor f, RealFrac a, Ord a, g ~ V) 
=> (FU f a -> f a -> [f a])

Primal minimizer

-> Opt f a

The optimization problem of interest

-> a

The penalty increase factor

-> f a

The primal starting value

-> g a

The dual starting value

-> [f a]

Optimizing iterates

Minimize the given constrained optimization problem This is a basic penalty method approach

maximize Source #

Arguments

:: (Functor f, RealFrac a, Ord a, g ~ V) 
=> (FU f a -> f a -> [f a])

Primal minimizer

-> Opt f a

The optimization problem of interest

-> a

The penalty increase factor

-> f a

The primal starting value

-> g a

The dual starting value

-> [f a]

Optimizing iterates

Maximize the given constrained optimization problem

Finding the Lagrangian

lagrangian :: Num a => Opt f a -> forall s. Mode s => f (AD s a) -> V (AD s a) -> AD s a Source #

The Lagrangian for the given constrained optimization