Java Reference
In-Depth Information
These temporal parameters do not (usually) satisfy the temporal and
resource constraints of the entire scheduling problem.
The scheduling algorithm computes new values of the temporal para-
meters of each activity in order to satisfy all the temporal and resource
constraints and to maximize satisfaction of the user preferences.
3.4.2
Design
We need to transform the analysis diagram depicted in Figure 3.4 into a
Design class diagram. This requires defining the attributes of each class,
identifying their responsibilities and specifying the relationships between
the classes. A set of decisions must be taken and the result is depicted in
Figure 3.5.
Decision point
How do we represent Activity , Task and Resource ?
Class Activity has a simple data structure that records the temporal para-
meters introduced in Figure 3.2. It implements a method for evaluating the
performance value as defined in Equation 3.1 and a method for updating the
temporal parameters according to Equation 3.2.
Class Task is a simple collection (see Sidebar 3.1) of Activity objects. It is
used mainly to keep track of which activity is part of which task.
Class Resource is an ordered collection of Activity objects. It implements the
scheduling algorithm presented in Section 3.3.1. In particular, it serializes the
Scheduler
schedule()
Resource
Activity
name : String
gain : double
id : int
name : String
releaseTime : int
activation Time : int
terminationTime : int
dueTime : int
Problem
schedule()
getPerformance() : double
addResource( r : Resource)
addTask( t : Task)
getResource(id : int) : Resource
getActivity(t : int, a : int) : Activity
init()
serialize( a : Activity )
update( gain : double )
getPerformance() : double
Task
addActivity( a : Activity )
getActivity(id : int) : Activity
ConcreteProblem
init()
Figure 3.5 The class diagram of the scheduling tool
 
 
Search WWH ::




Custom Search