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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Note: This chapter consists of a tutorial based on a procedure-based learning strategy. Thetutorial is built around a sample problem, available in a file that can be opened in anintegrated development environment, such as Microsoft Visual Studio. As you follow thesteps in the tutorial, you can examine the code and apply concepts explained in thetutorials. Then you compile and execute the code to analyze the results. Ideally, as youwork through the tutorial, you are sitting in front of your computer with <strong>ILOG</strong> ConcertTechnology for .NET users and <strong>ILOG</strong> <strong>CPLEX</strong> already installed and available in yourintegrated development environment.For hints about checking your installation of <strong>ILOG</strong> <strong>CPLEX</strong> and <strong>ILOG</strong> Concert Technologyfor .NET users, see the online manual Getting Started. It is also a good idea to try the tutorialfor .NET users in that manual before beginning this one.DescribeThe aim of this tutorial is build a simple application with <strong>ILOG</strong> <strong>CPLEX</strong> and ConcertTechnology for .NET users. The tutorial is based on the well known diet problem: tominimize the cost of a daily diet that satisfies certain nutritional constraints. Theconventional statement of the problem assumes data indicating the cost and nutritional valueof each available food.The finished application accepts a filename and two options -c and -i as command linearguments. Option -i allows you to create a MIP model where the quantities of foods topurchase must be integers (for example, 10 carrots). Otherwise, the application searches fora solution expressed in continuous variables (for example, 1.7 kilos of carrots). Option -ccan be used to build the model by columns. Otherwise, the application builds the model byrows.The finished application starts by evaluating the command line arguments and reading theinput data file. The input data for this example is the same data as for the corresponding C++and Java examples in this manual. The data is available in the standard distribution at:your<strong>CPLEX</strong>home\examples\data\diet.datStep 1Describe the ProblemWrite a natural language description of the problem and answer these questions:◆ What is known about this problem?◆ What are the unknown pieces of information (the decision variables) in this problem?◆ What are the limitations (the constraints) on the decision variables?98 <strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL

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

Saved successfully!

Ooh no, something went wrong!