From ee8aebd69bef6e90b102ec2be16216a7fda74b9e Mon Sep 17 00:00:00 2001 From: rhombicosi Date: Wed, 23 Feb 2022 02:08:28 +0300 Subject: [PATCH] change maxgap value --- molp_app/models.py | 16 ++++++++-------- molp_app/utilities/scalarization.py | 2 -- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/molp_app/models.py b/molp_app/models.py index a7ecb0d..607cd72 100644 --- a/molp_app/models.py +++ b/molp_app/models.py @@ -11,13 +11,13 @@ class Problem(models.Model): task_status = models.CharField(max_length=50, null=True, blank=True) zero = 0 - ten = 0.1 - quater = 0.25 + ten = 0.01 + quater = 0.025 MAXGAPS = [ (zero, '0%'), - (ten, '10%'), - (quater, '25%') + (ten, '1%'), + (quater, '2.5%') ] maxgap = models.FloatField(choices=MAXGAPS, default=ten, verbose_name="Max gap") @@ -93,13 +93,13 @@ class UserProblem(models.Model): task_status = models.CharField(max_length=50, null=True, blank=True) zero = 0 - ten = 0.1 - quater = 0.25 + ten = 0.01 + quater = 0.025 MAXGAPS = [ (zero, '0%'), - (ten, '10%'), - (quater, '25%') + (ten, '1%'), + (quater, '2.5%') ] maxgap = models.FloatField(choices=MAXGAPS, default=ten, verbose_name="Max gap") diff --git a/molp_app/utilities/scalarization.py b/molp_app/utilities/scalarization.py index aeeaa58..66f1cd4 100644 --- a/molp_app/utilities/scalarization.py +++ b/molp_app/utilities/scalarization.py @@ -166,8 +166,6 @@ def calculate_reference(num_of_obj, models, maxgap, maxtime): m = models[obj] # optimization with CBC - # m.max_gap = 0.1 - # status = m.optimize(max_seconds=float('inf')) m.max_gap = maxgap status = m.optimize(max_seconds=float(maxtime))