Initializing help system before first use

requires

Purpose
Sets the minimal and maximal amount of resource required by a task for a particular resource.
A task requires some amount of processing power of a resource when this amount must be made available for the execution of the task. The resource requirement is considered as renewable which means that whenever the tasks ends the processing power that was required is still available for processing other tasks. Note that a minimal amount of 0 is possible thus allowing modelisation of alternative resources. The type of resource requirement can be defined in several ways:
  • By specifying a resource and a constant requirement parameter 'requirement'. In this case the resource requirement is constant other the execution of the task.
  • By specifying a resource and a minimal 'minReq' and maximal 'maxReq' requirement parameters: In this case the resource requirement is a decision variable but is constant other the execution of the task.
  • By specifying a cpresusage 'usage' (see resusage for further detail).
  • By a set of alternative cpresusage 'optUsages': This makes it possible to model alternative resources. The type of resource requirement is defined by the resource usage passed in argument (see resusage for further detail).
  • By a set of alternative cpresusage 'optUsages', a minimal 'minalt' and a maximal 'maxalt' number of alternative resources that are required: Between [minalt..maxalt] alternative requirements from the set will be active which means that several resources will be chosen as requirements by the task. The type of resource requirement is defined by the resource usage passed in argument (see resusage for further detail).

Synopsis
procedure requires(task:cptask, requirement:integer, resource:cpresource)
procedure requires(task:cptask, minReq:integer, maxReq:integer, resource:cpresource)
procedure requires(task:cptask, usage:cpresusage)
procedure requires(task:cptask, optUsages:set of cpresusage)
procedure requires(task:cptask, optUsages:set of cpresusage, minalt:integer, maxalt:integer)
Arguments
task 
the task
requirement 
constant positive resource consumption
minReq 
minimal resource requirement
maxReq 
maximal resource requirement
resource 
the resource to be required
usage 
the resource usage
optUsages 
the set of alternatives resource requirements
minalt 
minimal number of resources that must be required
maxalt 
maximal number of resources that may be required
Example
See the example provided for consumes.
Related topics

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.