Skip to content

Commit

Permalink
Change default solver to HiGHS, increase default and max timeout and …
Browse files Browse the repository at this point in the history
…max tolerance
  • Loading branch information
Bill-Becker committed Mar 28, 2024
1 parent 2bdb08a commit 8816074
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 4.0.7 on 2024-03-28 03:12

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('reoptjl', '0054_rename_distance_to_emissions_region_meters_electricutilityoutputs_distance_to_avert_emissions_region'),
]

operations = [
migrations.AlterField(
model_name='settings',
name='optimality_tolerance',
field=models.FloatField(default=0.001, help_text="The threshold for the difference between the solution's objective value and the best possible value at which the solver terminates", validators=[django.core.validators.MinValueValidator(5e-06), django.core.validators.MaxValueValidator(0.2)]),
),
migrations.AlterField(
model_name='settings',
name='solver_name',
field=models.TextField(blank=True, choices=[('HiGHS', 'Highs'), ('Cbc', 'Cbc'), ('SCIP', 'Scip'), ('Xpress', 'Xpress')], default='HiGHS', help_text='Solver used for REopt.jl. Options include HiGHS, Cbc, SCIP, and Xpress'),
),
migrations.AlterField(
model_name='settings',
name='timeout_seconds',
field=models.IntegerField(default=600, help_text='The number of seconds allowed before the optimization times out.', validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(1200)]),
),
]
8 changes: 4 additions & 4 deletions reoptjl/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ class TIME_STEP_CHOICES(models.IntegerChoices):
FOUR = 4

timeout_seconds = models.IntegerField(
default=420,
default=600,
validators=[
MinValueValidator(1),
MaxValueValidator(420)
MaxValueValidator(1200)
],
help_text="The number of seconds allowed before the optimization times out."
)
Expand All @@ -251,7 +251,7 @@ class TIME_STEP_CHOICES(models.IntegerChoices):
default=0.001,
validators=[
MinValueValidator(5.0e-6),
MaxValueValidator(0.05)
MaxValueValidator(0.20)
],
help_text=("The threshold for the difference between the solution's objective value and the best possible "
"value at which the solver terminates")
Expand Down Expand Up @@ -296,7 +296,7 @@ class SOLVERS(models.TextChoices):

solver_name = models.TextField(
blank=True,
default=SOLVERS.XPRESS,
default=SOLVERS.HIGHS,
choices=SOLVERS.choices,
help_text=("Solver used for REopt.jl. Options include HiGHS, Cbc, SCIP, and Xpress")
)
Expand Down

0 comments on commit 8816074

Please sign in to comment.