Guidelines for Programmers

Adding a new constraint type

The main type of addition that programmers may wish to make is to add or extend the existing vocabulary of constraints.  Two main changes must be made to do so.  First, the user must create their own constraint which implements all of the functions listed in the abstract interface 'genericConstraint.m'.  The easiest way to do so is to select a similar type of constraint from those that already exist and either modify it or follow its function and method definitions.  The second change is that this constraint must be listed as a supported type within the validator in 'genericConstraint.m'.  

Additionally, if users are creating a new type of constraint that is neither 'hard', 'soft', nor 'meta', further changes will be needed in the main SOS object.  See the constraint creation methods for what types of validation will be required for this new constraint, as well as for examples of how to store lists of these new types of constraints.

Compiling a New Version of SOS

To compile a new standalone version of SOS, you will need to have the MATLAB compiler package installed on your system (available as part of a complete MATALB install).  Once that is complete, simply run the appropriate makefile<ARCH>.m file for your architecture, followed by clean.m.  If a makefile does not currently exist for your architecture, you may find it useful to start with a makefile from a similar architecture and modify it as necessary for your system.

Note that if you compile your own version of SOS, it may be necessary to also distribute the MATLAB Runtime Component (MCR) that is associated with the MATLAB version used to compile the program.  You can find the location of this file by typing 'mcrinstaller' in the MATLAB command line.

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