summaryrefslogtreecommitdiff
path: root/tests/general_tests/cbcintlinprog/cbcintlinprog_degeneracy2.sce
blob: 6f7d9d41d518f5eef9cab5e9e85cba5e3c16729a (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
// Degeneracy

// Reference : Problem Set 5A,2, The Simplex method and Sensitivity Analysis, Hamdy A. Taha. "Operations Research-An Introduction", 9E(2014))

// Objective function
c = [-3,-2]';

// Lower Bound of variable
lb = [0,0]
// Upper Bound of variables
ub = [%inf,%inf]

// Constraint Matrix
A = [4,-1;
4,3;
4,1]

b=[8,12,8]

intcon = [1 2];

// Calling cbcintlinprog
[x,f,status,output] = cbcintlinprog(c,intcon,A,b,[],[],lb,ub)
//output  =
// 
//   relativegap: 0
//   absolutegap: 0
//   numnodes: 0
//   numfeaspoints: 2
//   numiterations: 2
//   constrviolation: 0
//   message: "Optimal Solution"
// status  =
// 
//    0.  
// f  =
// 
//  - 8.  
// x  =
// 
//    0.  
//    4.  
//