IBM ILOG Scheduler User's Manual > Integrated Applications > Incremental Scheduling: Using Scheduler with Multiple Problem Sub-models > Designing the Models > Creating the Temporal Model

The first submodel we create represents only the activities of the problem and the temporal constraints within each job. In particular, there is no representation of resources, resource constraints, or optimization criteria.

The temporal model is used to maintain the temporal windows of each activity given the temporal constraints within a job in the evolving model and given the evolving solution. In particular, we make the following assumptions:

  1. Given that the evolving solution was found by attempting to minimize the makespan of the evolving model, we assume that the start time assigned to each activity in the evolving solution is a lower bound on the start time it can have in the next evolving solution; that is, in the solution to the next iteration of the evolving model, when a new job has been added. However, this is not necessarily the case. If we solved the evolving model from scratch, it is likely that some activities would be assigned to earlier start times than they were in the previous evolving solution. However, given that the previous evolving solution attempted to minimize makespan, it is unlikely that earlier start times will be found without a re-assignment of many start times. Since we are trying to minimize the changes from the previous evolving solution, a reasonable constraint is that the new start times can only be greater than they were in the previous iteration.
  2. The upper-bound on the makespan of the new model is the one stored in the default solution.

So, with these two assumptions, we constrain the makespan of the temporal model to be less than our new upper bound. Remember that our default solution is one in which we match this new upper bound with no changes in the existing activities. Therefore, we only want to search for a solution with a smaller makespan.

  IloNum maxMakespanIncrease = 0;
  IloInt i;
  for(i = 0; i < numberOfResources; ++i)
    maxMakespanIncrease += 
      newJob[i].getActivity().getProcessingTimeVariable().getUB();

  temporalModel.add(makespan < 
		    originalSolution.getSolution().getValue(makespan) + 
		    maxMakespanIncrease);

We then add to the temporal model all the precedence constraints existing in the evolving model and constrain the minimum start time of each activity to be equal to its minimum start time in the evolving solution from the previous iteration.

Note also that we have created an IloSchedulerSolution object for the temporal model. This solution will be a key data structure for the communication of information between models.

Solving the temporal model (see Solving the Temporal Model for details) establishes a time window for each activity. It is important to understand that we are guaranteed that the time windows of each activity define a search space that includes at least one solution to the full evolving model, that is, to the model that includes all resources and resource constraints.