Skip to content

Commit 1d0129a

Browse files
authored
Create MOF v1.3 (#24)
Add support for: * Parameter * Reified * HyperRectangle * HermitianPositiveSemidefiniteConeTriangle
1 parent 01af5b9 commit 1d0129a

File tree

3 files changed

+1133
-1
lines changed

3 files changed

+1133
-1
lines changed

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ Here is a summary of the sets defined by MathOptFormat.
222222
| `"Semicontinuous"` | {0} ∪ [lower, upper] | {"type": "Semicontinuous", "lower": 2.1, "upper": 3.4} |
223223
| `"ZeroOne"` | {0, 1} | {"type": "ZeroOne"} |
224224
| `"Integer"` || {"type": "Integer"} |
225+
| `"Parameter"` | {value} | {"type": "Parameter", "value": 2.1} |
225226

226227
#### Vector Sets
227228

@@ -263,6 +264,9 @@ Here is a summary of the sets defined by MathOptFormat.
263264
| `"Cumulative"` | The set `{(s, d, r, b) in Z^{3n+1}}`, representing the `cumulative` global constraint, where `n == length(s) == length(r) == length(b)` and `dimension = 3n + 1`. `Cumulative` requires that a set of tasks given by start times `s`, durations `d`, and resource requirements `r`, never requires more than the global resource bound `b` at any one time. | {"type": "Cumulative", "dimension": 10} |
264265
| `"Path"` | Given a graph comprised of a set of nodes `1..N` and a set of arcs `1..E` represented by an edge from node `from[i]` to node `to[i]`, `Path` constrains the set `(s, t, ns, es) in (1..N)times(1..E)times{0,1}^Ntimes{0,1}^E`, to form subgraph that is a path from node `s` to node `t`, where node `n` is in the path if `ns[n]` is `1`, and edge `e` is in the path if `es[e]` is `1`. The path must be acyclic, and it must traverse all nodes `n` for which `ns[n]` is `1`, and all edges `e` for which `es[e]` is `1`. | {"type": "Path", "from": [1, 1, 2, 2, 3], "to": [2, 3, 3, 4, 4]} |
265266
| `"Table"` | The set `{x in R^d}` where `d = size(table, 2)`, such that `x` belongs to one row of `table`. That is, there exists some `j` in `1:size(table, 1)`, such that `x[i] = table[j, i]` for all `i=1:size(table, 2)`. | {"type": "Table", "table": [[1, 1, 0], [0, 1, 1]]} |
267+
| `"Reified"` | (z, f(x)) ∈ {R^{dimension}: z iff f(x) ∈ S} | {"type": "Reified", "set": {"type": "GreaterThan", "lower": 0}} |
268+
| `"HyperRectangle"` | x ∈ {R^d: x_i ∈ [lower_i, upper_i]} | {"type": "HyperRectangle", "lower": [0, 0], "upper": [1, 1]} |
269+
| `"HermitianPositiveSemidefiniteConeTriangle"` | The (vectorized) cone of Hermitian positive semidefinite matrices, with non-negative side_dimension rows and columns. | {"type": "HermitianPositiveSemidefiniteConeTriangle", "side_dimension": 3} |
266270

267271
### Nonlinear functions
268272

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.2.schema.json'
6+
SCHEMA_FILENAME = '../schemas/mof.1.3.schema.json'
77

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

0 commit comments

Comments
 (0)