10优化方法程序实现概要
Conjugate Gradient Method Start with steepest descent direction n0 = g0 = -?f(x0), find new minimum at x1 Build next search direction n1 from g0 and g1 = -?f(x1), such that n0?A?n1 = 0 Repeat step 2 iteratively to find nj (a Gram-Schmidt orthogonalization process). The result is a set of N vectors (in N dimensions) ni?A?nj = 0 Conjugate Gradient Algorithm Initialize n0 = g0 = -?f(x0), i = 0, Find ? that minimizes f(xi+?ni), let xi+1 =xi+?ni Compute new negative gradient gi+1 = -?f(xi+1) Compute Update new search direction as ni+1 = gi+1 + ?ini; ++i, go to 2 The Conjugate Gradient Program 解: f = [-5; -4; -6]; A = [1 -1 1;3 2 4;3 2 0]; b = [20; 42; 30]; lb = zeros(3,1); [x,fval,exitflag,output,lambda] = linprog(f,A,b,[],[],lb) 结果为: x = %最优解 0.0000 15.0000 3.0000 fval = %最优值 -78.0000 exitflag = %收敛 1 output = iterations: 6 %迭代次数 cgiterations: 0 algorithm: lipsol %所使用规则 结构拓扑优化设计程序实现 top(60,20,0.5,3.0,1.5) FMIN Minimize function of one variable. X = FMIN(F,x1,x2) attempts to return a value of x which is a local minimizer of F(x) in the interval x1 x x2. F is a string containing the name of the objective function to be minimized. X = FMIN(F,x1,x2,OPTIONS) uses a vector of control parameters. If OPTIONS(1) is positive, intermediate steps in the solution are displayed; the default is OPTIONS(1) = 0. OPTIONS(2) is the termination tolerance for x; the default is 1.e-4. OPTIONS(14) is the maximum number of function evaluations; the default is OPTIONS(14) = 500. The other components of OPTIONS are not used as input control parameters by FMIN. For more information, see FOPTIONS. X = FMIN(F,x1,x2,OPTIONS,P1,P2,...) provides for additional arguments which are passed to the objective function, F(X,P1,P2,...) [X,OPTIONS] = FMIN(...) returns a count of the number of steps taken in OPTIONS(10). [x,options]=fmin(‘f’,x, options,gradfun,paramt1,par
您可能关注的文档
最近下载
- 数字图像处理图像编码.ppt VIP
- 湖北城市建设职业职业技术学院2025年高职单招考试城市燃气工程技术专业考试大纲.pdf VIP
- 长帝电烤箱TV42W使用说明书用户手册.pdf
- 气象学与气候学课件.pptx
- 电子科技大学《光电图像处理》 第六章 图像编码与压缩 ppt课件.pptx VIP
- 对外经济贸易大学2021-2022学年《Python程序设计》期末考试试卷(A卷)及标准答案.docx
- 高考数学极值点偏移练习题(含答案).docx VIP
- 化工过程安全管理导则-装置安全规划与设计课件.pptx VIP
- 五脏与情志 jt叔叔 JT叔叔伤寒杂病论慢慢教(.)五脏与情志.doc VIP
- 图像处理与分析图像的编码技术.ppt VIP
原创力文档

文档评论(0)