summaryrefslogtreecommitdiff
path: root/tests/general_tests/qpipopt/qpipopt_logical_2.sce
blob: 7a75ebea561701eb2817d98fba3999eb136f2022 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// A simple example without constraints
A= [];
conLB=[];
conUB = [];
lb=[];
ub=[];
f=[2 -35 -47]'; 
H =[5   -2   -1; -2   4   3; -1   3   5];
nbVar = 3;
nbCon = 0;


//Output
//
//Optimal Solution Found.
// 
//   lower: [0,0,0]
//   upper: [0,0,0]
//   constraint: [0x0 constant]
// 
// lambda   
// 
//   Iterations: 1
// 
// output   
// 
//  0  
// 
// exitflag   
// 
//  - 249.  
// 
// fopt   
// 
//    3.  
//    5.  
//    7.  
// 
// xopt 

[xopt,fopt,exitflag,output,lambda]=qpipopt(nbVar,nbCon,H,f,lb,ub,A,conLB,conUB);
disp("xopt",xopt,"fopt",fopt,"exitflag",exitflag,"output",output,"lambda",lambda);