Resources


Scheduling Resource Entity State and Capacity Adjustments

Resources often undergo routine adjustments or changes, and the effects of such adjustments often last for a limited period of time. Examples are a truck having routine maintenance, a worker taking a lunch break, and salespeople being added for a holiday shopping season.

The scheduling of a resource adjustment often needs to address the following issues:

  • what type of adjustment to make—either capacity or state change

  • what resources to adjust—locate the targeted resources

  • when to adjust

  • how long to adjust

  • whether the adjustment is preemptive (disruptive)

  • where and how the adjustment takes place—in resource pools (unseized) or in other entity holding blocks (seized)

  • how to proceed to the next related adjustment, if any—temporally constrained or not

  • whether to repeat this adjustment in the future—repeatable or not

In Simulation Studio, resource scheduling is supported by the Resource Agenda and Resource Scheduler blocks together. The Resource Agenda block addresses the first issue in the preceding list, and the Resource Scheduler block addresses the other issues.

Resource adjustments are often related and happen in an orderly fashion. In Simulation Studio, related adjustment actions can be grouped together. A special type of value object called a Resource Agenda defines a sequence of related resource-adjustment actions based on a relative simulation time that starts at time zero. Each resource adjustment action includes a change to either the resource capacity value or the resource state value in targeted resource entities over a certain time period; it is defined as a resource agenda entry. The Resource Agenda block provides a resource agenda to describe what type of resource adjustments to make during a simulation run.

The Resource Scheduler block accepts and stores resource agenda objects during a simulation run. This block also accepts scheduling requests through an appointment to perform resource adjustments. The resource agendas are later activated and processed by the Resource Scheduler block as specified by the appointments. An appointment tells the Resource Scheduler which resource agenda to use for resource adjustments and how to deal with the second through last issues in the preceding list. After a resource agenda is activated, its entries are activated and processed sequentially. An appointment is fulfilled when all entries in the specified resource agenda are processed and all associated resource adjustments are completed.

There are two ways to specify an appointment in a Resource Scheduler block: statically or dynamically. You can enter a static appointment at the design or modeling time by using the Appointments tab of the Resource Scheduler block properties dialog box (see Figure 9.9). At simulation time, appointments are processed as the initial requests by the Resource Scheduler block. After an unrepeatable request is processed and all associated adjustments are completed, the request is discarded by the Resource Scheduler block.

In addition to the appointments that you schedule through the properties dialog box controls, you can also use resource schedule entities to request a Resource Scheduler block to process resource agendas dynamically through the InRequest port during a simulation run. If a request is repeatable and the OutRequest port is connected, the Resource Scheduler block sends a resource schedule entity out through the OutRequest port to represent the request that can be used again later. You can route these resource schedule entities to a Resource Scheduler block through its InRequest port as dynamic requests. Before being routed to a Resource Scheduler block, these resource schedule entities can be processed (delayed, modified, counted, stored, and so on) to simulate complicated scheduling situations. Resource schedule entities have attributes for each field that is required in order to define an appointment in a Resource Scheduler block. You can also create resource schedule entities by using an Entity Generator block, and the values of the resource schedule entity attributes can be set before routing it to a Resource Scheduler block. Note that if an appointment is repeatable but the OutRequest port is not connected, then the Resource Scheduler block automatically reschedules the appointment, using the current simulation time as the new start time.

Sometimes the contents of the resource agenda entries in a resource agenda are fixed and can be specified completely at the design time. But at other times, the duration or capacity change of an adjustment action is not fixed or cannot be specified in the corresponding resource agenda entries at the design time. For example, the downtime or duration of a machine failure is not fixed but follows a certain statistical distribution (such as a normal distribution). In Simulation Studio, the numeric contents (such as duration, units, and units offset) of a resource agenda entry can be left unspecified, or blank. Such an agenda entry is called a dynamic agenda entry. The Resource Agenda block populates the unspecified values by pulling these values dynamically though the InDuration or InValue input ports during the simulation. The desired values are created through submodels that are connected to these input ports.

