Spaces:
Sleeping
Sleeping
Upload classes.py
Browse files- classes.py +3 -4
classes.py
CHANGED
@@ -332,13 +332,12 @@ class Scenario:
|
|
332 |
return -1 * self.modified_total_sales
|
333 |
|
334 |
res = minimize(
|
335 |
-
objective_function,
|
336 |
-
|
337 |
-
method="SLSQP",
|
338 |
x0=old_spends,
|
339 |
constraints=constraint,
|
340 |
bounds=bounds,
|
341 |
-
options={"maxiter":
|
342 |
)
|
343 |
# res = dual_annealing(
|
344 |
# objective_function,
|
|
|
332 |
return -1 * self.modified_total_sales
|
333 |
|
334 |
res = minimize(
|
335 |
+
lambda x : objective_function(x) / 1e8,
|
336 |
+
method="trust-constr",
|
|
|
337 |
x0=old_spends,
|
338 |
constraints=constraint,
|
339 |
bounds=bounds,
|
340 |
+
options={"maxiter": int(1e7), 'xtol' : 100},
|
341 |
)
|
342 |
# res = dual_annealing(
|
343 |
# objective_function,
|