{"id":18669217,"url":"https://github.com/rafabench/modelcompare","last_synced_at":"2025-04-12T00:30:51.136Z","repository":{"id":67714024,"uuid":"238745254","full_name":"rafabench/ModelCompare","owner":"rafabench","description":"The purpose of this project is to compare two optimization models in two different files","archived":false,"fork":false,"pushed_at":"2023-07-03T17:09:13.000Z","size":227,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T20:13:41.334Z","etag":null,"topics":["comparison","julia","optimization"],"latest_commit_sha":null,"homepage":"","language":"Julia","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/rafabench.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}},"created_at":"2020-02-06T17:29:21.000Z","updated_at":"2023-02-05T20:16:15.000Z","dependencies_parsed_at":"2024-11-07T08:46:24.132Z","dependency_job_id":"dec2445e-0f15-4a78-894c-ecc69cf09954","html_url":"https://github.com/rafabench/ModelCompare","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/rafabench%2FModelCompare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafabench%2FModelCompare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafabench%2FModelCompare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafabench%2FModelCompare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafabench","download_url":"https://codeload.github.com/rafabench/ModelCompare/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501027,"owners_count":21114592,"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":["comparison","julia","optimization"],"created_at":"2024-11-07T08:46:16.481Z","updated_at":"2025-04-12T00:30:51.109Z","avatar_url":"https://github.com/rafabench.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ModelCompare\n\nThe purpose of this project is to compare two optimization models in two different files.\n\n### Running\n\nIf you have 2 files like `model1.lp` and `model2.lp` in the folder `test`.\nYou can compare them by running:\n\n```julia\ncompare_models(\n    file1 = \"test/models/model1.lp\",\n    file2 = \"test/models/model2.lp\",\n    outfile = \"test/models/compare_lp.txt\", \n    tol = 1e-3\n)\n```\n\n### Analyzing the results\n\nThe section `VARIABLE NAMES` says which variable belongs to each model.\n\n```\n\tMODEL 1\n\t\tw\n\t\tx\n\t\tz_a\n    MODEL 2\n\t\tp\n\t\tt\n\t\tz_10_\n\t\tz_6_\n\t\tz_7_\n\t\tz_8_\n\t\tz_9_\n\t\tz_a_1_\n\t\tz_a_2_\n```\n\nThe variables `w,x,z_a` belongs only to the first model and\n`p,t,z_10_,z_6_,z_7_,z_8_,z_9_,z_a_1_,z_a_2_` belongs only\nto the first model. If both models have the same variables,\nit doesn't show on the results.\n\nIn the objective section, it shows which coefficient are different.\n\n```\n\tSAME VARIABLES\n\ty_1_\n\t\t MODEL 1 =\u003e 3.0\n\t\t MODEL 2 =\u003e 5.0\n\ty_2_\n\t\t MODEL 1 =\u003e 3.0\n\t\t MODEL 2 =\u003e 5.0\n\td\n\t\t MODEL 1 =\u003e 5.0\n\t\t MODEL 2 =\u003e 1.0\n\tDIFFERENT VARIABLES:\n\tMODEL 1:\n\t\tw =\u003e 0.5\n\t\tx =\u003e 2.0\n\t\tz_a =\u003e 1.0\n\tMODEL 2:\n\t\tz_8_ =\u003e 1.0\n\t\tz_a_1_ =\u003e 1.0\n\t\tz_7_ =\u003e 1.0\n\t\tz_a_2_ =\u003e 1.0\n\t\tz_9_ =\u003e 1.0\n\t\tz_6_ =\u003e 1.0\n\t\tz_10_ =\u003e 1.0\n\t\tp =\u003e 3.0\n```\n\nThe variable `y_1_` has a coefficient 3.0 multiplying it in\nthe model1 and 5.0 in the model 2.\n\nIn the bounds section, it shows which bounds are different.\n\n```\nDIFFERENT VARIABLES:\n\tMODEL 1:\n\t\tw =\u003e [30.0,Inf)\n\t\tx =\u003e [0.0,Inf)\n\t\tz_a =\u003e [25.0,25.0]\n```\n\nThe variable `w` has bounds $[30.0,\\infty)$. The `z` variable\n is fixed in `25`.\n\nIn the constraint section it shows the coefficients of the variables\n that are different and if the constraint bounds are different.\n\n**You can only compare constraints with the same name, otherwise,\n it will be ignored.**\n\n```\nCONSTRAINT: c1\n\tDIFFERENT VARIABLES:\n\tMODEL 1:\n\t\tz_4_ =\u003e 2.0\n\t\tz_2_ =\u003e 2.0\n\t\tz_5_ =\u003e 2.0\n\t\tz_3_ =\u003e 2.0\n\t\tz_1_ =\u003e 2.0\n\t\tz_a =\u003e 1.0\n\tMODEL 2:\n\t\tz_a_1_ =\u003e 2.0\n\t\tz_a_2_ =\u003e 1.0\n\tSETS\n\t\tMODEL 1: MathOptInterface.GreaterThan{Float64}(3.0)\n\t\tMODEL 2: MathOptInterface.EqualTo{Float64}(3.0)\n\n\nCONSTRAINT: z_con\n\tDIFFERENT VARIABLES:\n\tMODEL 2:\n\t\tz_8_ =\u003e 1.0\n\t\tz_7_ =\u003e 1.0\n\t\tz_9_ =\u003e 1.0\n\t\tz_6_ =\u003e 1.0\n\t\tz_10_ =\u003e 1.0\n```\n\nOn the constraint `c1`. In the first model, it has the variables\n `z_1_,z_2_,z_3_,z_4_,z_5_,z_a_` on the constraint `c1`  and the\n second model doesn't have this variables in this constraint.\n Also, `z_1_` has a coefficient of 2 on the constraint `c1` and so on.\n\nIn the first model, the `c1` constraint has a bound of `Greater than 3`\n and on the second model `Equal to 3`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafabench%2Fmodelcompare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafabench%2Fmodelcompare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafabench%2Fmodelcompare/lists"}