Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"GPkit-specific Exception classes"
2from . import DimensionalityError # pylint: disable=unused-import
4class MathematicallyInvalid(TypeError):
5 "Raised whenever something violates a mathematical definition."
7class InvalidPosynomial(MathematicallyInvalid):
8 "Raised if a Posynomial would be created with a negative coefficient"
10class InvalidGPConstraint(MathematicallyInvalid):
11 "Raised if a non-GP-compatible constraint is used in a GP"
13class InvalidSGPConstraint(MathematicallyInvalid):
14 "Raised if a non-SGP-compatible constraint is used in an SGP"
17class UnnecessarySGP(ValueError):
18 "Raised if an SGP is fully GP-compatible"
20class UnboundedGP(ValueError):
21 "Raise if a GP is not fully bounded"
24class InvalidLicense(RuntimeWarning):
25 "Raised if a solver's license is missing, invalid, or expired."
28class Infeasible(RuntimeWarning):
29 "Raised if a model does not solve"
31class UnknownInfeasible(Infeasible):
32 "Raised if a model does not solve for unknown reasons"
34class PrimalInfeasible(Infeasible):
35 "Raised if a model returns a certificate of primal infeasibility"
37class DualInfeasible(Infeasible):
38 "Raised if a model returns a certificate of dual infeasibility"