Distinguishing shared coverage from one qualified technician

A maintenance visit requires tasks P, Q, and R. In an OCL model, self.requiredTasks : Set(Task) contains exactly those three distinct task objects. Each technician has a property qualifications : Set(Task) containing exactly the task objects listed below. Every property is defined.


Technician

Qualifications

Ari

P, Q

Bo

Q, R

Cy

P, R

Dee

P, Q, R

Eli

P


A candidate self.roster : Set(Technician) contains exactly two distinct technicians from this table. Consider every possible two-person roster once; selecting Ari and Bo is the same roster as selecting Bo and Ari. There are no scheduling or capacity restrictions beyond the stated OCL expressions.


Rule X is:


ocl
self.requiredTasks->forAll(task |
    self.roster->exists(tech |
        tech.qualifications->includes(task)))


Rule Y is:


ocl
self.roster->exists(tech |
    self.requiredTasks->forAll(task |
        tech.qualifications->includes(task)))


Determine the number of candidate rosters for which Rule X is true and the number for which Rule Y is true. Enter both counts as exact integers.

Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Object Constraint Language (OCL) Questions: