The task is the following: Find the ellipse with maximal area.
The center of the ellipse is given. Several inequalities are also given, and all of the ellipse's points must satisfy all of the inequalities. So basically I need to find the maximal area ellipse which is in the area enclosed by the inequalities. Here is a picture for illustration: https://ibb.co/LS93208
In my example the center is (Cx,Cy)=(1,1), and the inequalities are the following:
- y <= 0.5x + 4
- y >= (1/3)x - 3
- y >= -0.5x - 4
- y <= -0.25x + 4
Any idea how can you solve this? I've tried creating an optimization model where the objective function is the area(width*height) and the three decision variables are width(x2),height(x3),rotation angle(x1) - these 3 determine the ellipse -, but I can't seem to write up the right constraints. I share the model I created, but it is probably wrong. The objective function is x2*x3, you have to maximize it.
The first 2 equations on the picture is the general ellipse equation, followed by the 4 inequalities(alpha between 0 and 2pi). Then I substituted x(alpha) and y(alpha) into the inequalities(I don't know if it's a right move), and moved everything to left side so the right side is 0. The result is:
I can't manage to solve this optimization problem in matlab, so I'm on a wrong track probably and you don't solve this task as an optimization problem.
Just in case anyone interested, my optimization model was correct and could be solved in matlab(fseminf function), also can be generalized to higher dimension