{-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# Language ForeignFunctionInterface #-} {-# Language FlexibleInstances #-} {-# Language MultiParamTypeClasses #-} module Casadi.Wrappers.Classes.DirectMultipleShooting ( DirectMultipleShooting, DirectMultipleShootingClass(..), directMultipleShooting, directMultipleShooting', directMultipleShooting'', directMultipleShooting''', directMultipleShooting_getConstraintBounds, directMultipleShooting_getGuess, directMultipleShooting_getNLPSolver, directMultipleShooting_getReportConstraints, directMultipleShooting_getVariableBounds, directMultipleShooting_reportConstraints', directMultipleShooting_setOptimalSolution, ) where import Prelude hiding ( Functor ) import Data.Vector ( Vector ) import Foreign.C.Types import Foreign.Ptr ( Ptr ) import Foreign.ForeignPtr ( newForeignPtr ) import System.IO.Unsafe ( unsafePerformIO ) -- for show instances import Casadi.Wrappers.Classes.PrintableObject import Casadi.Wrappers.CToolsInstances ( ) import Casadi.Wrappers.Data import Casadi.Wrappers.Enums import Casadi.MarshalTypes ( CppVec, StdString' ) -- StdOstream' import Casadi.Marshal ( Marshal(..), withMarshal ) import Casadi.WrapReturn ( WrapReturn(..) ) instance Show DirectMultipleShooting where show = unsafePerformIO . printableObject_getDescription -- direct wrapper foreign import ccall unsafe "CasADi__DirectMultipleShooting__getGuess" c_CasADi__DirectMultipleShooting__getGuess :: Ptr DirectMultipleShooting' -> Ptr (CppVec CDouble) -> IO () casADi__DirectMultipleShooting__getGuess :: DirectMultipleShooting -> Vector Double -> IO () casADi__DirectMultipleShooting__getGuess x0 x1 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> c_CasADi__DirectMultipleShooting__getGuess x0' x1' >>= wrapReturn -- classy wrapper {-| >Get the variables. -} directMultipleShooting_getGuess :: DirectMultipleShootingClass a => a -> Vector Double -> IO () directMultipleShooting_getGuess x = casADi__DirectMultipleShooting__getGuess (castDirectMultipleShooting x) -- direct wrapper foreign import ccall unsafe "CasADi__DirectMultipleShooting__getVariableBounds" c_CasADi__DirectMultipleShooting__getVariableBounds :: Ptr DirectMultipleShooting' -> Ptr (CppVec CDouble) -> Ptr (CppVec CDouble) -> IO () casADi__DirectMultipleShooting__getVariableBounds :: DirectMultipleShooting -> Vector Double -> Vector Double -> IO () casADi__DirectMultipleShooting__getVariableBounds x0 x1 x2 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> withMarshal x2 $ \x2' -> c_CasADi__DirectMultipleShooting__getVariableBounds x0' x1' x2' >>= wrapReturn -- classy wrapper {-| >Get the variables. -} directMultipleShooting_getVariableBounds :: DirectMultipleShootingClass a => a -> Vector Double -> Vector Double -> IO () directMultipleShooting_getVariableBounds x = casADi__DirectMultipleShooting__getVariableBounds (castDirectMultipleShooting x) -- direct wrapper foreign import ccall unsafe "CasADi__DirectMultipleShooting__getConstraintBounds" c_CasADi__DirectMultipleShooting__getConstraintBounds :: Ptr DirectMultipleShooting' -> Ptr (CppVec CDouble) -> Ptr (CppVec CDouble) -> IO () casADi__DirectMultipleShooting__getConstraintBounds :: DirectMultipleShooting -> Vector Double -> Vector Double -> IO () casADi__DirectMultipleShooting__getConstraintBounds x0 x1 x2 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> withMarshal x2 $ \x2' -> c_CasADi__DirectMultipleShooting__getConstraintBounds x0' x1' x2' >>= wrapReturn -- classy wrapper {-| >Get the constraints. -} directMultipleShooting_getConstraintBounds :: DirectMultipleShootingClass a => a -> Vector Double -> Vector Double -> IO () directMultipleShooting_getConstraintBounds x = casADi__DirectMultipleShooting__getConstraintBounds (castDirectMultipleShooting x) -- direct wrapper foreign import ccall unsafe "CasADi__DirectMultipleShooting__setOptimalSolution" c_CasADi__DirectMultipleShooting__setOptimalSolution :: Ptr DirectMultipleShooting' -> Ptr (CppVec CDouble) -> IO () casADi__DirectMultipleShooting__setOptimalSolution :: DirectMultipleShooting -> Vector Double -> IO () casADi__DirectMultipleShooting__setOptimalSolution x0 x1 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> c_CasADi__DirectMultipleShooting__setOptimalSolution x0' x1' >>= wrapReturn -- classy wrapper {-| >Set the optimal solution. -} directMultipleShooting_setOptimalSolution :: DirectMultipleShootingClass a => a -> Vector Double -> IO () directMultipleShooting_setOptimalSolution x = casADi__DirectMultipleShooting__setOptimalSolution (castDirectMultipleShooting x) -- direct wrapper foreign import ccall unsafe "CasADi__DirectMultipleShooting__getNLPSolver" c_CasADi__DirectMultipleShooting__getNLPSolver :: Ptr DirectMultipleShooting' -> IO (Ptr NLPSolver') casADi__DirectMultipleShooting__getNLPSolver :: DirectMultipleShooting -> IO NLPSolver casADi__DirectMultipleShooting__getNLPSolver x0 = withMarshal x0 $ \x0' -> c_CasADi__DirectMultipleShooting__getNLPSolver x0' >>= wrapReturn -- classy wrapper directMultipleShooting_getNLPSolver :: DirectMultipleShootingClass a => a -> IO NLPSolver directMultipleShooting_getNLPSolver x = casADi__DirectMultipleShooting__getNLPSolver (castDirectMultipleShooting x) -- direct wrapper foreign import ccall unsafe "CasADi__DirectMultipleShooting__reportConstraints_TIC" c_CasADi__DirectMultipleShooting__reportConstraints_TIC :: Ptr DirectMultipleShooting' -> IO () casADi__DirectMultipleShooting__reportConstraints' :: DirectMultipleShooting -> IO () casADi__DirectMultipleShooting__reportConstraints' x0 = withMarshal x0 $ \x0' -> c_CasADi__DirectMultipleShooting__reportConstraints_TIC x0' >>= wrapReturn -- classy wrapper directMultipleShooting_reportConstraints' :: DirectMultipleShootingClass a => a -> IO () directMultipleShooting_reportConstraints' x = casADi__DirectMultipleShooting__reportConstraints' (castDirectMultipleShooting x) -- direct wrapper foreign import ccall unsafe "CasADi__DirectMultipleShooting__getReportConstraints" c_CasADi__DirectMultipleShooting__getReportConstraints :: Ptr DirectMultipleShooting' -> IO (Ptr StdString') casADi__DirectMultipleShooting__getReportConstraints :: DirectMultipleShooting -> IO String casADi__DirectMultipleShooting__getReportConstraints x0 = withMarshal x0 $ \x0' -> c_CasADi__DirectMultipleShooting__getReportConstraints x0' >>= wrapReturn -- classy wrapper directMultipleShooting_getReportConstraints :: DirectMultipleShootingClass a => a -> IO String directMultipleShooting_getReportConstraints x = casADi__DirectMultipleShooting__getReportConstraints (castDirectMultipleShooting x) -- direct wrapper foreign import ccall unsafe "CasADi__DirectMultipleShooting__DirectMultipleShooting" c_CasADi__DirectMultipleShooting__DirectMultipleShooting :: IO (Ptr DirectMultipleShooting') casADi__DirectMultipleShooting__DirectMultipleShooting :: IO DirectMultipleShooting casADi__DirectMultipleShooting__DirectMultipleShooting = c_CasADi__DirectMultipleShooting__DirectMultipleShooting >>= wrapReturn -- classy wrapper {-| >> CasADi::DirectMultipleShooting::DirectMultipleShooting() >------------------------------------------------------------------------ > >Default constructor. > >> CasADi::DirectMultipleShooting::DirectMultipleShooting(const Function &ffcn, const Function &mfcn, const Function &cfcn=Function(), const Function &rfcn=Function()) >------------------------------------------------------------------------ > >Create a multiple shooting OCP solver. > >Parameters: >----------- > >ffcn: Continuous time dynamics, an CasADi::Function with the folowing >mapping: > >>Input scheme: CasADi::DAEInput (DAE_NUM_IN = 5) [daeIn] >+-----------+-------+----------------------------+ >| Full name | Short | Description | >+===========+=======+============================+ >| DAE_X | x | Differential state . | >+-----------+-------+----------------------------+ >| DAE_Z | z | Algebraic state . | >+-----------+-------+----------------------------+ >| DAE_P | p | Parameter . | >+-----------+-------+----------------------------+ >| DAE_T | t | Explicit time dependence . | >+-----------+-------+----------------------------+ > >>Output scheme: CasADi::DAEOutput (DAE_NUM_OUT = 4) [daeOut] >+-----------+-------+--------------------------------------------+ >| Full name | Short | Description | >+===========+=======+============================================+ >| DAE_ODE | ode | Right hand side of the implicit ODE . | >+-----------+-------+--------------------------------------------+ >| DAE_ALG | alg | Right hand side of algebraic equations . | >+-----------+-------+--------------------------------------------+ >| DAE_QUAD | quad | Right hand side of quadratures equations . | >+-----------+-------+--------------------------------------------+ > Important notes: >In the above table, INTEGRATOR_P input is not really of shape (np x >1), but rather ( (np+nu) x 1 ). > >The first np entries of the INTEGRATOR_P input are interpreted as parameters >to be optimized but constant over the whole domain. The remainder are >interpreted as controls. > >BEWARE: if the right hand side of ffcn is dependent on time, the results >will be incorrect. > >Parameters: >----------- > >mfcn: Mayer term, CasADi::Function mapping to cost (1 x 1) > >>Input scheme: CasADi::MayerInput (MAYER_NUM_IN = 3) [mayerIn] >+-----------+-------+---------------------------------------------+ >| Full name | Short | Description | >+===========+=======+=============================================+ >| MAYER_X | x | States at the end of integration (nx x 1) . | >+-----------+-------+---------------------------------------------+ >| MAYER_P | p | Problem parameters (np x 1) . | >+-----------+-------+---------------------------------------------+ > >Parameters: >----------- > >cfcn: Path constraints, CasADi::Function mapping to (nh x 1) > >>Input scheme: CasADi::DAEInput (DAE_NUM_IN = 5) [daeIn] >+-----------+-------+----------------------------+ >| Full name | Short | Description | >+===========+=======+============================+ >| DAE_X | x | Differential state . | >+-----------+-------+----------------------------+ >| DAE_Z | z | Algebraic state . | >+-----------+-------+----------------------------+ >| DAE_P | p | Parameter . | >+-----------+-------+----------------------------+ >| DAE_T | t | Explicit time dependence . | >+-----------+-------+----------------------------+ > >Parameters: >----------- > >rfcn: Initial value constraints -} directMultipleShooting :: IO DirectMultipleShooting directMultipleShooting = casADi__DirectMultipleShooting__DirectMultipleShooting -- direct wrapper foreign import ccall unsafe "CasADi__DirectMultipleShooting__DirectMultipleShooting_TIC" c_CasADi__DirectMultipleShooting__DirectMultipleShooting_TIC :: Ptr Function' -> Ptr Function' -> Ptr Function' -> Ptr Function' -> IO (Ptr DirectMultipleShooting') casADi__DirectMultipleShooting__DirectMultipleShooting' :: Function -> Function -> Function -> Function -> IO DirectMultipleShooting casADi__DirectMultipleShooting__DirectMultipleShooting' x0 x1 x2 x3 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> withMarshal x2 $ \x2' -> withMarshal x3 $ \x3' -> c_CasADi__DirectMultipleShooting__DirectMultipleShooting_TIC x0' x1' x2' x3' >>= wrapReturn -- classy wrapper directMultipleShooting' :: Function -> Function -> Function -> Function -> IO DirectMultipleShooting directMultipleShooting' = casADi__DirectMultipleShooting__DirectMultipleShooting' -- direct wrapper foreign import ccall unsafe "CasADi__DirectMultipleShooting__DirectMultipleShooting_TIC_TIC" c_CasADi__DirectMultipleShooting__DirectMultipleShooting_TIC_TIC :: Ptr Function' -> Ptr Function' -> Ptr Function' -> IO (Ptr DirectMultipleShooting') casADi__DirectMultipleShooting__DirectMultipleShooting'' :: Function -> Function -> Function -> IO DirectMultipleShooting casADi__DirectMultipleShooting__DirectMultipleShooting'' x0 x1 x2 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> withMarshal x2 $ \x2' -> c_CasADi__DirectMultipleShooting__DirectMultipleShooting_TIC_TIC x0' x1' x2' >>= wrapReturn -- classy wrapper directMultipleShooting'' :: Function -> Function -> Function -> IO DirectMultipleShooting directMultipleShooting'' = casADi__DirectMultipleShooting__DirectMultipleShooting'' -- direct wrapper foreign import ccall unsafe "CasADi__DirectMultipleShooting__DirectMultipleShooting_TIC_TIC_TIC" c_CasADi__DirectMultipleShooting__DirectMultipleShooting_TIC_TIC_TIC :: Ptr Function' -> Ptr Function' -> IO (Ptr DirectMultipleShooting') casADi__DirectMultipleShooting__DirectMultipleShooting''' :: Function -> Function -> IO DirectMultipleShooting casADi__DirectMultipleShooting__DirectMultipleShooting''' x0 x1 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> c_CasADi__DirectMultipleShooting__DirectMultipleShooting_TIC_TIC_TIC x0' x1' >>= wrapReturn -- classy wrapper directMultipleShooting''' :: Function -> Function -> IO DirectMultipleShooting directMultipleShooting''' = casADi__DirectMultipleShooting__DirectMultipleShooting'''