6

I have a code in MATLAB which uses YALMIP to structure my optimization model and solve it via a solver. I would like to obtain a .mps file out of my model, apparently, YALMIP does not produce this if I am not mistaken. I would like to obtain a .mps file, how can I do this?

Edit: I know this is not an OR question, but I am sure a lot of OR people may face this challenge someday.

independentvariable
  • 3,980
  • 10
  • 36

1 Answers1

2

I am not an expert in YALMIP but you may check the saveampl(F,h,filename) command written in YALMIP website. An example of the implementation is given as:

x = sdpvar(3,1);
A = randn(5,3);
b = randn(5,1);
c = randn(3,1);
F = [A*x <= b, integer(x(2:3))];
saveampl(F,c'*x,'myamplmodel.mod');

where I think you can save the model with .mps extension instead of .mod.

Oguz Toragay
  • 8,652
  • 2
  • 13
  • 41