MATLAB算法实战应用案例精讲-【优化算法】基于房地产市场的优化算法(REMARK)(附MATLAB代码实现)

代码实现

MATLAB

main.m

clc, clear
rng('shuffle')
format short e
options.nDim = 2;
options.nDemander = 80;
options.nSupplier = ceil(options.nDemander/4);
options.maxFrnd = ceil(options.nDemander/4);
options.constrPer = 10;
options.KsigmaD = 0.7;
options.KsigmaS = 0.2;
options.KnumS = 0.4;
options.domain = [zeros(options.nDim, 1)-65.536, zeros(options.nDim, 1)+65.536];
options.nFeval = 50000;
options.objFun = 'Foxholes';
[x, val, valHist, m] = remark(options);
x, val

remark.m

function [x, val, valHist, m] = remark(options)
m = market(options.objFun,...
    options.domain,...
    options.nDemander,...
    options.maxFrnd,...
    options.nDim,...
    options.nSupplier,...
    options.constrPer,...
    options.KsigmaD,...
    options.KsigmaS,...
    options.KnumS...
    );
nIter = floor(options.nFeval/options.nDemander);
valHist = zeros(nIte

你可能感兴趣的:(matlab,开发语言)