didppy.max

didppy.max(x, y)

Returns an expression representing the greater value.

Parameters:
Returns:

The greater value.

Return type:

ElementExpr, IntExpr, FloatExpr, or SetExpr

Raises:

TypeError – If the types of x and y mismatch.

Examples

>>> import didppy as dp
>>> model = dp.Model()
>>> var = model.add_int_var(target=2)
>>> dp.max(var, 1).eval(model.target_state, model)
2