Диссертация (1172898), страница 23
Текст из файла (страница 23)
– 2019. – №1(30). – С. 24–29.111. Smirnov A., Khabibulin R., Topolski N., Tarakanov D. Multi-Agent AnalysisModel of Resource Allocation Variants To Ensure Fire Safety // Proceedings of the 21International Conference on Enterprise Information Systems, Heraklion, Greece, May 35, 2019. P.
379-386. DOI: 10.5220/0007716403910398147Приложение А. Свидетельство о регистрации программы для ЭВМ – Программадля рационального распределения ресурсов в многоагентной системе управленияпожарной безопасности на производственных объектах химической отрасли148Приложение Б. Свидетельство о регистрации программы для ЭВМ – Программадля многопараметрического анализа вариантов распределения ресурсов в многоагентных системах149Приложение В.
Листинг программного кода<!DOCTYPE html><html lang="ru"><head><meta name="viewport" content="width=device-width, initial-scale=1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><script src="plotly-latest.min.js"></script><link rel="stylesheet" href="style.css"><title></title></head><body><div id="main"><div id="caption">Математическая модель принятия решений</div><div id="navi"><span id="F1" onclick="F1()">Проверка компромисса</span> |<span id="F2" onclick="F2()">Парное сравнение вариантов</span> |<span id="F3" onclick="F3()">Сравнение критериев</span></div><div id="content"><div id="table"><table><tr><td>Количество вариантов:</td><td><input type="number" value="5" min="2" id="hcount" class="arrow"></td></tr><tr>150<td>Количество целей:</td><td><input type="number" value="6" min="3" id="vcount" class="arrow"></td></tr></table><br><button onclick="CreateTable()"> Обновить таблицу </button><br><br></div><div id="table1"></div><br><div id="tableF2"><table><tr><td>x</td><td><input type="number" value="2" min="1" id="a1" class="arrow"></td><td> ≈ x</td><td><input type="number" value="4" min="1" id="b1" class="arrow"></td></tr></table><br><button onclick="GetMatrix()"> Обновить матрицу предпочтений </button><br><br>151</div><button onclick="Plot()" id="createplot"> Обновить графики </button><!----------------------------------------------------------------------------><div id="st3"><div id="tableF213"></div><br><button onclick="GetZ1()"> Создать </button><br><br><div id="tableZ1"></div><br><button onclick="GetZ()"> Построить/обновить матрицу предпочтений </button><br><br><div id="tableZ3"></div><br><div id="tableK3"></div><br><div id="tableT3"></div><div id="tableTT"></div><br>152<div id="range3"></div><br><div id="tester3"></div><div id="tester4"></div></div><!----------------------------------------------------------------------------><div id="tableF21"></div><br><div id="tableK"></div><br><div id="tableT"></div><br><div id="range"></div><br><div id="tester"></div><br><div id="tester1"></div><div id="plot"></div></div>153</div><script>window.onload = function () {CreateTable();F1();}function CreateTable() {var a = '<table>';var m = document.getElementById('hcount').value;var n = document.getElementById('vcount').value;document.getElementById('a1').setAttribute('max', m);document.getElementById('b1').setAttribute('max', m);for (var i = 0; i <= n; i++) {a = a + '<tr>';for (var j = 0; j <= m; j++) {if ((i != 0) && (j != 0)) {var rand = Math.round(Random(0, 1) * 10) / 10;a = a + '<td><input id="i' + i + j + '" type="number" min="0" max="1"step="0.1" value="' +'kjh' + '"></td>';}if ((i == 0) && (j != 0)) {a = a + '<td align="center">x' + j + '</td>';}if ((j == 0) && (i != 0)) {a = a + '<td id="n' + i + '">f' + i + '</td>';}if ((i == 0) && (j == 0)) {a = a + '<td>F|X</td>';154}}a = a + '</tr>';}a = a + '</table>';document.getElementById('table1').innerHTML = a;document.getElementById('i11').value = '0.9';document.getElementById('i12').value = '0.1';document.getElementById('i13').value = '0.4';document.getElementById('i14').value = '0.6';document.getElementById('i15').value = '0.3';document.getElementById('i21').value = '0.1';document.getElementById('i22').value = '0.9';document.getElementById('i23').value = '0.2';document.getElementById('i24').value = '0.4';document.getElementById('i25').value = '0.5';document.getElementById('i31').value = '0.5';document.getElementById('i32').value = '0.2';document.getElementById('i33').value = '0.9';document.getElementById('i34').value = '0.1';document.getElementById('i35').value = '0.4';document.getElementById('i41').value = '0.7';document.getElementById('i42').value = '0.4';document.getElementById('i43').value = '0.3';document.getElementById('i44').value = '0.9';document.getElementById('i45').value = '0.7';document.getElementById('i51').value = '0.1';document.getElementById('i52').value = '0.2';document.getElementById('i53').value = '0.4';155document.getElementById('i54').value = '0.5';document.getElementById('i55').value = '0.9';document.getElementById('i61').value = '0.5';document.getElementById('i62').value = '0.2';document.getElementById('i63').value = '0.7';document.getElementById('i64').value = '0.9';document.getElementById('i65').value = '0.4';CreateDivPlot();}function CreateDivPlot() {var m = document.getElementById('hcount').value;var a = '';for (var i = 1; i <= m * (m - 1) / 2; i++) {a = a + '<div id="plot' + i + '"></div>';}document.getElementById('plot').innerHTML = a;}function Plot() {var m = document.getElementById('hcount').value;var n = document.getElementById('vcount').value;var m1 = [];var m2 = [];var tetta = [];var title = [];var namea = [];var nameb = [];var s = 1,t = 1;function Berger() {156if (t == m) {t = s + 1;s++;}if (t < m) {t++;}if (s < m) {return [s, t];} else {return [0, 0];}}for (var i = 1; i <= m * (m - 1) / 2; i++) {var a = [];a = Berger();for (var j = 1; j <= n; j++) {m1[j - 1] = document.getElementById('i' + j + a[0]).value;m2[j - 1] = document.getElementById('i' + j + a[1]).value;tetta[j - 1] = document.getElementById('n' + j).textContent;}tetta[j - 1] = tetta[0];m1[j - 1] = m1[0];m2[j - 1] = m2[0];title[i] = i + '.) ' + 'x' + a[0] + '-' + 'x' + a[1];namea[i] = 'f(x' + a[0] + ')';nameb[i] = 'f(x' + a[1] + ')';//--------------------Plotly-------------------------------data = [{157type: 'scatterpolar',r: m1,theta: tetta,fill: 'toself',name: namea[i]},{type: 'scatterpolar',r: m2,theta: tetta,fill: 'toself',name: nameb[i]}]layout = {margin: {b: '40',t: '40',},paper_bgcolor: 'rgb(240,240,240)',font: {family: 'Open Sans Condensed',size: '18',},title: title[i],polar: {radialaxis: {visible: true,range: [0, 1]158}}}Plotly.purge('plot' + i);Plotly.plot('plot' + i, data, layout);//---------------------------------------------------------}}function Random(min, max) {return Math.random() * (max - min) + min;}function F1() {Plot();document.getElementById('st3').style.display = 'none';document.getElementById('table').style.display = 'block';document.getElementById('createplot').style.display = 'block';document.getElementById('plot').style.display = 'block';document.getElementById('F2').style.borderBottom = '1px solid blue';document.getElementById('F2').style.color = 'blue';document.getElementById('F1').style.borderBottom = '0px';document.getElementById('F1').style.color = 'black';document.getElementById('F3').style.borderBottom = '1px solid blue';document.getElementById('F3').style.color = 'blue';document.getElementById('tableF2').style.display = 'none';document.getElementById('tableF21').style.display = 'none';document.getElementById('tableK').style.display = 'none';document.getElementById('tableT').style.display = 'none';//document.getElementById('norm').style.display = 'none';document.getElementById('range').style.display = 'none';159document.getElementById('tester').style.display = 'none';document.getElementById('tester1').style.display = 'none';document.getElementById('tester3').style.display = 'none';}function F2() {GetMatrix();document.getElementById('st3').style.display = 'none';document.getElementById('table').style.display = 'none';document.getElementById('createplot').style.display = 'none';document.getElementById('plot').style.display = 'none';document.getElementById('F2').style.borderBottom = '0px';document.getElementById('F2').style.color = 'black';document.getElementById('F1').style.borderBottom = '1px solid blue';document.getElementById('F1').style.color = 'blue';document.getElementById('F3').style.borderBottom = '1px solid blue';document.getElementById('F3').style.color = 'blue';document.getElementById('tableF2').style.display = 'block';document.getElementById('tableF21').style.display = 'block';document.getElementById('tableK').style.display = 'block';document.getElementById('tableT').style.display = 'block';document.getElementById('norm').style.display = 'block';document.getElementById('range').style.display = 'block';document.getElementById('tester').style.display = 'block';document.getElementById('tester1').style.display = 'block';document.getElementById('tester3').style.display = 'none';}function F3() {160Приложение Г.
Акты внедрения161162163.