Skip to content

Commit 58d9a35

Browse files
authored
Merge pull request #13 from jump-dev/od/tidy
Tidy MathOptFormat for jump.dev/MathOptFormat website
2 parents 4662c69 + b5ad03e commit 58d9a35

10 files changed

+119
-286
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vscode

Diff for: README.md

+27-23
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,33 @@
33
This repository describes a file-format for mathematical optimization problems
44
called _MathOptFormat_ with the file extension `.mof.json`.
55

6-
It is heavily inspired by [MathOptInterface](https://github.com/JuliaOpt/MathOptInterface.jl).
6+
MathOptFormat is rigidly defined by the [JSON schema](http://json-schema.org/)
7+
available at
8+
[`https://jump.dev/MathOptFormat/mof.0.4.schema.json`](https://jump.dev/MathOptFormat/mof.0.4.schema.json).
9+
10+
It is intended for the schema to be self-documenting. Instead of modifying or
11+
adding to this documentation, clarifying edits should be made to the
12+
`description` field of the relevant part of the schema.
13+
14+
A number of examples of optimization problems encoded using MathOptFormat are
15+
provided in the [`/examples` directory](https://github.com/odow/MathOptFormat/tree/master/examples).
16+
17+
A paper describing the motivation, design principles, and historical setting of
18+
MathOptFormat is available at:
19+
20+
Legat, B., Dowson, O., Garcia, J.D., Lubin, M. (2020). MathOptInterface: a data
21+
structure for mathematical optimization problems.
22+
[[preprint]](http://www.optimization-online.org/DB_HTML/2020/02/7609.html)
23+
[[repository]](https://github.com/jump-dev/MathOptFormat)
24+
25+
**We highly recommend you read that paper before reading further.**
26+
27+
## Implementations
28+
29+
- Julia
30+
31+
- The [MathOptInterface.jl](https://github.com/jump-dev/MathOptInterface.jl) package
32+
supports reading and writing MathOptFormat files.
733

834
## Standard form
935

@@ -146,20 +172,6 @@ required keys at the top level:
146172
with a lower bound of `1`. See [List of supported sets](#list-of-supported-sets)
147173
for other sets supported by MathOptFormat.
148174

149-
### Other examples
150-
151-
A number of examples of optimization problems encoded using MathOptFormat are
152-
provided in the [`/examples` directory](https://github.com/odow/MathOptFormat/tree/master/examples).
153-
154-
## The schema
155-
156-
A [JSON schema](http://json-schema.org/) for the `.mof.json` file-format is
157-
provided in the file [`mof.schema.json`](https://github.com/odow/MathOptFormat/blob/master/mof.schema.json).
158-
159-
It is intended for the schema to be self-documenting. Instead of modifying or
160-
adding to this documentation, clarifying edits should be made to the
161-
`description` field of the relevant part of the schema.
162-
163175
### List of supported functions
164176

165177
The list of functions supported by MathOptFormat are contained in the
@@ -178,7 +190,6 @@ Here is a summary of the functions defined by MathOptFormat.
178190
| `"ScalarQuadraticFunction"` | The function `0.5x'Qx + a'x + b`, where `a` is a sparse vector of `ScalarAffineTerm`s in `affine_terms`, `b` is the scalar `constant`, and `Q` is a symmetric matrix specified by a list of `ScalarQuadraticTerm`s in `quadratic_terms`. Duplicate indices in `affine_terms` and `quadratic` are accepted, and the corresponding coefficients are summed together. Mirrored indices in `quadratic_terms` (i.e., `(i,j)` and `(j, i)`) are considered duplicates; only one need to be specified. | {"head": "ScalarQuadraticFunction", "constant": 1.0, "affine_terms": [{"coefficient": 2.5, "variable": "x"}], "quadratic_terms": [{"coefficient": 2.0, "variable_1": "x", "variable_2": "y"}]} |
179191
| `"ScalarNonlinearFunction"` | An expression graph representing a scalar nonlinear function. | |
180192

181-
182193
For more information on `"ScalarNonlinearFunction"` functions, see
183194
[Nonlinear functions](nonlinear-functions).
184195

@@ -397,10 +408,3 @@ In MathOptFormat, this expression graph can be encoded as follows:
397408
]
398409
}
399410
```
400-
401-
## Implementations
402-
403-
- Julia
404-
405-
- The [MathOptInterface.jl](https://github.com/jump-dev/MathOptInterface.jl) package
406-
supports reading and writing MathOptFormat files.
File renamed without changes.
File renamed without changes.

Diff for: mof.schema.json renamed to mof.0.4.schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://json-schema.org/schema#",
3-
"$id": "https://github.com/odow/MathOptFormat/blob/master/mof.schema.json",
3+
"$id": "https://jump.dev/MathOptFormat/mof.0.4.schema.json",
44
"title": "The schema for MathOptFormat",
55
"type": "object",
66
"required": ["version", "variables", "objective", "constraints"],

Diff for: mof/.gitignore

-5
This file was deleted.

Diff for: mof/generate-static-schema.go

-25
This file was deleted.

Diff for: mof/mof.go

-203
This file was deleted.

Diff for: mof/mof_test.go

-29
This file was deleted.

0 commit comments

Comments
 (0)