%% Read .lis file
% Gets variable and constraint names from AIMMS
%%
function [var_names, con_names] = read_lis(filename)
fileID = fopen(filename);
junk = textscan(fileID,'%s %*[^\n]',4); % read header rows
var_lines = textscan(fileID,'%*u %s %*[^\n]'); % read integer _ string _ newline until we hit a string, discard the integer
var_names=var_lines{1,1}; % get cell from within cell
junk = textscan(fileID,'%s %*[^\n]',1); % read row label line
con_lines = textscan(fileID,'%*u %s %*[^\n]'); % read integer _ string _ newline until end of file, discard the integer
con_names=con_lines{1,1}; % get cell from within cell
fclose(fileID);
end

