We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c35875 commit 9b9c175Copy full SHA for 9b9c175
src/FileFormats/LP/read.jl
@@ -617,9 +617,13 @@ function _parse_optional_name(state::LexerState, cache::Cache)
617
return nothing
618
end
619
620
-# OBJECTIVE --> [NAME] EXPRESSION
+# OBJECTIVE --> [NAME] [EXPRESSION]
621
function _parse_objective(state::LexerState, cache::Cache)
622
_ = _parse_optional_name(state, cache)
623
+ _skip_newlines(state)
624
+ if _next_token_is(state, _TOKEN_KEYWORD)
625
+ return # A line like `obj:\nsubject to`
626
+ end
627
f = _parse_expression(state, cache)
628
MOI.set(cache.model, MOI.ObjectiveFunction{typeof(f)}(), f)
629
return
0 commit comments