Safe Haskell | None |
---|
- var' :: (Monad m, Functor m) => Maybe (Double, Double) -> Maybe String -> String -> NLPT m Ix
- var :: (Monad m, Functor m) => Maybe (Double, Double) -> String -> StateT NLPState m (AnyRF Identity)
- varFresh :: (Monad m, Functor m) => Maybe (Double, Double) -> String -> StateT NLPState m (AnyRF Identity)
- data AnyRF cb = AnyRF (forall a. AnyRFCxt a => Vector a -> cb a)
- newtype Identity a = Identity {
- runIdentity :: a
- addG :: Monad m => Maybe String -> (Double, Double) -> AnyRF Identity -> NLPT m ()
- addF :: Monad m => Maybe String -> AnyRF Identity -> NLPT m ()
- ppSoln :: (MonadIO m, Functor m) => NLPState -> NLPT m (IpOptSolved Vector) -> m (IpOptSolved Vector, Doc)
- type NLPT = StateT NLPState
- nlpstate0 :: NLPState
- module Control.Monad.State
- solveNLP' :: (Vector v Double, MonadIO m) => (IpProblem -> IO ()) -> NLPT m (IpOptSolved v)
- addIpoptNumOption :: Real a => IpProblem -> String -> a -> IO Bool
- addIpoptStrOption :: IpProblem -> String -> String -> IO Bool
- addIpoptIntOption :: Integral a => IpProblem -> String -> a -> IO Bool
- setIpoptProblemScaling :: IpProblem -> Double -> IOVector IpNumber -> IOVector IpNumber -> IO Bool
- openIpoptOutputFile :: Integral a => IpProblem -> String -> a -> IO Bool
- data IpOptSolved v = IpOptSolved {}
- data ApplicationReturnStatus
- = SolveSucceeded
- | SolvedToAcceptableLevel
- | InfeasibleProblemDetected
- | SearchDirectionBecomesTooSmall
- | DivergingIterates
- | UserRequestedStop
- | FeasiblePointFound
- | MaximumIterationsExceeded
- | RestorationFailed
- | ErrorInStepComputation
- | MaximumCputimeExceeded
- | NotEnoughDegreesOfFreedom
- | InvalidProblemDefinition
- | InvalidOption
- | InvalidNumberDetected
- | UnrecoverableException
- | NonipoptExceptionThrown
- | InsufficientMemory
- | InternalError
- type Vec = IOVector IpNumber
- type IpNumber = CDouble
high-level
variables
:: (Monad m, Functor m) | |
=> Maybe (Double, Double) | bounds |
-> Maybe String | optional longer description |
-> String | variable name (namespace from the |
-> NLPT m Ix | the index (into the rawvector of variables that the solver sees) |
add a variable, or get a reference to the the same variable if it has already been used
var :: (Monad m, Functor m) => Maybe (Double, Double) -> String -> StateT NLPState m (AnyRF Identity)Source
varFresh :: (Monad m, Functor m) => Maybe (Double, Double) -> String -> StateT NLPState m (AnyRF Identity)Source
newtype Identity a
Identity functor and monad.
Identity | |
|
Monad Identity | |
Functor Identity | |
MonadFix Identity | |
Applicative Identity | |
Foldable Identity | |
Traversable Identity | |
Comonad Identity | |
ComonadApply Identity | |
Distributive Identity | |
Settable Identity | So you can pass our |
Effective Identity r (Accessor r) | |
(Contravariant k, Functor k) => Contains k (Identity a) | |
Functor f => Ixed f (Identity a) | |
Functor f => Each f (Identity a) (Identity b) a b |
|
Eq (AnyRF Identity) | |
Floating (AnyRF Identity) | |
Fractional (AnyRF Identity) | |
Num (AnyRF Identity) | |
Ord (AnyRF Identity) | |
Real (AnyRF Identity) | |
RealFloat (AnyRF Identity) | |
RealFrac (AnyRF Identity) | |
VectorSpace (AnyRF Identity) | |
AdditiveGroup (AnyRF Identity) |
functions
:: Monad m | |
=> Maybe String | optional description |
-> (Double, Double) | bounds |
-> AnyRF Identity | g_i(x) |
-> NLPT m () |
add a constraint
add a piece of the objective function, which is added in the form `f_1 + f_2 + ...`, to make it easier to understand (at some point) which components are responsible for the majority of the cost, and which are irrelevant.
running the solver
ppSoln :: (MonadIO m, Functor m) => NLPState -> NLPT m (IpOptSolved Vector) -> m (IpOptSolved Vector, Doc)Source
the initial state to use when you actually have to get to IO with the solution
module Control.Monad.State
:: (Vector v Double, MonadIO m) | |
=> (IpProblem -> IO ()) | set ipopt options (using functions from Ipopt.Raw) |
-> NLPT m (IpOptSolved v) |
calls createIpoptProblemAD
and ipoptSolve
. To be used at the
end of a do-block.
solver options
setIpoptProblemScaling :: IpProblem -> Double -> IOVector IpNumber -> IOVector IpNumber -> IO BoolSource
low-level bits still needed
data IpOptSolved v Source
lenses are in Ipopt.PP
data ApplicationReturnStatus Source