Research Article

Solving a Real Constraint Satisfaction Model for the University Course Timetabling Problem: A Case Study

Algorithm 1

Constructive Approach Algorithm for generating feasible solutions for the FCSE pattern.
() Read input instance
() Event clasification (type, characteristics)
() for to NumSolutions do
()   Initialize to 0 and empty arrays
()   while  TenuredEventsNotScheduled  do
()      Assign tenuredEvents in empty slots satisfying hard constraints (HC)
()      Assign unscheduled events (uE) in temporary arrays
()      if (uE)
()         Assign uE in empty slots randomly satisfying HC
()   endwhile
()   while   < maxStages or allEventsScheduled  do
()      Sort nontenureEvents (capacity)
()      Assign nontenureEvents in empty slots randomly satisfying RD
()      Assign unscheduled nontenureEvents (uNTE) in temporary arrays
()      while   < maxAttempts do
()          for   to uNTE do
()             Assign uNTE in empty slots without validating RD
()          endfor
()          for   to events scheduled in empty slots without validating RD do
()             while   < maxAttemptsB do
()                 Select events scheduled in empty slots without validating RD
()                 Select Random temporalSolution occupied or unoccupied slots
()                 Swap or Insert events in empty slots if events satisfy RD
()             endwhile
()          endfor
()          Reschedule events
()      endwhile
()   endwhile
()   if temporalSolution feasible
()      Print Feasible Solution and time in seconds
()      Save solution
()   else Print Infeasible Solution and time in seconds
() endfor