amino  1.0-beta2
Lightweight Robot Utility Library
opt.h File Reference

General optimization routines. More...

Go to the source code of this file.

Typedefs

typedef struct aa_opt_cx * aa_opt_gmcreate_fun(size_t m, size_t n, const double *A, size_t ldA, const double *b_lower, const double *b_upper, const double *c, const double *x_lower, const double *x_upper)
 Optimization context constructor from general matrix format.
 

Enumerations

enum  aa_opt_rel_type { AA_OPT_REL_EQ, AA_OPT_REL_LEQ, AA_OPT_REL_GEQ }
 Optimization constraint type. More...
 
enum  aa_opt_direction { AA_OPT_MAXIMIZE, AA_OPT_MINIMIZE }
 Optimization direction. More...
 
enum  aa_opt_type { AA_OPT_CONTINUOUS, AA_OPT_BINARY, AA_OPT_INTEGER }
 Type of optiziation variable. More...
 

Functions

AA_API int aa_opt_solve (struct aa_opt_cx *cx, size_t n, double *x)
 Solve the optimization problem.
 
AA_API int aa_opt_destroy (struct aa_opt_cx *cx)
 Destroy the optimization context.
 
AA_API int aa_opt_set_direction (struct aa_opt_cx *cx, enum aa_opt_direction)
 Destroy the optimization direction.
 
AA_API int aa_opt_set_quad_obj_crs (struct aa_opt_cx *cx, size_t n, const double *Q_values, int *Q_cols, int *Q_row_ptr)
 Destroy the quadratic objective function via compressed-row-storage format.
 
AA_API int aa_opt_set_type (struct aa_opt_cx *cx, size_t i, enum aa_opt_type type)
 Destroy the optimization variable type.
 
AA_API struct aa_opt_cx * aa_opt_lpsolve_gmcreate (size_t m, size_t n, const double *A, size_t ldA, const double *b_lower, const double *b_upper, const double *c, const double *x_lower, const double *x_upper)
 Create an optimization context for LP-Solve.
 
AA_API struct aa_opt_cx * aa_opt_clp_gmcreate (size_t m, size_t n, const double *A, size_t ldA, const double *b_lower, const double *b_upper, const double *c, const double *x_lower, const double *x_upper)
 Create an optimization context for CLP.
 
AA_API struct aa_opt_cx * aa_opt_glpk_gmcreate (size_t m, size_t n, const double *A, size_t ldA, const double *b_lower, const double *b_upper, const double *c, const double *x_lower, const double *x_upper)
 Create an optimization context for GLPK.
 
AA_API struct aa_opt_cx * aa_opt_lpsolve_crscreate (size_t m, size_t n, const double *A_values, int *A_cols, int *A_row_ptr, const double *b_lower, const double *b_upper, const double *c, const double *x_lower, const double *x_upper)
 Create an optimization context for LP-Solve.
 
AA_API struct aa_opt_cx * aa_opt_clp_crscreate (size_t m, size_t n, const double *A_values, int *A_cols, int *A_row_ptr, const double *b_lower, const double *b_upper, const double *c, const double *x_lower, const double *x_upper)
 Create an optimization context for CLP.
 
AA_API struct aa_opt_cx * aa_opt_glpk_crscreate (size_t m, size_t n, const double *A_values, int *A_cols, int *A_row_ptr, const double *b_lower, const double *b_upper, const double *c, const double *x_lower, const double *x_upper)
 Create an optimization context for GLPK.
 

Detailed Description

General optimization routines.

Definition in file opt.h.

Enumeration Type Documentation

◆ aa_opt_direction

Optimization direction.

Enumerator
AA_OPT_MAXIMIZE 

maximize objective function

AA_OPT_MINIMIZE 

minimize objective function

Definition at line 66 of file opt.h.

◆ aa_opt_rel_type

Optimization constraint type.

Enumerator
AA_OPT_REL_EQ 

equality constraint

AA_OPT_REL_LEQ 

Less-than or equal constraint.

AA_OPT_REL_GEQ 

Greater-than or equal constraint.

Definition at line 56 of file opt.h.

◆ aa_opt_type

Type of optiziation variable.

Enumerator
AA_OPT_CONTINUOUS 

continuous (float) variable

AA_OPT_BINARY 

binary variable

AA_OPT_INTEGER 

integer variable

Definition at line 74 of file opt.h.