首页 > TAG信息列表 > bestX

​【优化求解】基于黑洞算法求解最优目标matlab源码

1 简介 2 部分代码 clear all clc close all d=5;                % dimension options.lk=-32*ones(1,d);   % lower bound options.uk=32*ones(1,d);    % upper bound options.m=50; % Size of the population options.MAXITER=500; % Maximum number of

​【优化求解】基于黑洞算法求解最优目标matlab源码

1 简介 2 部分代码 clear all clc close all d=5;                % dimension options.lk=-32*ones(1,d);   % lower bound options.uk=32*ones(1,d);    % upper bound options.m=50; % Size of the population options.MAXITER=500; % Maximum number of

装载问题(回溯法)

    #include<iostream>using namespace std; class Loading { friend int MaxLoading(int* w, int c, int n, int* bestx);private: void Backtrack(int i); int n;//集装箱数 int* x;//当前解 int* bestx;//当前最优解 int* w,//集装箱重量数组 c,//第一艘轮船的载重量 cw,/

MATLAB实现智能优化算法

MATLAB实现智能优化算法 代码实现 分别使用了遗传算法(GA)、粒子群算法(PSO)、模拟退火算法(SA)、蚁群算法(ACO),针对函数 f(x)=x+10sin(5x)+7cos(4x); 在定义域[0,10]内寻找最大值的迭代优化,源代码如下所示: function test(para) %%%% para为1 %%%%%%%%%遗传算法%%%%%%%% if para==1