title: How can I get Gurobi status codes in AMPL?
body: <p>I would like to know how can I get the Gurobi Status Code - optimum found, infeasible etc. (the possible results are listed in <a href="http://www.gurobi.com/documentation/7.0/ampl-gurobi/results.html" rel="nofollow noreferrer">http://www.gurobi.com/documentation/7.0/ampl-gurobi/results.html</a>) from AMPL after running the optimization.</p>
  
  <p>Here is my <code>.run</code> code</p>
  
  <pre><code>model model.md;
  data input.dat;
  option solver gurobi;
  option gurobi_options 'logfile=log.txt timelim=60 writeprob=model.lp 
  resultfile=sol.sol';
  problem oampl: fo, variables, constraints;
  solve oampl;
  </code></pre>
  
  <p>And <code>model.md</code> have the model with the objective function (fo), variables and constraints.</p>