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
-
Create a model using Solver Foundation Services.
Use the name context for the SolverContext object.
-
Add the following code to your application.
using (StreamWriter sw = new StreamWriter(@"modelname.mps")) { context.SaveModel(FileFormat.MPS, sw); }
Show: