Define an operation RemoveOperator which takes as input an existing operator who is currently available and removes that operator from the system

A telecommunications company has set up a 2-tier technical support call centre for assisting its customers. The centre manager is responsible for receiving incoming calls and distributing them to technical operators. The operators are partitioned into two kinds: ordinary and specialist. Ordinary operators deal with basic customer issues; specialist operators deal with advanced customer issues. A new incoming call is by default treated as ordinary. Such a call is either forwarded to an available ordinary operator, providing that such an operator exists, or it is appended at the end of a queue of waiting calls. As soon as an operator of a particular kind becomes available, he/she is ready to receive the first call from the queue of waiting calls that matches his/her kind. An ordinary operator that cannot deal with a call, upgrades the call kind to specialist and either forwards it to an available specialist operator, or places it to the end of the queue of waiting calls if no specialist operator is currently available (in order for the call to be subsequently dealt by a specialist operator). Therefore, the call centre manager is required to keep track of:

  • waiting incoming calls;
  • the kind of each call;
  • the kind of each operator;
  • the operators that are currently available (if any); ▪ which call each operator is currently serving (if any);
  • the number of operators of each kind.

A Z specification of the call centre manager may begin as follows:

 

[Call, Operator]

 

Kind == ordinary | specialist

 

  1. The CallCentre schema should include a number of invariants in addition to the one already provided. Write the formal definitions of the following invariants in terms of predicates:
    • there cannot be available operators whilst there are waiting calls
    • an operator can only serve calls that are of the same kind as the operator – an operator should either be serving a call or be available, not both; – a call can either be served or be in the queue of waiting calls, not both.

[15%]

  1. Using Z schemata specify the following operations:
    1. ServingCallsPerKind. Given a kind, outputs the set of all calls of that kind that are currently being served.

[10%]

  1. Removes an existing waiting call from the queue of waiting calls.

[10%]

  • Handles a new incoming call. The new call should be either forwarded to some available ordinary operator, providing that such an operator exists, or it should be placed at the end of the queue of waiting calls, otherwise. Recall that a new incoming call is by default of kind ordinary.

[15%] iv. Take special care of any errors that may occur; use schema calculus to provide a robust version (say RobustNewCall) of the NewCall operation.

  1. Complete the recursive axiomatic description firstCallOfKind below that takes as inputs: (i) a sequence of calls (say s), (ii) a function (say f) that assigns kinds (either ordinary or specialist) to calls, and (iii) a kind k (either ordinary or specialist). firstCallOfKind returns the value null if s is empty; otherwise, it returns the first call in s whose kind matches, according to the assignments in f, the kind k. Note that f must be applicable to all calls in s, hence the precondition ran s ⊆ dom f. Formally:

firstCallOfKind : seq Call × (Call Kind) × Kind Call ∪ {null}

 

s: seq Call; f: Call Kind; k: Kind ⦁  ran s ⊆ dom f  s = ⟨⟩ ⇒ firstCallOfKind(s, f, k) = null

 …     ⇒  f(head s) = k ⇒ …

              …                  ⇒ …

 

d) Define an operation TerminateCall which removes a call that is currently being served. The operator serving the call:

  • either becomes available, if the queue of waiting calls contains no call which is of the same kind as the terminated call;
  • or starts serving the first waiting call which is of the same kind as the terminated call, otherwise.

In the latter case, the newly-served call is removed from the queue of waiting calls. [HINT:  For the latter case, you may use the axiomatic description firstCallOfKind from 4.a with its 2nd argument (f) being substituted by the function callKind.].

e) Define an operation RemoveOperator which takes as input an existing operator who is currently available and removes that operator from the system. Also, it updates the multiplicities of operator kinds in the system to take this change into account

© 2020 Essaylane.com. All Rights Reserved. | Disclaimer: for assistance purposes only. These custom papers should be used with proper reference.