pyoptexplain 0.1.0rc1__py3-none-any.whl
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.
- pyoptexplain/__init__.py +126 -0
- pyoptexplain/_version.py +3 -0
- pyoptexplain/analysis/__init__.py +40 -0
- pyoptexplain/analysis/analyzer.py +659 -0
- pyoptexplain/analysis/diagnostics/__init__.py +31 -0
- pyoptexplain/analysis/diagnostics/_common.py +92 -0
- pyoptexplain/analysis/diagnostics/capabilities.py +139 -0
- pyoptexplain/analysis/diagnostics/rows.py +413 -0
- pyoptexplain/analysis/diagnostics/tables.py +291 -0
- pyoptexplain/analysis/experiments/__init__.py +30 -0
- pyoptexplain/analysis/experiments/ablation.py +55 -0
- pyoptexplain/analysis/experiments/base.py +142 -0
- pyoptexplain/analysis/experiments/group.py +63 -0
- pyoptexplain/analysis/experiments/relaxation.py +150 -0
- pyoptexplain/analysis/utils.py +104 -0
- pyoptexplain/analysis/workflows/__init__.py +20 -0
- pyoptexplain/analysis/workflows/batch.py +118 -0
- pyoptexplain/analysis/workflows/grid.py +690 -0
- pyoptexplain/analysis/workflows/robustness.py +942 -0
- pyoptexplain/analysis/workflows/scenarios.py +641 -0
- pyoptexplain/analysis/workflows/sensitivity.py +370 -0
- pyoptexplain/core/__init__.py +77 -0
- pyoptexplain/core/blocks.py +131 -0
- pyoptexplain/core/certificates.py +115 -0
- pyoptexplain/core/changes.py +169 -0
- pyoptexplain/core/handles.py +24 -0
- pyoptexplain/core/representations.py +26 -0
- pyoptexplain/core/results.py +125 -0
- pyoptexplain/core/solvers.py +154 -0
- pyoptexplain/handles/__init__.py +35 -0
- pyoptexplain/handles/_common.py +196 -0
- pyoptexplain/handles/basic.py +50 -0
- pyoptexplain/handles/cplex.py +934 -0
- pyoptexplain/handles/cvxpy.py +1720 -0
- pyoptexplain/handles/gurobi.py +1244 -0
- pyoptexplain/handles/linear_matrix.py +890 -0
- pyoptexplain/handles/ortools.py +1342 -0
- pyoptexplain/handles/pyomo.py +1070 -0
- pyoptexplain/handles/quadratic_matrix.py +233 -0
- pyoptexplain/representations/__init__.py +27 -0
- pyoptexplain/representations/_cvxpy_common.py +96 -0
- pyoptexplain/representations/_native_scenario.py +75 -0
- pyoptexplain/representations/basic.py +156 -0
- pyoptexplain/representations/cplex_scenario.py +346 -0
- pyoptexplain/representations/cvxpy_scenario.py +368 -0
- pyoptexplain/representations/gurobi_scenario.py +432 -0
- pyoptexplain/representations/linear_matrix.py +1758 -0
- pyoptexplain/representations/matrix_scenario.py +283 -0
- pyoptexplain/representations/pyomo_scenario.py +358 -0
- pyoptexplain/representations/quadratic_matrix.py +712 -0
- pyoptexplain/solvers/__init__.py +31 -0
- pyoptexplain/solvers/_common.py +66 -0
- pyoptexplain/solvers/cplex.py +419 -0
- pyoptexplain/solvers/defaults.py +31 -0
- pyoptexplain/solvers/gurobi.py +793 -0
- pyoptexplain/solvers/highs.py +658 -0
- pyoptexplain/solvers/osqp.py +386 -0
- pyoptexplain/solvers/scip.py +342 -0
- pyoptexplain/utils/matrices.py +103 -0
- pyoptexplain/utils/names.py +34 -0
- pyoptexplain-0.1.0rc1.dist-info/METADATA +312 -0
- pyoptexplain-0.1.0rc1.dist-info/RECORD +65 -0
- pyoptexplain-0.1.0rc1.dist-info/WHEEL +5 -0
- pyoptexplain-0.1.0rc1.dist-info/licenses/LICENSE +176 -0
- pyoptexplain-0.1.0rc1.dist-info/top_level.txt +1 -0
pyoptexplain/__init__.py
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"""Post-optimality analysis and explainable optimization helpers."""
|
|
2
|
+
|
|
3
|
+
from pyoptexplain.analysis import (
|
|
4
|
+
Analyzer,
|
|
5
|
+
BlockExperiment,
|
|
6
|
+
ChangeRHS,
|
|
7
|
+
RelaxationCurve,
|
|
8
|
+
ExperimentResult,
|
|
9
|
+
GridAxis,
|
|
10
|
+
GridResult,
|
|
11
|
+
LocalStabilityThresholds,
|
|
12
|
+
PerturbationPlan,
|
|
13
|
+
PerturbationRobustnessResult,
|
|
14
|
+
RelaxConstraint,
|
|
15
|
+
RelaxIntegrality,
|
|
16
|
+
RemoveConstraint,
|
|
17
|
+
RemoveConstraintGroup,
|
|
18
|
+
RemoveVariable,
|
|
19
|
+
RemoveVariableGroup,
|
|
20
|
+
)
|
|
21
|
+
from pyoptexplain.core import (
|
|
22
|
+
ChangeObjectiveCoefficient,
|
|
23
|
+
ChangeVariableBounds,
|
|
24
|
+
ConstraintBlock,
|
|
25
|
+
RepresentationCertificate,
|
|
26
|
+
RepresentationRef,
|
|
27
|
+
ScaleQuadraticDiagonal,
|
|
28
|
+
ScaleQuadraticObjective,
|
|
29
|
+
ScenarioCase,
|
|
30
|
+
ScenarioChange,
|
|
31
|
+
SetObjectiveCoefficient,
|
|
32
|
+
SetParameter,
|
|
33
|
+
SetVariableBounds,
|
|
34
|
+
SolveResult,
|
|
35
|
+
UnsupportedFeature,
|
|
36
|
+
VariableBlock,
|
|
37
|
+
)
|
|
38
|
+
from pyoptexplain.handles import (
|
|
39
|
+
BasicProblemHandle,
|
|
40
|
+
CplexProblemHandle,
|
|
41
|
+
CvxpyProblemHandle,
|
|
42
|
+
GurobiProblemHandle,
|
|
43
|
+
LinearConstraintBlockInput,
|
|
44
|
+
LinearMatrixProblemHandle,
|
|
45
|
+
OrToolsProblemHandle,
|
|
46
|
+
PyomoProblemHandle,
|
|
47
|
+
QuadraticMatrixProblemHandle,
|
|
48
|
+
UnsupportedCplexStructureError,
|
|
49
|
+
UnsupportedCvxpyStructureError,
|
|
50
|
+
UnsupportedGurobiStructureError,
|
|
51
|
+
UnsupportedOrToolsStructureError,
|
|
52
|
+
UnsupportedPyomoStructureError,
|
|
53
|
+
)
|
|
54
|
+
from pyoptexplain.representations import (
|
|
55
|
+
BasicProblemRepresentation,
|
|
56
|
+
CplexScenarioRepresentation,
|
|
57
|
+
CvxpyScenarioRepresentation,
|
|
58
|
+
GurobiScenarioRepresentation,
|
|
59
|
+
LinearMatrixRepresentation,
|
|
60
|
+
LinearMatrixScenarioRepresentation,
|
|
61
|
+
PyomoScenarioRepresentation,
|
|
62
|
+
QuadraticMatrixScenarioRepresentation,
|
|
63
|
+
QuadraticMatrixRepresentation,
|
|
64
|
+
)
|
|
65
|
+
from pyoptexplain.solvers import OSQPBackend
|
|
66
|
+
|
|
67
|
+
from pyoptexplain._version import __version__
|
|
68
|
+
|
|
69
|
+
__all__ = [
|
|
70
|
+
"Analyzer",
|
|
71
|
+
"BlockExperiment",
|
|
72
|
+
"ChangeRHS",
|
|
73
|
+
"ChangeObjectiveCoefficient",
|
|
74
|
+
"ChangeVariableBounds",
|
|
75
|
+
"BasicProblemHandle",
|
|
76
|
+
"BasicProblemRepresentation",
|
|
77
|
+
"ConstraintBlock",
|
|
78
|
+
"CplexProblemHandle",
|
|
79
|
+
"CplexScenarioRepresentation",
|
|
80
|
+
"CvxpyProblemHandle",
|
|
81
|
+
"CvxpyScenarioRepresentation",
|
|
82
|
+
"RelaxationCurve",
|
|
83
|
+
"ExperimentResult",
|
|
84
|
+
"GridAxis",
|
|
85
|
+
"GridResult",
|
|
86
|
+
"GurobiProblemHandle",
|
|
87
|
+
"GurobiScenarioRepresentation",
|
|
88
|
+
"LinearConstraintBlockInput",
|
|
89
|
+
"LinearMatrixProblemHandle",
|
|
90
|
+
"LinearMatrixRepresentation",
|
|
91
|
+
"LinearMatrixScenarioRepresentation",
|
|
92
|
+
"QuadraticMatrixScenarioRepresentation",
|
|
93
|
+
"OrToolsProblemHandle",
|
|
94
|
+
"OSQPBackend",
|
|
95
|
+
"PyomoProblemHandle",
|
|
96
|
+
"PyomoScenarioRepresentation",
|
|
97
|
+
"QuadraticMatrixProblemHandle",
|
|
98
|
+
"QuadraticMatrixRepresentation",
|
|
99
|
+
"LocalStabilityThresholds",
|
|
100
|
+
"PerturbationPlan",
|
|
101
|
+
"PerturbationRobustnessResult",
|
|
102
|
+
"RelaxConstraint",
|
|
103
|
+
"RelaxIntegrality",
|
|
104
|
+
"RepresentationCertificate",
|
|
105
|
+
"RepresentationRef",
|
|
106
|
+
"ScaleQuadraticDiagonal",
|
|
107
|
+
"ScaleQuadraticObjective",
|
|
108
|
+
"RemoveConstraint",
|
|
109
|
+
"RemoveConstraintGroup",
|
|
110
|
+
"RemoveVariable",
|
|
111
|
+
"RemoveVariableGroup",
|
|
112
|
+
"ScenarioCase",
|
|
113
|
+
"ScenarioChange",
|
|
114
|
+
"SetParameter",
|
|
115
|
+
"SetObjectiveCoefficient",
|
|
116
|
+
"SetVariableBounds",
|
|
117
|
+
"SolveResult",
|
|
118
|
+
"UnsupportedFeature",
|
|
119
|
+
"VariableBlock",
|
|
120
|
+
"UnsupportedCplexStructureError",
|
|
121
|
+
"UnsupportedCvxpyStructureError",
|
|
122
|
+
"UnsupportedGurobiStructureError",
|
|
123
|
+
"UnsupportedOrToolsStructureError",
|
|
124
|
+
"UnsupportedPyomoStructureError",
|
|
125
|
+
"__version__",
|
|
126
|
+
]
|
pyoptexplain/_version.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""Analysis helpers."""
|
|
2
|
+
|
|
3
|
+
from pyoptexplain.analysis.analyzer import Analyzer
|
|
4
|
+
from pyoptexplain.analysis.experiments import (
|
|
5
|
+
BlockExperiment,
|
|
6
|
+
ChangeRHS,
|
|
7
|
+
RelaxationCurve,
|
|
8
|
+
ExperimentResult,
|
|
9
|
+
RelaxConstraint,
|
|
10
|
+
RelaxIntegrality,
|
|
11
|
+
RemoveConstraint,
|
|
12
|
+
RemoveConstraintGroup,
|
|
13
|
+
RemoveVariable,
|
|
14
|
+
RemoveVariableGroup,
|
|
15
|
+
)
|
|
16
|
+
from pyoptexplain.analysis.workflows.grid import GridAxis, GridResult
|
|
17
|
+
from pyoptexplain.analysis.workflows.robustness import (
|
|
18
|
+
LocalStabilityThresholds,
|
|
19
|
+
PerturbationPlan,
|
|
20
|
+
PerturbationRobustnessResult,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
__all__ = [
|
|
24
|
+
"Analyzer",
|
|
25
|
+
"BlockExperiment",
|
|
26
|
+
"ChangeRHS",
|
|
27
|
+
"RelaxationCurve",
|
|
28
|
+
"ExperimentResult",
|
|
29
|
+
"GridAxis",
|
|
30
|
+
"GridResult",
|
|
31
|
+
"LocalStabilityThresholds",
|
|
32
|
+
"PerturbationPlan",
|
|
33
|
+
"PerturbationRobustnessResult",
|
|
34
|
+
"RelaxConstraint",
|
|
35
|
+
"RelaxIntegrality",
|
|
36
|
+
"RemoveConstraint",
|
|
37
|
+
"RemoveConstraintGroup",
|
|
38
|
+
"RemoveVariable",
|
|
39
|
+
"RemoveVariableGroup",
|
|
40
|
+
]
|