test_vanBarelsUnboundedQP.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of qpOASES.
3  *
4  * qpOASES -- An Implementation of the Online Active Set Strategy.
5  * Copyright (C) 2007-2015 by Hans Joachim Ferreau, Andreas Potschka,
6  * Christian Kirches et al. All rights reserved.
7  *
8  * qpOASES is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * qpOASES is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with qpOASES; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  */
23 
24 
36 #include <qpOASES.hpp>
37 #include <qpOASES/UnitTesting.hpp>
38 
39 #include <stdio.h>
40 
41 
42 
43 int main( )
44 {
46 
47  real_t H[2*2] = { 1.0, 0.0, 0.0, 0.0 };
48  real_t g[2] = { 1.5, 1.0 };
49 
51  //options.enableFarBounds = BT_FALSE;
52 
53  QProblemB qp(2);
54  qp.setOptions( options );
55 
56  int_t iter = 10;
57  qp.init( H,g,0,0,iter );
58 
59  real_t xOpt[2];
60  qp.getPrimalSolution( xOpt );
61  print( xOpt,2 );
62 
63  return TEST_PASSED;
64 }
65 
66 
67 /*
68  * end of file
69  */
Implements the online active set strategy for box-constrained QPs.
returnValue init(const real_t *const _H, const real_t *const _g, const real_t *const _lb, const real_t *const _ub, int &nWSR, const real_t *const yOpt=0, real_t *const cputime=0)
returnValue setOptions(const Options &_options)
Provides a generic way to set and pass user-specified options.
Definition: options.hpp:65
#define TEST_PASSED
Definition: UnitTesting.hpp:45
BEGIN_NAMESPACE_QPOASES returnValue print(const real_t *const v, int n)
double real_t
Definition: AD_test.c:10


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:12