Skip to content

Functions

maximize(expr)

Creates a maximization objective function of a linear expression.

Note

Only applicable in the MIP algorithm.

Parameters:

Name Type Description Default
expr LinExpr

A linear expression

required

Returns:

Type Description
Tuple[flowty.constants.ObjSense, flowty.entities.LinExpr]

A tuple of Maximize and the linear expression.

minimize(expr)

Creates a minimization objective function of a linear expression.

Parameters:

Name Type Description Default
expr LinExpr

A linear expression

required

Returns:

Type Description
Tuple[flowty.constants.ObjSense, flowty.entities.LinExpr]

A tuple of Minimize and the linear expression.

xsum(terms)

Sums up the terms into a linear expression.

Usage is:

expr = xsum( 3 * x + 4 * y + z - otherExpr)

Parameters:

Name Type Description Default
terms List[Union[Tuple[float, flowty.entities.Var], flowty.entities.Var, flowty.entities.LinExpr]]

A list of terms to sum

required

Returns:

Type Description
LinExpr

A linear expression