{"id":37624277,"url":"https://github.com/areenberg/tranqnet","last_synced_at":"2026-01-16T10:45:34.570Z","repository":{"id":165327547,"uuid":"175442551","full_name":"areenberg/TranQNet","owner":"areenberg","description":"Numerically evaluate any transient M/M/C/K queue or queueing network","archived":false,"fork":false,"pushed_at":"2022-02-19T00:01:35.000Z","size":147,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-09T09:50:09.979Z","etag":null,"topics":["analytical-solution","auto-build","auto-generate","markov-chains","numerical-methods","queueing-networks","queueing-theory","time-dependent"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/areenberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-03-13T14:56:39.000Z","updated_at":"2022-02-10T08:27:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"8ec5a75b-d860-406d-ab68-d45bfd74d406","html_url":"https://github.com/areenberg/TranQNet","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/areenberg/TranQNet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areenberg%2FTranQNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areenberg%2FTranQNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areenberg%2FTranQNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areenberg%2FTranQNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/areenberg","download_url":"https://codeload.github.com/areenberg/TranQNet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areenberg%2FTranQNet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytical-solution","auto-build","auto-generate","markov-chains","numerical-methods","queueing-networks","queueing-theory","time-dependent"],"created_at":"2026-01-16T10:45:34.054Z","updated_at":"2026-01-16T10:45:34.561Z","avatar_url":"https://github.com/areenberg.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\r\nThe purpose of this library is to provide a method for evaluating both transient and steady-state M/M/C/K single queues and queueing networks. The library has been designed to make this process as smooth as possible by restricting the input to the adjacency matrix and the basic parameters that characterize the system.\r\n\r\nUsing the library involves the following two steps:\r\n\r\n**Step 1:** Construct the infinitesimal generator for the network at hand. This is handled automatically by the `create` class.\r\n\r\n**Step 2:** Use the object created in the aforementioned step to retrieve the behavior of the network. This is handled by the `evaluate` class.\r\n\r\n# Basic Overview\r\n\r\n## Files\r\n\r\n- `mc_math-1.2.jar`: The library file.\r\n\r\n## Classes\r\n\r\n- `create`: Automatically constructs the infinitesimal generator (the transition rate matrix) and various other parameters.\r\n\r\n- `evaluate`: Uses an object defined with `create` to evaluate the queueing network.\r\n\r\n# Getting Started\r\nFirstly, download and add `mc_math.jar` to your Java-project.\r\n\r\nNow import the `queueing` classes.\r\n\r\n```java\r\nimport queueing.*;\r\n```\r\n\r\nDefine the weighted directed adjacency matrix using the structure: (1) Sources nodes, (2) queueing nodes, and (3) sink node. In this example, we have three queueing nodes. A single source node feeds all arriving customers into the first queueing node. The flow then splits into three parts sending 45% of the customers to queue 2, 30% to queue 3, and 25% to the sink node. Queue 2 and 3 send all customers to the sink after their service has been completed.\r\n\r\n```java\r\ndouble[][] A = {{0,1,0,0,0},\r\n                {0,0,0.45,0.30,0.25},\r\n                {0,0,0,0,1},\r\n                {0,0,0,0,1},\r\n                {0,0,0,0,0}};\r\n```\r\n\r\nDefine the remaining characteristics of the system, i.e. the arrival rate (`lambda`), service rates (`mu`), number of servers (`c`), capacity (`cap`), and how much of the capacity is occupied at time=0 (`occupiedCap`). If customers should be rejected when downstream queues are full, set `rejectWhenFull = true`; otherwise `rejectWhenFull = false`.  \r\n\r\n```java\r\ndouble[] lambda = {2}; double[] mu = {1.5,4,2.5}; int[] c = {2,1,2}; int[] cap = {20,20,20};\r\nint[] occupiedCap = {0,0,0}; boolean rejectWhenFull = false;\r\n```\r\n\r\nCreate the model.\r\n\r\n```java\r\ncreate network = new create(A,lambda,mu,c,cap,rejectWhenFull);\r\n```\r\n\r\nPrepare the evaluation calculations by plugging the `network` object into `evaluate`.\r\n\r\n```java\r\nevaluate system = new evaluate(occupiedCap,network);\r\n```\r\n\r\nEvaluate the behavior of the system at time=5 with a precision of 1x10^-9.\r\n\r\n```java\r\nsystem.uniformization(5,1e-9);\r\n```\r\n\r\nEvaluate the steady-state behavior of the system (i.e. at time=Inf) with a precision of 1x10^-6.\r\n\r\n```java\r\nsystem.gauss_seidel(1e-6);\r\n```\r\n\r\nGet the marginal state distribution for each of the network queues.\r\n\r\n```java\r\ndouble[][] dist = system.getMarginalDistributions();\r\n```\r\n\r\nGet the expected number of customers within each queue node.\r\n\r\n```java\r\ndouble[] expValue = system.expectedCustomers();\r\n```\r\n\r\nGet the probability of waiting on arrival at each queue node.\r\n\r\n```java\r\ndouble[] waitProb = system.waitingProbability();\r\n```\r\n\r\n# Citing this library\r\n\r\n[![DOI](https://zenodo.org/badge/175442551.svg)](https://zenodo.org/badge/latestdoi/175442551)\r\n\r\n\r\nAnders Reenberg Andersen. (2021). areenberg/mc_math: Converted to Maven project (v1.2). Zenodo. https://doi.org/10.5281/zenodo.5650104\r\n\r\n# License\r\nCopyright 2021 Anders Reenberg Andersen, PhD\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\n\r\n    http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software\r\ndistributed under the License is distributed on an \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fareenberg%2Ftranqnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fareenberg%2Ftranqnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fareenberg%2Ftranqnet/lists"}