0001 function install()
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 [ST I]=dbstack('-completenames');
0014 ravenDir=fileparts(ST(I).file);
0015
0016
0017 mosekDir=uigetdir('','Select the Mosek home directory');
0018 mosekDir=fullfile(mosekDir,'6','toolbox','r2009b');
0019 if ~exist(fullfile(mosekDir,'mosekopt.m'),'file')
0020 throw(MException('','Not the correct MOSEK directory'));
0021 end
0022
0023
0024 sbmlDir=uigetdir('','Select the libSBML home directory');
0025 sbmlDir=fullfile(sbmlDir,'bindings','matlab');
0026 if ~exist(fullfile(sbmlDir,'TranslateSBML.m'),'file')
0027 if exist(fullfile(sbmlDir,'matlab','TranslateSBML.m'),'file')
0028 sbmlDir=fullfile(sbmlDir,'matlab');
0029 else
0030 throw(MException('','Not the correct libSBML directory'));
0031 end
0032 end
0033
0034
0035 addpath(ravenDir);
0036 addpath(mosekDir);
0037 addpath(sbmlDir);
0038 savepath
0039
0040
0041 a=optimset();
0042 if isfield(a,'TolFun')
0043 throw(MException('','Wrong path list for Mosek'));
0044 end
0045
0046 excelFile=fullfile(ravenDir,'tutorial','empty.xlsx');
0047 xmlFile=fullfile(ravenDir,'tutorial','empty.xml');
0048 try
0049 SBMLFromExcel(excelFile,xmlFile,false,false);
0050 catch
0051 if ispc==1
0052 fprintf('ERROR: Could not import from Excel. Some functionality of the RAVEN Toolbox will not be available\n');
0053 else
0054 fprintf('ERROR: Could not import from Excel. This functionality uses Excel COM server, which works best for the Windows version of Matlab. Some functionality of the RAVEN Toolbox will not be available\n');
0055 end
0056 end
0057 try
0058 smallModel=importModel(xmlFile);
0059 catch
0060 fprintf('ERROR: Could not use libSBML. Some functionality of the RAVEN Toolbox will not be available\n');
0061 end
0062 try
0063 sol=solveLP(smallModel);
0064 catch
0065 fprintf('ERROR: Could not use Mosek. Some functionality of the RAVEN Toolbox will not be available\n');
0066 end
0067
0068
0069 fprintf('INSTALLATION OF THE RAVEN TOOLBOX v1.02 COMPLETED\n');
0070 end