From 3fec27f9dd186ab6be65750c852113efe10d0b20 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sat, 19 Apr 2025 23:58:27 -0500 Subject: [PATCH 1/2] Ignore more comments in SIF files --- src/readqps.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/readqps.jl b/src/readqps.jl index 77ffc04..37c4764 100644 --- a/src/readqps.jl +++ b/src/readqps.jl @@ -202,7 +202,7 @@ Read the fields in `ln` into `card`. """ function read_card!(card::MPSCard{FixedMPS}, ln::String) l = length(ln) - if l == 0 || ln[1] == '*' || ln[1] == '&' + if l == 0 || ln[1] == '*' || ln[1] == '&' || ln[1] == '$' # This line is an empty line, or it is a comment card.iscomment = true card.isheader = false @@ -314,7 +314,7 @@ Read the fields in `ln` into `card`. """ function read_card!(card::MPSCard{FreeMPS}, ln::String) l = length(ln) - if l == 0 || ln[1] == '*' || ln[1] == '&' + if l == 0 || ln[1] == '*' || ln[1] == '&' || ln[1] == '$' # This line is an empty line, or it is a comment card.iscomment = true card.isheader = false From c155100be235def055b5c2eacb829e076b714973 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sun, 20 Apr 2025 00:19:57 -0500 Subject: [PATCH 2/2] Better handle some cards --- src/readqps.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/readqps.jl b/src/readqps.jl index 37c4764..1077f95 100644 --- a/src/readqps.jl +++ b/src/readqps.jl @@ -850,12 +850,12 @@ function readqps(qps::IO; mpsformat::Symbol = :free) elseif sec == COLUMNS # Check if card is marker if card.f2 == "'MARKER'" - if card.f3 == "'INTORG'" + if card.f3 == "'INTORG'" || card.f4 == "'INTORG'" integer_section = true - elseif card.f3 == "'INTEND'" + elseif card.f3 == "'INTEND'" || card.f4 == "'INTEND'" integer_section = false else - @error "Ignoring marker $(card.f3) at line $(card.nline)" + @error "Ignoring marker $(card.f3) (or $(card.f4)) at line $(card.nline)" end continue end