amino  1.0-beta2
Lightweight Robot Utility Library
lp.h
Go to the documentation of this file.
1 /* -*- mode: C; c-basic-offset: 4 -*- */
2 /* ex: set shiftwidth=4 tabstop=4 expandtab: */
3 /*
4  * Copyright (c) 2016, Rice University
5  * All rights reserved.
6  *
7  * Author(s): Neil T. Dantam <ntd@gatech.edu>
8  *
9  * This file is provided under the following "BSD-style" License:
10  *
11  *
12  * Redistribution and use in source and binary forms, with or
13  * without modification, are permitted provided that the following
14  * conditions are met:
15  * * Redistributions of source code must retain the above copyright
16  * notice, this list of conditions and the following disclaimer.
17  * * Redistributions in binary form must reproduce the above
18  * copyright notice, this list of conditions and the following
19  * disclaimer in the documentation and/or other materials provided
20  * with the distribution.
21  * * Neither the name of copyright holder the names of its
22  * contributors may be used to endorse or promote products derived
23  * from this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
26  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
27  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
30  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
33  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
34  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
36  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37  * POSSIBILITY OF SUCH DAMAGE.
38  *
39  */
40 #ifndef AMINO_OPT_LP_H
41 #define AMINO_OPT_LP_H
42 
48 #include "opt.h"
49 
50 
54 typedef int aa_opt_lp_solver_fun (
55  size_t m, size_t n,
56  const double *A, size_t ldA,
57  const double *b_lower, const double *b_upper,
58  const double *c,
59  const double *x_lower, const double *x_upper,
60  double *x );
61 
62 
67  size_t m, size_t n,
68  const double *A, size_t ldA,
69  const double *b_lower, const double *b_upper,
70  const double *c,
71  const double *x_lower, const double *x_upper,
72  double *x );
73 
78  size_t m, size_t n,
79  const double *A, size_t ldA,
80  const double *b_lower, const double *b_upper,
81  const double *c,
82  const double *x_lower, const double *x_upper,
83  double *x );
84 
89  size_t m, size_t n,
90  const double *A, size_t ldA,
91  const double *b_lower, const double *b_upper,
92  const double *c,
93  const double *x_lower, const double *x_upper,
94  double *x );
95 
99 typedef int aa_opt_lp_crs_solver (
100  size_t m, size_t n,
101  const double *A_values, int *A_cols, int *A_row_ptr,
102  const double *b_lower, const double *b_upper,
103  const double *c,
104  const double *x_lower, const double *x_upper,
105  double *x );
106 
111  size_t m, size_t n,
112  const double *A_values, int *A_cols, int *A_row_ptr,
113  const double *b_lower, const double *b_upper,
114  const double *c,
115  const double *x_lower, const double *x_upper,
116  double *x );
117 
122  size_t m, size_t n,
123  const double *A_values, int *A_cols, int *A_row_ptr,
124  const double *b_lower, const double *b_upper,
125  const double *c,
126  const double *x_lower, const double *x_upper,
127  double *x );
128 
133  size_t m, size_t n,
134  const double *A_values, int *A_cols, int *A_row_ptr,
135  const double *b_lower, const double *b_upper,
136  const double *c,
137  const double *x_lower, const double *x_upper,
138  double *x );
139 
140 #endif //AMINO_OPT_H
#define AA_API
calling and name mangling convention for functions
Definition: amino.h:95
AA_API int aa_opt_lp_clp(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, double *x)
Solve general-matrix linear program with CLP.
int aa_opt_lp_crs_solver(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, double *x)
Function type to solve a compressed-row-storage linear program.
Definition: lp.h:99
AA_API int aa_opt_lp_crs_lpsolve(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, double *x)
Solve compressed-row-storage linear program with LP-Solve.
AA_API int aa_opt_lp_glpk(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, double *x)
Solve general-matrix linear program with GLPK.
AA_API int aa_opt_lp_lpsolve(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, double *x)
Solve general-matrix linear program with LP-Solve.
AA_API int aa_opt_lp_crs_glpk(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, double *x)
Solve compressed-row-storage linear program with GLPK.
int aa_opt_lp_solver_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, double *x)
Function type to solve a general-matrix linear program.
Definition: lp.h:54
AA_API int aa_opt_lp_crs_clp(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, double *x)
Solve compressed-row-storage linear program with CLP.
General optimization routines.