Starting from:

$30

IE507-Lab7 Solved

There are three exercises in this lab.

Please use different notebooks for solving different problems.

The notebook name for Exercise 1 should be YOURROLLNUMBER IE 507 Lab7Ex1.ipynb.

Similarly, the notebook name for Exercise 2 should be YOURROLLNUMBER IE 507Lab7 Ex2.ipynb, etc.

Please post your doubts in MS Teams or Moodle so that TAs can clarify.

We will practice some nonlinear optimization in this lab. In many real applications, the functions associated with an optimization problem can be nonlinear. Nonlinear optimization is usually more difficult and error-prone as compared to linear optimization.

Generally speaking, there are no practical methods to verify whether a given point is an optimal solution. Most solvers iteratively converge to a point that satisfies ‘Karush-Kuhn-Tucker’ (KKT) conditions. Ipopt is one such solver. If the problem is convex or if certain other conditions are satisfied, then the KKT point is also an optimal point. In this session, we will encounter convex problems only.


Exercise 1: Practice Problem. [10 marks] Read and understand the practice notebook available for this lab.

1.    Run the example provided.

2.    Add bounds on the variables of the model:

5 ≤ x1 ≤ 10

5 ≤ x2 ≤ 10

Report the new solution and the value.

3.    Add an addtional constraint (in addition to the bounds):

 

Report the new solution and the value.

4.    In the model of Part(3), which constraints are not tight at the solution? Remove those constraints and check whether the optimal solution changes.


Exercise 2: Pipeline Layout. Shreyas owns a rather irregular piece of farm. It is a polyhedron with four corners, with his house at one of the corners. The second corner is 100 meters to the west and 100 meters to the south of his house. The third one is 200 meters south of his house. The fourth one is 150 meters east and 50 meters south of his house. There is a circular lake of radius 50 meters whose center is 200 meters north and 200 meters east of his house. He wants to lay a pipeline from the lake to his farm.

1.    [R] Write a mathematical program to find the two end points of the shortest possible pipeline. Let (xf,yf) and (xl,yl) be the end points at the farm side and the lake side respectively. Remember that (xf,yf) must lie inside the farm and (xl,yl) inside the lake.

2.    Model the problem in Pyomo and solve using Ipopt.

3.    [R] Report the locations of the two ends.

4.    [R] Shreyas also wants to have a small pipe coming into his store-house which is 15m east and 20m north of his house. He wants to lay a ‘Y’ shaped pipe one end of which is in the lake and the others are in the store-house and the farm. The pipe from the junction to the store-house is thinner and its unit-cost is only 20% of that of the pipe from lake to junction and that from the junction to the farm. Write a mathematical program to find the locations of the ends in the farm and the lake, and also of the junction.

5.    Model the problem in Pyomo and solve using Ipopt.

6.    [R] Report the locations of the two ends.


Exercise 3 Regression [20 Marks] Revisit Exercise 3 of Lab 06 (Fitting data using a linear model). Instead of minimizing the absolute value of the residual, |Ri|, we can also instead minimize the square, i.e. Ri2.

1.    Model and solve this regression problem

2.    Report the results. Compare the maximum deviation (maximum value of the residuals in this model to the linear model with absolute terms). Reason out why there should be a difference and whether one model should have a lower maximum value as compared to the other.

More products