Minwei Kong commited on
Update fragkos2021 and oliveira2020 references
Browse filesRefresh the audited fragkos2021 tiny Gurobi certificate. Replace the oversized oliveira2020 tiny instance with the reproducible 8-job instance and proven reference, and correct derived metadata on its five large instances.
- tasks/fragkos2021/gurobi_code.py +8 -1
- tasks/fragkos2021/gurobi_solution/tiny_solution.json +2 -2
- tasks/oliveira2020/gurobi_code.py +11 -2
- tasks/oliveira2020/gurobi_solution/tiny_solution.json +2 -2
- tasks/oliveira2020/gurobi_solution_log/tiny_log.jsonl +2 -2
- tasks/oliveira2020/instance/large_instance_1.json +2 -2
- tasks/oliveira2020/instance/large_instance_2.json +2 -2
- tasks/oliveira2020/instance/large_instance_3.json +2 -2
- tasks/oliveira2020/instance/large_instance_4.json +2 -2
- tasks/oliveira2020/instance/large_instance_5.json +2 -2
- tasks/oliveira2020/instance/tiny_instance.json +2 -2
tasks/fragkos2021/gurobi_code.py
CHANGED
|
@@ -222,7 +222,7 @@ def main():
|
|
| 222 |
# the latest captured incumbent (or the trivial stub if Gurobi found
|
| 223 |
# nothing yet) — never a half-written or stale-dimension file.
|
| 224 |
# ------------------------------------------------------------------
|
| 225 |
-
def _atomic_write_solution(path, x_vec, ub, elapsed_s, cuts):
|
| 226 |
payload = {
|
| 227 |
"objective_value": ub,
|
| 228 |
"facility_locations": x_vec,
|
|
@@ -230,6 +230,8 @@ def main():
|
|
| 230 |
"total_time_seconds": round(elapsed_s, 4),
|
| 231 |
"cuts_added": cuts,
|
| 232 |
}
|
|
|
|
|
|
|
| 233 |
dirn = _os.path.dirname(_os.path.abspath(path)) or "."
|
| 234 |
fd, tmp = tempfile.mkstemp(prefix=_os.path.basename(path) + ".",
|
| 235 |
suffix=".tmp", dir=dirn)
|
|
@@ -375,6 +377,11 @@ def main():
|
|
| 375 |
best["ub"],
|
| 376 |
total_time,
|
| 377 |
best["cuts"],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 378 |
)
|
| 379 |
|
| 380 |
print(f"Objective value : {best['ub']:.4f}")
|
|
|
|
| 222 |
# the latest captured incumbent (or the trivial stub if Gurobi found
|
| 223 |
# nothing yet) — never a half-written or stale-dimension file.
|
| 224 |
# ------------------------------------------------------------------
|
| 225 |
+
def _atomic_write_solution(path, x_vec, ub, elapsed_s, cuts, solver_result=None):
|
| 226 |
payload = {
|
| 227 |
"objective_value": ub,
|
| 228 |
"facility_locations": x_vec,
|
|
|
|
| 230 |
"total_time_seconds": round(elapsed_s, 4),
|
| 231 |
"cuts_added": cuts,
|
| 232 |
}
|
| 233 |
+
if solver_result is not None:
|
| 234 |
+
payload.update(solver_result)
|
| 235 |
dirn = _os.path.dirname(_os.path.abspath(path)) or "."
|
| 236 |
fd, tmp = tempfile.mkstemp(prefix=_os.path.basename(path) + ".",
|
| 237 |
suffix=".tmp", dir=dirn)
|
|
|
|
| 377 |
best["ub"],
|
| 378 |
total_time,
|
| 379 |
best["cuts"],
|
| 380 |
+
{
|
| 381 |
+
"solver_status": model.Status,
|
| 382 |
+
"best_bound": model.ObjBound if model.SolCount > 0 else None,
|
| 383 |
+
"mip_gap": model.MIPGap if model.SolCount > 0 else None,
|
| 384 |
+
},
|
| 385 |
)
|
| 386 |
|
| 387 |
print(f"Objective value : {best['ub']:.4f}")
|
tasks/fragkos2021/gurobi_solution/tiny_solution.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:177ce5d1eff424729b2f82535e12444367becd22ac3b6bdd8ca24bbe598e1912
|
| 3 |
+
size 422
|
tasks/oliveira2020/gurobi_code.py
CHANGED
|
@@ -73,7 +73,8 @@ def solve(instance_path, solution_path, time_limit):
|
|
| 73 |
|
| 74 |
model = gp.Model("parallel_machine_weighted_tardiness")
|
| 75 |
model.Params.Threads = 1
|
| 76 |
-
|
|
|
|
| 77 |
model.Params.OutputFlag = 1
|
| 78 |
model.Params.MIPFocus = 1
|
| 79 |
|
|
@@ -203,7 +204,15 @@ if __name__ == "__main__":
|
|
| 203 |
parser.add_argument("--instance_path", required=True)
|
| 204 |
parser.add_argument("--solution_path", required=True)
|
| 205 |
parser.add_argument("--time_limit", type=int, default=3600)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
parser.add_argument("--log_path", default=None)
|
| 207 |
arguments = parser.parse_args()
|
| 208 |
install_gurobi_logger(arguments.log_path)
|
| 209 |
-
solve(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
model = gp.Model("parallel_machine_weighted_tardiness")
|
| 75 |
model.Params.Threads = 1
|
| 76 |
+
if time_limit is not None:
|
| 77 |
+
model.Params.TimeLimit = time_limit
|
| 78 |
model.Params.OutputFlag = 1
|
| 79 |
model.Params.MIPFocus = 1
|
| 80 |
|
|
|
|
| 204 |
parser.add_argument("--instance_path", required=True)
|
| 205 |
parser.add_argument("--solution_path", required=True)
|
| 206 |
parser.add_argument("--time_limit", type=int, default=3600)
|
| 207 |
+
parser.add_argument(
|
| 208 |
+
"--no-time-limit", action="store_true",
|
| 209 |
+
help="Run Gurobi without a solver time limit.",
|
| 210 |
+
)
|
| 211 |
parser.add_argument("--log_path", default=None)
|
| 212 |
arguments = parser.parse_args()
|
| 213 |
install_gurobi_logger(arguments.log_path)
|
| 214 |
+
solve(
|
| 215 |
+
arguments.instance_path,
|
| 216 |
+
arguments.solution_path,
|
| 217 |
+
None if arguments.no_time_limit else arguments.time_limit,
|
| 218 |
+
)
|
tasks/oliveira2020/gurobi_solution/tiny_solution.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a23a5c1c702bba90ffc41163148649bdc7a6ecb788e6b25edbbda27bbf09db2
|
| 3 |
+
size 1535
|
tasks/oliveira2020/gurobi_solution_log/tiny_log.jsonl
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:efebef3b126d56b03db2679573f7e1a1d1248d75665143e67fa765a7a0c237da
|
| 3 |
+
size 82
|
tasks/oliveira2020/instance/large_instance_1.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e6e0906cb22c0c5ac5c7c1df3ce74d4c880e40791c19e6b6264bb55dfff33c88
|
| 3 |
+
size 2070
|
tasks/oliveira2020/instance/large_instance_2.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:baf24c73ca304abd2f50a49266eb1a8ce3043b9e729b0db28605e76ad9e9aae6
|
| 3 |
+
size 2083
|
tasks/oliveira2020/instance/large_instance_3.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:23786dc6afed78fda648e8d1956e047b668848119b71c93e4a5b0c9811b98021
|
| 3 |
+
size 2077
|
tasks/oliveira2020/instance/large_instance_4.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:70ee6bb3b01b48631025a3d9e50026c8ca2e47a630a79b3171f651331b3f4254
|
| 3 |
+
size 2073
|
tasks/oliveira2020/instance/large_instance_5.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6ea77361f81eaabf6dc1aad12ccd2e534c5da5786eb10cc3984cb9e1c57b3471
|
| 3 |
+
size 2071
|
tasks/oliveira2020/instance/tiny_instance.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:af263e66ddd7afa088839bd3b566b4de16d0ec40634ca332ac279c02609189c1
|
| 3 |
+
size 1134
|