Inequality
New in version 1.1.0.
- class nexus.Inequality(*args)
Abstract class for inequality constraints. Do not use this class directly. An inequality must be derived from this class in Python the following way.
# definition of the derived class class InequalityDefinedInPython(nx.Inequality): def __init__(self, id="user id"): super().__init__(id) # implementation of the actual inequalities # must return a bool # The function must be able to return True values, otherwise the optimization will fail. def Function(self): ineq1 = a > b ineq2 = b + c > 1 ... return ineq1 * ineq2 * ...
- Parameters:
id (string) – User identifier.
- id
User identifier.
- Type:
string
- Function()
Call of the Equality function implementation from python.
- NumFunction()
Get the number of functions provided.
Examples can be found in the Tutorial section.