Go to primary content
Oracle® Retail Demand Forecasting Implementation Guide
Release 16.0
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

9 AutoSource

The AutoSource binary may be used to determine the optimal source level for a product/location. For the final level specified, AutoSource produces a forecast using each source level. The source level that produces the best PAE (Percent Absolute Error) for a time series is selected as the Optimal Source Level. The AutoSource results may be accessed by the user through the Forecast Maintenance workbook. If the Optimal Source Level is to be used for a product/location, the Use Optimal Source parameter should be set to True.

The AutoSource binary invokes code in the BatchForecast library to run the batch process. AutoSource can take four inputs: mode (required), finallevels (required), today, and timelimit (required for ONCEONLY and CYCLE mode).

The AutoSource binary does the following:

AutoSource uses the forecast horizon to compute the PAE (Percent Absolute Error). If the forecast horizon is changed from the default of 13 weeks, AutoSource starts forecasting that number of weeks back. For example, if you have a forecast horizon of 52 weeks, AutoSource starts its analysis 53 weeks before today. This approach can disallow Winters and Seasonal models if sufficient calendar is not available. If the forecast horizon is 52 weeks, you should have at least 3.5 years of history for AutoSource to be able to perform all of its analysis.

Unlike Generate, there is no interim forecast calculation in AutoSource. Instead, AutoSource attempts to generate an AutoES result at the final level, then uses that result to perform the source level spreads.


Note:

If the time series data is dense enough at the final level, the spread is not based on a linear contribution to the source. It will not maintain the source shape, and it will make recommendations based on such spreads.

AutoSource makes an initial recommendation to all the product/location combinations with sufficient data to perform analysis. Subsequent PAE calculation and comparison only occurs to these product/location combinations. The product/location combination without sufficient data (total sales = 0 during history region or total sales = 0 during forecast evaluation region) will not get any recommendation.

Inputs to AutoSource Binary

AutoSource is invoked from a script or the command line. The binary inputs are detailed in Table 9-1 and Table 9-2:

Table 9-1 AutoSource Binary Input Descriptions

Binary Inputs Description Example

-d

Relative or absolute path to domain

-d /cygdrive/c/Domains/RDF/ldom2

-mode

Includes the following options:


RESTART

Resetting measures, such that the next run starts without prior information. This option does not actually kick off any source level optimization run. Use this option when a clean run is desired, and then run AutoSource with one of the following next modes.

-mode RESTART

CYCLE

If AutoSource doesn't complete an optimization run due to the time limit, the next time it is run it picks up where it left last time.

For instance, if there are 10 source levels and during one run AutoSource only evaluated 3 source levels, then the next time it runs it optimizes source levels 4 and up.

CYCLE without a time limit will never finish. Once the last source level was evaluated, AutoSource starts with the first level again.

-mode CYCLE

ONCEONLY

AutoSource completes the run or stops when the time limit is up

-mode ONCEONLY

-flvllist

A list of the final forecast levels to be optimized

-flvllist 1


Table 9-2 AutoSource Optional Binary Input Descriptions

Optional Binary Inputs Description Example

[-today]

Specifies the date when AutoSource stops the evaluation of the forecast error. The evaluation starts at the date given by today minus the number of periods specified in the forecast length. Hence the time interval over which AutoSource evaluates the forecast error is [today - forecast length, today]. The date should be in the RPAS format stored in the dim_day array.

-today D20010101

[-timelimit]

Time, in minutes allowed AutoSource to run. It is optional for RESTART mode, but required for ONCEONLY and CYCLE mode. It needs to be greater than 0 to allow AutoSource to run.

-timelimit 10,000

[-noclear]

This is a flag indicating if temporary information should be deleted.

If not specified, the temporary information is deleted.

-noclear


Example 9-1 AutoSource Binary Example 1

AutoSource -d . -mode RESTART -flvllist 01,06 -today 20020101 -timelimit 10
AutoSource -d . -mode ONCEONLY -flvllist 01,06 -today 20020101 -timelimit 10

Example 9-2 AutoSource Binary Example 2

AutoSource -d . -mode CYCLE -flvllist 01,06 -today 20020101 -timelimit 10

If only running AutoSource periodically, then use the RESTART and ONCEONLY modes. If the run exceeds the time limit during a RESTART run, then ONCEONLY should be run. If you want to start from the beginning, RESTART and ONCEONLY should be run again.

If AutoSource is scheduled as part of the daily cron job, use CYCLE. CYCLE runs RESTART and then ONCEONLY consecutively.

Refer to the Oracle Retail Demand Forecasting User Guide for specifics pertaining to the Forecast Maintenance Workbook and picking optimal levels.


Note:

For item/stores that are new or highly seasonal, AutoSource may not return the best recommendation since new items may not have an adequate sales history length and highly seasonal items may only sell for a short period during the year. For these items, you should not set the AutoSource recommendation as default at the final level. Only use AutoSource recommendations for item/stores that have an adequate sales history.

AutoSource Measures

The following AutoSource measures are available in the Forecast Maintenance workbook.

Optimal Source Levels

Displayed only at final levels, a value is populated in this field if AutoSource has been run on the final level. The AutoSource executable evaluates all levels associated to a final level and returns the Source Level that yields the optimal forecast results or lowest error.

Pick Optimal Level

Set only at final levels, a check mark in this field indicates that the batch forecast should use the Optimal Source Level selected by AutoSource.

The final level measure Optimal Source Levels is used for reference. The RDF user can view the optimal Source Level that was determined by AutoSource. This Source Level was chosen by generating forecasts at all Source Levels and determining the lowest forecast error (PAE) at the final level.

If the user would like to use the Optimal Source Level during forecast generation they can set the Pick Optimal Level Boolean measure to True.

If Pick Optimal Level is set to True, when forecast generation is run, the optimal Source Level is used. The Forecast Method set at the optimal Source Level and the additional associated forecast parameters is also used.

Usage

AutoSource -d pathToDomain -mode RESTART/ONCEONLY/CYCLE -flvllist lvlx,lvly

[-today] todayString (the same format as in dim_day)

[-timelimit] minutes (optional for RESTART mode, but required for ONCEONLY and CYCLE mode)

[-noclear]

To get this usage text, use -?, -help, or -usage.

To get the version of this utility, use -version.

To set the level of information provided, use -loglevel with values of: all, profile, debug, information, warning, error, or none.

To disable the timestamp header, use -noheader.

The mode input must be one of RESTART, CYCLE, or ONCEONLY.

The flvllist must be a comma separated list of final levels.

The today input must be the same format as in dim_day, For example, YYYYMMDD.

The timelimit is in minutes.

  • RESTART: This mode initializes the system in preparation for a new Autosource batch process.

  • ONCEONLY: This mode runs the Autosource batch process until it completes or until the timelimit has been reached (whichever comes first).


    Note:

    In order to run in ONCEONLY mode, RESTART mode has to be run first.

  • CYCLE: This mode continuously runs the Autosource batch process by first running the RESTART mode, and then running ONCEONLY. The CYCLE mode allows the Autosource batch process to always use the latest data in determining the optimal source level for a prod/loc.


Note:

For Autosource usage examples, refer to Example 9-1 and Example 9-2.