{ "cells": [ { "cell_type": "markdown", "id": "8ca9e27f", "metadata": {}, "source": [ "# Analysis of rates" ] }, { "cell_type": "markdown", "id": "04992dc1", "metadata": {}, "source": [ "By combining elements from graph theory, convex optimization, and linear algebra, we can have powerful results on the stability of a stochastic system and its set of feasible rates." ] }, { "cell_type": "markdown", "id": "6e744269", "metadata": {}, "source": [ "`stochastic matching` provides the following information (cf https://hal.archives-ouvertes.fr/hal-03502084 for details):\n", "\n", "- Graph type: injective-only, surjective-only, bijective, ``nonjective'';\n", "- Kernel structure (for node and edge kernels);\n", "- For given arrival rates: \n", " - stability of the matching model;\n", " - Maximin and Moore-Penrose solutions of the conservation equation;\n", " - if relevant, a complete description of the vertices of $\\Lambda_{\\geqslant 0}$.\n", "\n" ] }, { "cell_type": "markdown", "id": "0c70988e", "metadata": {}, "source": [ "The purpose of this notebook is to give a tour of these analysis on some examples." ] }, { "cell_type": "code", "execution_count": 1, "id": "d0cb1566", "metadata": { "ExecuteTime": { "end_time": "2022-01-24T14:38:45.535453Z", "start_time": "2022-01-24T14:38:44.327612Z" }, "execution": { "iopub.execute_input": "2025-09-27T14:18:32.329932Z", "iopub.status.busy": "2025-09-27T14:18:32.329932Z", "iopub.status.idle": "2025-09-27T14:18:39.072404Z", "shell.execute_reply": "2025-09-27T14:18:39.072086Z", "shell.execute_reply.started": "2025-09-27T14:18:32.329932Z" } }, "outputs": [], "source": [ "import stochastic_matching as sm\n", "from stochastic_matching.display import VIS_OPTIONS\n", "\n", "VIS_OPTIONS[\"height\"] = \"200px\"" ] }, { "cell_type": "code", "execution_count": 2, "id": "48f18fb6", "metadata": { "ExecuteTime": { "end_time": "2022-01-24T14:38:45.550922Z", "start_time": "2022-01-24T14:38:45.537955Z" }, "execution": { "iopub.execute_input": "2025-09-27T14:18:39.073095Z", "iopub.status.busy": "2025-09-27T14:18:39.073095Z", "iopub.status.idle": "2025-09-27T14:18:39.158951Z", "shell.execute_reply": "2025-09-27T14:18:39.158951Z", "shell.execute_reply.started": "2025-09-27T14:18:39.073095Z" } }, "outputs": [ { "data": { "text/plain": [ "{'interaction': {'navigationButtons': False},\n", " 'width': '100%',\n", " 'height': '200px'}" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "VIS_OPTIONS" ] }, { "cell_type": "markdown", "id": "25015814", "metadata": {}, "source": [ "## Tadpole" ] }, { "cell_type": "markdown", "id": "8d70692a", "metadata": {}, "source": [ "### Bijective tadpole" ] }, { "cell_type": "markdown", "id": "2b5a160a", "metadata": {}, "source": [ "Consider a tadpole $T_{5, 3}$ with uniform arrival rates. Side note: if no rate is specified, degree-proportional rates are assumed, which ensure that the model is stabilizable if the graph is surjective." ] }, { "cell_type": "code", "execution_count": 3, "id": "99bf6801", "metadata": { "ExecuteTime": { "end_time": "2022-01-24T14:38:45.581742Z", "start_time": "2022-01-24T14:38:45.553014Z" }, "execution": { "iopub.execute_input": "2025-09-27T14:18:39.159958Z", "iopub.status.busy": "2025-09-27T14:18:39.159958Z", "iopub.status.idle": "2025-09-27T14:18:39.167816Z", "shell.execute_reply": "2025-09-27T14:18:39.167816Z", "shell.execute_reply.started": "2025-09-27T14:18:39.159958Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "