{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# This notebook provides a quick test for bifurcation plots in MuMoT." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import mumot\n", "\n", "mumot.__version__" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%model\n", "$\n", "U -> A : g_A\n", "U -> B : g_B\n", "A -> U : a_A\n", "B -> U : a_B\n", "A + U -> A + A : r_A\n", "B + U -> B + B : r_B\n", "A + B -> A + U : s\n", "A + B -> B + U : s\n", "$" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "model1 = mumot.parseModel(In[2])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "model2 = model1.substitute('U = N - A - B')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "model3 = model2.substitute('a_A = 1/v_A, a_B = 1/v_B, g_A = v_A, g_B = v_B, r_A = v_A, r_B = v_B')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "model4 = model3.substitute('v_A = \\mu + \\Delta/2, v_B = \\mu - \\Delta/2')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "bifurcation1 = model4.bifurcation('s','A-B', choose_xrange = [0,5], initWidgets={'initBifParam': [4.5,0,5,0.1]})\n", "# to get started, here is a parameter combination that works\n", "# set \\mu = 3\n", "# set \\Delta = 0.1 for unfolding of pitchfork\n", "# set \\Delta = 0 for pitchfork" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "bifurcation1.showLogs()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "bifurcation2 = model4.bifurcation('\\\\Delta','A-B', initBifParam = 2.0, params = [('\\\\mu', 4), ('s', 4)], \n", " choose_xrange = [-2,2])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "bifurcation2.showLogs()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "multiController4 = mumot.MuMoTmultiController([model4.bifurcation('s','A', silent = True), \n", " model4.bifurcation('s','B', silent = True)], \n", " shareAxes = False)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "multiController4.showLogs()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.4" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 1 }