Exemplo n.º 1
0
        public Timetable(string dataFilename)
        {
            _variables       = new Dictionary <Variable, DomainSet>();
            _sequenceNumbers = new List <int>();

            GenerateeTimetable(dataFilename);
            DomainSet.LoadStaticLimitations(root);
            FillVariables();
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public static void LoadStaticLimitations(JsonElement element)
 {
     _subjectLecturer  = GetAsObjectJSON(element, "Subject_lecturer", "Subject");
     _lectureAudiences = new List <int>(GetAsObjectJSON <int[]>(element, "AudienceForLectures"));
     _fullDomain       = new DomainSet(element);
 }