import xml.etree.ElementTree as ET
from xml.dom import minidom
from random import shuffle


# the number of students in each year, implicitly defines the number of years
year_students = [100, 75, 60]

# each year has a number of subjects (only count one semester)
year_subjects = [5, 5, 10]

# the number of subjects in a year that are mandatory
# mandatory subjects have all students of a year assigned, for non-mandatory,
# all students of that year are evenly distributed between them
year_subjects_mandatory = [5, 5, 1]

assert len(year_students) == len(year_subjects) == len(year_subjects_mandatory)

# each subject gets its own professor
# assistants have to be specified
# jobs are randomly distributed: each assistant gets one subject,
# then the remaining subjects are evenly distributed (think balanced tree)
num_assistants = 10
global_assistant_available_hours = 20
assert sum(year_subjects) > num_assistants

# the types of the classrooms
TYPE_LECTURE = 0
TYPE_TUTORIAL = 1
TYPE_LECTURE_TUTORIAL = 2

# each classroom has a capacity and a type
classroom_capacities = [150, 120, 30, 30, 18, 18, 18]
classroom_types = [TYPE_LECTURE, TYPE_LECTURE, TYPE_LECTURE_TUTORIAL, TYPE_LECTURE_TUTORIAL, TYPE_TUTORIAL, TYPE_TUTORIAL, TYPE_TUTORIAL]
assert len(classroom_capacities) == len(classroom_types)


# results
classrooms = []
professors = []
students = []
subjects = []