Batch override rules
Batch override rules are used to determine if forming batch loads should be released even though the forming batch quantity has not reached the minimum release quantity. An example of such a situation is when a load has been waiting for a length of time longer than that specified in the override release threshold on the batch.
The batch override function associated with a rule is called under these two conditions:
- When add override release reviews are enabled and a load is added to a forming batch, but the forming batch does not reach or exceed its minimum release quantity.
- During a periodic override release review, which occurs at an interval specified on the batch if the periodic review is enabled.
You can create a custom batch override rule and its corresponding function. Your function can have any name that is not a standard system function name. It must accept two arguments:
- A pointer to the forming batch load, Type: FORMBAT *.
- A pointer to the batch for the forming batch load, Type: BATCHDEF *.
Your function should return (Type: int):
- TRUE (non-zero) if the forming batch load should be released.
- FALSE (zero) if the forming batch load that should not be released.
Here is an example of a batch override function:
int borl (FORMBAT *formbat, BATCHDEF *batch)
/*-----------------------------------------------------------------
Function to process batching override rule 0 (the time that
the forming batch has been waiting is greater or equal to the
override threshold).
ARGS:
formbat - forming batch load to check for release
batch - batch that the forming batch is in
RETURNS:
true if the forming batch has been waiting too long, or
false otherwise.
-----------------------------------------------------------------*/
{
double x;
char trace[200];
x = cstnow - formbat->fbsttim;
sprintf(trace, "Batch %d has been forming %f hours",
formbat->fbldp->lobat->bibatid, x);
setrace(0, trace);
/* If the time the batch has been forming is at least the
threshold, then release the batch. */
if(x >= batch->btovth)
{
return(1);
}
else
{
return(0);
}
}
To make your tailored batch override function available to the Scheduler, you must “install” it from the first user-initialization function ucini1 by calling the function sedfov. The function sedfov has two arguments:
- The number of the batch override release rule for which your function contains tailored logic.
- The address of your batch override function.