-
Notifications
You must be signed in to change notification settings - Fork 9
[MOF] Begin formal JSON schema #47
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. It's even easier to read than I expected.
Yes, it's very easy to read. I wonder if we should include the math descriptions for all functions and sets in the schema so that it is virtually self-documenting. |
@@ -0,0 +1,34 @@ | |||
{ | |||
"description": "The problem: min{x^2 + x * y + y^2}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on
{
"coefficient": 2,
"variable_1": "x",
"variable_2": "y"
}
it should be min{x^2 + 2 * x * y + y^2}
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. You're right that there is a mistake but that is the wrong one. I doubled the wrong value.
This is an annoying point that has come up a few times (e.g., JuliaOpt/LinQuadOptInterface.jl#22).
MOI defines the ScalarQuadraticFunction as 0.5 x' Q x
.
Merging since I think we're fairly happy with this. We can address any other points in future PR's. |
Still todo
is there a way to validate variable names used in functions are defined inDon't think sovariables
?Name
Closes #46