From bb0bcf7c7640f1793efa0731c53fc6941e669e67 Mon Sep 17 00:00:00 2001 From: Hayato Arai Date: Sat, 2 Nov 2024 20:36:40 +0900 Subject: [PATCH] Modified example/wedding.py to maximize happiness --- examples/wedding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/wedding.py b/examples/wedding.py index 96681c47..31fb6cb4 100644 --- a/examples/wedding.py +++ b/examples/wedding.py @@ -27,7 +27,7 @@ def happiness(table): "table", possible_tables, lowBound=0, upBound=1, cat=pulp.LpInteger ) -seating_model = pulp.LpProblem("Wedding Seating Model", pulp.LpMinimize) +seating_model = pulp.LpProblem("Wedding Seating Model", pulp.LpMaximize) seating_model += pulp.lpSum([happiness(table) * x[table] for table in possible_tables])