qpOASES
3.2.2
An Implementation of the Online Active Set Strategy
examples
generate_sparse_qp
trivial_qp_data.hpp
1
/*
2
* This file is part of qpOASES.
3
*
4
* qpOASES -- An Implementation of the Online Active Set Strategy.
5
* Copyright (C) 2007-2017 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
34
USING_NAMESPACE_QPOASES
35
36
#define NV 100
37
#define NC 10
38
39
const
real_t
Inf =
INFTY
;
40
41
sparse_int_t
H_ri[] = {
42
43
0,
44
1,
45
2,
46
3,
47
4,
48
5,
49
6,
50
7,
51
8,
52
9,
53
10,
54
11,
55
12,
56
13,
57
14,
58
15,
59
16,
60
17,
61
18,
62
19,
63
20,
64
21,
65
22,
66
23,
67
24,
68
25,
69
26,
70
27,
71
28,
72
29,
73
30,
74
31,
75
32,
76
33,
77
34,
78
35,
79
36,
80
37,
81
38,
82
39,
83
40,
84
41,
85
42,
86
43,
87
44,
88
45,
89
46,
90
47,
91
48,
92
49,
93
50,
94
51,
95
52,
96
53,
97
54,
98
55,
99
56,
100
57,
101
58,
102
59,
103
60,
104
61,
105
62,
106
63,
107
64,
108
65,
109
66,
110
67,
111
68,
112
69,
113
70,
114
71,
115
72,
116
73,
117
74,
118
75,
119
76,
120
77,
121
78,
122
79,
123
80,
124
81,
125
82,
126
83,
127
84,
128
85,
129
86,
130
87,
131
88,
132
89,
133
90,
134
91,
135
92,
136
93,
137
94,
138
95,
139
96,
140
97,
141
98,
142
99,
143
};
144
145
sparse_int_t
H_cp[] = {
146
147
0,
148
1,
149
2,
150
3,
151
4,
152
5,
153
6,
154
7,
155
8,
156
9,
157
10,
158
11,
159
12,
160
13,
161
14,
162
15,
163
16,
164
17,
165
18,
166
19,
167
20,
168
21,
169
22,
170
23,
171
24,
172
25,
173
26,
174
27,
175
28,
176
29,
177
30,
178
31,
179
32,
180
33,
181
34,
182
35,
183
36,
184
37,
185
38,
186
39,
187
40,
188
41,
189
42,
190
43,
191
44,
192
45,
193
46,
194
47,
195
48,
196
49,
197
50,
198
51,
199
52,
200
53,
201
54,
202
55,
203
56,
204
57,
205
58,
206
59,
207
60,
208
61,
209
62,
210
63,
211
64,
212
65,
213
66,
214
67,
215
68,
216
69,
217
70,
218
71,
219
72,
220
73,
221
74,
222
75,
223
76,
224
77,
225
78,
226
79,
227
80,
228
81,
229
82,
230
83,
231
84,
232
85,
233
86,
234
87,
235
88,
236
89,
237
90,
238
91,
239
92,
240
93,
241
94,
242
95,
243
96,
244
97,
245
98,
246
99,
247
100,
248
};
249
250
real_t
H_val[] = {
251
252
1.0,
253
1.0,
254
1.0,
255
1.0,
256
1.0,
257
1.0,
258
1.0,
259
1.0,
260
1.0,
261
1.0,
262
1.0,
263
1.0,
264
1.0,
265
1.0,
266
1.0,
267
1.0,
268
1.0,
269
1.0,
270
1.0,
271
1.0,
272
1.0,
273
1.0,
274
1.0,
275
1.0,
276
1.0,
277
1.0,
278
1.0,
279
1.0,
280
1.0,
281
1.0,
282
1.0,
283
1.0,
284
1.0,
285
1.0,
286
1.0,
287
1.0,
288
1.0,
289
1.0,
290
1.0,
291
1.0,
292
1.0,
293
1.0,
294
1.0,
295
1.0,
296
1.0,
297
1.0,
298
1.0,
299
1.0,
300
1.0,
301
1.0,
302
1.0,
303
1.0,
304
1.0,
305
1.0,
306
1.0,
307
1.0,
308
1.0,
309
1.0,
310
1.0,
311
1.0,
312
1.0,
313
1.0,
314
1.0,
315
1.0,
316
1.0,
317
1.0,
318
1.0,
319
1.0,
320
1.0,
321
1.0,
322
1.0,
323
1.0,
324
1.0,
325
1.0,
326
1.0,
327
1.0,
328
1.0,
329
1.0,
330
1.0,
331
1.0,
332
1.0,
333
1.0,
334
1.0,
335
1.0,
336
1.0,
337
1.0,
338
1.0,
339
1.0,
340
1.0,
341
1.0,
342
1.0,
343
1.0,
344
1.0,
345
1.0,
346
1.0,
347
1.0,
348
1.0,
349
1.0,
350
1.0,
351
1.0,
352
};
353
354
sparse_int_t
A_ri[] = {
355
356
0,
357
1,
358
2,
359
3,
360
4,
361
5,
362
6,
363
7,
364
8,
365
9,
366
};
367
368
sparse_int_t
A_cp[] = {
369
370
0,
371
1,
372
2,
373
3,
374
4,
375
5,
376
6,
377
7,
378
8,
379
9,
380
10,
381
10,
382
10,
383
10,
384
10,
385
10,
386
10,
387
10,
388
10,
389
10,
390
10,
391
10,
392
10,
393
10,
394
10,
395
10,
396
10,
397
10,
398
10,
399
10,
400
10,
401
10,
402
10,
403
10,
404
10,
405
10,
406
10,
407
10,
408
10,
409
10,
410
10,
411
10,
412
10,
413
10,
414
10,
415
10,
416
10,
417
10,
418
10,
419
10,
420
10,
421
10,
422
10,
423
10,
424
10,
425
10,
426
10,
427
10,
428
10,
429
10,
430
10,
431
10,
432
10,
433
10,
434
10,
435
10,
436
10,
437
10,
438
10,
439
10,
440
10,
441
10,
442
10,
443
10,
444
10,
445
10,
446
10,
447
10,
448
10,
449
10,
450
10,
451
10,
452
10,
453
10,
454
10,
455
10,
456
10,
457
10,
458
10,
459
10,
460
10,
461
10,
462
10,
463
10,
464
10,
465
10,
466
10,
467
10,
468
10,
469
10,
470
10,
471
};
472
473
real_t
A_val[] = {
474
475
1.0,
476
1.0,
477
1.0,
478
1.0,
479
1.0,
480
1.0,
481
1.0,
482
1.0,
483
1.0,
484
1.0,
485
};
486
487
real_t
g[] = {
488
489
1.0,
490
1.0,
491
1.0,
492
1.0,
493
1.0,
494
1.0,
495
1.0,
496
1.0,
497
1.0,
498
1.0,
499
1.0,
500
1.0,
501
1.0,
502
1.0,
503
1.0,
504
1.0,
505
1.0,
506
1.0,
507
1.0,
508
1.0,
509
1.0,
510
1.0,
511
1.0,
512
1.0,
513
1.0,
514
1.0,
515
1.0,
516
1.0,
517
1.0,
518
1.0,
519
1.0,
520
1.0,
521
1.0,
522
1.0,
523
1.0,
524
1.0,
525
1.0,
526
1.0,
527
1.0,
528
1.0,
529
1.0,
530
1.0,
531
1.0,
532
1.0,
533
1.0,
534
1.0,
535
1.0,
536
1.0,
537
1.0,
538
1.0,
539
1.0,
540
1.0,
541
1.0,
542
1.0,
543
1.0,
544
1.0,
545
1.0,
546
1.0,
547
1.0,
548
1.0,
549
1.0,
550
1.0,
551
1.0,
552
1.0,
553
1.0,
554
1.0,
555
1.0,
556
1.0,
557
1.0,
558
1.0,
559
1.0,
560
1.0,
561
1.0,
562
1.0,
563
1.0,
564
1.0,
565
1.0,
566
1.0,
567
1.0,
568
1.0,
569
1.0,
570
1.0,
571
1.0,
572
1.0,
573
1.0,
574
1.0,
575
1.0,
576
1.0,
577
1.0,
578
1.0,
579
1.0,
580
1.0,
581
1.0,
582
1.0,
583
1.0,
584
1.0,
585
1.0,
586
1.0,
587
1.0,
588
1.0,
589
};
590
591
real_t
lb[] = {
592
593
-10000000000.0,
594
-10000000000.0,
595
-10000000000.0,
596
-10000000000.0,
597
-10000000000.0,
598
-10000000000.0,
599
-10000000000.0,
600
-10000000000.0,
601
-10000000000.0,
602
-10000000000.0,
603
-10000000000.0,
604
-10000000000.0,
605
-10000000000.0,
606
-10000000000.0,
607
-10000000000.0,
608
-10000000000.0,
609
-10000000000.0,
610
-10000000000.0,
611
-10000000000.0,
612
-10000000000.0,
613
-10000000000.0,
614
-10000000000.0,
615
-10000000000.0,
616
-10000000000.0,
617
-10000000000.0,
618
-10000000000.0,
619
-10000000000.0,
620
-10000000000.0,
621
-10000000000.0,
622
-10000000000.0,
623
-10000000000.0,
624
-10000000000.0,
625
-10000000000.0,
626
-10000000000.0,
627
-10000000000.0,
628
-10000000000.0,
629
-10000000000.0,
630
-10000000000.0,
631
-10000000000.0,
632
-10000000000.0,
633
-10000000000.0,
634
-10000000000.0,
635
-10000000000.0,
636
-10000000000.0,
637
-10000000000.0,
638
-10000000000.0,
639
-10000000000.0,
640
-10000000000.0,
641
-10000000000.0,
642
-10000000000.0,
643
-10000000000.0,
644
-10000000000.0,
645
-10000000000.0,
646
-10000000000.0,
647
-10000000000.0,
648
-10000000000.0,
649
-10000000000.0,
650
-10000000000.0,
651
-10000000000.0,
652
-10000000000.0,
653
-10000000000.0,
654
-10000000000.0,
655
-10000000000.0,
656
-10000000000.0,
657
-10000000000.0,
658
-10000000000.0,
659
-10000000000.0,
660
-10000000000.0,
661
-10000000000.0,
662
-10000000000.0,
663
-10000000000.0,
664
-10000000000.0,
665
-10000000000.0,
666
-10000000000.0,
667
-10000000000.0,
668
-10000000000.0,
669
-10000000000.0,
670
-10000000000.0,
671
-10000000000.0,
672
-10000000000.0,
673
-10000000000.0,
674
-10000000000.0,
675
-10000000000.0,
676
-10000000000.0,
677
-10000000000.0,
678
-10000000000.0,
679
-10000000000.0,
680
-10000000000.0,
681
-10000000000.0,
682
-10000000000.0,
683
-10000000000.0,
684
-10000000000.0,
685
-10000000000.0,
686
-10000000000.0,
687
-10000000000.0,
688
-10000000000.0,
689
-10000000000.0,
690
-10000000000.0,
691
-10000000000.0,
692
-10000000000.0,
693
};
694
695
real_t
ub[] = {
696
697
10000000000.0,
698
10000000000.0,
699
10000000000.0,
700
10000000000.0,
701
10000000000.0,
702
10000000000.0,
703
10000000000.0,
704
10000000000.0,
705
10000000000.0,
706
10000000000.0,
707
10000000000.0,
708
10000000000.0,
709
10000000000.0,
710
10000000000.0,
711
10000000000.0,
712
10000000000.0,
713
10000000000.0,
714
10000000000.0,
715
10000000000.0,
716
10000000000.0,
717
10000000000.0,
718
10000000000.0,
719
10000000000.0,
720
10000000000.0,
721
10000000000.0,
722
10000000000.0,
723
10000000000.0,
724
10000000000.0,
725
10000000000.0,
726
10000000000.0,
727
10000000000.0,
728
10000000000.0,
729
10000000000.0,
730
10000000000.0,
731
10000000000.0,
732
10000000000.0,
733
10000000000.0,
734
10000000000.0,
735
10000000000.0,
736
10000000000.0,
737
10000000000.0,
738
10000000000.0,
739
10000000000.0,
740
10000000000.0,
741
10000000000.0,
742
10000000000.0,
743
10000000000.0,
744
10000000000.0,
745
10000000000.0,
746
10000000000.0,
747
10000000000.0,
748
10000000000.0,
749
10000000000.0,
750
10000000000.0,
751
10000000000.0,
752
10000000000.0,
753
10000000000.0,
754
10000000000.0,
755
10000000000.0,
756
10000000000.0,
757
10000000000.0,
758
10000000000.0,
759
10000000000.0,
760
10000000000.0,
761
10000000000.0,
762
10000000000.0,
763
10000000000.0,
764
10000000000.0,
765
10000000000.0,
766
10000000000.0,
767
10000000000.0,
768
10000000000.0,
769
10000000000.0,
770
10000000000.0,
771
10000000000.0,
772
10000000000.0,
773
10000000000.0,
774
10000000000.0,
775
10000000000.0,
776
10000000000.0,
777
10000000000.0,
778
10000000000.0,
779
10000000000.0,
780
10000000000.0,
781
10000000000.0,
782
10000000000.0,
783
10000000000.0,
784
10000000000.0,
785
10000000000.0,
786
10000000000.0,
787
10000000000.0,
788
10000000000.0,
789
10000000000.0,
790
10000000000.0,
791
10000000000.0,
792
10000000000.0,
793
10000000000.0,
794
10000000000.0,
795
10000000000.0,
796
10000000000.0,
797
};
798
799
real_t
lbA[] = {
800
801
-1.0,
802
-1.0,
803
-1.0,
804
-1.0,
805
-1.0,
806
-1.0,
807
-1.0,
808
-1.0,
809
-1.0,
810
-1.0,
811
};
812
813
real_t
ubA[] = {
814
815
1.0,
816
1.0,
817
1.0,
818
1.0,
819
1.0,
820
1.0,
821
1.0,
822
1.0,
823
1.0,
824
1.0,
825
};
826
827
long
H_nnz = 100;
828
long
A_nnz = 10;
INFTY
const real_t INFTY
Definition
Constants.hpp:61
USING_NAMESPACE_QPOASES
#define USING_NAMESPACE_QPOASES
Definition
Types.hpp:113
sparse_int_t
int_t sparse_int_t
Definition
Types.hpp:199
real_t
BEGIN_NAMESPACE_QPOASES typedef double real_t
Definition
Types.hpp:171
Generated on Thu Feb 12 2026 18:10:53 for qpOASES by
1.9.8