Set up the system path to the MOSEK in AMPL

106 views
Skip to first unread message

Anokhin, Dmitry

unread,
Jan 13, 2022, 10:20:35 PM1/13/22
to am...@googlegroups.com
Hello,

I am trying to use MOSEK solver with AMPL, and I faced an issue that AMPL does not see the solver. I know that to use MOSEK from AMPL I need to set up the system path to the MOSEK command-line tool. I checked the MOSEK Command line tool guide and all other documentation but still could not figure it out. I tried to call Mosek directly by "option solver mosek" and using the command line using "mampl".  Any ideas on how can I  set up the system path to the MOSEK or any other ideas? Any help would be appreciated.


Additional info:

MOSEK version:  9.3
Working platform: Windows  64 bit
The API I am using: AMPL
Error message:  "Error at _cmdno 4 executing "solve" command"
Sample code attached.

--
Sincerely,
Dmitry Anokhin
test_data_1.txt
Chanta.mod
Chanta.run

AMPL Google Group

unread,
Jan 14, 2022, 12:16:43 PM1/14/22
to AMPL Modeling Language
Hi Dimitry,

You can add the path to the location where you have the MOSEK executable on Windows to the environment variable "Path" as described in: https://www.computerhope.com/issues/ch000549.htm

It is also recommended to the the same for the AMPL directory where you can find ampl.exe and other solvers.

Alternatively, you can specify the complete path to MOSEK in AMPL as follows:

ampl: option solver "C:/complete/path/to/mosek.exe";


--
Filipe Brandão
am...@googlegroups.com
{#HS:1756934152-108107#}
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/CAPzuO6wMFfR-zjTAjEqYGM_Shby-pFU605be8FDtvDcPo5whiw%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages