public Timetable(string dataFilename) { _variables = new Dictionary <Variable, DomainSet>(); _sequenceNumbers = new List <int>(); GenerateeTimetable(dataFilename); DomainSet.LoadStaticLimitations(root); FillVariables(); }
private int CountConflictsNumber(DomainSet set, Dictionary <Variable, DomainSet> other) { var conflictsN = 0; other = other.Where(x => !x.Value.Value.Empty).ToDictionary(p => p.Key, p => p.Value); foreach (var p in other) { if (set.CanConstruct(p.Value.Value)) { ++conflictsN; } } return(conflictsN); }
public static void LoadStaticLimitations(JsonElement element) { _subjectLecturer = GetAsObjectJSON(element, "Subject_lecturer", "Subject"); _lectureAudiences = new List <int>(GetAsObjectJSON <int[]>(element, "AudienceForLectures")); _fullDomain = new DomainSet(element); }