AMPL can't find minos

I am having a problem with AMPL. I am using a 32-bit version of Linux OS. I am trying to solve a simple linear programming problem, but I canโ€™t understand whatโ€™s wrong ... Here is a model, data files and a script session. Response to the "solve" command: Cannot find the "minos". But the solver is now in my folder! Changing solvers doesn't help. Any suggestions?

Problem Model:

param n; param t; param p{i in 1..n}; param r{i in 1..n}; param m{i in 1..n}; #Declaration of variables var x {i in 1..n} >=0; #Objective Function maximize revenues: sum {i in 1..n} p[i]*x[i] ; #Constraints subject to Aval_Time: sum{i in 1..n} x[i]/r[i]<=t; subject to Max_Flavor {i in 1..n}: x[i]<=m[i]; 

These problems:

 param n := 4;# No of Flavors param t := 40; # Total labor hour in a week param p := 1 1 2 1.5 3 1 4 1.5; # Revenue per package flavor i param r := 1 40 2 30 3 50 4 20; # Production rate of package flavor i param m := 1 1000 2 900 3 500 4 800; # Maximum demand package flavor i 

AMPL session:

 reset; model example2.mod; data example2.dat; solve; display x; 

System response:

Can't find mines

+6
source share
3 answers

The error message is trying to tell you that there is no solver . AMPL does not solve your problem, it simply turns your model into a form suitable for the solver, passes it to the solver, and the actual solution is performed by the solver. This is an error message.

To solve this problem, you need a solver. Download and extract the minos utility. Make it exectuable: in the Bash shell (and not in the AMPL shell) do the following:

 chmod +x minos 

You will also tell AMPL where the solver is before you execute the solve; command solve; . Before the solve command, do this either in the AMPL shell or in the model file:

 option solver "/path/to/minos"; 

where you change /path/to/minos according to your setup.

What all.

+5
source

On Unix and Unix-like operating systems such as Linux, the current directory is usually not in the way. You have the following options:

  • Use option solver './minos'; before the solve team.
  • As above, but use the absolute path to the minos, as suggested by Ali.
  • Add the AMPL directory path to the PATH environment variable.
  • Copy (or create a symbolic link) minos to a directory on the search path, for example /usr/local/bin
+4
source

Sorry for the delay in my reply. The problem was solved with the following command

 option solver "./minos"; 

in the folder with AMPL. Thanks.

+1
source

All Articles