diet - let n_max[N] := i; solve; if solve_result =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
model diet.mod; data diet2.dat; d param N symbolic in NUTR; param nstart > 0; param nstep > 0; read N, nstart, nstep <- ; # read data interactively r set N_MAX default {}; param N_obj {N_MAX}; param N_dual {N_MAX}; option solver_msg 0; o for {i in nstart . . 0 by -nstep} {
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: let n_max[N] := i; solve; if solve_result = "infeasible" then { printf "--- infeasible at %d ---\n\n", i; break; } let N_MAX := N_MAX union {i}; let N_obj[i] := Total_Cost; let N_dual[i] := Diet[N].dual; } display N_obj, N_dual;...
View Full Document

This note was uploaded on 04/01/2011 for the course CO 370 taught by Professor Henry during the Winter '11 term at Waterloo.

Ask a homework question - tutors are online