Create a text file in the AMPL and lpsolve directory with the following line:
option solver './lpsolve';
Before running ampl, you must set the OPTIONS_IN environment OPTIONS_IN and point to this newly created text file. I use bash and I gave the name settings.txt to this text file. Before calling ampl, I issue the following command in the bash shell:
export OPTIONS_IN=./settings.txt
There are other ways to do this, and you can use a different shell, so I don't want to extend it.
You can find the helpful CPLEX User Guide . Although there are several gain sections for CPLEX that are commonly used.
For example, all of the above that I am writing is given in this user guide, see chapter 4, “Setting AMPL,” section “Constant Parameter Parameters”.
source share