From 386aa0172bd4431b80be6ec215981accc7383c66 Mon Sep 17 00:00:00 2001 From: Christoph Jabs Date: Mon, 21 Aug 2023 12:47:05 +0300 Subject: [PATCH] return empty objective instead of failing --- src/instances/fio/dimacs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/instances/fio/dimacs.rs b/src/instances/fio/dimacs.rs index 32320dda..4a887375 100644 --- a/src/instances/fio/dimacs.rs +++ b/src/instances/fio/dimacs.rs @@ -71,9 +71,9 @@ where VM: ManageVars + Default, { let reader = BufReader::new(reader); - let (constrs, objs) = parse_dimacs(reader)?; + let (constrs, mut objs) = parse_dimacs(reader)?; if objs.is_empty() { - return Err(Error::InvalidInstanceType); + objs.push(Objective::default()); } else if obj_idx >= objs.len() { return Err(Error::ObjNoExist(objs.len())); }