didppy.min

didppy.min(x, y)

Returns an expression representing the smaller value.

Parameters:
Returns:

The smaller 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.min(var, 1).eval(model.target_state, model)
1