ommx 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ommx-0.0.1/MANIFEST.in ADDED
@@ -0,0 +1 @@
1
+ prune tests
ommx-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,62 @@
1
+ Metadata-Version: 2.1
2
+ Name: ommx
3
+ Version: 0.0.1
4
+ Summary: Open Mathematical prograMming eXchange (OMMX)
5
+ Author-email: "Jij Inc." <info@j-ij.com>
6
+ Project-URL: Homepage, https://github.com/Jij-Inc/ommx
7
+ Project-URL: Issues, https://github.com/Jij-Inc/ommx/issues
8
+ Classifier: Programming Language :: Python :: 3 :: Only
9
+ Classifier: Programming Language :: Python :: 3.8
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Requires-Python: >=3.8
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: protobuf<6.0.0,>=5.26.1
19
+ Provides-Extra: dev
20
+ Requires-Dist: mypy>=0.910; extra == "dev"
21
+ Requires-Dist: mypy-protobuf; extra == "dev"
22
+ Requires-Dist: pyright; extra == "dev"
23
+ Requires-Dist: pytest; extra == "dev"
24
+ Requires-Dist: types-protobuf>=0.1.14; extra == "dev"
25
+
26
+ # OMMX
27
+
28
+ Open Mathematical prograMming eXchange (OMMX) is an open ecosystem that empowers mathematical programming and optimization developers and reserchers.
29
+
30
+ # API Reference
31
+
32
+ - [Protobuf](https://jij-inc.github.io/ommx/protobuf.html)
33
+ - [Rust](https://jij-inc.github.io/ommx/rust/ommx/index.html)
34
+
35
+ # Compatibility
36
+
37
+ This project manages several versions as follows:
38
+
39
+ ## Protocol buffers schema
40
+
41
+ - OMMX defines a protocol buffers schema with version like `v1`, `v2`, etc. `v1` schema has a namesapce `ommx.v1`.
42
+ - Schemas in `ommx.v1` will be compatible after [`1.0.0` release](https://github.com/Jij-Inc/ommx/milestone/3). Note that the schema can be changed incompatible way until this release.
43
+ - `v2` schema with namespace `ommx.v2` will start developing if we need to change the schema in incompatible way after `1.0.0` release. Compatible changes will be made in `v1` schema also after `1.0.0` release. We never create namespaces like `ommx.v1_1`.
44
+
45
+ ## `ommx` Rust crate
46
+ TBW
47
+
48
+ ## `ommx` Python package
49
+ TBW
50
+
51
+ # License
52
+ © 2024 Jij Inc.
53
+
54
+ This project is licensed under either of
55
+
56
+ - Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <https://www.apache.org/licenses/LICENSE-2.0>)
57
+ - MIT license ([LICENSE-MIT](LICENSE-MIT) or <https://opensource.org/licenses/MIT>)
58
+
59
+ at your option.
60
+
61
+ # Contribution
62
+ TBW
ommx-0.0.1/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # OMMX
2
+
3
+ Open Mathematical prograMming eXchange (OMMX) is an open ecosystem that empowers mathematical programming and optimization developers and reserchers.
4
+
5
+ # API Reference
6
+
7
+ - [Protobuf](https://jij-inc.github.io/ommx/protobuf.html)
8
+ - [Rust](https://jij-inc.github.io/ommx/rust/ommx/index.html)
9
+
10
+ # Compatibility
11
+
12
+ This project manages several versions as follows:
13
+
14
+ ## Protocol buffers schema
15
+
16
+ - OMMX defines a protocol buffers schema with version like `v1`, `v2`, etc. `v1` schema has a namesapce `ommx.v1`.
17
+ - Schemas in `ommx.v1` will be compatible after [`1.0.0` release](https://github.com/Jij-Inc/ommx/milestone/3). Note that the schema can be changed incompatible way until this release.
18
+ - `v2` schema with namespace `ommx.v2` will start developing if we need to change the schema in incompatible way after `1.0.0` release. Compatible changes will be made in `v1` schema also after `1.0.0` release. We never create namespaces like `ommx.v1_1`.
19
+
20
+ ## `ommx` Rust crate
21
+ TBW
22
+
23
+ ## `ommx` Python package
24
+ TBW
25
+
26
+ # License
27
+ © 2024 Jij Inc.
28
+
29
+ This project is licensed under either of
30
+
31
+ - Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <https://www.apache.org/licenses/LICENSE-2.0>)
32
+ - MIT license ([LICENSE-MIT](LICENSE-MIT) or <https://opensource.org/licenses/MIT>)
33
+
34
+ at your option.
35
+
36
+ # Contribution
37
+ TBW
File without changes
@@ -0,0 +1,32 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: ommx/v1/constraint.proto
4
+ # Protobuf Python Version: 5.26.1
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+ from ommx.v1 import function_pb2 as ommx_dot_v1_dot_function__pb2
16
+
17
+
18
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18ommx/v1/constraint.proto\x12\x07ommx.v1\x1a\x16ommx/v1/function.proto\"\x83\x03\n\nConstraint\x12\x0e\n\x02id\x18\x01 \x01(\x04R\x02id\x12\x38\n\x08\x65quality\x18\x02 \x01(\x0e\x32\x1c.ommx.v1.Constraint.EqualityR\x08\x65quality\x12-\n\x08\x66unction\x18\x03 \x01(\x0b\x32\x11.ommx.v1.FunctionR\x08\x66unction\x12\x46\n\x0b\x64\x65scription\x18\x04 \x01(\x0b\x32\x1f.ommx.v1.Constraint.DescriptionH\x00R\x0b\x64\x65scription\x88\x01\x01\x1a\x39\n\x0b\x44\x65scription\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n\x06\x66orall\x18\x02 \x03(\x03R\x06\x66orall\"i\n\x08\x45quality\x12\x18\n\x14\x45QUALITY_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x45QUALITY_EQUAL_TO_ZERO\x10\x01\x12\'\n#EQUALITY_LESS_THAN_OR_EQUAL_TO_ZERO\x10\x02\x42\x0e\n\x0c_descriptionB[\n\x0b\x63om.ommx.v1B\x0f\x43onstraintProtoP\x01\xa2\x02\x03OXX\xaa\x02\x07Ommx.V1\xca\x02\x07Ommx\\V1\xe2\x02\x13Ommx\\V1\\GPBMetadata\xea\x02\x08Ommx::V1b\x06proto3')
19
+
20
+ _globals = globals()
21
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
22
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ommx.v1.constraint_pb2', _globals)
23
+ if not _descriptor._USE_C_DESCRIPTORS:
24
+ _globals['DESCRIPTOR']._loaded_options = None
25
+ _globals['DESCRIPTOR']._serialized_options = b'\n\013com.ommx.v1B\017ConstraintProtoP\001\242\002\003OXX\252\002\007Ommx.V1\312\002\007Ommx\\V1\342\002\023Ommx\\V1\\GPBMetadata\352\002\010Ommx::V1'
26
+ _globals['_CONSTRAINT']._serialized_start=62
27
+ _globals['_CONSTRAINT']._serialized_end=449
28
+ _globals['_CONSTRAINT_DESCRIPTION']._serialized_start=269
29
+ _globals['_CONSTRAINT_DESCRIPTION']._serialized_end=326
30
+ _globals['_CONSTRAINT_EQUALITY']._serialized_start=328
31
+ _globals['_CONSTRAINT_EQUALITY']._serialized_end=433
32
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,89 @@
1
+ """
2
+ @generated by mypy-protobuf. Do not edit manually!
3
+ isort:skip_file
4
+ """
5
+
6
+ import builtins
7
+ import collections.abc
8
+ import google.protobuf.descriptor
9
+ import google.protobuf.internal.containers
10
+ import google.protobuf.internal.enum_type_wrapper
11
+ import google.protobuf.message
12
+ import ommx.v1.function_pb2
13
+ import sys
14
+ import typing
15
+
16
+ if sys.version_info >= (3, 10):
17
+ import typing as typing_extensions
18
+ else:
19
+ import typing_extensions
20
+
21
+ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
22
+
23
+ @typing.final
24
+ class Constraint(google.protobuf.message.Message):
25
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
26
+
27
+ class _Equality:
28
+ ValueType = typing.NewType("ValueType", builtins.int)
29
+ V: typing_extensions.TypeAlias = ValueType
30
+
31
+ class _EqualityEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Constraint._Equality.ValueType], builtins.type):
32
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
33
+ EQUALITY_UNSPECIFIED: Constraint._Equality.ValueType # 0
34
+ EQUALITY_EQUAL_TO_ZERO: Constraint._Equality.ValueType # 1
35
+ EQUALITY_LESS_THAN_OR_EQUAL_TO_ZERO: Constraint._Equality.ValueType # 2
36
+
37
+ class Equality(_Equality, metaclass=_EqualityEnumTypeWrapper): ...
38
+ EQUALITY_UNSPECIFIED: Constraint.Equality.ValueType # 0
39
+ EQUALITY_EQUAL_TO_ZERO: Constraint.Equality.ValueType # 1
40
+ EQUALITY_LESS_THAN_OR_EQUAL_TO_ZERO: Constraint.Equality.ValueType # 2
41
+
42
+ @typing.final
43
+ class Description(google.protobuf.message.Message):
44
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
45
+
46
+ NAME_FIELD_NUMBER: builtins.int
47
+ FORALL_FIELD_NUMBER: builtins.int
48
+ name: builtins.str
49
+ @property
50
+ def forall(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
51
+ def __init__(
52
+ self,
53
+ *,
54
+ name: builtins.str = ...,
55
+ forall: collections.abc.Iterable[builtins.int] | None = ...,
56
+ ) -> None: ...
57
+ def ClearField(self, field_name: typing.Literal["forall", b"forall", "name", b"name"]) -> None: ...
58
+
59
+ ID_FIELD_NUMBER: builtins.int
60
+ EQUALITY_FIELD_NUMBER: builtins.int
61
+ FUNCTION_FIELD_NUMBER: builtins.int
62
+ DESCRIPTION_FIELD_NUMBER: builtins.int
63
+ id: builtins.int
64
+ """Constraint ID
65
+
66
+ - Constraint IDs are managed separately from decision variable IDs.
67
+ We can use the same ID for both. For example, we have a decision variable `x` with decision variable ID `1``
68
+ and constraint `x == 0` with constraint ID `1`.
69
+ - IDs are not required to be sequential.
70
+ - IDs must be unique with other types of constraints.
71
+ """
72
+ equality: global___Constraint.Equality.ValueType
73
+ @property
74
+ def function(self) -> ommx.v1.function_pb2.Function: ...
75
+ @property
76
+ def description(self) -> global___Constraint.Description: ...
77
+ def __init__(
78
+ self,
79
+ *,
80
+ id: builtins.int = ...,
81
+ equality: global___Constraint.Equality.ValueType = ...,
82
+ function: ommx.v1.function_pb2.Function | None = ...,
83
+ description: global___Constraint.Description | None = ...,
84
+ ) -> None: ...
85
+ def HasField(self, field_name: typing.Literal["_description", b"_description", "description", b"description", "function", b"function"]) -> builtins.bool: ...
86
+ def ClearField(self, field_name: typing.Literal["_description", b"_description", "description", b"description", "equality", b"equality", "function", b"function", "id", b"id"]) -> None: ...
87
+ def WhichOneof(self, oneof_group: typing.Literal["_description", b"_description"]) -> typing.Literal["description"] | None: ...
88
+
89
+ global___Constraint = Constraint
@@ -0,0 +1,33 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: ommx/v1/decision_variables.proto
4
+ # Protobuf Python Version: 5.26.1
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+
16
+
17
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n ommx/v1/decision_variables.proto\x12\x07ommx.v1\"3\n\x05\x42ound\x12\x14\n\x05lower\x18\x01 \x01(\x01R\x05lower\x12\x14\n\x05upper\x18\x02 \x01(\x01R\x05upper\"\xb4\x03\n\x10\x44\x65\x63isionVariable\x12\x0e\n\x02id\x18\x01 \x01(\x04R\x02id\x12\x32\n\x04kind\x18\x02 \x01(\x0e\x32\x1e.ommx.v1.DecisionVariable.KindR\x04kind\x12)\n\x05\x62ound\x18\x03 \x01(\x0b\x32\x0e.ommx.v1.BoundH\x00R\x05\x62ound\x88\x01\x01\x12L\n\x0b\x64\x65scription\x18\x04 \x01(\x0b\x32%.ommx.v1.DecisionVariable.DescriptionH\x01R\x0b\x64\x65scription\x88\x01\x01\x1a\x41\n\x0b\x44\x65scription\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1e\n\nsubscripts\x18\x02 \x03(\x04R\nsubscripts\"\x85\x01\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x0f\n\x0bKIND_BINARY\x10\x01\x12\x10\n\x0cKIND_INTEGER\x10\x02\x12\x13\n\x0fKIND_CONTINUOUS\x10\x03\x12\x15\n\x11KIND_SEMI_INTEGER\x10\x04\x12\x18\n\x14KIND_SEMI_CONTINUOUS\x10\x05\x42\x08\n\x06_boundB\x0e\n\x0c_descriptionBb\n\x0b\x63om.ommx.v1B\x16\x44\x65\x63isionVariablesProtoP\x01\xa2\x02\x03OXX\xaa\x02\x07Ommx.V1\xca\x02\x07Ommx\\V1\xe2\x02\x13Ommx\\V1\\GPBMetadata\xea\x02\x08Ommx::V1b\x06proto3')
18
+
19
+ _globals = globals()
20
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
21
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ommx.v1.decision_variables_pb2', _globals)
22
+ if not _descriptor._USE_C_DESCRIPTORS:
23
+ _globals['DESCRIPTOR']._loaded_options = None
24
+ _globals['DESCRIPTOR']._serialized_options = b'\n\013com.ommx.v1B\026DecisionVariablesProtoP\001\242\002\003OXX\252\002\007Ommx.V1\312\002\007Ommx\\V1\342\002\023Ommx\\V1\\GPBMetadata\352\002\010Ommx::V1'
25
+ _globals['_BOUND']._serialized_start=45
26
+ _globals['_BOUND']._serialized_end=96
27
+ _globals['_DECISIONVARIABLE']._serialized_start=99
28
+ _globals['_DECISIONVARIABLE']._serialized_end=535
29
+ _globals['_DECISIONVARIABLE_DESCRIPTION']._serialized_start=308
30
+ _globals['_DECISIONVARIABLE_DESCRIPTION']._serialized_end=373
31
+ _globals['_DECISIONVARIABLE_KIND']._serialized_start=376
32
+ _globals['_DECISIONVARIABLE_KIND']._serialized_end=509
33
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,140 @@
1
+ """
2
+ @generated by mypy-protobuf. Do not edit manually!
3
+ isort:skip_file
4
+ """
5
+
6
+ import builtins
7
+ import collections.abc
8
+ import google.protobuf.descriptor
9
+ import google.protobuf.internal.containers
10
+ import google.protobuf.internal.enum_type_wrapper
11
+ import google.protobuf.message
12
+ import sys
13
+ import typing
14
+
15
+ if sys.version_info >= (3, 10):
16
+ import typing as typing_extensions
17
+ else:
18
+ import typing_extensions
19
+
20
+ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
21
+
22
+ @typing.final
23
+ class Bound(google.protobuf.message.Message):
24
+ """Upper and lower bound of the decision variable."""
25
+
26
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
27
+
28
+ LOWER_FIELD_NUMBER: builtins.int
29
+ UPPER_FIELD_NUMBER: builtins.int
30
+ lower: builtins.float
31
+ """Lower bound of the decision variable."""
32
+ upper: builtins.float
33
+ """Upper bound of the decision variable."""
34
+ def __init__(
35
+ self,
36
+ *,
37
+ lower: builtins.float = ...,
38
+ upper: builtins.float = ...,
39
+ ) -> None: ...
40
+ def ClearField(self, field_name: typing.Literal["lower", b"lower", "upper", b"upper"]) -> None: ...
41
+
42
+ global___Bound = Bound
43
+
44
+ @typing.final
45
+ class DecisionVariable(google.protobuf.message.Message):
46
+ """Decison variable which mathematical programming solver will optimize.
47
+ It must have its kind, i.e. binary, integer, real or others and unique identifier of 64-bit integer.
48
+ It may have its name and subscripts which are used to identify in modeling tools.
49
+ """
50
+
51
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
52
+
53
+ class _Kind:
54
+ ValueType = typing.NewType("ValueType", builtins.int)
55
+ V: typing_extensions.TypeAlias = ValueType
56
+
57
+ class _KindEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DecisionVariable._Kind.ValueType], builtins.type):
58
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
59
+ KIND_UNSPECIFIED: DecisionVariable._Kind.ValueType # 0
60
+ KIND_BINARY: DecisionVariable._Kind.ValueType # 1
61
+ KIND_INTEGER: DecisionVariable._Kind.ValueType # 2
62
+ KIND_CONTINUOUS: DecisionVariable._Kind.ValueType # 3
63
+ KIND_SEMI_INTEGER: DecisionVariable._Kind.ValueType # 4
64
+ """Semi-integer decision variable is a decision variable that can take only integer values in the given range or zero."""
65
+ KIND_SEMI_CONTINUOUS: DecisionVariable._Kind.ValueType # 5
66
+ """Semi-continuous decision variable is a decision variable that can take only continuous values in the given range or zero."""
67
+
68
+ class Kind(_Kind, metaclass=_KindEnumTypeWrapper):
69
+ """Kind of the decision variable"""
70
+
71
+ KIND_UNSPECIFIED: DecisionVariable.Kind.ValueType # 0
72
+ KIND_BINARY: DecisionVariable.Kind.ValueType # 1
73
+ KIND_INTEGER: DecisionVariable.Kind.ValueType # 2
74
+ KIND_CONTINUOUS: DecisionVariable.Kind.ValueType # 3
75
+ KIND_SEMI_INTEGER: DecisionVariable.Kind.ValueType # 4
76
+ """Semi-integer decision variable is a decision variable that can take only integer values in the given range or zero."""
77
+ KIND_SEMI_CONTINUOUS: DecisionVariable.Kind.ValueType # 5
78
+ """Semi-continuous decision variable is a decision variable that can take only continuous values in the given range or zero."""
79
+
80
+ @typing.final
81
+ class Description(google.protobuf.message.Message):
82
+ """Human readable description of the decision variable."""
83
+
84
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
85
+
86
+ NAME_FIELD_NUMBER: builtins.int
87
+ SUBSCRIPTS_FIELD_NUMBER: builtins.int
88
+ name: builtins.str
89
+ """Name of the decision variable."""
90
+ @property
91
+ def subscripts(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
92
+ """The subscripts of a deicision variable which is defined as multi-dimensional array.
93
+ Empty list means that the decision variable is scalar
94
+ """
95
+
96
+ def __init__(
97
+ self,
98
+ *,
99
+ name: builtins.str = ...,
100
+ subscripts: collections.abc.Iterable[builtins.int] | None = ...,
101
+ ) -> None: ...
102
+ def ClearField(self, field_name: typing.Literal["name", b"name", "subscripts", b"subscripts"]) -> None: ...
103
+
104
+ ID_FIELD_NUMBER: builtins.int
105
+ KIND_FIELD_NUMBER: builtins.int
106
+ BOUND_FIELD_NUMBER: builtins.int
107
+ DESCRIPTION_FIELD_NUMBER: builtins.int
108
+ id: builtins.int
109
+ """Decision variable ID.
110
+
111
+ - IDs are not required to be sequential.
112
+ """
113
+ kind: global___DecisionVariable.Kind.ValueType
114
+ """Kind of the decision variable"""
115
+ @property
116
+ def bound(self) -> global___Bound:
117
+ """Bound of the decision variable
118
+ If the bound is not specified, the decision variable is considered as unbounded.
119
+ """
120
+
121
+ @property
122
+ def description(self) -> global___DecisionVariable.Description:
123
+ """This is optional since the name and subscripts does not exist in general mathematical programming situation"""
124
+
125
+ def __init__(
126
+ self,
127
+ *,
128
+ id: builtins.int = ...,
129
+ kind: global___DecisionVariable.Kind.ValueType = ...,
130
+ bound: global___Bound | None = ...,
131
+ description: global___DecisionVariable.Description | None = ...,
132
+ ) -> None: ...
133
+ def HasField(self, field_name: typing.Literal["_bound", b"_bound", "_description", b"_description", "bound", b"bound", "description", b"description"]) -> builtins.bool: ...
134
+ def ClearField(self, field_name: typing.Literal["_bound", b"_bound", "_description", b"_description", "bound", b"bound", "description", b"description", "id", b"id", "kind", b"kind"]) -> None: ...
135
+ @typing.overload
136
+ def WhichOneof(self, oneof_group: typing.Literal["_bound", b"_bound"]) -> typing.Literal["bound"] | None: ...
137
+ @typing.overload
138
+ def WhichOneof(self, oneof_group: typing.Literal["_description", b"_description"]) -> typing.Literal["description"] | None: ...
139
+
140
+ global___DecisionVariable = DecisionVariable
@@ -0,0 +1,30 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: ommx/v1/function.proto
4
+ # Protobuf Python Version: 5.26.1
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+ from ommx.v1 import linear_pb2 as ommx_dot_v1_dot_linear__pb2
16
+ from ommx.v1 import polynomial_pb2 as ommx_dot_v1_dot_polynomial__pb2
17
+ from ommx.v1 import quadratic_pb2 as ommx_dot_v1_dot_quadratic__pb2
18
+
19
+
20
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16ommx/v1/function.proto\x12\x07ommx.v1\x1a\x14ommx/v1/linear.proto\x1a\x18ommx/v1/polynomial.proto\x1a\x17ommx/v1/quadratic.proto\"\xca\x01\n\x08\x46unction\x12\x1c\n\x08\x63onstant\x18\x01 \x01(\x01H\x00R\x08\x63onstant\x12)\n\x06linear\x18\x02 \x01(\x0b\x32\x0f.ommx.v1.LinearH\x00R\x06linear\x12\x32\n\tquadratic\x18\x03 \x01(\x0b\x32\x12.ommx.v1.QuadraticH\x00R\tquadratic\x12\x35\n\npolynomial\x18\x04 \x01(\x0b\x32\x13.ommx.v1.PolynomialH\x00R\npolynomialB\n\n\x08\x66unctionBY\n\x0b\x63om.ommx.v1B\rFunctionProtoP\x01\xa2\x02\x03OXX\xaa\x02\x07Ommx.V1\xca\x02\x07Ommx\\V1\xe2\x02\x13Ommx\\V1\\GPBMetadata\xea\x02\x08Ommx::V1b\x06proto3')
21
+
22
+ _globals = globals()
23
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
24
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ommx.v1.function_pb2', _globals)
25
+ if not _descriptor._USE_C_DESCRIPTORS:
26
+ _globals['DESCRIPTOR']._loaded_options = None
27
+ _globals['DESCRIPTOR']._serialized_options = b'\n\013com.ommx.v1B\rFunctionProtoP\001\242\002\003OXX\252\002\007Ommx.V1\312\002\007Ommx\\V1\342\002\023Ommx\\V1\\GPBMetadata\352\002\010Ommx::V1'
28
+ _globals['_FUNCTION']._serialized_start=109
29
+ _globals['_FUNCTION']._serialized_end=311
30
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,52 @@
1
+ """
2
+ @generated by mypy-protobuf. Do not edit manually!
3
+ isort:skip_file
4
+ """
5
+
6
+ import builtins
7
+ import google.protobuf.descriptor
8
+ import google.protobuf.message
9
+ import ommx.v1.linear_pb2
10
+ import ommx.v1.polynomial_pb2
11
+ import ommx.v1.quadratic_pb2
12
+ import typing
13
+
14
+ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
15
+
16
+ @typing.final
17
+ class Function(google.protobuf.message.Message):
18
+ """Real-valued multivariate function used for objective function and constraints."""
19
+
20
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
21
+
22
+ CONSTANT_FIELD_NUMBER: builtins.int
23
+ LINEAR_FIELD_NUMBER: builtins.int
24
+ QUADRATIC_FIELD_NUMBER: builtins.int
25
+ POLYNOMIAL_FIELD_NUMBER: builtins.int
26
+ constant: builtins.float
27
+ """Constant function like `f(x_1, x_2) = 2`"""
28
+ @property
29
+ def linear(self) -> ommx.v1.linear_pb2.Linear:
30
+ """Linear function like `f(x_1, x_2) = 2 x_1 + 3 x_2`"""
31
+
32
+ @property
33
+ def quadratic(self) -> ommx.v1.quadratic_pb2.Quadratic:
34
+ """Quadratic function like `f(x_1, x_2) = 4 x_1 x_2 + 5 x_2`"""
35
+
36
+ @property
37
+ def polynomial(self) -> ommx.v1.polynomial_pb2.Polynomial:
38
+ """Polynomial like `f(x_1, x_2) = 4 x_1^2 + 5 x_2^3 + 6 x_1 x_2^2 + 7 x_2^2 + 8 x_1 x_2 + 9 x_1 + 10 x_2 + 11`"""
39
+
40
+ def __init__(
41
+ self,
42
+ *,
43
+ constant: builtins.float = ...,
44
+ linear: ommx.v1.linear_pb2.Linear | None = ...,
45
+ quadratic: ommx.v1.quadratic_pb2.Quadratic | None = ...,
46
+ polynomial: ommx.v1.polynomial_pb2.Polynomial | None = ...,
47
+ ) -> None: ...
48
+ def HasField(self, field_name: typing.Literal["constant", b"constant", "function", b"function", "linear", b"linear", "polynomial", b"polynomial", "quadratic", b"quadratic"]) -> builtins.bool: ...
49
+ def ClearField(self, field_name: typing.Literal["constant", b"constant", "function", b"function", "linear", b"linear", "polynomial", b"polynomial", "quadratic", b"quadratic"]) -> None: ...
50
+ def WhichOneof(self, oneof_group: typing.Literal["function", b"function"]) -> typing.Literal["constant", "linear", "quadratic", "polynomial"] | None: ...
51
+
52
+ global___Function = Function
@@ -0,0 +1,32 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: ommx/v1/instance.proto
4
+ # Protobuf Python Version: 5.26.1
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+ from ommx.v1 import constraint_pb2 as ommx_dot_v1_dot_constraint__pb2
16
+ from ommx.v1 import decision_variables_pb2 as ommx_dot_v1_dot_decision__variables__pb2
17
+ from ommx.v1 import function_pb2 as ommx_dot_v1_dot_function__pb2
18
+
19
+
20
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16ommx/v1/instance.proto\x12\x07ommx.v1\x1a\x18ommx/v1/constraint.proto\x1a ommx/v1/decision_variables.proto\x1a\x16ommx/v1/function.proto\"\xb3\x03\n\x08Instance\x12?\n\x0b\x64\x65scription\x18\x01 \x01(\x0b\x32\x1d.ommx.v1.Instance.DescriptionR\x0b\x64\x65scription\x12H\n\x12\x64\x65\x63ision_variables\x18\x02 \x03(\x0b\x32\x19.ommx.v1.DecisionVariableR\x11\x64\x65\x63isionVariables\x12/\n\tobjective\x18\x03 \x01(\x0b\x32\x11.ommx.v1.FunctionR\tobjective\x12\x35\n\x0b\x63onstraints\x18\x04 \x03(\x0b\x32\x13.ommx.v1.ConstraintR\x0b\x63onstraints\x1a\xb3\x01\n\x0b\x44\x65scription\x12\x17\n\x04name\x18\x01 \x01(\tH\x00R\x04name\x88\x01\x01\x12%\n\x0b\x64\x65scription\x18\x02 \x01(\tH\x01R\x0b\x64\x65scription\x88\x01\x01\x12\x18\n\x07\x61uthors\x18\x03 \x03(\tR\x07\x61uthors\x12\"\n\ncreated_by\x18\x04 \x01(\tH\x02R\tcreatedBy\x88\x01\x01\x42\x07\n\x05_nameB\x0e\n\x0c_descriptionB\r\n\x0b_created_byBY\n\x0b\x63om.ommx.v1B\rInstanceProtoP\x01\xa2\x02\x03OXX\xaa\x02\x07Ommx.V1\xca\x02\x07Ommx\\V1\xe2\x02\x13Ommx\\V1\\GPBMetadata\xea\x02\x08Ommx::V1b\x06proto3')
21
+
22
+ _globals = globals()
23
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
24
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ommx.v1.instance_pb2', _globals)
25
+ if not _descriptor._USE_C_DESCRIPTORS:
26
+ _globals['DESCRIPTOR']._loaded_options = None
27
+ _globals['DESCRIPTOR']._serialized_options = b'\n\013com.ommx.v1B\rInstanceProtoP\001\242\002\003OXX\252\002\007Ommx.V1\312\002\007Ommx\\V1\342\002\023Ommx\\V1\\GPBMetadata\352\002\010Ommx::V1'
28
+ _globals['_INSTANCE']._serialized_start=120
29
+ _globals['_INSTANCE']._serialized_end=555
30
+ _globals['_INSTANCE_DESCRIPTION']._serialized_start=376
31
+ _globals['_INSTANCE_DESCRIPTION']._serialized_end=555
32
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,84 @@
1
+ """
2
+ @generated by mypy-protobuf. Do not edit manually!
3
+ isort:skip_file
4
+ """
5
+
6
+ import builtins
7
+ import collections.abc
8
+ import google.protobuf.descriptor
9
+ import google.protobuf.internal.containers
10
+ import google.protobuf.message
11
+ import ommx.v1.constraint_pb2
12
+ import ommx.v1.decision_variables_pb2
13
+ import ommx.v1.function_pb2
14
+ import typing
15
+
16
+ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
17
+
18
+ @typing.final
19
+ class Instance(google.protobuf.message.Message):
20
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
21
+
22
+ @typing.final
23
+ class Description(google.protobuf.message.Message):
24
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
25
+
26
+ NAME_FIELD_NUMBER: builtins.int
27
+ DESCRIPTION_FIELD_NUMBER: builtins.int
28
+ AUTHORS_FIELD_NUMBER: builtins.int
29
+ CREATED_BY_FIELD_NUMBER: builtins.int
30
+ name: builtins.str
31
+ description: builtins.str
32
+ created_by: builtins.str
33
+ """The application or library name that created this message."""
34
+ @property
35
+ def authors(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
36
+ def __init__(
37
+ self,
38
+ *,
39
+ name: builtins.str | None = ...,
40
+ description: builtins.str | None = ...,
41
+ authors: collections.abc.Iterable[builtins.str] | None = ...,
42
+ created_by: builtins.str | None = ...,
43
+ ) -> None: ...
44
+ def HasField(self, field_name: typing.Literal["_created_by", b"_created_by", "_description", b"_description", "_name", b"_name", "created_by", b"created_by", "description", b"description", "name", b"name"]) -> builtins.bool: ...
45
+ def ClearField(self, field_name: typing.Literal["_created_by", b"_created_by", "_description", b"_description", "_name", b"_name", "authors", b"authors", "created_by", b"created_by", "description", b"description", "name", b"name"]) -> None: ...
46
+ @typing.overload
47
+ def WhichOneof(self, oneof_group: typing.Literal["_created_by", b"_created_by"]) -> typing.Literal["created_by"] | None: ...
48
+ @typing.overload
49
+ def WhichOneof(self, oneof_group: typing.Literal["_description", b"_description"]) -> typing.Literal["description"] | None: ...
50
+ @typing.overload
51
+ def WhichOneof(self, oneof_group: typing.Literal["_name", b"_name"]) -> typing.Literal["name"] | None: ...
52
+
53
+ DESCRIPTION_FIELD_NUMBER: builtins.int
54
+ DECISION_VARIABLES_FIELD_NUMBER: builtins.int
55
+ OBJECTIVE_FIELD_NUMBER: builtins.int
56
+ CONSTRAINTS_FIELD_NUMBER: builtins.int
57
+ @property
58
+ def description(self) -> global___Instance.Description: ...
59
+ @property
60
+ def decision_variables(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ommx.v1.decision_variables_pb2.DecisionVariable]:
61
+ """Decision variables used in this instance
62
+
63
+ - This must constain every decision variables used in the objective and constraints.
64
+ - This can contains a decision variable that is not used in the objective or constraints.
65
+ """
66
+
67
+ @property
68
+ def objective(self) -> ommx.v1.function_pb2.Function: ...
69
+ @property
70
+ def constraints(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ommx.v1.constraint_pb2.Constraint]:
71
+ """Constraints of the optimization problem"""
72
+
73
+ def __init__(
74
+ self,
75
+ *,
76
+ description: global___Instance.Description | None = ...,
77
+ decision_variables: collections.abc.Iterable[ommx.v1.decision_variables_pb2.DecisionVariable] | None = ...,
78
+ objective: ommx.v1.function_pb2.Function | None = ...,
79
+ constraints: collections.abc.Iterable[ommx.v1.constraint_pb2.Constraint] | None = ...,
80
+ ) -> None: ...
81
+ def HasField(self, field_name: typing.Literal["description", b"description", "objective", b"objective"]) -> builtins.bool: ...
82
+ def ClearField(self, field_name: typing.Literal["constraints", b"constraints", "decision_variables", b"decision_variables", "description", b"description", "objective", b"objective"]) -> None: ...
83
+
84
+ global___Instance = Instance
@@ -0,0 +1,29 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: ommx/v1/linear.proto
4
+ # Protobuf Python Version: 5.26.1
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+
16
+
17
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14ommx/v1/linear.proto\x12\x07ommx.v1\"\x8a\x01\n\x06Linear\x12*\n\x05terms\x18\x01 \x03(\x0b\x32\x14.ommx.v1.Linear.TermR\x05terms\x12\x1a\n\x08\x63onstant\x18\x02 \x01(\x01R\x08\x63onstant\x1a\x38\n\x04Term\x12\x0e\n\x02id\x18\x01 \x01(\x04R\x02id\x12 \n\x0b\x63oefficient\x18\x02 \x01(\x01R\x0b\x63oefficientBW\n\x0b\x63om.ommx.v1B\x0bLinearProtoP\x01\xa2\x02\x03OXX\xaa\x02\x07Ommx.V1\xca\x02\x07Ommx\\V1\xe2\x02\x13Ommx\\V1\\GPBMetadata\xea\x02\x08Ommx::V1b\x06proto3')
18
+
19
+ _globals = globals()
20
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
21
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ommx.v1.linear_pb2', _globals)
22
+ if not _descriptor._USE_C_DESCRIPTORS:
23
+ _globals['DESCRIPTOR']._loaded_options = None
24
+ _globals['DESCRIPTOR']._serialized_options = b'\n\013com.ommx.v1B\013LinearProtoP\001\242\002\003OXX\252\002\007Ommx.V1\312\002\007Ommx\\V1\342\002\023Ommx\\V1\\GPBMetadata\352\002\010Ommx::V1'
25
+ _globals['_LINEAR']._serialized_start=34
26
+ _globals['_LINEAR']._serialized_end=172
27
+ _globals['_LINEAR_TERM']._serialized_start=116
28
+ _globals['_LINEAR_TERM']._serialized_end=172
29
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,48 @@
1
+ """
2
+ @generated by mypy-protobuf. Do not edit manually!
3
+ isort:skip_file
4
+ """
5
+
6
+ import builtins
7
+ import collections.abc
8
+ import google.protobuf.descriptor
9
+ import google.protobuf.internal.containers
10
+ import google.protobuf.message
11
+ import typing
12
+
13
+ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
14
+
15
+ @typing.final
16
+ class Linear(google.protobuf.message.Message):
17
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
18
+
19
+ @typing.final
20
+ class Term(google.protobuf.message.Message):
21
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
22
+
23
+ ID_FIELD_NUMBER: builtins.int
24
+ COEFFICIENT_FIELD_NUMBER: builtins.int
25
+ id: builtins.int
26
+ coefficient: builtins.float
27
+ def __init__(
28
+ self,
29
+ *,
30
+ id: builtins.int = ...,
31
+ coefficient: builtins.float = ...,
32
+ ) -> None: ...
33
+ def ClearField(self, field_name: typing.Literal["coefficient", b"coefficient", "id", b"id"]) -> None: ...
34
+
35
+ TERMS_FIELD_NUMBER: builtins.int
36
+ CONSTANT_FIELD_NUMBER: builtins.int
37
+ constant: builtins.float
38
+ @property
39
+ def terms(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Linear.Term]: ...
40
+ def __init__(
41
+ self,
42
+ *,
43
+ terms: collections.abc.Iterable[global___Linear.Term] | None = ...,
44
+ constant: builtins.float = ...,
45
+ ) -> None: ...
46
+ def ClearField(self, field_name: typing.Literal["constant", b"constant", "terms", b"terms"]) -> None: ...
47
+
48
+ global___Linear = Linear
@@ -0,0 +1,29 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: ommx/v1/polynomial.proto
4
+ # Protobuf Python Version: 5.26.1
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+
16
+
17
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18ommx/v1/polynomial.proto\x12\x07ommx.v1\">\n\x08Monomial\x12\x10\n\x03ids\x18\x01 \x03(\x04R\x03ids\x12 \n\x0b\x63oefficient\x18\x02 \x01(\x01R\x0b\x63oefficient\"5\n\nPolynomial\x12\'\n\x05terms\x18\x01 \x03(\x0b\x32\x11.ommx.v1.MonomialR\x05termsB[\n\x0b\x63om.ommx.v1B\x0fPolynomialProtoP\x01\xa2\x02\x03OXX\xaa\x02\x07Ommx.V1\xca\x02\x07Ommx\\V1\xe2\x02\x13Ommx\\V1\\GPBMetadata\xea\x02\x08Ommx::V1b\x06proto3')
18
+
19
+ _globals = globals()
20
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
21
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ommx.v1.polynomial_pb2', _globals)
22
+ if not _descriptor._USE_C_DESCRIPTORS:
23
+ _globals['DESCRIPTOR']._loaded_options = None
24
+ _globals['DESCRIPTOR']._serialized_options = b'\n\013com.ommx.v1B\017PolynomialProtoP\001\242\002\003OXX\252\002\007Ommx.V1\312\002\007Ommx\\V1\342\002\023Ommx\\V1\\GPBMetadata\352\002\010Ommx::V1'
25
+ _globals['_MONOMIAL']._serialized_start=37
26
+ _globals['_MONOMIAL']._serialized_end=99
27
+ _globals['_POLYNOMIAL']._serialized_start=101
28
+ _globals['_POLYNOMIAL']._serialized_end=154
29
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,52 @@
1
+ """
2
+ @generated by mypy-protobuf. Do not edit manually!
3
+ isort:skip_file
4
+ """
5
+
6
+ import builtins
7
+ import collections.abc
8
+ import google.protobuf.descriptor
9
+ import google.protobuf.internal.containers
10
+ import google.protobuf.message
11
+ import typing
12
+
13
+ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
14
+
15
+ @typing.final
16
+ class Monomial(google.protobuf.message.Message):
17
+ """A monomial in a multivariate polynomial."""
18
+
19
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
20
+
21
+ IDS_FIELD_NUMBER: builtins.int
22
+ COEFFICIENT_FIELD_NUMBER: builtins.int
23
+ coefficient: builtins.float
24
+ @property
25
+ def ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
26
+ def __init__(
27
+ self,
28
+ *,
29
+ ids: collections.abc.Iterable[builtins.int] | None = ...,
30
+ coefficient: builtins.float = ...,
31
+ ) -> None: ...
32
+ def ClearField(self, field_name: typing.Literal["coefficient", b"coefficient", "ids", b"ids"]) -> None: ...
33
+
34
+ global___Monomial = Monomial
35
+
36
+ @typing.final
37
+ class Polynomial(google.protobuf.message.Message):
38
+ """Multi­variate polynomial"""
39
+
40
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
41
+
42
+ TERMS_FIELD_NUMBER: builtins.int
43
+ @property
44
+ def terms(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Monomial]: ...
45
+ def __init__(
46
+ self,
47
+ *,
48
+ terms: collections.abc.Iterable[global___Monomial] | None = ...,
49
+ ) -> None: ...
50
+ def ClearField(self, field_name: typing.Literal["terms", b"terms"]) -> None: ...
51
+
52
+ global___Polynomial = Polynomial
@@ -0,0 +1,28 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: ommx/v1/quadratic.proto
4
+ # Protobuf Python Version: 5.26.1
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+ from ommx.v1 import linear_pb2 as ommx_dot_v1_dot_linear__pb2
16
+
17
+
18
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17ommx/v1/quadratic.proto\x12\x07ommx.v1\x1a\x14ommx/v1/linear.proto\"\x8a\x01\n\tQuadratic\x12\x12\n\x04rows\x18\x01 \x03(\x04R\x04rows\x12\x18\n\x07\x63olumns\x18\x02 \x03(\x04R\x07\x63olumns\x12\x16\n\x06values\x18\x03 \x03(\x01R\x06values\x12,\n\x06linear\x18\x04 \x01(\x0b\x32\x0f.ommx.v1.LinearH\x00R\x06linear\x88\x01\x01\x42\t\n\x07_linearBZ\n\x0b\x63om.ommx.v1B\x0eQuadraticProtoP\x01\xa2\x02\x03OXX\xaa\x02\x07Ommx.V1\xca\x02\x07Ommx\\V1\xe2\x02\x13Ommx\\V1\\GPBMetadata\xea\x02\x08Ommx::V1b\x06proto3')
19
+
20
+ _globals = globals()
21
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
22
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ommx.v1.quadratic_pb2', _globals)
23
+ if not _descriptor._USE_C_DESCRIPTORS:
24
+ _globals['DESCRIPTOR']._loaded_options = None
25
+ _globals['DESCRIPTOR']._serialized_options = b'\n\013com.ommx.v1B\016QuadraticProtoP\001\242\002\003OXX\252\002\007Ommx.V1\312\002\007Ommx\\V1\342\002\023Ommx\\V1\\GPBMetadata\352\002\010Ommx::V1'
26
+ _globals['_QUADRATIC']._serialized_start=59
27
+ _globals['_QUADRATIC']._serialized_end=197
28
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,50 @@
1
+ """
2
+ @generated by mypy-protobuf. Do not edit manually!
3
+ isort:skip_file
4
+ """
5
+
6
+ import builtins
7
+ import collections.abc
8
+ import google.protobuf.descriptor
9
+ import google.protobuf.internal.containers
10
+ import google.protobuf.message
11
+ import ommx.v1.linear_pb2
12
+ import typing
13
+
14
+ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
15
+
16
+ @typing.final
17
+ class Quadratic(google.protobuf.message.Message):
18
+ """Quadratic function as a COO-style sparse matrix and linear sparse vector.
19
+
20
+ COOrdinate format, also known as triplet format, is a way to represent sparse matrices as a list of non-zero elements.
21
+ It consists of three lists: the row indices, the column indices, and the values of the non-zero elements.
22
+ """
23
+
24
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
25
+
26
+ ROWS_FIELD_NUMBER: builtins.int
27
+ COLUMNS_FIELD_NUMBER: builtins.int
28
+ VALUES_FIELD_NUMBER: builtins.int
29
+ LINEAR_FIELD_NUMBER: builtins.int
30
+ @property
31
+ def rows(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
32
+ @property
33
+ def columns(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
34
+ @property
35
+ def values(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.float]: ...
36
+ @property
37
+ def linear(self) -> ommx.v1.linear_pb2.Linear: ...
38
+ def __init__(
39
+ self,
40
+ *,
41
+ rows: collections.abc.Iterable[builtins.int] | None = ...,
42
+ columns: collections.abc.Iterable[builtins.int] | None = ...,
43
+ values: collections.abc.Iterable[builtins.float] | None = ...,
44
+ linear: ommx.v1.linear_pb2.Linear | None = ...,
45
+ ) -> None: ...
46
+ def HasField(self, field_name: typing.Literal["_linear", b"_linear", "linear", b"linear"]) -> builtins.bool: ...
47
+ def ClearField(self, field_name: typing.Literal["_linear", b"_linear", "columns", b"columns", "linear", b"linear", "rows", b"rows", "values", b"values"]) -> None: ...
48
+ def WhichOneof(self, oneof_group: typing.Literal["_linear", b"_linear"]) -> typing.Literal["linear"] | None: ...
49
+
50
+ global___Quadratic = Quadratic
@@ -0,0 +1,33 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: ommx/v1/solution.proto
4
+ # Protobuf Python Version: 5.26.1
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+
16
+
17
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16ommx/v1/solution.proto\x12\x07ommx.v1\"\x80\x01\n\x08Solution\x12\x38\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1e.ommx.v1.Solution.EntriesEntryR\x07\x65ntries\x1a:\n\x0c\x45ntriesEntry\x12\x10\n\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x01R\x05value:\x02\x38\x01\"?\n\x0cSolutionList\x12/\n\tsolutions\x18\x01 \x03(\x0b\x32\x11.ommx.v1.SolutionR\tsolutionsBY\n\x0b\x63om.ommx.v1B\rSolutionProtoP\x01\xa2\x02\x03OXX\xaa\x02\x07Ommx.V1\xca\x02\x07Ommx\\V1\xe2\x02\x13Ommx\\V1\\GPBMetadata\xea\x02\x08Ommx::V1b\x06proto3')
18
+
19
+ _globals = globals()
20
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
21
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ommx.v1.solution_pb2', _globals)
22
+ if not _descriptor._USE_C_DESCRIPTORS:
23
+ _globals['DESCRIPTOR']._loaded_options = None
24
+ _globals['DESCRIPTOR']._serialized_options = b'\n\013com.ommx.v1B\rSolutionProtoP\001\242\002\003OXX\252\002\007Ommx.V1\312\002\007Ommx\\V1\342\002\023Ommx\\V1\\GPBMetadata\352\002\010Ommx::V1'
25
+ _globals['_SOLUTION_ENTRIESENTRY']._loaded_options = None
26
+ _globals['_SOLUTION_ENTRIESENTRY']._serialized_options = b'8\001'
27
+ _globals['_SOLUTION']._serialized_start=36
28
+ _globals['_SOLUTION']._serialized_end=164
29
+ _globals['_SOLUTION_ENTRIESENTRY']._serialized_start=106
30
+ _globals['_SOLUTION_ENTRIESENTRY']._serialized_end=164
31
+ _globals['_SOLUTIONLIST']._serialized_start=166
32
+ _globals['_SOLUTIONLIST']._serialized_end=229
33
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,67 @@
1
+ """
2
+ @generated by mypy-protobuf. Do not edit manually!
3
+ isort:skip_file
4
+ """
5
+
6
+ import builtins
7
+ import collections.abc
8
+ import google.protobuf.descriptor
9
+ import google.protobuf.internal.containers
10
+ import google.protobuf.message
11
+ import typing
12
+
13
+ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
14
+
15
+ @typing.final
16
+ class Solution(google.protobuf.message.Message):
17
+ """A solution obtained by the solver."""
18
+
19
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
20
+
21
+ @typing.final
22
+ class EntriesEntry(google.protobuf.message.Message):
23
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
24
+
25
+ KEY_FIELD_NUMBER: builtins.int
26
+ VALUE_FIELD_NUMBER: builtins.int
27
+ key: builtins.int
28
+ value: builtins.float
29
+ def __init__(
30
+ self,
31
+ *,
32
+ key: builtins.int = ...,
33
+ value: builtins.float = ...,
34
+ ) -> None: ...
35
+ def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
36
+
37
+ ENTRIES_FIELD_NUMBER: builtins.int
38
+ @property
39
+ def entries(self) -> google.protobuf.internal.containers.ScalarMap[builtins.int, builtins.float]: ...
40
+ def __init__(
41
+ self,
42
+ *,
43
+ entries: collections.abc.Mapping[builtins.int, builtins.float] | None = ...,
44
+ ) -> None: ...
45
+ def ClearField(self, field_name: typing.Literal["entries", b"entries"]) -> None: ...
46
+
47
+ global___Solution = Solution
48
+
49
+ @typing.final
50
+ class SolutionList(google.protobuf.message.Message):
51
+ """List of solutions obtained by the solver.
52
+ This message is for supporting solvers that return multiple solutions.
53
+ """
54
+
55
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
56
+
57
+ SOLUTIONS_FIELD_NUMBER: builtins.int
58
+ @property
59
+ def solutions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Solution]: ...
60
+ def __init__(
61
+ self,
62
+ *,
63
+ solutions: collections.abc.Iterable[global___Solution] | None = ...,
64
+ ) -> None: ...
65
+ def ClearField(self, field_name: typing.Literal["solutions", b"solutions"]) -> None: ...
66
+
67
+ global___SolutionList = SolutionList
@@ -0,0 +1,27 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: ommx/v1/sparse_matrix.proto
4
+ # Protobuf Python Version: 5.26.1
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+
16
+
17
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bommx/v1/sparse_matrix.proto\x12\x07ommx.v1\"\x90\x01\n\x0cSparseMatrix\x12\x19\n\x08num_rows\x18\x01 \x01(\x04R\x07numRows\x12\x1f\n\x0bnum_columns\x18\x02 \x01(\x04R\nnumColumns\x12\x12\n\x04rows\x18\x03 \x03(\x04R\x04rows\x12\x18\n\x07\x63olumns\x18\x04 \x03(\x04R\x07\x63olumns\x12\x16\n\x06values\x18\x05 \x03(\x01R\x06valuesB]\n\x0b\x63om.ommx.v1B\x11SparseMatrixProtoP\x01\xa2\x02\x03OXX\xaa\x02\x07Ommx.V1\xca\x02\x07Ommx\\V1\xe2\x02\x13Ommx\\V1\\GPBMetadata\xea\x02\x08Ommx::V1b\x06proto3')
18
+
19
+ _globals = globals()
20
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
21
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ommx.v1.sparse_matrix_pb2', _globals)
22
+ if not _descriptor._USE_C_DESCRIPTORS:
23
+ _globals['DESCRIPTOR']._loaded_options = None
24
+ _globals['DESCRIPTOR']._serialized_options = b'\n\013com.ommx.v1B\021SparseMatrixProtoP\001\242\002\003OXX\252\002\007Ommx.V1\312\002\007Ommx\\V1\342\002\023Ommx\\V1\\GPBMetadata\352\002\010Ommx::V1'
25
+ _globals['_SPARSEMATRIX']._serialized_start=41
26
+ _globals['_SPARSEMATRIX']._serialized_end=185
27
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,62 @@
1
+ Metadata-Version: 2.1
2
+ Name: ommx
3
+ Version: 0.0.1
4
+ Summary: Open Mathematical prograMming eXchange (OMMX)
5
+ Author-email: "Jij Inc." <info@j-ij.com>
6
+ Project-URL: Homepage, https://github.com/Jij-Inc/ommx
7
+ Project-URL: Issues, https://github.com/Jij-Inc/ommx/issues
8
+ Classifier: Programming Language :: Python :: 3 :: Only
9
+ Classifier: Programming Language :: Python :: 3.8
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Requires-Python: >=3.8
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: protobuf<6.0.0,>=5.26.1
19
+ Provides-Extra: dev
20
+ Requires-Dist: mypy>=0.910; extra == "dev"
21
+ Requires-Dist: mypy-protobuf; extra == "dev"
22
+ Requires-Dist: pyright; extra == "dev"
23
+ Requires-Dist: pytest; extra == "dev"
24
+ Requires-Dist: types-protobuf>=0.1.14; extra == "dev"
25
+
26
+ # OMMX
27
+
28
+ Open Mathematical prograMming eXchange (OMMX) is an open ecosystem that empowers mathematical programming and optimization developers and reserchers.
29
+
30
+ # API Reference
31
+
32
+ - [Protobuf](https://jij-inc.github.io/ommx/protobuf.html)
33
+ - [Rust](https://jij-inc.github.io/ommx/rust/ommx/index.html)
34
+
35
+ # Compatibility
36
+
37
+ This project manages several versions as follows:
38
+
39
+ ## Protocol buffers schema
40
+
41
+ - OMMX defines a protocol buffers schema with version like `v1`, `v2`, etc. `v1` schema has a namesapce `ommx.v1`.
42
+ - Schemas in `ommx.v1` will be compatible after [`1.0.0` release](https://github.com/Jij-Inc/ommx/milestone/3). Note that the schema can be changed incompatible way until this release.
43
+ - `v2` schema with namespace `ommx.v2` will start developing if we need to change the schema in incompatible way after `1.0.0` release. Compatible changes will be made in `v1` schema also after `1.0.0` release. We never create namespaces like `ommx.v1_1`.
44
+
45
+ ## `ommx` Rust crate
46
+ TBW
47
+
48
+ ## `ommx` Python package
49
+ TBW
50
+
51
+ # License
52
+ © 2024 Jij Inc.
53
+
54
+ This project is licensed under either of
55
+
56
+ - Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <https://www.apache.org/licenses/LICENSE-2.0>)
57
+ - MIT license ([LICENSE-MIT](LICENSE-MIT) or <https://opensource.org/licenses/MIT>)
58
+
59
+ at your option.
60
+
61
+ # Contribution
62
+ TBW
@@ -0,0 +1,26 @@
1
+ MANIFEST.in
2
+ README.md
3
+ pyproject.toml
4
+ ommx/__init__.py
5
+ ommx.egg-info/PKG-INFO
6
+ ommx.egg-info/SOURCES.txt
7
+ ommx.egg-info/dependency_links.txt
8
+ ommx.egg-info/requires.txt
9
+ ommx.egg-info/top_level.txt
10
+ ommx/v1/constraint_pb2.py
11
+ ommx/v1/constraint_pb2.pyi
12
+ ommx/v1/decision_variables_pb2.py
13
+ ommx/v1/decision_variables_pb2.pyi
14
+ ommx/v1/function_pb2.py
15
+ ommx/v1/function_pb2.pyi
16
+ ommx/v1/instance_pb2.py
17
+ ommx/v1/instance_pb2.pyi
18
+ ommx/v1/linear_pb2.py
19
+ ommx/v1/linear_pb2.pyi
20
+ ommx/v1/polynomial_pb2.py
21
+ ommx/v1/polynomial_pb2.pyi
22
+ ommx/v1/quadratic_pb2.py
23
+ ommx/v1/quadratic_pb2.pyi
24
+ ommx/v1/solution_pb2.py
25
+ ommx/v1/solution_pb2.pyi
26
+ ommx/v1/sparse_matrix_pb2.py
@@ -0,0 +1,8 @@
1
+ protobuf<6.0.0,>=5.26.1
2
+
3
+ [dev]
4
+ mypy>=0.910
5
+ mypy-protobuf
6
+ pyright
7
+ pytest
8
+ types-protobuf>=0.1.14
@@ -0,0 +1 @@
1
+ ommx
@@ -0,0 +1,42 @@
1
+ [project]
2
+ name = "ommx"
3
+ version = "0.0.1"
4
+ description = "Open Mathematical prograMming eXchange (OMMX)"
5
+ authors = [
6
+ { name="Jij Inc.", email="info@j-ij.com" },
7
+ ]
8
+ readme = "README.md"
9
+ requires-python = ">=3.8"
10
+ classifiers = [
11
+ "Programming Language :: Python :: 3 :: Only",
12
+ "Programming Language :: Python :: 3.8",
13
+ "Programming Language :: Python :: 3.9",
14
+ "Programming Language :: Python :: 3.10",
15
+ "Programming Language :: Python :: 3.11",
16
+ "Programming Language :: Python :: 3.12",
17
+ "License :: OSI Approved :: Apache Software License",
18
+ "License :: OSI Approved :: MIT License",
19
+ ]
20
+ dependencies = [
21
+ "protobuf>=5.26.1, <6.0.0",
22
+ ]
23
+
24
+
25
+ [project.optional-dependencies]
26
+ dev = [
27
+ "mypy>=0.910",
28
+ "mypy-protobuf",
29
+ "pyright",
30
+ "pytest",
31
+ "types-protobuf>=0.1.14",
32
+ ]
33
+
34
+
35
+ [project.urls]
36
+ Homepage = "https://github.com/Jij-Inc/ommx"
37
+ Issues = "https://github.com/Jij-Inc/ommx/issues"
38
+
39
+
40
+ [build-system]
41
+ requires = ["setuptools", "wheel"]
42
+ build-backend = "setuptools.build_meta"
ommx-0.0.1/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+