didppy.float

didppy.float(x)

Convert an integer expression to a continuous expression.

Parameters:

x (IntExpr, IntVar, IntResourceVar, or int) – Input.

Returns:

The continuous expression.

Return type:

FloatExpr

Examples

>>> import didppy as dp
>>> model = dp.Model()
>>> state = model.target_state
>>> expr = dp.IntExpr(4)
>>> dp.float(expr).eval(state, model)
4.0