Python pulp.LpBinary() Examples

The following are 2 code examples of pulp.LpBinary(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module pulp , or try the search function .
Example #1
Source File: pulp_solver.py    From pydfs-lineup-optimizer with MIT License 5 votes vote down vote up
def add_variable(self, name):
        return LpVariable(name, cat=LpBinary) 
Example #2
Source File: utils.py    From ConferenceScheduler with MIT License 5 votes vote down vote up
def variables(shape: Shape):
    return pulp.LpVariable.dicts(
        "x",
        it.product(range(shape.events), range(shape.slots)),
        cat=pulp.LpBinary
    )