summaryrefslogtreecommitdiff
path: root/1682
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /1682
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip
updated the code
Diffstat (limited to '1682')
-rwxr-xr-x1682/CH16/EX16.4/Exa16_4.sce72
1 files changed, 36 insertions, 36 deletions
diff --git a/1682/CH16/EX16.4/Exa16_4.sce b/1682/CH16/EX16.4/Exa16_4.sce
index 549c375bf..4a1322b16 100755
--- a/1682/CH16/EX16.4/Exa16_4.sce
+++ b/1682/CH16/EX16.4/Exa16_4.sce
@@ -1,36 +1,36 @@
-//Exa 16.4
-clc;
-clear;
-close;
-//given data :
-disp("Given the following LP model :")
-disp("minimize Z = 2*X1 + 3*X2");
-disp("subject to");
-disp("X1+X2 >= 6");
-disp("7*X1+X2 >= 14");
-disp("X1,X2 >= 0");
-disp("The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.");
-disp("Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : ");
-disp("X1+X2 = 6");
-disp("When X1=0 : X2=6");
-disp("When X2=0 : X1=6");
-X1=0:6;
-X2=(6-X1);
-plot2d(X1,X2);
-disp("Consider the 2nd constraint in the form :");
-disp("7*X1+X2 = 14");
-disp("When X1=0 : X2=14");
-disp("When X2=0 : X1=2");
-X1=0:2;
-X2=(14-7*X1);
-plot2d(X1,X2);
-disp("The Optimum solution will be in any one of the corners A, B and C");
-disp("The objective function value at each of these corner points of the feasible solution space is computed as fllows by substituting its coordinates in the objective function.")
-ZA=2*0+3*14;
-ZB=2*(4/3)+3*(14/3);
-ZC=2*6+3*0;
-disp("ZA=6*0+8*0=0...
- ZB=6*10+8*0=60...
- ZC=6*8+8*2=64);
-disp("Since the type of the objective function is minimization, the solution corresponding to the minimum Z value should be selected as the optimum solution. The Z value is minimum for the corner point C. Hence, the corresponding solution is ");
-disp("X1 = 6 X2 = 0 and Z(Optimum) = 12");
+//Exa 16.4
+clc;
+clear;
+close;
+//given data :
+disp("Given the following LP model :")
+disp("minimize Z = 2*X1 + 3*X2");
+disp("subject to");
+disp("X1+X2 >= 6");
+disp("7*X1+X2 >= 14");
+disp("X1,X2 >= 0");
+disp("The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.");
+disp("Compute the cordinates to plot equations relating to the constraints on the XY plane as shown below : ");
+disp("X1+X2 = 6");
+disp("When X1=0 : X2=6");
+disp("When X2=0 : X1=6");
+X1=0:6;
+X2=(6-X1);
+plot2d(X1,X2);
+disp("Consider the 2nd constraint in the form :");
+disp("7*X1+X2 = 14");
+disp("When X1=0 : X2=14");
+disp("When X2=0 : X1=2");
+X1=0:2;
+X2=(14-7*X1);
+plot2d(X1,X2);
+disp("The Optimum solution will be in any one of the corners A, B and C");
+disp("The objective function value at each of these corner points of the feasible solution space is computed as follows by substituting its coordinates in the objective function.")
+ZA=2*0+3*14;
+ZB=2*(4/3)+3*(14/3);
+ZC=2*6+3*0;
+disp("ZA=6*0+8*0=0...
+ ZB=6*10+8*0=60...
+ ZC=6*8+8*2=64");
+disp("Since the type of the objective function is minimization, the solution corresponding to the minimum Z value should be selected as the optimum solution. The Z value is minimum for the corner point C. Hence, the corresponding solution is ");
+disp("X1 = 6 X2 = 0 and Z(Optimum) = 12"); \ No newline at end of file