Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Question no.

2
proc nlp;
max f1;
decvar x1 x2 x3;
bounds x1>=0, x2>=0,x3>=0;
c1=X1*X1+x2*x2+x3*x3;
nlincon c1=1;
f1=8*x1*x2*x3;
run;
Solution:
PROC NLP: Nonlinear Maximization
Optimization Results
Parameter Estimates
Gradient
Objective
Estimate
Function

N Parameter
1 x1
2 x2
3 x3

0.577354
0.577356
0.577340

Gradient
Lagrange
Function

2.666648
2.666641
2.666712

-0.000038318
-0.000052093
0.000090414

Value of Objective Function = 1.5396007969

Value of Lagrange Function = 1.5396007172

Values of Nonlinear Constraints


Lagrange
Value Residual Multiplier

Constraint
[

1 ]

c1

1.0000 3.452E-8

2.3094

*?*

Question no. 3
proc nlp;
max f1;
decvar x1 x2;
bounds x1>=0,x2>=0;
lincon 2*x1+3*x2<=6;
lincon -3*x1+2*x2<=3;
lincon 2*x2<=5;
lincon 2*x1+x2<=4;
f1=4*x1+3*x2;
run;
Solution:
The SAS System

14:50 Wednesday, September 7, 2011

52

PROC NLP: Nonlinear Maximization


Optimization Results
Parameter Estimates
N Parameter

Estimate

Gradient
Objective
Function

1 x1
2 x2

1.500000
1.000000

4.000000
3.000000

Value of Objective Function = 9

Linear Constraints Evaluated at Solution


1 ACT 2.2204E-16
2
5.50000
3 ACT -2.22E-16

=
=
=

6.0000
3.0000
4.0000

+
-

2.0000 * x1
3.0000 * x1
2.0000 * x1

3.0000 * x2
2.0000 * x2
1.0000 * x2

Question no.4
proc nlp;
min f1;
decvar x1 x2;
bounds x1>=0,x2>=0;
lincon 3*x1+x2=3;
lincon 4*x1+3*x2>=6;
lincon x1+2*x2<=3;
f1=4*x1+x2;
run;
Solution:
The SAS System

14:50 Wednesday, September 7, 2011

44

PROC NLP: Nonlinear Minimization


Optimization Results
Parameter Estimates

N Parameter

Estimate

Gradient
Objective
Function

1 x1
2 x2

0.600000
1.200000

4.000000
1.000000

Value of Objective Function = 3.6

Linear Constraints Evaluated at Solution


1 ACT
2 ACT
3 ACT

-2.22E-16
0
-2.22E-16

Question no. 5
proc nlp;
max f1;
decvar x1 x2;
bounds x1>=0,x2>=0;
lincon x1+4*x2-12<=0;

=
=
=

-3.0000
-6.0000
3.0000

+
+
-

3.0000 * x1
4.0000 * x1
1.0000 * x1

Linearly
Dependent
Active
Linear
Constraints

+
+
-

1.0000 * x2
3.0000 * x2
2.0000 * x2

f1=2*x1*x2+4*x2-2*x1**2;
ods rtf file='adref';
run;
ods rtf close;

Solution:

The SAS System

14:50 Wednesday, September 7, 2011

48

PROC NLP: Nonlinear Maximization


Optimization Results
Parameter Estimates
N Parameter

Estimate

Gradient
Objective
Function

1 x1
2 x2

1.000000
2.750000

1.500000
6.000000

Value of Objective Function = 14.5

Linear Constraints Evaluated at Solution


1 ACT

12.0000

1.0000 * x1

4.0000 * x2

You might also like