/Optimization-Problems-in-Python

Learning Example on Solving Optimization Problems using Python

Primary LanguageJupyter Notebook

Optimization-Problems-in-Python

  1. A revolutionary nutritionist is devising a new diet based on only 3 basic foods. The amount of protein, sugar, and vitamins provided by each food and the cost per serving is displayed below.

Food Cost per serving Protein (g) Sugar (g) Vitamins (g) Chocolate bar 2 2 1 2 Cookies 1 1 3 4 Ice cream 3 1 2 6

The daily requirement for protein, sugar, and vitamins is 100g, 50g, and 25g. A balanced diet should satisfy: • The daily requirement for protein, sugar, and vitamins. • The number of servings of chocolate bars should be at least twice the number of servings of cookies and ice cream combined • The amount of money spent on ice cream should be less than or equal to the amount of money spent on cookies The goal of the nutritionist is to create a minimal-cost diet.

  1. Adirondack Savings Bank (ASB) has $1 million in new funds that must be allocated to home loans, personal loans, and automobile loans. The annual rates of return for the three types of loans are 7% for home loans, 12% for personal loans, and 9% for automobile loans. The bank’s planning committee has decided that at least 40% of the new funds must be allocated to home loans. In addition, the planning committee has specified that the amount allocated to personal loans cannot exceed 60% of the amount allocated to automobile loans. Formulate a linear programming model that can be used to determine the amount of funds ASB should allocate to each type of loan in order to maximize the total annual return for the new funds.