packages feed

casadi-bindings-1.9.0.0: Casadi/Wrappers/Classes/DirectCollocation.hs

{-# OPTIONS_GHC -Wall #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# Language ForeignFunctionInterface #-}
{-# Language FlexibleInstances #-}
{-# Language MultiParamTypeClasses #-}

module Casadi.Wrappers.Classes.DirectCollocation
       (
         DirectCollocation,
         DirectCollocationClass(..),
         directCollocation,
         directCollocation',
         directCollocation'',
         directCollocation''',
         directCollocation_getConstraintBounds,
         directCollocation_getGuess,
         directCollocation_getNLPSolver,
         directCollocation_getReportConstraints,
         directCollocation_getVariableBounds,
         directCollocation_reportConstraints',
         directCollocation_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 DirectCollocation where
  show = unsafePerformIO . printableObject_getDescription
-- direct wrapper
foreign import ccall unsafe "CasADi__DirectCollocation__getGuess" c_CasADi__DirectCollocation__getGuess
  :: Ptr DirectCollocation' -> Ptr (CppVec CDouble) -> IO ()
casADi__DirectCollocation__getGuess
  :: DirectCollocation -> Vector Double -> IO ()
casADi__DirectCollocation__getGuess x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__DirectCollocation__getGuess x0' x1' >>= wrapReturn

-- classy wrapper
{-|
>Get the variables.
-}
directCollocation_getGuess :: DirectCollocationClass a => a -> Vector Double -> IO ()
directCollocation_getGuess x = casADi__DirectCollocation__getGuess (castDirectCollocation x)


-- direct wrapper
foreign import ccall unsafe "CasADi__DirectCollocation__getVariableBounds" c_CasADi__DirectCollocation__getVariableBounds
  :: Ptr DirectCollocation' -> Ptr (CppVec CDouble) -> Ptr (CppVec CDouble) -> IO ()
casADi__DirectCollocation__getVariableBounds
  :: DirectCollocation -> Vector Double -> Vector Double -> IO ()
casADi__DirectCollocation__getVariableBounds x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__DirectCollocation__getVariableBounds x0' x1' x2' >>= wrapReturn

-- classy wrapper
{-|
>Get the variables.
-}
directCollocation_getVariableBounds :: DirectCollocationClass a => a -> Vector Double -> Vector Double -> IO ()
directCollocation_getVariableBounds x = casADi__DirectCollocation__getVariableBounds (castDirectCollocation x)


-- direct wrapper
foreign import ccall unsafe "CasADi__DirectCollocation__getConstraintBounds" c_CasADi__DirectCollocation__getConstraintBounds
  :: Ptr DirectCollocation' -> Ptr (CppVec CDouble) -> Ptr (CppVec CDouble) -> IO ()
casADi__DirectCollocation__getConstraintBounds
  :: DirectCollocation -> Vector Double -> Vector Double -> IO ()
casADi__DirectCollocation__getConstraintBounds x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__DirectCollocation__getConstraintBounds x0' x1' x2' >>= wrapReturn

-- classy wrapper
{-|
>Get the constraints.
-}
directCollocation_getConstraintBounds :: DirectCollocationClass a => a -> Vector Double -> Vector Double -> IO ()
directCollocation_getConstraintBounds x = casADi__DirectCollocation__getConstraintBounds (castDirectCollocation x)


-- direct wrapper
foreign import ccall unsafe "CasADi__DirectCollocation__setOptimalSolution" c_CasADi__DirectCollocation__setOptimalSolution
  :: Ptr DirectCollocation' -> Ptr (CppVec CDouble) -> IO ()
casADi__DirectCollocation__setOptimalSolution
  :: DirectCollocation -> Vector Double -> IO ()
casADi__DirectCollocation__setOptimalSolution x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__DirectCollocation__setOptimalSolution x0' x1' >>= wrapReturn

-- classy wrapper
{-|
>Set the optimal solution.
-}
directCollocation_setOptimalSolution :: DirectCollocationClass a => a -> Vector Double -> IO ()
directCollocation_setOptimalSolution x = casADi__DirectCollocation__setOptimalSolution (castDirectCollocation x)


-- direct wrapper
foreign import ccall unsafe "CasADi__DirectCollocation__getNLPSolver" c_CasADi__DirectCollocation__getNLPSolver
  :: Ptr DirectCollocation' -> IO (Ptr NLPSolver')
casADi__DirectCollocation__getNLPSolver
  :: DirectCollocation -> IO NLPSolver
casADi__DirectCollocation__getNLPSolver x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__DirectCollocation__getNLPSolver x0' >>= wrapReturn

-- classy wrapper
{-|
>Access the underlying NLPSolver object.
-}
directCollocation_getNLPSolver :: DirectCollocationClass a => a -> IO NLPSolver
directCollocation_getNLPSolver x = casADi__DirectCollocation__getNLPSolver (castDirectCollocation x)


-- direct wrapper
foreign import ccall unsafe "CasADi__DirectCollocation__reportConstraints_TIC" c_CasADi__DirectCollocation__reportConstraints_TIC
  :: Ptr DirectCollocation' -> IO ()
casADi__DirectCollocation__reportConstraints'
  :: DirectCollocation -> IO ()
casADi__DirectCollocation__reportConstraints' x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__DirectCollocation__reportConstraints_TIC x0' >>= wrapReturn

-- classy wrapper
directCollocation_reportConstraints' :: DirectCollocationClass a => a -> IO ()
directCollocation_reportConstraints' x = casADi__DirectCollocation__reportConstraints' (castDirectCollocation x)


-- direct wrapper
foreign import ccall unsafe "CasADi__DirectCollocation__getReportConstraints" c_CasADi__DirectCollocation__getReportConstraints
  :: Ptr DirectCollocation' -> IO (Ptr StdString')
casADi__DirectCollocation__getReportConstraints
  :: DirectCollocation -> IO String
casADi__DirectCollocation__getReportConstraints x0 =
  withMarshal x0 $ \x0' ->
  c_CasADi__DirectCollocation__getReportConstraints x0' >>= wrapReturn

-- classy wrapper
{-|
>Return the report as a string.
-}
directCollocation_getReportConstraints :: DirectCollocationClass a => a -> IO String
directCollocation_getReportConstraints x = casADi__DirectCollocation__getReportConstraints (castDirectCollocation x)


-- direct wrapper
foreign import ccall unsafe "CasADi__DirectCollocation__DirectCollocation" c_CasADi__DirectCollocation__DirectCollocation
  :: IO (Ptr DirectCollocation')
casADi__DirectCollocation__DirectCollocation
  :: IO DirectCollocation
casADi__DirectCollocation__DirectCollocation  =
  c_CasADi__DirectCollocation__DirectCollocation  >>= wrapReturn

-- classy wrapper
{-|
>>  CasADi::DirectCollocation::DirectCollocation()
>------------------------------------------------------------------------
>
>Default constructor.
>
>>  CasADi::DirectCollocation::DirectCollocation(const Function &ffcn, const Function &mfcn, const Function &cfcn=Function(), const Function &rfcn=Function())
>------------------------------------------------------------------------
>
>Constructor.
-}
directCollocation :: IO DirectCollocation
directCollocation = casADi__DirectCollocation__DirectCollocation


-- direct wrapper
foreign import ccall unsafe "CasADi__DirectCollocation__DirectCollocation_TIC" c_CasADi__DirectCollocation__DirectCollocation_TIC
  :: Ptr Function' -> Ptr Function' -> Ptr Function' -> Ptr Function' -> IO (Ptr DirectCollocation')
casADi__DirectCollocation__DirectCollocation'
  :: Function -> Function -> Function -> Function -> IO DirectCollocation
casADi__DirectCollocation__DirectCollocation' x0 x1 x2 x3 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  withMarshal x3 $ \x3' ->
  c_CasADi__DirectCollocation__DirectCollocation_TIC x0' x1' x2' x3' >>= wrapReturn

-- classy wrapper
directCollocation' :: Function -> Function -> Function -> Function -> IO DirectCollocation
directCollocation' = casADi__DirectCollocation__DirectCollocation'


-- direct wrapper
foreign import ccall unsafe "CasADi__DirectCollocation__DirectCollocation_TIC_TIC" c_CasADi__DirectCollocation__DirectCollocation_TIC_TIC
  :: Ptr Function' -> Ptr Function' -> Ptr Function' -> IO (Ptr DirectCollocation')
casADi__DirectCollocation__DirectCollocation''
  :: Function -> Function -> Function -> IO DirectCollocation
casADi__DirectCollocation__DirectCollocation'' x0 x1 x2 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  withMarshal x2 $ \x2' ->
  c_CasADi__DirectCollocation__DirectCollocation_TIC_TIC x0' x1' x2' >>= wrapReturn

-- classy wrapper
directCollocation'' :: Function -> Function -> Function -> IO DirectCollocation
directCollocation'' = casADi__DirectCollocation__DirectCollocation''


-- direct wrapper
foreign import ccall unsafe "CasADi__DirectCollocation__DirectCollocation_TIC_TIC_TIC" c_CasADi__DirectCollocation__DirectCollocation_TIC_TIC_TIC
  :: Ptr Function' -> Ptr Function' -> IO (Ptr DirectCollocation')
casADi__DirectCollocation__DirectCollocation'''
  :: Function -> Function -> IO DirectCollocation
casADi__DirectCollocation__DirectCollocation''' x0 x1 =
  withMarshal x0 $ \x0' ->
  withMarshal x1 $ \x1' ->
  c_CasADi__DirectCollocation__DirectCollocation_TIC_TIC_TIC x0' x1' >>= wrapReturn

-- classy wrapper
directCollocation''' :: Function -> Function -> IO DirectCollocation
directCollocation''' = casADi__DirectCollocation__DirectCollocation'''