Jaa


Command Line Tools for Solver Foundation

Microsoft Solver Foundation provides several tools for modeling and solving optimization problems.  Don't forget about msftcli - a simple command-line interface.  If you have downloaded the Express Edition, you can find it in Program Files\Microsoft Solver Foundation\1.0.7.5685\Bin.  Try it out, especially if you are a command-line guy like me:

 msfcli /?
usage: MSFCli [[flags] files]+
    files: one or more .oml or mps/qps files
    flags:
        +type: oml|mps|qps for unified model, linear model, and quadratic model (default is oml)
        +timelimit : abort after  seconds of elapsed time
        +solutioncount :  of solution to print (default is 1)
        +rw: use rewrite parser (default is off)
        [+|-]strict: sets/clears strict mode (default is off)
        [+|-]wait: whether to wait for  before terminating
        [+|-]verbose (default is off)
        [+|-]log: whether to log diagnostic messages (default is off)
        [+|-]time: time expression evaluation (default is on)

The most common usage is to simply provide the path to an input file.  MSFCLI will solve the problem using Solver Foundation and print the results to the screen, using the variable names provided in the input file.  MSFCLI also supports a number of command line arguments that control its behavior.  The usage of +timelimit, +wait, +time are straightforward so I will skip those.  Some of these are enabled by default; put a "-" in front to disable.

+type lets you specify the input format.  OML (Optimization Modeling Language) is Solver Foundation's declarative modeling language.  There are many samples provided with the Express Edition, check out Microsoft Solver Foundation\Samples\SolverFoundationServices\OML.  MPS and QPS are standard formats for specifying linear and quadratic programs, respectively.  You can find out more about these formats and download samples at https://www.netlib.org/lp/data/.

+solutioncount is straightforward, but note that this option is not supported for quadratic programs since they are solved using the interior point solver, which does not support retrieving multiple solutions.

+verbose prints additional information about the solution process, the contents of which depend on the type of problem being solved.

+strict and +log only apply for OML input files.

If you have any suggestions about how to make msfcli better, let me know!