{"id":26551074,"url":"https://github.com/bergio13/heuristic-optimization-mwccp","last_synced_at":"2025-09-12T22:49:52.599Z","repository":{"id":265099608,"uuid":"878958970","full_name":"bergio13/heuristic-optimization-MWCCP","owner":"bergio13","description":"Construction Heuristics, Local Search, VND, GRASP, GVNS, GA and ACO applied to the Minimum Wieghted Crossings with Constraints Problem (MWCCP)","archived":false,"fork":false,"pushed_at":"2025-01-22T17:26:38.000Z","size":22098,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-01T20:07:09.305Z","etag":null,"topics":["aco","ant-colony-optimization","bipartite-matching","genetic-algorithm","grasp","gvns","heuristics","local-search","metaheuristics","variable-neighbourhood-descent"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/bergio13.png","metadata":{"files":{"readme":"README.md","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,"zenodo":null}},"created_at":"2024-10-26T15:23:56.000Z","updated_at":"2025-01-22T17:26:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f57638a-a6d2-491e-bf0f-1d1f25c0d644","html_url":"https://github.com/bergio13/heuristic-optimization-MWCCP","commit_stats":null,"previous_names":["bergio13/heuristic-optimization-mwccp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bergio13/heuristic-optimization-MWCCP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergio13%2Fheuristic-optimization-MWCCP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergio13%2Fheuristic-optimization-MWCCP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergio13%2Fheuristic-optimization-MWCCP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergio13%2Fheuristic-optimization-MWCCP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bergio13","download_url":"https://codeload.github.com/bergio13/heuristic-optimization-MWCCP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bergio13%2Fheuristic-optimization-MWCCP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274890274,"owners_count":25368869,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["aco","ant-colony-optimization","bipartite-matching","genetic-algorithm","grasp","gvns","heuristics","local-search","metaheuristics","variable-neighbourhood-descent"],"created_at":"2025-03-22T07:45:47.393Z","updated_at":"2025-09-12T22:49:52.558Z","avatar_url":"https://github.com/bergio13.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minimum Weighted Crossings with Constraints Problem (MWCCP)\n\nThe **Minimum Weighted Crossings with Constraints Problem (MWCCP)** is a generalization of the Minimum Crossings Problem.\n\n## Problem Definition\n\nWe are given an **undirected weighted bipartite graph** $G = (U ∪ V, E)$ with:\n\n- **Node sets**:\n  - `U = {1, ..., m}`: the first partition.\n  - `V = {m + 1, ..., n}`: the second partition.\n- `U` and `V` are disjoint.\n- **Edge set**: $E ⊆ U × V$, consisting of edges between the two partitions.\n- **Edge weights**: $w_e = w_{u,v}$ for $e = (u, v) ∈ E$.\n\n### Constraints\n\nPrecedence constraints $C$ are given as a set of ordered node pairs:\n\n$C ⊆ V × V$,\n\nwhere $(v, v') ∈ C$ means that **node $v$ must appear before node $v'$** in a feasible solution.\n\n### Goal\n\nThe nodes of the graph $G$ are to be arranged in two layers:\n\n1. The **first layer** contains all nodes in $U$, arranged in fixed label order `1, ..., m`.\n2. The **second layer** contains all nodes in $V$, arranged in an order to be determined.\n\nThe goal is to find an ordering of the nodes in $V$ such that:\n\n- The **weighted edge crossings** are minimized.\n- All precedence constraints $C$ are satisfied.\n\n---\n\n## Solution Representation\n\nA candidate solution is represented by a **permutation** $π = (π_{m+1}, ..., π_n)$ of the nodes in $V$.\n\n### Feasibility\n\nA solution is feasible if all precedence constraints $C$ are fulfilled:\n\n$$\npos_π(v) \u003c pos_π(v'), \\forall (v, v') ∈ C\n$$\n\nwhere $pos_π(v)$ is the position of node $v$ in the permutation $π$.\n\n---\n\n## Objective Function\n\nThe objective is to minimize the following function:\n\n$$\nf(π) = ∑_{(u, v) ∈ E} ∑_{(u', v') ∈ E, u \u003c u'} \n       (w_{u,v} + w_{u',v'}) · δ_π((u, v), (u', v'))\n$$\n\n### Crossing Indicator\n\nThe indicator function $δ_π((u, v), (u', v'))$ is defined as:\n\n$δ_π((u, v), (u', v')) =$\n- $1$, if $pos_π(v) \u003e pos_π(v')$\n- $0$, otherwise\n\n\nThis formulation ensures that the **weighted crossings** are minimized while satisfying all precedence constraints.\n\n---\n# Repository Content\n- `source` is a folder containing the python code for the different heuristics used\n- `report_1.pdf` contains a description of the Local Search, VND, GVNS, and GRASP heuristics used, as well as detailed results and analysis of how these techniques perform when applied to different instances of the MWCPP\n- `report_2.pdf` contains a description of the Genetic Algorithm and Ant Colony Optimization metaheuristics used and results and comparisons between them\n---\n# Results\n\n![Algorithms Comparison](https://github.com/bergio13/heuristic-optimization-MWCCP/blob/main/images/algo_comp.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbergio13%2Fheuristic-optimization-mwccp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbergio13%2Fheuristic-optimization-mwccp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbergio13%2Fheuristic-optimization-mwccp/lists"}