CS代考 STOR415: INTRODUCTION TO OPTIMIZATION

STOR415: INTRODUCTION TO OPTIMIZATION
DEPARTMENT OF STATISTICS AND OPERATIONS RESEARCH

———————– FALL 2022 ———————–

Copyright By PowCoder代写 加微信 powcoder

INSTRUCTOR: MICHAEL O’NEILL

HOMEWORK 9: MORE LINEAR PROGRAMMING APPLICATIONS
Each problem should be solved in a separate Jupyter notebook.

• Create an ipynb with exactly the same name as is required in the problem. In the Julia code, declare
variables with the name given in the problem. Then, after solving the problem, in the last cell of your
notebook print (or use @show) all the values of all of the variables in your optimization problem as
well as the value of the objective function.

• Please comment add comments to your code describing the variables, constraints and objective func-
tion of your model.

• The homework assignment will have two parts. For the first part (with this outline), you should
submit a PDF of your Jupyter notebook for each homework problem (You should be able to submit
multiple PDF’s for the assignment. If you submit everything in a single pdf, please assign pages
to make it easier to grade). For the second part, which is Homework 8 IPYNB, please submit your
Jupyter notebook files (.ipynb). We won’t directly grade these, however they may be used if there are
issues with your PDF submissions.

• Ensure that your notebook runs properly before submitting it. In the main bar, perform Clear Outputs
of All Cells then Run All. to ensure that there are no errors.

• To generate a PDF of your notebook:

– In the main bar, click Export (may be hidden behind a 3 dots dropdown menu)

– Choose Export as PDF (may require additional extensions).

– If Export as PDF fails or does not give proper output, export the file as HTML, open this HTML
file in a web browser and save the HTML file as a PDF.

– If you cannot get exporting to work in VSCode, you may use a Jupyter Notebook to PDF con-
verter online.

• Remember to submit the .pdf versions to the normal Homework 9 assignment and the .ipynb files to
the Homework 8 IPYNB assignment.

STOR415: Introduction to Optimization – Fall 2022 Student’s name:

Question 1. (30 points): bakes two types of cakes: cheesecakes and black forest cakes.
During any month, he can bake at most 65 cakes in total. The costs per cake and the demands for cakes,
which must be met in time, are given in the following table.

Month 1 Month 2 Month 3

Item Demand Cost/cake($) Demand Cost/cake($) Demand Cost/cake($)

Cheesecake 40 3.00 30 3.40 20 3.80

20 2.50 30 2.80 10 3.40

We assume that cakes baked during a month can be used to meet demand for this month. At the end of
each month (after all cakes have been baked and the current month’s demand has been satisfied), a holding
cost of 50 cents per cheesecake and 40 cents per black forest cake is incurred for cakes left in inventory.
Those cakes can be used to satisfy future demand.

Formulate an LP to minimize the total cost of meeting the next three months’ demands and solve it
using JuMP. Create a Jupyter notebook named cake.ipynb. Declare two vectors in the :

cakes = [:cheesecake, :blackforest]
months = 1:3

Declare the holding costs as a Dictionary over cakes and the demands and production costs as NamedArrays
over (cakes,months). Then, declare positive variables x[cakes,months] and h[cakes,months], to represent the
number of each type of cakes to make each month and the number of each type of cakes left in inventory at
the end of each month respectively. To check the correctness of your solution: the optimal value is $464.5.

STOR415: Introduction to Optimization – Fall 2022 Student’s name:

Question 2. (30 points): A shipping company supplies goods to three customers, who require 40, 50 and
40 units respectively. The company has three warehouses, each of which has 30 units available. The costs
of shipping 1 unit from each warehouse to each customer are shown in the table below.

From/To Customer 1 Customer 2 Customer 3

Warehouse 1 $15 $35 $25
Warehouse 2 $10 $50 $40
Warehouse 3 $20 $40 $30

There is a penalty for unmet demand: With customer 1, a penalty cost of $70 per unit is incurred; with
customer 2, $75 per unit; and with customer 3, $65 per unit. The company’s goal is to minimize the total

Formulate the problem as a balanced transportation problem by adding a dummy warehouse. Create a
Jupyter notebook named company.ipynb to solve the problem. Display values of all variables. (The optimal
value is $4,950.)

STOR415: Introduction to Optimization – Fall 2022 Student’s name:

Question 3. (40 points):
Oilco has oil fields in Los Angeles and San Diego. The Los Angeles field can produce 400,000 barrels

per day and the San Diego field can produce 500,000 barrels per day.
Oil is sent from the fields to a refinery, in either Dallas or Houston (assume each refinery has unlimited

capacity). To refine 100,000 barrels costs $700 at Dallas and $900 at Houston.
Refined oil is shipped to customers in and Chicago. customers require 300,000

barrels per day and Chicago customers require 400,000 barrels per day.
The costs of shipping 100,000 barrels of oil (refined or unrefined) between cities are shown below.

From/To($) Dallas Houston Chicago

Los Angels 300 110 – –
San Diego 420 100 – –
Dallas – – 450 550
Houston – – 470 530

Formulate a minimum-cost-network-flow-problem (MCNFP) to minimize the total cost of meeting all
demands. Create a Jupyter notebook named oilco.ipynb to solve this problem. Display values of all variables.
(The optimal value is $10,470.)

———————— The end ————————

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com