When a resource agenda is active, the Resource Scheduler block performs the appropriate actions as specified by the Immediate Actions, Search Targets By, and Adjust Units By rules. For each adjustment action, certain groups of resource entities are identified as follows:

  • Potential targets are resource entities in the functional state that satisfy the requirements of the Search Targets By rule, which contains the Entity Type and Attribute Rule fields. If no rule is specified in these fields (that is, they are left blank), then all resource entities are potential targets.

  • Targets are resource entities from the set of potential targets that the Resource Scheduler block selects for adjustment so that the set of targeted entities is a subset of the set of potential targets. The resource entities that are selected to be targets depend on several factors, including the Adjust Units By rule and an “unseized first” heuristic, which means that the Resource Scheduler block always attempts to adjust unseized resource entities before seized entities.

Figure 9.12 and Figure 9.13 depict the relationship between the sets of resource entities that are potential targets and those that are actual targets.

Figure 9.12: Resource Entity Groups That Are Formed for an Adjustment Action

Resource Entity Groups That Are Formed for an Adjustment Action


Figure 9.13: How Resource Entity Groups Are Formed for an Adjustment Action

How Resource Entity Groups Are Formed for an Adjustment Action


When the targeted resource entities are actually adjusted depends on the Immediate Actions rule, which contains the Unseized, Seized, and Advance Agenda options. The Unseized option specifies when targeted unseized resource entities are adjusted. When selected, any targeted, unseized resource entities are adjusted immediately. Examples of when selecting this option is useful include increasing inventory levels immediately at all inactive warehouses or putting all trucks currently in a garage through routine maintenance. If you do not select the Unseized option, then any targeted unseized resource entities are adjusted after all seized resource entities that are potential targets become unseized. This represents the situation when all resource entities in the potential target group need to be gathered (unseized in a Resource Pool block) before any targeted entities are adjusted.

The Seized option specifies when seized resource entities (if any) are adjusted. When selected, any targeted resource entities that are currently seized are adjusted immediately if there are not enough unseized potential targets available to adjust. Whether the adjustment is a capacity change or a state change, this could trigger a preemption in a holding block where a seized entity is located at the time of the adjustment. If either the OutPreempt or OutResource port on the holding block is connected, then preemption will occur. If you do not select the Seized option, then any targeted, seized resource entities are adjusted after all seized resource entities that are potential targets return to a Resource Pool block and become unseized. Selecting the Seized option does not guarantee that any seized resource entities are adjusted. Seized entities are identified as targets for adjustment only if there are not enough unseized entities to cover the scheduled adjustment.

The Advance Agenda option is the third part of the Immediate Actions rule. When selected, the Resource Scheduler block moves on to process the next agenda entry without waiting for all seized and unseized targets to be adjusted for the current entry. This could result in a shorter time between actual resource adjustments than what the agenda specifies. If you do not select the Advance Agenda option, the Resource Scheduler block waits for all seized and unseized targets for the current entry to be adjusted before moving on to process the next agenda entry. As a result, the time between resource adjustments could be longer than the duration time specified in the resource agenda.

The Resource Scheduler block uses several heuristics to adjust the units of targeted resource entities when a request is made. In general, the Resource Scheduler block always attempts to adjust unseized entities before seized entities. This “unseized first” heuristic avoids unnecessary preemptive adjustments. The Adjust Units By field in the Resource Scheduler block dialog box specifies the policy that is used to allocate or deallocate resource units among targeted resource entities when there is a scheduled resource adjustment. The default FairIntegerBased policy requires that any adjustment to the units of a resource entity be made on an integer basis (integrally) and that any fractional resource units be ignored. If there is an increase in resource units, then those units are distributed integrally and as evenly as possible among all unseized resource entities that are potential targets (according to the “unseized first” heuristic). If there are not enough unseized potential targets available to adjust, then seized entities are adjusted. If there is a decrease in resource units, then the capacities of any unseized resource entities that are potential targets are integrally and evenly reduced. If there are not enough unseized resource units to cover the scheduled decrease, then the capacities of seized resource entities that are potential targets are integrally and evenly reduced either immediately (if you select the Seized option) or when all seized entities that are potential targets return to a Resource Pool block and become unseized (if you do not select the Seized option). For more information about the functionality of the Resource Agenda and Resource Scheduler blocks, see Appendix A: Templates.