Running SOS

Once you have completed the download and install of SOS, you are ready to run the SOS software proper.  This page describes how to get SOS running so that you may begin your own optimizations.  Examples of how to use SOS once it is running are included as part of the SOS article (particularly the tutorial included in an appendix), the supplemental materials, and in the example scripts section of the manual.  

Source Code Version

The source code version of MATLAB allows you to interact with the SOS code as if it were any other standard set of libraries in MATLAB.  

You may check that the graphical user inferface loads by running:


If you do not plan to use the graphical user interface, you may instead simply test that you have successfully added SOS to the MATLAB search path by running:

testSample = sample(5); % checks if a sample object can be created

Once the software is running, consult the article, supplemental materials, or exmaple scripts sections for details on how to construct and run an optimization. 

Standalone Binary Version

Once you have uncompressed the standalone binary archive to a directory of your choosing, you are ready to begin using SOS.  

Important note on 'Errors' raised by the standalone Version of SOS

Differences in the details and sophistication of how the MATLAB runtime component is implemented on Windows/OSX/Linux sometimes cause different 'errors' to be raised in the console/command line interface.  This is particularly (but not exclusively) the case when using the graphical interface, which has been made into an integral part of the standalone version to ensure that all users have access to the broadest set of functionality as is possible.  For instance, users may encounter messages such as:

[On SOS startup]

??? Undefined function or variable


 [When Using SOS]

??? Error using ==> eval

Undefined function or variable 'hfudge'.

Error in ==> movegui at 114

Error in ==> openfig at 109

Error in ==> gui_mainfcn>local_openfig at 286

Error in ==> gui_mainfcn at 234

Error in ==> sos_gui at 74

These errors do not appear to be unique to SOS and are encountered with other similarly-complex standalone executables generated from MATLAB source code. Critically, however, the SOS software nevertheless runs properly and optimizations can be completed successfully by ignoring these messages.  To date, we have not discovered a better solution to these non-critical errors, but if one is discovered an updated version of the software will be created.

  Windows users:

Simple usage:

Run the 'sos.exe' binary in '<INSTALLDIR>/SOS/bin'

Advanced usage:

Start the SOS binary from within a windows command line interface so that detailed command line information can be recorded and manipulated by pipes, redirects, etc.  To do so in Windows go to 'Start Menu--> Run...', and type 'cmd'.  In the command line interface, you can then 'cd' to the location of the SOS binary (e.g., 'cd C:\SOS\binary', if you uncompressed the standalone executable archive to 'C:\') and run sos by typing 'sos.exe'.

  Linux and OSX users:

From a console/terminal/command line interface, run the ''  shell script located in '<INSTALLDIR>/SOS/bin' (but see the note below if you have problems).  You should be able to do this directly in a shell such as BASH without forcing the use of a different shell.  If the file is not labeled as executable, you may need to 'chmod' it to allow this (type 'man chmod' in a console for help in doing this).  

If you receive a message indicating that you must pass in the <deployedMCRroot>, you will also need to supply this information when running SOS.  For instance, starting SOS might require a command such as the following, which assumes that the user is in '<INSTALLDIR>/SOS/bin' and installed the MCR to '~/MCR':

./ ~/MCR/v7141/

Note that this requires passing in the name of the subfolder ('v7141') in the base folder ('~/MCR') in which you may have installed the MCR.

Using SOS

Examples of how to use SOS once it is running are included as part of the SOS article (particularly the tutorial included in an appendix), the supplemental materials, and in the example scripts section of the manual.  

Blair Armstrong, Christine Watson, David Plaut, 2011-2012