Hi Rohan,

You could see this error if you are trying to read a solution file into a model with no variables. Did you add variables to the model (named to match the variables in the .mst file) prior to calling Model.read()?

Thanks,

Eli

Hi Eli! Thanks for the comment. Actually, the model contains all the variables when I'm calling model.read. I'm calling it just before model.optimize().

Could there be any other reasons for this error?

Thanks,
Rohan

Hi Rohan,

Could you try calling Model.update() immediately before reading the .mst file? Thanks!

Eli

Hi Eli,

It worked! Thanks!

Rohan