FE501 – 1221 NLP Inequality and Equality Case

Information about 2nd mid-term

  1. Portfolio optimiation problems are also constrained NLPs.

  2. In the mid-term there will be 4 questions:

    1. Solve an unconstrained Nonlinear problem (1214)
    2. Solve an constrained NLP with equality constraints (1221)
    3. Solve an constrained NLP with inequality constraints (1221)
    4. Showing convexity or concavity of the functions (1207)

Constrained NLPs with Equality Constraints

General form of a constrained NLPs with equality constraints is:

(max)minf(x1,,xn)s.t.h1(x1,,xn)=b1h2(x1,,xn)=b2hm(x1,,xn)=bm

Suppose we have such equality constraint NLP as below:

(1)maxx+ys.t.x2+y2=2

Solve (1) with graphical solution precedure

  1. draw the constraint of the problem

    image-20221222201037253

  2. Draw isoprofit (isocost) line (curve) correspondingly

    (How can we draw all the points which gives us the objective values of 0 ?)

    We take the gradient of the f

    (2)=[fxfy]=[11]

    the gradient vector is always perpendicular to the level curve.

image-20221222202329693

 

From the graph we can find that, the z=x+y takes maximum value (optimal value ) at the intersrct point (c,x+y) at A(1,1)

At the local optimal point, the gradient of the objective function and the gradient of the constraint function is parallel.

Gradient of the objective function:

(3)f=[fxfy]=[11]

Gradient of the constraint :

(4)h=[hxhy]=[2x2y]

image-20221222203057597

 

2022-12-22 at 20.33.26

Lagrangian Multiplier

Lagrange multipliers can be used to solve NLPs in which all the constraints are equalityconstraints. We consider NLPs of the following type:

min (ormax)f(x1,,xn)(eq)s.t.h1(x1,,xn)=b1h2(x1,,xn)=b2hm(x1,,xn)=bm

To solve (eq), we associate a multiplier  λi with the ith constraint in (eq) and form the Lagrangian

minf(x1,,xn)(eq)s.t.h1(x1,,xn)=b1| λ1h2(x1,,xn)=b2| λ2hm(x1,,xn)=bm| λm
(5)L(x1,,xn,λ1,,λm)=f(x1,,xn)+i=1i=mλi[hi(x1,,xn)bm]

Notice: The number of λ is same as the number of equality functions (that is to say m)

Then we attempt to find a point (x1,x2,...,xn,λ1,λ2,...,λm) that maximizes (or minimizes) L(x1,x2,...,xn,λ1,λ2,...,λm).

That is to say, when we will solve

(6)Lxi=0i=1,2,3nLλj=0j=1,2,3m

Solve (1) with Lagrangian Multiplier

image-20221223215224258

Lagrangian Multiplier in Advertising

A company is planning to spend $10,000 on advertising. It costs $3,000 per minute to advertiseon television and $1,000 per minute to advertise on radio. If the firm buys x minutesof television advertising and y minutes of radio advertising, then its revenue in thousandsof dollars is given by f(x,y)=2x2y2+xy+8x+3y. How can the firmmaximize its revenue?

(7)maxf(x,y)=2x2y2+xy+8x+3ys.t.3x+y=10

Solve (7) without the constraint

image-20221223222134089

image-20221223222146854

Solve (7) with equality constraint

image-20221223224004999

image-20221223224022624

image-20221223224035525

Unconstrained inequality NLPs (KTT)

General form

(8)max(or min)f(x1,,xn)s.t.g1(x1,,xn)b1g1(x1,,xn)b2g1(x1,,xn)bn

To apply the results of this section, all the NLP’s constraints must beconstraints.

Other types of constraines must be changed, for example:

image-20221223224830079

 

Lagrangian Function of inequality

For minimization problem:

image-20221223225404535

For maximization problem:

image-20221223225453048

KKT Conditions

  1. Stationary conditions

    partial derivatives set to zero

  2. primal feasibility

    original constraints must satisfy

  3. complementary slackness

    dual must be zero :

    1. strict ? μ=0
    2. not strict ? bigi=0
  4. dual feasibility

    μ is not negative.

Expl.1. max x1x2

(9)maxx1x2s.t.x12+x221

image-20221224102505286

Expl.2. min x1x2

(10)minx1x2s.t.x12+x221

image-20221224103139714

image-20221224103154279

 

Expl.3. 50 points problem (😅)

IMG_4841

IMG_4841

Note: I do have calculated the problem, but, i have a completly different answer to that. To not mislead anyone, i put on the original answers, to check my answers, you may click here.

Max x*y

(11)maxxys.t.x+y3

Solving using the graphical precedure

image-20221224130229574

Using KKT

image-20221224173457176

End of 1221.