1.
use
LP
Process solving linear planning
Max z = 6 * x1-2 * x2 3 * x3
S.t. 2 * x1-x2 2 * x3 <= 2
X1 4 * x3 <= 4
X1, x2, x3> = 0sas program as follows
Data EX1;
Input _row_ $ x1 x2 x3 _type_ $ _RHS_;
Cards;
Object 6 -2 3 max.
CON1 2 -1 2 Le 2
CON2 1 0 4 Le 4
;
PROC LP;
Run;
Solve result
: x1 = 4, x2 = 6, x3 = 0, z = 12
2. Use the LP process to solve the number linear planning max z = -3 * x1 x2s.t. 3 * x1-2x2 <= 3 -5 * x1-4 * x2 <= - 10 2 * x1 x2 <= 5 x1 X2, X3> = 0SAS program as follows; input _row_ $ x1 x2 _type_ $ _RHS_; cards; Object -3 1 max .con1 3 -2 le 3con2 -5 -4 Le -10Con3 2 1 le 5bound 3 5 Upperbd. InBD 1 2 Integer.; Proc LP; Run; Solution: X1 = 0, X2 = 5, Z = 5
3. Solve unconstrained optimization with NLP process min z = x1 * x1 x2 * x2-3 * x1-x1 * x2 3Proc NLP; min y; PARMS X1 X2 = -1; Bounds 0 <= x1 ,0 < = x2; y = x1 * x1 x2 * x2-3 * x1-x1 * x2 3; Run; solution results: x1 = 2, x2 = 1, z = 0
4. Solving Nonlinear Planning MIN Z = -3 * x1 * x1-x2 * x2-2 * x3 * x3s.t. X1 * x1 x2 * x2 x3 * x3 = 3-x1 x2> = 0 x1, x2, x3> = 0Proc NLP; min y; PARMS X1 x2 x3 = -1; Bounds 0 <= x1, 0 <= x2, 0 <= x3; Y1 = x1 * x1; Y2 = x2 * x2; Y3 = x3 * x3; Y4 = Y1 Y2 Y3; Y5 = -x1 x2; NLINCON 2.9999 <= Y4 <= 3, 0 <= Y5; Y = -3 * Y1-Y2-2 * Y3; RUN; Solution: x1 = 1, x2 = 1, x3 = 1, z = 6
5. Solve nonlinear planning min z = 8 * x1 10 * x2-x1 * x1-x2-x2s.t. 3 * x1 2 * x2 <= 6 x1, x2> = 0Proc NLP; min y PARMS X1 X2 = -1; Bounds 0 <= x1, 0 <= x2; y1 = x1 * x1; y2 = x2 * x2; y3 = 8 * x1; Y4 = 10 * x2; Y5 = 3 * x1 2 * x2; nlincon 0 <= Y5 <= 6; y = Y3 Y4-Y1-Y2; Run; solve result: x1 = 0, X2 = 0, z = 06. Solve the lower linear target planning model min z = p1 * (D11 D12) P2 * D21 P3 * D32S.T. x1 x2 D11-x12 = 103 * x1 4 * x2 D21-D22 = 508 * x1 10 * x2 D31-D32 = 300x1, X2, D11, D12, D21, D22, D31, D32> = 0DATA EX6; Input _Row_ $ X1 X2 D11 D12 D21 D22 D31 D32 _Type_ $ _RHS_; Cards; Object 0 0 0.495 0.0001 Min .con1 1 1 1 -1 0 0 0 0 0 1 -1 0 EQ 50CON3 8 10 0 0 0 0 1 -1 EQ 300; Proc LP; Run; Solution: X1 = 0, X2 = 10, D11 = 0 , D12 = 0, D21 = 10, D22 = 0, D31 = 200, D32 = 0, Z = 0.099
7. Solve the following 0-1 planning model MIN Z = 4 * x1 3 * x2 2 * x3s.t. 2 * x1-5 * x2 3 * x3 <= 4 4 * x1 x2 3 * x3> = 3 x2 x3> = 1 x1, x2, x3 = 0 or 1DATA EX7; Input _row_ $ x1 x2 x3 _type_ $ _RHS_; cards; Object 4 3 2 min .con1 2 -5 3 le 4con2 4 1 3 GE 3BOUNDS 1 1 1 Upperbd .inbd 1 2 3 Integer.; Proc LP; Run; Solution Result: X1 = 0, X2 = 0, X3 = 1, Z = 2