|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
АвтоАвтоматизацияАрхитектураАстрономияАудитБиологияБухгалтерияВоенное делоГенетикаГеографияГеологияГосударствоДомДругоеЖурналистика и СМИИзобретательствоИностранные языкиИнформатикаИскусствоИсторияКомпьютерыКулинарияКультураЛексикологияЛитератураЛогикаМаркетингМатематикаМашиностроениеМедицинаМенеджментМеталлы и СваркаМеханикаМузыкаНаселениеОбразованиеОхрана безопасности жизниОхрана ТрудаПедагогикаПолитикаПравоПриборостроениеПрограммированиеПроизводствоПромышленностьПсихологияРадиоРегилияСвязьСоциологияСпортСтандартизацияСтроительствоТехнологииТорговляТуризмФизикаФизиологияФилософияФинансыХимияХозяйствоЦеннообразованиеЧерчениеЭкологияЭконометрикаЭкономикаЭлектроникаЮриспунденкция |
Часть 1Описание функции 1:
% Задание целевй функции function f = y1(x)
% выручка от продажи билетов f = -10000*x(1)-800*x(2)-500*x(3);
end
Описание функции 2:
% Задание целевй функции function f = y2(x)
% шумовая поддержка игроков во время матча f = -0.001*x(1)-0.05*x(2)-0.21*x(3);
end Описание функции 3:
% Задание целевй функции function f = y3(x)
% риск возникновения беспорядков на трибунах f = exp(0.0001*x(1)+0.00023*x(2)-0.0006*x(3));
end
Описание функции 4:
% Задание целевй функции function f = y4(x)
% выручка от продажи атрибутики f = -10*x(1)-100*x(2)-1500*x(3);
end
Описание функции 5:
% Задание целевй функции function f = y5(x)
% пожертвования на развитие клуба f = -1000000*x(1)-500*x(2)-1000*x(3);
end
Описание ограничений:
function [C, Ceq] = cond(x) % ограничения в виде равенства Ceq = []; % Ограничения вида АХ<0 C = []; end Метод 1. Выделение главного критерия
Для критерия 1: >> lb = [0 0 0]; >> ub = [500 60000 10000]; >> x0 = [0 0 0]; >> options = optimset('Algorithm','active-set');
>> [x1, fval1] = fmincon(@y1, x0, [], [], [], [], lb, ub, cond, options)
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints were satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
Active inequalities (to within options.TolCon = 1e-006): lower upper ineqlin ineqnonlin
x1 =
500 60000 10000
fval1 =
-58000000
Для критерия 2:
>> [x2, fval2] = fmincon(@y2, x0, [], [], [], [], lb, ub, @cond, options)
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints were satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
Active inequalities (to within options.TolCon = 1e-006): lower upper ineqlin ineqnonlin
x2 =
500 60000 10000
fval2 =
-5.1005e+003
Для критерия 3:
>> options = optimset('Algorithm','interior-point'); >> [x3, fval3] = fmincon(@y3, x0, [], [], [], [], lb, ub, @cond, options)
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints were satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
x3 =
1.0e+003 *
0.0003 2.4116 9.9998
fval3 =
0.0043
Для критерия 4:
>> [x4, fval4] = fmincon(@y4, x0, [], [], [], [], lb, ub, @cond, options)
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints were satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
Active inequalities (to within options.TolCon = 1e-006): lower upper ineqlin ineqnonlin
x4 =
500 60000 10000
fval4 =
-21005000
Для критерия 5:
>> [x5, fval5] = fmincon(@y5, x0, [], [], [], [], lb, ub, @cond, options)
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints were satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
Active inequalities (to within options.TolCon = 1e-006): lower upper ineqlin ineqnonlin
x5 =
500 60000 10000
fval5 =
-540000000
В качестве главного критерия выбираем 1 критерий. Система показателей относительно которых удовлетворяет ограничениям: (1) Среди показателей выделим основной , тогда переходим к однокритериальной задаче: при ограничениях (1), где В качестве главного критерия выберем критерий Введем ограничения для многокритериального решения: ) ) ) ) Воспользуемся Optimization Toolbox Mathlab и функцией fmincon. function [C, Ceq] = cond_main(x) % ограничения в виде равенства Ceq = []; % Ограничения вида АХ<0 C = [ -0.001*x(1) - 0.05*x(2) - 0.21*x(3) - 58000000; exp(0.0001*x(1) + 0.00023*x(2) - 0.0006*x(3)) + 43; -10*x(1) - 100*x(2) - 1500*x(3) - 21005000; -1000000*x(1) - 500*x(2) - 1000*x(3) - 540000000 ]; end
>> options = optimset('Algorithm','interior-point'); >> [x, fval] = fmincon(@y1, x0, [], [], [], [], lb, ub, @cond_main) Warning: Trust-region-reflective algorithm does not solve this type of problem, using active-set algorithm. You could also try the interior-point algorithm: set the Algorithm option to 'interior-point' and rerun. > In fmincon at 460
Solver stopped prematurely.
fmincon stopped because it exceeded the function evaluation limit, options.MaxFunEvals = 300 (the default value).
x =
1.0e+003 *
0.4153 1.3986 8.6014
fval =
-9.5725e+006 Метод 2. Свертка критериев
Свертка критериев с одинаковыми весами.
function f = conv(x)
B = [0.5, 0.5, 0.5, 0.5, 0.5]; Fmax = [510; 580; 43; 210; 540]; f = B(1)*y1(x)/Fmax(1) + B(2)*y2(x)/Fmax(2) + B(3)*y3(x)/Fmax(3)+ B(4)*y4(x)/Fmax(4)+B(5)*y5(x)/Fmax(5);
end
>> [x,fval] = fmincon(@conv, x0, [], [], [], [], lb, ub, cond, options)
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints were satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
x =
1.0e+004 *
0.0500 6.0000 1.0000
fval =
-6.0685e+005
Метод 3. Метод максиминной свертки function f = maxmin(x)
f(1) = y1(x); f(2) = y2(x); f(3) = y3(x); f(4) = y4(x); f(5) = y5(x);
end
>> [x, fval] = fminimax(@maxmin, x0, [], [], [], [], lb, ub, @cond, options)
Local minimum possible. Constraints satisfied.
fminimax stopped because the size of the current search direction is less than twice the default value of the step size tolerance and constraints were satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
Active inequalities (to within options.TolCon = 1e-006): lower upper ineqlin ineqnonlin 1 3
x =
0 0 0.0228
fval =
-11.3949 -0.0048 1.0000 -34.1848 -22.7898 Метод 4. Метод последовательных уступок
Расположим критерии в порядке убывания важности:
Для главного критерия (y1):
x1 = 500 60000 10000
fval1 =
-58000000
Для критерия y2: Накладываем на критерий y1 ограничение 00
function [C, Ceq] = cond1(x) % ограничения в виде равенства Ceq = []; % Ограничения вида АХ<0 C = y1(x)-58000; end >> [x, fval] = fmincon(@y2, x0, [], [], [], [], lb, ub, @cond1, options)
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints were satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
x =
1.0e+004 *
0.0500 6.0000 1.0000
fval =
-5.1005e+003
Для критерия y3:
function [C, Ceq] = cond2(x) % ограничения в виде равенства Ceq = []; % Ограничения вида АХ<0 C = [ y1(x)-580000; y2(x)-510050; ]; end
>> [x, fval] = fmincon(@y3, x0, [], [], [], [], lb, ub, @cond2, options)
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints were satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
x =
1.0e+003 *
0.0015 0.0025 9.9996
fval =
0.0025
Для критерия y4: function [C, Ceq] = cond3(x) % ограничения в виде равенства Ceq = []; % Ограничения вида АХ<0 C = [ y1(x)-58000; y2(x)-51000; y3(x)-4300; ]; end
>> [x, fval] = fmincon(@y4, x0, [], [], [], [], lb, ub, @cond3, options)
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints were satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
x =
1.0e+004 *
0.0500 6.0000 1.0000
fval =
-2.1005e+007
Для критерия y5: function [C, Ceq] = cond4(x) % ограничения в виде равенства Ceq = []; % Ограничения вида АХ<0 C = [ y1(x)-5800; y2(x)-5100; y3(x)-43; y4(x)-5400 ];
>> [x, fval] = fmincon(@y5, x0, [], [], [], [], lb, ub, @cond4, options)
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints were satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
x =
1.0e+004 *
0.0500 4.2223 1.0000
fval =
-5.3111e+008
Метод 5. fgoalattain
>> goal = [-150 50 100 -250 -5000]; >> weight = abs(goal); >> [x3, fval3] = fgoalattain(@maxmin, x0, goal, weight, [], [], [], [], lb, ub, @cond)
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints were satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
x3 =
1.0e+004 *
0.0349 0.6888 1.0000
fval3 =
1.0e+008 *
-0.0904 0.0590 0.5680 -0.1507 -3.5962
Сравнение результатов по методам:
Поиск по сайту: |
Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав. Студалл.Орг (0.042 сек.) |