- Increase penalty of timerange and area meeting overlap
- Fix incidental bug in schedule optimiser - Fix unused import - Legacy-Id: 17988
This commit is contained in:
parent
d0386b8524
commit
ec1ee89e89
|
@ -323,6 +323,7 @@ class Schedule(object):
|
|||
an entirely random timeslot, in which they fit.
|
||||
Parameter is an iterable of (timeslot, session) tuples.
|
||||
"""
|
||||
self.calculate_dynamic_cost() # update all costs
|
||||
to_reschedule = [(t, s) for t, s in items if s.last_cost]
|
||||
random.shuffle(to_reschedule)
|
||||
if self.verbosity >= 2:
|
||||
|
|
|
@ -35,7 +35,7 @@ def forward(apps, schema_editor):
|
|||
BusinessConstraint.objects.create(
|
||||
slug="area_overlapping_other_area",
|
||||
name="Area meetings cannot conflict with other area meetings",
|
||||
penalty=1000,
|
||||
penalty=100000,
|
||||
)
|
||||
BusinessConstraint.objects.create(
|
||||
slug="session_overlap_ad",
|
||||
|
@ -58,7 +58,7 @@ def forward(apps, schema_editor):
|
|||
ConstraintName.objects.filter(slug='conflic2').update(penalty=10000)
|
||||
ConstraintName.objects.filter(slug='conflic3').update(penalty=100000)
|
||||
ConstraintName.objects.filter(slug='bethere').update(penalty=10000)
|
||||
ConstraintName.objects.filter(slug='timerange').update(penalty=10000)
|
||||
ConstraintName.objects.filter(slug='timerange').update(penalty=1000000)
|
||||
ConstraintName.objects.filter(slug='time_relation').update(penalty=1000)
|
||||
ConstraintName.objects.filter(slug='wg_adjacent').update(penalty=1000)
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ from django.core.management.base import CommandError
|
|||
from ietf.utils.test_utils import TestCase
|
||||
from ietf.group.factories import GroupFactory, RoleFactory
|
||||
from ietf.person.factories import PersonFactory
|
||||
from ietf.meeting.models import Session, Constraint, TimerangeName, BusinessConstraint
|
||||
from ietf.meeting.models import Constraint, TimerangeName, BusinessConstraint
|
||||
from ietf.meeting.factories import MeetingFactory, RoomFactory, TimeSlotFactory, SessionFactory
|
||||
from ietf.meeting.management.commands.schedule_generator import ScheduleHandler
|
||||
|
||||
|
|
|
@ -5625,7 +5625,7 @@
|
|||
"desc": "",
|
||||
"name": "Can't meet within timerange",
|
||||
"order": 0,
|
||||
"penalty": 10000,
|
||||
"penalty": 1000000,
|
||||
"used": true
|
||||
},
|
||||
"model": "name.constraintname",
|
||||
|
@ -14541,7 +14541,7 @@
|
|||
"pk": "area_overlapping_other_area",
|
||||
"fields": {
|
||||
"name": "Area meetings cannot conflict with other area meetings",
|
||||
"penalty": 1000
|
||||
"penalty": 100000
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue