{"id":19320618,"url":"https://github.com/aluriak/cathplace","last_synced_at":"2026-04-17T13:03:44.457Z","repository":{"id":143140917,"uuid":"147652979","full_name":"Aluriak/Cathplace","owner":"Aluriak","description":"Helper for placement of humans in their offices according to various constraints","archived":false,"fork":false,"pushed_at":"2018-09-06T14:32:02.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-06T05:12:14.947Z","etag":null,"topics":["answer-set-programming","python","qt5","tkinter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aluriak.png","metadata":{"files":{"readme":"README.mkd","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2018-09-06T09:49:43.000Z","updated_at":"2018-09-06T14:32:05.000Z","dependencies_parsed_at":"2023-05-22T14:30:55.117Z","dependency_job_id":null,"html_url":"https://github.com/Aluriak/Cathplace","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/Aluriak%2FCathplace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2FCathplace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2FCathplace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2FCathplace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aluriak","download_url":"https://codeload.github.com/Aluriak/Cathplace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240421670,"owners_count":19798617,"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":["answer-set-programming","python","qt5","tkinter"],"created_at":"2024-11-10T01:29:50.795Z","updated_at":"2026-04-17T13:03:44.399Z","avatar_url":"https://github.com/Aluriak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cathplace\nAutomatic assignation of places using [ASP/clingo](https://github.com/potassco/clingo/releases/).\n\nRun with:\n\n    clingo 0 data-examples/humans.lp data-examples/offices.lp engine.lp -W no-atom-undefined\n\nSee [Makefile](Makefile) for further usage information.\n\n\n## installation\nClone the repository or copy the source code.\nUse the Makefile or copy-paste commands you found here.\n\nYou will need python 3.6+, and some tierce-party packages installable with `pip install -r requirements.txt`.\nSee the [requirements.txt](requirements.txt) for exact dependencies.\n\nYou will also need the [clingo](https://github.com/potassco/clingo/releases/) solver to be installed in your $PATH.\n\nFinally, **create a data folder** (or a symlink to existing data folder somewhere else) and populate it with files:\n\n- `map.png`: a map of the office/lab, something like [this one](http://oi45.tinypic.com/fk5rbs.jpg) for instance\n- `humans.lp`: as described [later](#humans)\n- `offices.lp`: as described [later](#offices)\n\nThe data folder does not exists in this repo and is marked by `.gitignore`. You can therefore safely build your own with your private data.\n\n\n## DSL\nIn files `data/humans.lp` and `data/offices.lp`, the final user can specify\nits problem using the DSL.\n\nHe should not modify `engine.lp`, that contains the expension of the DSL, and the problem encoding.\n\n### humans\nUser can define humans using the `human(agnan,team_01).` expression. Team is here just for some features, like optimization of team mixing.\n\nUser can also:\n- place manually peoples at specific places\n- specify that a particular human must be alone in its room\n- declare incompatibilities between peoples\n- declare incompatibilities between peoples and properties\n- declare a property implied by a human on its room\n- declare relations between peoples, that will be later translated into constraints\n- provides some options, to help choose the best assignation of desks.\n\nFew examples:\n- `incompatible(michel,geraldine)`: Michel can't stand Géraldine\n- `imply(cunegonde,cold)`: Cunégonde makes its room cold (by opening the window, even in winter)\n- `friend(gislaine,roger)`: Gislaine is friend with Roger\n- `incompatible(eugene,sunny)`: Eugène can't be in a sunny room\n\n### desk\nUser can work either at room or desk level, or a mix of the two.\nHe will define rooms and desks as shown in [`offices.lp`](offices.lp),\nfor instance with `room(a100,2)` indicating that room a100 can contains two humans.\n\nRooms and/or desks can also hold arbitrary properties. Some typical\nproperties may be *sunny*, *south-oriented* or *noisy*. For instance, `property(a100,sunny)` defines room a100 as *sunny*, making it unsuitable for Eugène.\n\nNote that the [GUI](#GUIs) may help to build these data automatically.\n\n\n## GUIs\nTwo GUI currently coexist, offering the same features : one in tkinter, one in Qt,\nthan can be launched using either `python -m tkgui` or `python -m qtgui`.\n\nWith the GUI, it's quite simple to:\n- design the search space about desks and rooms, by adding desks on the map, and indicating where places for human are.\n- visualize the output of Cathplace program\n\nFor the tkinter GUI, you need Tcl/Tk, that is often shipped with python. For the Qt GUI, you need PyQt5.\nSee [installation](#installation).\n\n\n## Future work\n- implement the team mixing optimization\n- #project for non-differenciated desks\n- *need/2* handling in DSL\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faluriak%2Fcathplace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faluriak%2Fcathplace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faluriak%2Fcathplace/lists"}