5.2 Attributes FSML

(****
 *
 * Module Attributes defines the attributes objects of a schedule.
 *
 * NOTE: this is work in progress.  Pre and Post conditions need to be defined.
 * Also, more complete object descriptions are needed.
 *
 *)

module Attributes;
export Attributes;



  object Attributes
    components: ScheduleStrength;
    description: (*
        The Attributes object is comprised of the schedule strength (a measure
	of how good the schedule fulfills the desired preferences):
        ScheduleStrength.
    *);
  end Attributes;



  object ScheduleStrength
    components: schStrTotal and InstructorStrength* and Conflicts;
    description: (*
        The ScheduleStrength is a measure of how good the schedule fulfills all
	the desired preferences.
    *);
  end ScheduleStrength;
  
  object schStrTotal = integer;

  operation ViewSchedulingStrength (schedStrength:ScheduleStrength) ->  (consCount:conflictCount,
					  courseAvg:avgCourseStrength, pattAvg:avgPatternStrength, proxAvg:avgProxStrength,
					  timeAvg:avgTimeStrength, totalStr:schStrTotal)
    description: (* 
	Displays the average strength for each preference, and the overall schedule strength. It also displays the number of conflicts in the schedule.
    *);

    precondition: (*
	The schedule has to exist in the schedule database.
    *);
       
    postcondition: (*
	All averages are between 1 and 10 inclusive.
	The total strength is between 1 and 10 inclusive.
	The conflictCount is equal to or greater that zero.
    *);
  end ViewSchedulingStrength;



  object Conflicts
    components: Conflict* and conBoolean;
    description: (*
        The Conflicts object contains information to determine if the generated 
	schedule has conflicts and a description of the conflict if it does.
    *);
  end Conflicts;

  object Conflict = string;
  object conBoolean = boolean;

  object conflictCount = integer;

  operation ViewConflicts (cons:Conflicts) ->  (cons':Conflicts, consCount:conflictCount)
    description: (* 
	Displays the total number of conflicts of the generated schedule as well
	as the individual conflicts themselves 
    *);

    precondition: (*
	The schedule has to exist in the schedule database.
    *);
       
    postcondition: (*
	The conflicts listed in the view are the conflicts created in the generation.
	The conflictCount is equal to the number of Conflicts.
	The conflictCount is equal to or greater that zero.
    *);
  end ViewConflicts;



  object InstructorStrength
    components: Name and Value and Courses* and Pattern* and Proximal* and Time*;
    description: (*
        The InstructorStrength object gives an integer value that represents how
	good the generated schedule fits the given instructor's preferences.
    *);
  end InstructorStrength;
 
  object Name = string;


  
  object Courses
    components: Course and Value;
    description: (*
        The Courses object gives an integer value that represents how
	good the generated schedule fits the an instructor's course preferences.
    *);
  end Courses;
 
  object Course = string;

  object avgCourseStrength = integer;

  operation ViewCourseSchedulingStrength (schedStrength:ScheduleStrength) ->  (names:Name*, values:Value*, avg:avgCourseStrength)
    description: (* 
	Displays all the intructors in the schedule, their corresponding strength value
	for their Course preference, and the average Course strength for that schedule.
    *);

    precondition: (*
	The schedule has to exist in the schedule database.
    *);
       
    postcondition: (*
	The instructors are listed in alphabetical order with their corresponding Course strength value.
	The avgCourseStrength is between 1 and 10 inclusive.
    *);
  end ViewCourseSchedulingStrength;
  
  

  object Pattern
    components: PatternV and Value;
    description: (*
        The Pattern object gives an integer value that represents how
	good the generated schedule fits the an instructor's pattern preferences.
    *);
  end Pattern;
 
  object PatternV = string;

  object avgPatternStrength = integer;

  operation ViewPatternSchedulingStrength (schedStrength:ScheduleStrength) ->  (names:Name*, values:Value*, avg:avgPatternStrength)
    description: (* 
	Displays all the intructors in the schedule, their corresponding strength value
	for their Pattern preference, and the average Pattern strength for that schedule.
    *);

    precondition: (*
	The schedule has to exist in the schedule database.
    *);
       
    postcondition: (*
	The instructors are listed in alphabetical order with their corresponding Pattern strength value.
	The avgPatternStrength is between 1 and 10 inclusive.
    *);
  end ViewPatternSchedulingStrength;

  

  object Proximal
    components: Distance and Value;
    description: (*
        The Proximal object gives an integer value that represents how
	good the generated schedule fits the an instructor's proximal preferences.
    *);
  end Proximal;
 
  object Distance = integer;

  object avgProxStrength = integer;

  operation ViewProximalSchedulingStrength (schedStrength:ScheduleStrength) ->  (names:Name*, values:Value*, avg:avgProxStrength)
    description: (* 
	Displays all the intructors in the schedule, their corresponding strength value
	for their proximal preference, and the average proximal strength for that schedule.
    *);

    precondition: (*
	The schedule has to exist in the schedule database.
    *);
       
    postcondition: (*
	The instructors are listed in alphabetical order with their corresponding proximal strength value.
	The avgProxStrength is between 1 and 10 inclusive.
    *);
  end ViewProximalSchedulingStrength;

  

  object Time
    components: TimeV and Value;
    description: (*
        The Time object gives an integer value that represents how
	good the generated schedule fits the an instructor's Time preferences.
    *);
  end Time;

  object TimeV = integer;

  object avgTimeStrength = integer;

  operation ViewTimeSchedulingStrength (schedStrength:ScheduleStrength) ->  (names:Name*, values:Value*, avg:avgTimeStrength)
    description: (* 
	Displays all the intructors in the schedule, their corresponding strength value
	for their Time preference, and the average Time strength for that schedule.
    *);

    precondition: (*
	The schedule has to exist in the schedule database.
    *);
       
    postcondition: (*
	The instructors are listed in alphabetical order with their corresponding Time strength value.
	The avgTimeStrength is between 1 and 10 inclusive.
    *);
  end ViewTimeSchedulingStrength;

  

  object Value = integer;

end Attributes;







Prev: Scheduling DB FMSL | Next: Room DB FMSL | Up: Specs | Top: index