12.07.2015 Views

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Step 14Display the solutionGo to the comment Step 14 in Dietlesson.cs, and add the following lines to display thesolution.}System.Console.WriteLine();System.Console.WriteLine("Solution status = "+ cplex.GetStatus());System.Console.WriteLine();System.Console.WriteLine(" cost = " + cplex.ObjValue);for (int i = 0; i < nFoods; i++) {System.Console.WriteLine(" Buy"+ i+ " = "+ cplex.GetValue(Buy[i]));}System.Console.WriteLine();Step 15End and free licenseGo to the comment Step 15 in Dietlesson.cs, and add this statement to free the licenseused by <strong>ILOG</strong> <strong>CPLEX</strong>.cplex.End();Good Programming PracticesThe next steps of this tutorial show you how to add features to your application.<strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL 105

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!