{"id":27148183,"url":"https://github.com/dias1c/lem-in","last_synced_at":"2025-04-08T11:53:06.635Z","repository":{"id":57653784,"uuid":"403998870","full_name":"Dias1c/lem-in","owner":"Dias1c","description":"🐜 Find optimal paths for ants","archived":false,"fork":false,"pushed_at":"2022-05-11T17:34:20.000Z","size":3497,"stargazers_count":28,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T09:39:01.918Z","etag":null,"topics":["01-edu","alem-school","algorithms","clean-architecture","go","golang","graph","lem-in","lemin","pkg","suurballe-algorithm","visualization","web"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dias1c.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}},"created_at":"2021-09-07T13:58:18.000Z","updated_at":"2025-01-29T10:18:36.000Z","dependencies_parsed_at":"2022-08-26T06:41:09.968Z","dependency_job_id":null,"html_url":"https://github.com/Dias1c/lem-in","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dias1c%2Flem-in","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dias1c%2Flem-in/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dias1c%2Flem-in/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dias1c%2Flem-in/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dias1c","download_url":"https://codeload.github.com/Dias1c/lem-in/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247838392,"owners_count":21004576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["01-edu","alem-school","algorithms","clean-architecture","go","golang","graph","lem-in","lemin","pkg","suurballe-algorithm","visualization","web"],"created_at":"2025-04-08T11:53:06.044Z","updated_at":"2025-04-08T11:53:06.626Z","avatar_url":"https://github.com/Dias1c.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lem-in\nThe task of the project is [here](https://github.com/01-edu/public/tree/master/subjects/lem-in)\u003cbr\u003e\nWiki [here](https://github.com/Dias1c/lem-in/wiki) and thx for [him](https://github.com/elijahkash)\n# Chapters\n- [Briefly about the project](#Briefly-about-the-project)\n- [Graphs in file](#Graphs-in-file)\n- [How use program](#How-use-program)\n- [How Program works](#How-Program-works)\n- [Authors](#Authors)\n# Briefly about the project\nThis is a console program that builds a graph based on the data transmitted by the user and distributes the ants along the paths so that everyone reaches from `A` to `B` in a minimum of steps.\n\n![lem-in preview](https://github.com/Dias1c/wiki/blob/master/lem-in/images/lem-in-demo.gif?raw=true)\n\u003e Also you can use web version for visualize your result. To do this, insert the map with result into the `text result` block and click on \u003ckbd\u003eSet Params\u003c/kbd\u003e. Now your graph is represented graphically.\n# How use program\n\u003e Program takes only 1 argument. \nIt can be filename or flags.\n#### Default:\n- `\"filename\"` - your file path with graph data\n#### Flags:\n- `--file=\"filename\"` - as default input. Just an explicit launch with a file\n- `--http=\":port\"` - starts run server on your port. Using for visualization.\n\nFor run project:\n```bash\ngo run ./cmd (filename | --http=:port | --file=filename)\n```\n### Example:\nRun program:\n```bash\n$ go run ./cmd example.txt\n#My comment\n3\n##start\nstart 2 2\nr1 3 1\nr2 3 3\nr3 4 1\n##end\nend 5 2\n\nstart-r1\nstart-r2\nr1-r3\nr2-end\nr3-end\nL1-r2 L2-r1 \nL1-end L2-r3 L3-r2 \nL2-end L3-end \n```\nAlso Get Steps Count:\n```bash\n$ go run ./cmd example.txt | grep '^L' | wc -l\n3\n```\nRun visualization:\n```bash\n$ go run ./cmd --http=:8080\nYYYY/MM/DD hh:mm:ss Server started on http://localhost:8080\n```\n\nThe program is provided with information about the graph (anthill) at the input:\n\n- Number of `ants` (ants \u003e 0)\n- The name of the vertices and their coordinates. The `##start` and `##end` commands specify the starting and ending vertices of the path. (x \u003e 0 \u0026 y \u003e 0)\n- Edges connecting vertices.\n- Optional comments starting by `#` (program ignore them)\n# Graphs in file\nThe map file looks like this\n```txt\n#My comment\n3\n##start\nstart 2 2\nr1 3 1\nr2 3 3\nr3 4 1\n##end\nend 5 2\n\nstart-r1\nstart-r2\nr1-r3\nr2-end\nr3-end\n``` \n# How Program works\n![short in diagram](https://raw.githubusercontent.com/Dias1c/wiki/0d6d9b8ee728e4fb1c27e1b82fcfd8b6af6ad420/lem-in/images/main.svg)\n\u003e To learn more, read the [wiki](https://github.com/Dias1c/lem-in/wiki)\n### Suurballe's algorithm Links:\n- [Detailed explanation](https://en.wikipedia.org/wiki/Suurballe%27s_algorithm)\n- [Briefly in pictures](http://www.macfreek.nl/memory/Disjoint_Path_Finding)\n# Authors\n- [Dias1c](https://github.com/Dias1c)\n- [nrblzn](https://github.com/RaevNur)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdias1c%2Flem-in","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdias1c%2Flem-in","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdias1c%2Flem-in/lists"}