selectObjectives()

This method selects all objectives matching a specified selector.

This page discusses:

Arguments

selector: Python callable object.

Return Value

Returns a list-like Python object containing all objectives matching the selector.

Each objective in the data set is passed to the selector. The following example selects all objectives with the type MAXIMIZE:

def maximizeTest(objective):
    return objective["type"] == "MAXIMIZE"

maxObjectives= FormulationAPI.selectObjectives(maximizeTest)