write a .sol file which stores the solution of a given AMPL problem
ampl_write_sol(asl,message,x,v)
a structure which handles the pointer to the problem
a string descriptor which will be stored in the .sol file
the solution of the AMPL problem
the dual variables of the AMPL problem
Write a .sol file which stores the solution of a given AMPL problem.
[asl, x0, bl, bu, v, cl, cu] = ampl_init('demos/data/ASL/ch03.nl'); ampl_write_sol(asl,'solution of the AMPL ch03 problem', x0, v); ampl_free(asl); // free the memory