Модель Лотки
independent: { t: 0 }, dependent: { //x: [2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.5, 1, 1.5, 2, 0, 0.5, 1, 1.5, 2], //y: [0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0] x: [4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0.5], y: [0, 1, 2, 3, 3.5, 0.05, 0.1, 0.5, 1, 2, 3, 4, 4 ] // x: [0, 2], // y: [0, 4] }, parameters: { k0: { min: 0.2, max: 4, value: 3 }, k1: { min: 1, max: 4, value: 2 }, k2: { min: 0.8, max: 3.7, value: 2 } }, derivatives: { dx_dt: 'k0 - k1 * x * y', dy_dt: 'k1 * x * y - k2 *y' }, param_charts: [ [{ func: 'k2(x)', equation: 'x*k1', swap_axes: true, accuracy: 0.01, bounds: { min: 0.01, max: 4 }, options: {lines: { lineWidth: 2} }, }], [{ func: 'k2(y)', equation: 'k0 / y', solve: true, //limit_point_equations: { // 'x(y)': '(k1 * y )' // }, swap_axes: true, accuracy: 0.01, bounds: { min: 0.01, max: 4 }, options: {lines: { lineWidth: 2} }, }], ], limit_points: { x: '[k2/k1]', y: '[k0/k2]', }, solver: { step: 0.01, accuracy: 0.001, autostop: 10, }, plot_options: { 'x': { min: 0, max: 4,}, 'y': { min: 0, max: 4,}, 'k2': { min: 0.01, max: 4} }, init_hook: function() { var a = -calc.sys_state['k1']*calc.sys_state['k0']/calc.sys_state['k2']; var b = -calc.sys_state['k2']; var c = calc.sys_state['k1']*calc.sys_state['k0']/calc.sys_state['k2']; var d = 0; var s_2 = (a+d)/2; var delta = a*d-b*c; var s2_4 = s_2*s_2; if (s2_4 >= delta) { var l1 = '' + (s_2 - Math.sqrt(s2_4-delta)).toPrecision(3); var l2 = '' + (s_2 + Math.sqrt(s2_4-delta)).toPrecision(3); } else { var l1 = '' + s_2.toPrecision(3) + '+ ' + Math.sqrt(delta-s2_4).toPrecision(3) + ' \\cdot i'; var l2 = '' + s_2.toPrecision(3) + '- ' + Math.sqrt(delta-s2_4).toPrecision(3) + ' \\cdot i'; } $('trax_controller_postfix').innerText = '$$ \\begin{aligned} \\lambda_1 &= {'+l1+'} \\\\ \\lambda_2 &= {'+l2+'} \\end{aligned} $$'; MathJax.Hub.Queue(["Typeset",MathJax.Hub,"trax_controller_postfix"]); },
Счёт:
Запускать по щелчку
Редактировать модель