Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

How to: Save a Model in MPS Format

Solver Foundation 3.0

You can save models that you develop using Solver Foundation Services in Mathematical Programming System (MPS) format using the SaveModel method.

To save a model in MPS format

  1. Create a model using Solver Foundation Services.

    Use the name context for the SolverContext object.

  2. Add the following code to your application.

          using (StreamWriter sw = new StreamWriter(@"modelname.mps")) {
            context.SaveModel(FileFormat.MPS, sw);
          }
    
    
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.