science/acados: New port: Fast and embedded solvers for nonlinear optimal control

This commit is contained in:
Yuri Victorovich 2025-01-12 14:12:14 -08:00
parent 75b2d3b694
commit 79112d3dec
6 changed files with 129 additions and 0 deletions

View file

@ -22,6 +22,7 @@
SUBDIR += R-cran-som
SUBDIR += R-cran-udunits2
SUBDIR += abinit
SUBDIR += acados
SUBDIR += afni
SUBDIR += agrum
SUBDIR += aircraft-datcom

44
science/acados/Makefile Normal file
View file

@ -0,0 +1,44 @@
PORTNAME= acados
DISTVERSIONPREFIX= v
DISTVERSION= 0.4.3
CATEGORIES= science
MAINTAINER= yuri@FreeBSD.org
COMMENT= Fast and embedded solvers for nonlinear optimal control
WWW= https://github.com/acados/acados
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libblasfeo.so:math/blasfeo \
libhpipm.so:math/hpipm
# math/casadi should be a dependency, but somehow cmake doesn't look for it
USES= cmake:testing localbase:ldflags
USE_GITHUB= yes
USE_LDCONFIG= yes
OPTIONS_DEFINE= OSQP
OPTIONS_DEFAULT= OSQP
OSQP_DESC= Build with OSQP solver
OSQP_CMAKE_BOOL= ACADOS_WITH_OSQP
OSQP_LIB_DEPENDS= libosqp.so:math/osqp
QPOASES_DESC= Build with QPOASES solver
QPOASES_CMAKE_BOOL= ACADOS_WITH_QPOASES
QPOASES_LIB_DEPENDS= libqpOASES.so:math/qposases
QPOASES_BROKEN= error: unknown type name 'namespace'
post-patch: # workaround for https://github.com/acados/acados/issues/1413
@${FIND} ${WRKSRC} -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" | \
${XARGS} ${REINPLACE_CMD} -E 's,"osqp/include/,"osqp/,'
@${FIND} ${WRKSRC} -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" | \
${XARGS} ${REINPLACE_CMD} \
-E '\
s,"(blasfeo|catch|daqp|hpmpc|hpipm)/include/,",; \
s|qpOASES_e|qpOASES|; \
s|qpOASES/QProblem.h|qpOASES/QProblem.hpp| \
'
.include <bsd.port.mk>

3
science/acados/distinfo Normal file
View file

@ -0,0 +1,3 @@
TIMESTAMP = 1736714240
SHA256 (acados-acados-v0.4.3_GH0.tar.gz) = d0fe5ea1e2cf79fcf0c173d52499277f4b82a116be5fc5b1a2e6cfb987b52c7b
SIZE (acados-acados-v0.4.3_GH0.tar.gz) = 23315087

View file

@ -0,0 +1,11 @@
--- CMakeLists.txt.orig 2025-01-12 20:38:45 UTC
+++ CMakeLists.txt
@@ -267,7 +267,7 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/interfaces/acad
add_subdirectory(${PROJECT_SOURCE_DIR}/interfaces/acados_c)
# Configure external libraries
-add_subdirectory(${EXTERNAL_SRC_DIR})
+#add_subdirectory(${EXTERNAL_SRC_DIR})
# Configure examples
if(ACADOS_EXAMPLES)

3
science/acados/pkg-descr Normal file
View file

@ -0,0 +1,3 @@
acados provides fast and embedded solvers for nonlinear optimal control.
It is written in C and offers interfaces to the programming languages Python,
MATLAB and Octave.

67
science/acados/pkg-plist Normal file
View file

@ -0,0 +1,67 @@
cmake/FindEigen3.cmake
cmake/FindFortranLibs.cmake
cmake/FindOpenBLAS.cmake
cmake/acadosConfig.cmake
cmake/acadosTargets-%%CMAKE_BUILD_TYPE%%.cmake
cmake/acadosTargets.cmake
include/acados/dense_qp/dense_qp_common.h
include/acados/dense_qp/dense_qp_daqp.h
include/acados/dense_qp/dense_qp_hpipm.h
include/acados/dense_qp/dense_qp_ooqp.h
include/acados/dense_qp/dense_qp_qore.h
include/acados/dense_qp/dense_qp_qpoases.h
include/acados/ocp_nlp/ocp_nlp_common.h
include/acados/ocp_nlp/ocp_nlp_constraints_bgh.h
include/acados/ocp_nlp/ocp_nlp_constraints_bgp.h
include/acados/ocp_nlp/ocp_nlp_constraints_common.h
include/acados/ocp_nlp/ocp_nlp_cost_common.h
include/acados/ocp_nlp/ocp_nlp_cost_conl.h
include/acados/ocp_nlp/ocp_nlp_cost_external.h
include/acados/ocp_nlp/ocp_nlp_cost_ls.h
include/acados/ocp_nlp/ocp_nlp_cost_nls.h
include/acados/ocp_nlp/ocp_nlp_ddp.h
include/acados/ocp_nlp/ocp_nlp_dynamics_common.h
include/acados/ocp_nlp/ocp_nlp_dynamics_cont.h
include/acados/ocp_nlp/ocp_nlp_dynamics_disc.h
include/acados/ocp_nlp/ocp_nlp_globalization_common.h
include/acados/ocp_nlp/ocp_nlp_globalization_fixed_step.h
include/acados/ocp_nlp/ocp_nlp_globalization_funnel.h
include/acados/ocp_nlp/ocp_nlp_globalization_merit_backtracking.h
include/acados/ocp_nlp/ocp_nlp_reg_common.h
include/acados/ocp_nlp/ocp_nlp_reg_convexify.h
include/acados/ocp_nlp/ocp_nlp_reg_mirror.h
include/acados/ocp_nlp/ocp_nlp_reg_noreg.h
include/acados/ocp_nlp/ocp_nlp_reg_project.h
include/acados/ocp_nlp/ocp_nlp_reg_project_reduc_hess.h
include/acados/ocp_nlp/ocp_nlp_sqp.h
include/acados/ocp_nlp/ocp_nlp_sqp_rti.h
include/acados/ocp_qp/ocp_qp_common.h
include/acados/ocp_qp/ocp_qp_common_frontend.h
include/acados/ocp_qp/ocp_qp_full_condensing.h
include/acados/ocp_qp/ocp_qp_hpipm.h
include/acados/ocp_qp/ocp_qp_hpmpc.h
include/acados/ocp_qp/ocp_qp_ooqp.h
include/acados/ocp_qp/ocp_qp_osqp.h
include/acados/ocp_qp/ocp_qp_partial_condensing.h
include/acados/ocp_qp/ocp_qp_qpdunes.h
include/acados/ocp_qp/ocp_qp_xcond_solver.h
include/acados/sim/sim_collocation_utils.h
include/acados/sim/sim_common.h
include/acados/sim/sim_erk_integrator.h
include/acados/sim/sim_gnsf.h
include/acados/sim/sim_irk_integrator.h
include/acados/sim/sim_lifted_irk_integrator.h
include/acados/utils/external_function_generic.h
include/acados/utils/math.h
include/acados/utils/mem.h
include/acados/utils/print.h
include/acados/utils/strsep.h
include/acados/utils/timing.h
include/acados/utils/types.h
include/acados_c/condensing_interface.h
include/acados_c/dense_qp_interface.h
include/acados_c/external_function_interface.h
include/acados_c/ocp_nlp_interface.h
include/acados_c/ocp_qp_interface.h
include/acados_c/sim_interface.h
lib/libacados.so