Skip to content

Commit

Permalink
change maxgap value
Browse files Browse the repository at this point in the history
  • Loading branch information
rhombicosi committed Feb 22, 2022
1 parent 661902b commit ee8aebd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 8 additions & 8 deletions molp_app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 0 additions & 2 deletions molp_app/utilities/scalarization.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit ee8aebd

Please sign in to comment.