optimization-0.1.4: Numerical optimization

Safe HaskellNone

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

runFU :: forall s. Mode s => f (AD s a) -> AD s a
 

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

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

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

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

Optimizing the problem

minimizeSource

Arguments

:: (Functor f, Num 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

maximizeSource

Arguments

:: (Functor f, Num 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 aSource

The Lagrangian for the given constrained optimization