AMPL下载使用
依次执行以下操作
wget https://ampl.com/demo/amplide.linux64.tgz
tar xzf amplide.linux64.tgz
cd amplide.linux64/
在当前目录下检验是否安装成功
./ampl
reset;
model ./models/oil.mod;
data ./models/oil.dat;
option solver './minos';
solve;
获取其余求解器
wget https://ampl.com/dl/open/cbc/cbc-linux64.zip
unzip cbc-linux64.zip
wget https://ampl.com/dl/open/couenne/couenne-linux64.zip
unzip couenne-linux64.zip
wget https://ampl.com/dl/open/bonmin/bonmin-linux64.zip
unzip bonmin-linux64.zip
wget https://ampl.com/dl/open/ipopt/ipopt/ipopt-linux64.zip
unzip ipopt-linux64.zip
设置变量
vim ~/.bashrc
写入
export PATH=$PATH:/home/yourname/software/AMPL/amplide.linux64/
执行
source ~/.bashrc