391Appendix B
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MATLAB code dual_step1.m (Solves step 1 of the problem)
% Gomory’s method (All-integer problem)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The matrix A and b corresponds to equation Ax=b
% c -> vector of cost coefficients
% basic_set -> set of basic variables
% nonbasic_set -> set of nonbasic variables
% B -> matrix containing basic variable columns of A
% N -> matrix containing nonbasic variable columns of A
% xb -> basic variables
% y -> simplex multipliers
% cb -> cost coefficients of basic variables
% cn -> cost coefficients of nonbasic variables
%
clear all
clc
format rational
format compact
A = [1 0 7/11 1/11 0;
0 1 -4/11 1/11 0;
0 0 -7/11 -1/11 1];
b = [85/11;30/11;-8/11]; ...