***补充: 1. 基本解法
例1设f1(x)?2x?x 1?x,0?x?1 f2(x)????2x?3,1?x?2R?[0,2],求V?maxF(x).
x?R2f1f2f112xf2解单个最优解f(0)1?f1(1)?maxf1(x);
f2(0)?f2(1)?maxf2(x)
是同一个点, 所以x?1是问题的最优解.
第 16 页 共 27 页
2. 变量空间与目标函数空间的图解法
f1f2f2 ?f(1)??1?f(x?)??1???? ?f2(1)??1?f11
f(?)?
|| 2x1???f2(?)f1x??? f2clear;clf;
x=[0:1/50:1];
f1=2*x-x.^2; f2=x; for i=1:size(x,2)
subplot(121);axis([0,2,-1,1]);plot(x(i),f1(i),'.');hold on;plot(x(i),f2(i),'.'); subplot(122);axis([0 1 -1 1]);plot(f1(i),f2(i),'.');hold on; pause(0.1); end
第 17 页 共 27 页
x=[1:1/50:2]; f1=2*x-x.^2; f2=-2*x+3; for i=1:size(x,2)
subplot(121);plot(x(i),f1(i),'.');hold on;plot(x(i),f2(i),'.'); subplot(122);plot(f1(i),f2(i),'.');hold on; pause(0.1); end
例2 设f1(x)?2x?x,f2(x)?x,R?[0,2],求最大. 解 易得单独的x(1)?1,x(2)?2, 无公共解. f1f2f2f2?f(?)
1 1f1 f(?)?f(??)?2???1 18 x页 共 27 页 ?第21[1,2]内都是非劣解.
2例3 设f1(x)?2x?x, f2(x)?(?12x2?36x?15)8,
R?[0,2],求最大V?maxF(x).
x?R解 易求得x?1,x?1.5, 无公共解. [1,1.5]内都是非劣解.
f2ff2 1f21.5 1f11
x 27 页 ? 19 10.511.5第2页 共f(1)(2)clear;clf;
x=[0:1/50:2]; f1=2*x-x.^2; f2=(-12*x.^2+36*x-15)/8; for i=1:size(x,2)
subplot(121);axis([0,2,-2,2]);plot(x(i),f1(i),'.');hold on;plot(x(i),f2(i),'.'); subplot(122);axis([0 1 -2 2]);plot(f1(i),f2(i),'.');hold on; pause(0.1); end
subplot(121);grid on;subplot(122);grid on;
例4 设f1(x)??3x1?2x2, f2(x)?x1?2x2
??2x1?3x2?18?R:??2x1?x2?10, 求V?maxF(x).
x?R?x?0,x?02?1
第 20 页 共 27 页