24小时热门版块排行榜    

CyRhmU.jpeg
查看: 817  |  回复: 1

M.bySong

铁虫 (小有名气)

[求助] 1stopt高版本代跑,很急,先谢谢大神们了!已有1人参与

大神上午好,最近碰到一个多目标优化的问题,想用理想点法与平方和加权法求多目标最优。三个目标函数,分别跑出最优值以后,加权求解。希望大神能够帮忙代跑一下,不胜感激。就这点金币了,完成后加v有大红包,现在很急,先谢谢大神们了!!!

求第一个目标目标函数最优值op1:
parameter x1=[6422,10000],x2=[0,6422],x3=[0,6422],h1=[0,2280],h2=[1600,10000],h3=[1241,10000] ;
minfunction 6422*600000*sqrt((h1-h3)^2+(x1-x3)^2)*(x1-x2)/((-x3*h3+x1*h1)*(x1-x2)-(-x2*h3+x1*h2)*(x1-x3));
x1-10000<=0
x3-x1<0;
x2-x3<0;
h2-h1<0;
h3-h2<0;
h3-x2<0;
sqrt((x1-x3)^2+(h1-h3)^2)-3000<=0;      
-sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h<0;      
sqrt((x3-h3)^2+((sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)+h1)^2)-8150<=0;              
(sqrt((x3-h3)^2+((sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)+h1)^2)-sqrt((x1-x3)^2+(h1-h3)^2))/(2*sqrt((x1-x3)^2+(h1-h3)^2))-0.8<=0;      
x1-(sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)-6000<=0;      
-x1+(sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)<=0;        
sqrt((x1-x2)^2+(-h3+h2)^2)-7000<0;                          
-6422*600000*sqrt((h1-h3)^2+(x1-x3)^2)*(x1-x2)/((-x3*h3+x1*h1)*(x1-x2)-(-x2*h3+x1*h2)*(x1-x3))<0;
——————————————————————————————————————————————————————————————————————————————————第2个目标目标函数最优值op2:
parameter x1=[6422,10000],x2=[0,6422],x3=[0,6422],h1=[0,2280],h2=[1600,10000],h3=[1241,10000] ;
minfunction sqrt((x1-x2)^2+(-h3+h2)^2);
x1-10000<=0
x3-x1<0;
x2-x3<0;
h2-h1<0;
h3-h2<0;
h3-x2<0;
sqrt((x1-x3)^2+(h1-h3)^2)-3000<=0;          //收拢长度
-sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h<0;           //H
sqrt((x3-h3)^2+((sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)+h1)^2)-8150<=0;              //展开长度
(sqrt((x3-h3)^2+((sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)+h1)^2)-sqrt((x1-x3)^2+(h1-h3)^2))/(2*sqrt((x1-x3)^2+(h1-h3)^2))-0.8<=0;       //导向比
x1-(sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)-6000<=0;        //导向行程
-x1+(sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)<=0;        //导向行程
sqrt((x1-x2)^2+(-h3+h2)^2)-7000<0;                          //拉杆长度
-6422*600000*sqrt((h1-h3)^2+(x1-x3)^2)*(x1-x2)/((-x3*h3+x1*h1)*(x1-x2)-(-x2*h3+x1*h2)*(x1-x3))<0;

——————————————————————————————————————————————————————————————————————————————————第3个目标目标函数最优值op3:
parameter x1=[6422,10000],x2=[0,6422],x3=[0,6422],h1=[0,2280],h2=[1600,10000],h3=[1241,10000] ;
minfunction sqrt((h3-269)^2+((sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)-6422)^2);
x1-10000<=0
x3-x1<0;
x2-x3<0;
h2-h1<0;
h3-h2<0;
h3-x2<0;
sqrt((x1-x3)^2+(h1-h3)^2)-3000<=0;          //收拢长度
-sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h<0;           //H
sqrt((x3-h3)^2+((sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)+h1)^2)-8150<=0;              //展开长度
(sqrt((x3-h3)^2+((sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)+h1)^2)-sqrt((x1-x3)^2+(h1-h3)^2))/(2*sqrt((x1-x3)^2+(h1-h3)^2))-0.8<=0;       //导向比
x1-(sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)-6000<=0;        //导向行程
-x1+(sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)<=0;        //导向行程
sqrt((x1-x2)^2+(-h3+h2)^2)-7000<0;                          //拉杆长度
-6422*600000*sqrt((h1-h3)^2+(x1-x3)^2)*(x1-x2)/((-x3*h3+x1*h1)*(x1-x2)-(-x2*h3+x1*h2)*(x1-x3))<0;

————————————————————————————————————————————————————————————————————————
将下面代码中的op1,op2,op3替换为上面计算出的结果,求多目标加权结果
parameter x1=[6422,10000],x2=[0,6422],x3=[0,6422],h1=[0,2280],h2=[1600,10000],h3=[1241,10000] ;
ConstStr f1=6422*600000*sqrt((h1-h3)^2+(x1-x3)^2)*(x1-x2)/((-x3*h3+x1*h1)*(x1-x2)-(-x2*h3+x1*h2)*(x1-x3));
conststr f2=minfunction sqrt((x1-x2)^2+(-h3+h2)^2);
conststr f3=sqrt((h3-269)^2+((sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)-6422)^2);
minfunction ((f1-op1)/op1)^2+((f2-op2)/op2)^2+((f3-op3)/op3)^2;
//minfunction 6422*600000*sqrt((h1-h3)^2+(x1-x3)^2)*(x1-x2)/((-x3*h3+x1*h1)*(x1-x2)-(-x2*h3+x1*h2)*(x1-x3));
//minfunction sqrt((x1-x2)^2+(-h3+h2)^2);
//minfunction sqrt((h3-269)^2+((sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)-6422)^2);
x1-10000<=0
x3-x1<0;
x2-x3<0;
h2-h1<0;
h3-h2<0;
h3-x2<0;
sqrt((x1-x3)^2+(h1-h3)^2)-3000<=0;          //收拢长度
-sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h<0;           //H
sqrt((x3-h3)^2+((sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)+h1)^2)-8150<=0;              //展开长度
(sqrt((x3-h3)^2+((sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)+h1)^2)-sqrt((x1-x3)^2+(h1-h3)^2))/(2*sqrt((x1-x3)^2+(h1-h3)^2))-0.8<=0;       //导向比
x1-(sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)-6000<=0;        //导向行程
-x1+(sqrt((x1-x2)^2+(h2-h3)^2-(x2-h3)^2)-h2)<=0;        //导向行程
sqrt((x1-x2)^2+(-h3+h2)^2)-7000<0;                          //拉杆长度
-6422*600000*sqrt((h1-h3)^2+(x1-x3)^2)*(x1-x2)/((-x3*h3+x1*h1)*(x1-x2)-(-x2*h3+x1*h2)*(x1-x3))<0;
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

独孤神宇

版主 (知名作家)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ...
感谢参与,应助指数 +1
小红豆: 金币+20, 应助指数+1, 回帖应助 2019-07-11 14:39:04
M.bySong: 金币+38 2019-07-11 14:53:51
目标函数值(最小): 1.87232999181561
x1: 6422
x2: 2282.96873670372
x3: 4485.76040752828
h1: 2279.99154310903
h2: 1600.03227522495
h3: 1241.37911564834
h: -1006.24586353898
数值计算
2楼2019-07-11 14:11:41
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 M.bySong 的主题更新
信息提示
请填处理意见