<s> """<STR_LIT>""" <EOL> """<STR_LIT>""" <EOL> import pulp <EOL> dealers = [ "<STR_LIT:X>" , "<STR_LIT:Y>" , "<STR_LIT>" ] <EOL> variable_costs = { "<STR_LIT:X>" : <NUM_LIT> , <EOL> "<STR_LIT:Y>" : <NUM_LIT> , <EOL> "<STR_LIT>" : <NUM_LIT> } <EOL> fixed_costs = { "<STR_LIT:X>" : <NUM_LIT> , <EOL> "<STR_LIT:Y>" : <NUM_LIT> , <EOL> "<STR_LIT>" : <NUM_LIT> } <EOL> quantities = pulp . LpVariable . dicts ( "<STR_LIT>" , <EOL> dealers , <EOL> lowBound = <NUM_LIT:0> , <EOL> cat = pulp . LpInteger ) <EOL> is_orders = pulp . LpVariable . dicts ( "<STR_LIT>" , dealers , <EOL> cat = pulp . LpBinary ) <EOL> """<STR_LIT>""" <EOL> model = pulp . LpProblem ( "<STR_LIT>" , pulp . LpMinimize ) <EOL> model += sum ( [ ( variable_costs [ i ] * quantities [ i ] + <EOL> fixed_costs [ i ] ) * is_orders [ i ] for i in dealers ] ) , "<STR_LIT>" <EOL> model += sum ( [ quantities [ i ] for i in dealers ] ) == <NUM_LIT> , "<STR_LIT>" <EOL> model += <NUM_LIT:30> <= quantities [ "<STR_LIT:X>" ] <= <NUM_LIT:100> , "<STR_LIT>" <EOL> model += <NUM_LIT:30> <= quantities [ "<STR_LIT:Y>" ] <= <NUM_LIT> , "<STR_LIT>" <EOL> model += <NUM_LIT:30> <= quantities [ "<STR_LIT>" ] <= <NUM_LIT> , "<STR_LIT>" <EOL> model . solve ( ) </s>
