Skip to content

Commit

Permalink
return empty objective instead of failing
Browse files Browse the repository at this point in the history
  • Loading branch information
chrjabs committed Aug 21, 2023
1 parent f191889 commit 386aa01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/instances/fio/dimacs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
Expand Down

0 comments on commit 386aa01

Please sign in to comment.