Skip to content

Commit 01af5b9

Browse files
authored
Add primal_start and dual_start for constraints to make v1.2 (#22)
1 parent d07b564 commit 01af5b9

File tree

5 files changed

+1077
-7
lines changed

5 files changed

+1077
-7
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ called _MathOptFormat_ with the file extension `.mof.json`.
55

66
MathOptFormat is rigidly defined by the [JSON schema](http://json-schema.org/)
77
available at
8-
[`https://jump.dev/MathOptFormat/schemas/mof.1.1.schema.json`](https://jump.dev/MathOptFormat/schemas/mof.1.1.schema.json).
8+
[`https://jump.dev/MathOptFormat/schemas/mof.1.2.schema.json`](https://jump.dev/MathOptFormat/schemas/mof.1.2.schema.json).
99

1010
It is intended for the schema to be self-documenting. Instead of modifying or
1111
adding to this documentation, clarifying edits should be made to the
@@ -67,7 +67,7 @@ Encoded into the MathOptFormat file format, this example becomes:
6767
{
6868
"version": {
6969
"major": 1,
70-
"minor": 1
70+
"minor": 2
7171
},
7272
"variables": [{"name": "x"}],
7373
"objective": {

Diff for: examples/milp.mof.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"description": "The problem: min{x | x + y >= 1, x ∈ [0, 1], y ∈ {0, 1}}",
33
"version": {
44
"major": 1,
5-
"minor": 1
5+
"minor": 2
66
},
77
"variables": [{
88
"name": "x",
@@ -36,7 +36,9 @@
3636
"set": {
3737
"type": "GreaterThan",
3838
"lower": 1
39-
}
39+
},
40+
"primal_start": 1,
41+
"dual_start": 0
4042
}, {
4143
"name": "x ∈ [0, 1]",
4244
"function": {

Diff for: examples/vector.mof.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"description": "The problem: min{0 | [1 2; 3 4][x, y] + [5, 6] ∈ R+.",
33
"version": {
44
"major": 1,
5-
"minor": 1
5+
"minor": 2
66
},
77
"variables": [{
88
"name": "x"
@@ -45,6 +45,8 @@
4545
"set": {
4646
"type": "Nonnegatives",
4747
"dimension": 2
48-
}
48+
},
49+
"primal_start": [5, 6],
50+
"dual_start": [0, 0]
4951
}]
5052
}

Diff for: python/mof.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44

55

6-
SCHEMA_FILENAME = '../schemas/mof.1.1.schema.json'
6+
SCHEMA_FILENAME = '../schemas/mof.1.2.schema.json'
77

88
def validate(filename):
99
with open(filename, 'r', encoding='utf-8') as io:

0 commit comments

Comments
 (0)