コード例 #1
0
        public Timetable(string dataFilename)
        {
            _variables       = new Dictionary <Variable, DomainSet>();
            _sequenceNumbers = new List <int>();

            GenerateeTimetable(dataFilename);
            DomainSet.LoadStaticLimitations(root);
            FillVariables();
        }
コード例 #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);
        }
コード例 #3
0
ファイル: DomainSet.cs プロジェクト: antomys/UniversityStuff
 public static void LoadStaticLimitations(JsonElement element)
 {
     _subjectLecturer  = GetAsObjectJSON(element, "Subject_lecturer", "Subject");
     _lectureAudiences = new List <int>(GetAsObjectJSON <int[]>(element, "AudienceForLectures"));
     _fullDomain       = new DomainSet(element);
 }