how to pass an additional option to the solver Knitro

27 views
Skip to first unread message

Abdullah

unread,
Jan 1, 2020, 3:15:32 PM1/1/20
to YALMIP
Greetings,

I am using the solver Knitro through yalmip. I am trying to set the option of Knitro (mip_method=2) through yalmip but this command in not showing under:

ops = sdpsettings;

ops
.knitro



Thank you.

Mark L. Stone

unread,
Jan 1, 2020, 5:33:10 PM1/1/20
to YALMIP

Abdullah

unread,
Jan 1, 2020, 6:34:45 PM1/1/20
to YALMIP
Thank Mark for your reply.
Could you please check your link. It's not working for me.

Mark L. Stone

unread,
Jan 1, 2020, 7:16:00 PM1/1/20
to YALMIP
I linked ti the topic on this forum "Does yalmip support parallelism of knitro solver?"

My answer there:

Try using
sdpsettings('solver','knitro','knitro.optionsfile',knitro_options_filename)

and set the options you  want in knitro_options_filename .


Abdullah

unread,
Jan 2, 2020, 4:42:30 PM1/2/20
to YALMIP
It worked.

Thank you Mark.

So basically, we create a text file in the same directory as the model and list all the parameters or options we want to pass to the solver in that file. Then, we tell yalmip to pass these options to the solver.


sdpsettings('solver','knitro','knitro.optionsfile','knitro_options_file.txt')
Reply all
Reply to author
Forward
0 new messages