# Call solver and give it options # submit the AMPL files along with data sets to NEOS server: # http://neos.mcs.anl.gov/neos/solvers/index.html # Choose the solver "SNOPT" under the "Nonlinear Constrained Optimization" # category and put the model files, data file, command file in the 3 boxes # respectively. # default options for SNOPT option snopt_options $snopt_options 'outlev=2 timing=1 '; # output level # Initial guesses set at trivial values; probably not good initial guess let {i in X} EV[i] := 0; let {i in 1..3} thetaProbs[i] := 1/3; # Solve command solve MPECZurcher; display _solve_time; # Output commands option display_round 6, display_width 120; # option display_width 120; # write the value function display EV; # write the structural parameters (remember beta was fixed) display beta, RC, thetaCost, thetaProbs, TransProb; # write errors in Bellman equations display Bellman_1toNminusM.body; display Bellman_LastM.body; display Bellman_N.body; display BellmanViola;