This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# OPTIONS_GHC -Wall #-} | |
| {-# Language DeriveGeneric #-} | |
| {-# Language DeriveFunctor #-} | |
| module Main where | |
| import GHC.Generics ( Generic ) | |
| import Data.Vector ( Vector ) | |
| import qualified Data.Vector as V |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ghorn@cowabunga:~/casadi-2.2.0-rc1$ grep -r '_core' * | |
| casadi/CMakeLists.txt: if(NOT "${name}" STREQUAL "casadi_core") | |
| casadi/CMakeLists.txt: target_link_libraries(${name} casadi_core) | |
| casadi/core/matrix/matrix.hpp:#ifdef casadi_core_implementation | |
| casadi/core/matrix/generic_matrix.hpp:#ifdef casadi_core_implementation | |
| casadi/core/matrix/generic_matrix.hpp:#ifdef casadi_core_implementation | |
| casadi/core/matrix/submatrix.hpp:#ifdef casadi_core_implementation | |
| casadi/core/matrix/nonzeros.hpp:#ifdef casadi_core_implementation | |
| casadi/core/CMakeLists.txt:casadi_library(casadi_core ${CASADI_SRCS} ${RUNTIME_EMBEDDED_SRC}) | |
| casadi/core/CMakeLists.txt:set_property(GLOBAL APPEND PROPERTY CASADI_SWIG_MODULES casadi_core) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ grep -n10 "std::vector<(casadi::SXElement)>" ~/casadi-2.2.0/build/swig/json/casadi.json | |
| 44434- "methodDocslink": "", | |
| 44435- "methodKind": "Normal" | |
| 44436- }, | |
| 44437- { | |
| 44438- "methodDocs": "", | |
| 44439- "methodName": "mul_no_alloc", | |
| 44440- "methodParams": [ | |
| 44441- "r.q(const).casadi::Matrix<(casadi::SXElement)>", | |
| 44442- "r.q(const).casadi::Matrix<(casadi::SXElement)>", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Compose f g a = f (g a) | |
| type Apply f a = f a | |
| -- This one fails with "Compose has 3 arguments but you gave it 2". | |
| -- All the others work. | |
| x0 :: Apply (Compose f g) a | |
| x0 = undefined | |
| x1 :: (Compose f g) a | |
| x1 = undefined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This is Ipopt version 3.11.9, running with linear solver ma86. | |
| Number of nonzeros in equality constraint Jacobian...: 0 | |
| Number of nonzeros in inequality constraint Jacobian.: 0 | |
| Number of nonzeros in Lagrangian Hessian.............: 786 | |
| Total number of variables............................: 109 | |
| variables with only lower bounds: 0 | |
| variables with lower and upper bounds: 0 | |
| variables with only upper bounds: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cbits/autogen/casadi_wrap_classes.cpp: In function ‘casadi::CodeGenerator* casadi__CodeGenerator__CONSTRUCTOR__0(std::string**)’: | |
| cbits/autogen/casadi_wrap_classes.cpp:1331:59: | |
| error: use of deleted function ‘casadi::CodeGenerator::CodeGenerator(casadi::CodeGenerator&&)’ | |
| casadi::CodeGenerator ret = casadi::CodeGenerator(); | |
| ^ | |
| In file included from /home/greghorn/casadi_install/include/casadi/core/core.hpp:46:0: | |
| 0, | |
| from /home/greghorn/casadi_install/include/casadi/casadi.hpp:29, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| proc wall num proc time wall time | |
| time time evals per eval per eval | |
| eval_f 0.002 [s] 0.002 [s] 15 0.10 [ms] 0.10 [ms] | |
| eval_grad_f 0.002 [s] 0.002 [s] 16 0.11 [ms] 0.11 [ms] | |
| eval_g 0.002 [s] 0.002 [s] 15 0.11 [ms] 0.11 [ms] | |
| eval_jac_g 0.006 [s] 0.006 [s] 17 0.36 [ms] 0.36 [ms] | |
| eval_h 0.306 [s] 0.306 [s] 15 20.39 [ms] 20.41 [ms] | |
| main loop 0.329 [s] 0.330 [s] | |
| callback function 0.000 [s] 0.000 [s] | |
| callback preparation 0.000 [s] 0.000 [s] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| proc wall num mean mean | |
| time time evals proc time wall time | |
| eval_f 0.368 [s] 0.112 [s] 6 61.27 [ms] 18.62 [ms] | |
| eval_grad_f 1.256 [s] 0.937 [s] 7 179.38 [ms] 133.85 [ms] | |
| eval_g 0.360 [s] 0.109 [s] 6 60.02 [ms] 18.09 [ms] | |
| eval_jac_g 5.360 [s] 5.052 [s] 8 670.00 [ms] 631.47 [ms] | |
| eval_h 2.749 [s] 2.749 [s] 6 458.21 [ms] 458.11 [ms] | |
| main loop 10.373 [s] 9.221 [s] | |
| jit + serial: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# OPTIONS_GHC -Wall #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
| -- | Some plotting utilities. | |
| module HackPlotLib | |
| ( Plotter | |
| -- * plotting functions | |
| , figure, figure' | |
| , plot, plot', plot3, plot3' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # check for inequalities | |
| for k in range(arg['lbx'].shape[0]): | |
| lbx = arg['lbx'].cat[k] | |
| ubx = arg['ubx'].cat[k] | |
| if lbx == ubx: | |
| pass | |
| elif lbx == -np.inf and ubx == np.inf: | |
| pass | |
| else: | |
| raise ValueError('x index %d is an inequality (%.3g, %.3g)' % (k, lbx, ubx)) |