2 %> Algorithm 16.1: Vertex enumeration Implementation of algorithm 16.1 of \cite Bier15-book
4 %> @note Tested with \ref run1604.m
5 %> @note Tested with \ref runBoundConstraints.m
7 %> @author Michel Bierlaire
8 %> @date Sun Mar 22 10:53:32 2015
12 %> Applies the vertex enumeration algorithm to solve \f$\min_x c^Tx\f$ subject to \f$Ax=b\f$ and \f$x \geq 0\f$ , where \f$A \in \mathbb{R}^{m\times n}\f$, \f$b \in \mathbb{R}^m\f$, and \f$c \in \mathbb{R}^n\f$.
13 %> @param A the constraint matrix
14 %> @param b the constraint right hand side
15 %> @param c the cost vector
for the objective
function 16 %> @
return [solution,optvalue]
17 %> @
return solution: an optimal solution
18 %> @
return optvalue: the value of the objective
function at the optimal solution
23 error(
"The number of rows in A and b do not match") ;
26 error(
"The number of columns in A and do not match the size of c") ;
30 enumerate = nchoosek(1:n,m) ;
33 [x, R] = linsolve(B,b) ; 37 printf("%e\t",xfull) ; 46 printf(
"Infeasible\n") ;
function vertexEnumeration(in A, in b, in c)
Applies the vertex enumeration algorithm to solve subject to and , where , , and ...