Professional Documents
Culture Documents
Objectives
Review Log Parser Output
Proport Behavior
Prediction Status
General Debugging
Agenda
Log Parser
Prediction Status
Proport Behavior
Any update statements in this presentation are meant to be executed in a NON PRODUCTION system.
Demonstration
Demantra Demand Planning Log File Parser (Doc ID 2053982.1)
Termonology
hist_glob_prop -- Specifies the maximum number of base time buckets to use in calculating glob_prop, the running average demand
for any given item-location combination.
def_delta -- Specifies the default value for the delta field in the mdp_matrix table. If delta equals null for a given combination, the
system uses the value of this parameter instead. In turn, the delta field specifies the month-to-month smoothing of the weekly
proportions.
proport_missing -- Specifies what value to use for dates with null sales (zero or average).
proport_threshold -- Specifies the number of distinct months needed to compute P1, ... P12 in the usual way.
proport_spread -- Specifies what value to use for any month that has null data.
last_date -- Last date of actual sales, to be used by the Analytical Engine and the proport mechanism. No dates after this are used
towards the forecast or the proport calculation.
quantity_form -- Expression that the Analytical Engine uses to select the historical demand from the sales_data table; the result of
this expression is the data that the engine uses as input. The default expression transforms negative values to zero and should be
modified if business needs require negative demand.
mature_age -- Controls the mature_date, which is calculated backwards from the current date using the mature_age parameter. A
combination is young (rather than active) if it does not have any non-zero sales data for dates on or before the mature_date.
dying_time -- If no sales occurred during the length of time specified by dying_time, the combination will be marked as dead (0
forecast will be issued).
10
98 - Young - there is very little sales order history so while the combination will not be dead the engine will not try
to generate a forecast. Users should make sure there is an override value manually entered until it turns mature.
99 - Dead - This item/location combination will be ignored by the Forecast engine due to the fact that there have
not been any sales orders for a certain amount of time which is determined by the Dying Time System parameter
(eg - If the dying_time parameter is set to 26 weeks and there have been no sales order history for the past 26 weeks, this will
be an indication where Proport would input this value as the prediction_status for this item/location combination
11
12
Forecast Rows
What creates the forecast rows in the future is the Insert_Units procedure that runs as part of the
analytical forecast engine run.
The filter, simplified, that this procedure uses to analyze each combination is:
SELECT DISTINCT item_id, location_id
FROM mdp_matrix m
WHERE prediction_status <> 99
AND do_fore <> 0
AND level_id > 0
Ensure those combinations meet the following rules in the mdp_matrix table:
prediction_status <>99 (99 = Dead Address from lack of recent sales)
do_fore <> 0 (0 = User told the system not to forecast this combination anymore)
level_id > 0 (0 = internal flag set by engine)
If the combinations in question do not meet all of the above criteria, that is the reason the forecast buckets
are not generated by the latest engine run.
13
14
Prop_changes Column
When you change the column prop_changes from 0 to 1 for item location combinations in the
mdp_matrix table, and you run the proport procedure it will
Review those item location combinations to check and see if their prediction_status is accurate.
Once this is done, all the item location combinations should have an accurate prediction_status
Then the batch analytical engine can be run again to pick up item location combinations with prediction_status =
1 and generate the future forecast.
15
16
Forecast User Status - this will tell the user if the combination was turned off
A value of Do Forecast (1) or Do Zero Forecast (2) will satisfy the second rule for Insert Units
If these levels are not available to the users in the Demantra tool
The system administrator will need to turn them to be enabled. To do this go to Business Modeler --> Components -->
Create/Open Component. After double
Clicking on the component then go to the Levels screen, scroll down and find the two levels in question,
right click on them and choose Full Control.
After saving it then the web server will need to be restarted for the changes to appear to the end users.
17
Mature_age
When does a young item become live based on mature age setting ?
When does a young item become dead based on mature age setting ?
Each combination is either young, live, or dead, depending on the relative age of its sales data.
Demantra uses two cutoff dates to determine the age of a combination:
The dying date is controlled by the dying_time parameter, and the mature date is controlled by the mature_age
parameter. Both parameters are global.
18
Mature_age
High forecast for less history by Analytical engine
1. If you want to change the HistoryLength, you will find it in System parameters --> Engine --> Time tab.
2. If your engine is not generating forecast for a combination which has only 4 weeks of history, then please check
mature_age parameter in proport tab of system parameter.
I have checked the HistoryLength and it is 104.00.
And value for mature_age is 8.00
You should have sales between week 8 and week 104 in order to have the combination as active and engine to
generate forecast for it.
If all your sales are older then 104 weeks, your combination is consider dead, so engine will not generate forecast
for it.
If you have sales only in the latest 8 weeks, your combination is young.
19
20
In addition, depending of the prediction_status for the corresponding combinations, if the prediction_status = 99,
you can also adjust update_dead_comb parameter.
If this parameter is set to 1, then all combinations, even those with a prediction_status of 99 (dead), will be
updated;
- If this parameter is set to 0, then any combinations with a status of 99 that have historical values will be updated.
- If this parameter is set to 2, then any combinations with a status of 99 will not be updated.
Copyright 2016, Oracle and/or its affiliates. All rights reserved. |
21
22
dying_time
Issue caused by the following setup: hist_glob_prop is lower then dying_time. If dying_time is bigger then
hist_glob_prop and all sales history is between hist_glob_prop and dying_time, the proportions are returning
NULLS.
Message: WARNING NULL proportion detected for prop # at node: #, # is a warning that there are nulls in p1- p12 parameters and this
parameters should be calculated by proport procedure.
23
dying_time cont.
5. Check p1 - p12 for nulls and confirm there are no nulls for all non-dead combinations:
select distinct prediction_status from mdp_matrix
where p1 is NULL
or p2 is NULL
or p3 is NULL
or p4 is NULL
or p5 is NULL
or p6 is NULL
or p7 is NULL
or p8 is NULL
or p9 is NULL
or p10 is NULL
or p11 is NULL
or p12 is NULL;
24
dying_time cont.
Demantra is not updating the prediction status to 99 / forecast system status dead for old combinations.
Even for more periods without history that are specified with the dying_time parameter.
For example: the dying_time parameter is set to 26 periods and history of 0 has been loaded for 30 periods but the
prediction_status is still shwing '98' for 'young' combination.
Running the mdp_add procedure is not updating the status Solution
If equal to 0, the length of the history is set by the start_date parameter instead.
But dying_time should be less than HistoryLength
Dying time is the number of time buckets back from last date (max_sales_date)
If any sales with "QuantityForm" > 0 are found between dying date and max_sales_date then combinations are
NOT dead.
25
Dead Prediction_status
If the combination has no demand in SALES_DATA (quantity_form values), history or
forecast, and the combination is declared as 'dead' (prediction_status = '99'), all the
proportion values should have been zeroed out.
Run the following select statement adding the associated location_ids:
select prop_changes,
prediction_status,
ITEM_ID,
LOCATION_ID,
do_fore,
level_id,
do_aggri,
item_node, loc_node,is_fictive
from mdp_matrix
where location_id in (<&loc_ids>)
order by item_id, location_id;
26
Are < 0
27
Missing
1. Check if there are combinations in SALES_DATA that do not exist in MDP_MATRIX using the SQL below:
select count(1) from mdp_matrix where (item_id,location_id) not in (select distinct item_id,location_id from sales_data)
and (prediction_status=1 or (prediction_status=98 and aggri_98=1) or (prediction_status=99 and aggri_99=1))
and item_id <> 0;
2. If the query in step 1 gives any record count that is not 0 then do the following steps.
3. Correct the entries in MDP_MATRIX by setting the invalid combinations to dead combinations.
To do this you reset all of the prediction statuses to 'do not forecast' and then let proport make sure that
only truly good for forecast combinations are set to prediction_status = 1.
Run the SQL statements below
update mdp_matrix set prediction_status = 99, prop_changes=1;
commit;
4. Run your organization's version of proport() to set the correct combinations with prediction_status of 1.
5. Please note that if you have customizations that set prediction_status or has a customized criteria for
determining the combinations that should have a forecast, you will need to run that process after steps 1 - 4
are completed.
Copyright 2016, Oracle and/or its affiliates. All rights reserved. |
28
Prediction_Status
Controls how the Analytical Engine uses this combination. Each combination has one of the following
prediction status values:
96 (No Forecast) This status means that the Analytical Engine will completely ignore this combination.
97 (Create Zero Forecast) --- A user has set do_fore equal to 2 manually.
This status means that the Analytical Engine will insert a zero forecast for this combination but otherwise
ignore it.
98 (Young) Sales for this combination are too new to be used for prediction.
99 (Dead) Sales for this combination are not recent enough to be used for prediction.
1 (Live or Active)Neither young nor dead.
The Analytical Engine ignores any young or dead combinations, except when it is
necessary to aggregate
29
MDP_MATRIX
1) select count(*), do_fore, prediction_status from mdp_matrix group by do_fore,prediction_status;
This will give us an overview of how many combinations have a prediction_status = 1, good for forecast). This will also ensure that
we do not have any invalid combinations as there should be no null values in either/both columns. Any null values should be set to
do_fore = 1 and prediction_status = 1)
30
MDP_MATRIX - Investigate
The following SQL will tell you
How many active combinations are in mdp_matrix
prediction_status = 1 and do_fore= 1
How many Young
prediction_status = 98 and do_fore= 1
Dead combinations are part of the aggregated sales history, do_aggri = 1 and aggri_98/aggri_99 = 1
Used by the Engine in order to create a forecast
prediction_status= 99 and do_fore= 1
Interesting exercise:
Determine all combinations then
Determine how many are dead
31
32
MDP_MATRIX
COUNT(*)
PREDICTION_STATUS
DO_FORE
DO_AGGRI
AGGRI_98
AGGRI_99
LEVEL_ID
99
169
99
150000
34
99
99
98
44
98
99
2086
99
1101
99
50000
33
MDP_MATRIX
COUNT(*)
PREDICTION_STATUS
DO_FORE
DO_AGGRI
AGGRI_98
AGGRI_99
LEVEL_ID
99
169
99
150000
34
99
99
98
44
98
99
2086
99
1101
99
50000
Prediction_status = 1 is active
34
MDP_MATRIX
COUNT(*)
PREDICTION_STATUS
DO_FORE
DO_AGGRI
AGGRI_98
AGGRI_99
LEVEL_ID
99
Dead
169
99
Dead
150000
34
99
99
98
Young
44
98
Young
99
2086
99
Dead
1101
99
Dead
50000
Dead
The above SQL output shows 200k active combinations plus another 3444 Young (98) and Dead (99) combinations to be used in
aggregation.
do_fore=0, do not forecast
do_fore=1, forecast-default
do_fore=2, zero forecast
35
Prediction_Status
Controls how the Analytical Engine uses this combination.
Each combination has one of the following prediction status values:
96 (No Forecast) This status means that the Analytical Engine will completely ignore this combination.
97 (Create Zero Forecast) A user has set do_fore equal to 2 manually. This status means that the Analytical Engine will
insert a
Zero forecast for this combination but otherwise ignore it
98 (Young) Sales for this combination are too new to be used for prediction.
99 (Dead) Sales for this combination are not recent enough to be used for prediction.
1 (Live or Active)Neither young nor dead.
36
MDP_MATRIX Review
My Data Combinations do not have do_fore = 1 or prediction_status = 1
To resolve we are submitting an update to repair
Engine does not directly look at do_forecast
It references the prediction_status series
When proport is run and do_forecast = 0 the results should translate to prediction_status = 99 for which the engine will
not generate a forecast
The primary method to resolve is Run proport to update prediction_status
You can ensure proport only runs on the desired combinations by setting prop_changes = 1, another hidden series based
on the do_fore series.
If do_forecast is modified you set the series connect to prop_changes = 1.
Prior to batch run, the expectation is that proport is being executed
If you are loading data, proport should run automatically
If not tied to data load you need to call the procedure or run a workflow step which calls proport for the specific
engine_profile you care about.
37
MDP_MATRIX Prediction_Status
Is_Fictive=1
Is_Fictive=0 or 2
Do_Fore=0
N
Choice Not Available
Do_Fore=1
N
Do_Fore=2
N
Dying_Time?
Mature_Age=Y
N
38
MDP_MATRIX Prediction_Status
Is_Fictive=1
Is_Fictive=0 or 2
Do_Fore=0
N
Choice Not Available
Do_Fore=1
N
Do_Fore=2
N
Dying_Time?
Mature_Age=Y
N
39
MDP_MATRIX Prediction_Status
Is_Fictive=1
Is_Fictive=0 or 2
Do_Fore=0
N
Choice Not Available
Do_Fore=1
N
Do_Fore=2
N
Dying_Time?
Mature_Age=Y
N
40
MDP_MATRIX Prediction_Status
Is_Fictive=1
Is_Fictive=0 or 2
Do_Fore=0
N
Choice Not Available
Do_Fore=1
N
Do_Fore=2
N
Dying_Time?
Mature_Age=Y
N
41
Debugging
Error running Proport in db_exception_log. Error in executing dynamic_proc
20003 ORA-20003: Error in PROCEDURE PROPORT_SALES line 1120
executing dynamic_proc('DYN_PROP_028165151068_93 ('01-18-2014 00:00:00','01-16-2016 00:00:00')')
What can you do to reveal additional error information?
Please manually execute DYN_PROP_028165151068_93 to get the real error .
Begin
dynamic_proc('DYN_PROP_028165151068_93 ('01-18-2014 00:00:00','01-16-2016 00:00:00')');
end;
42
Debugging
We are seeing that the level_id is not populated for these combinations we expect to see them active.
Below see prediction_status = 98.
How is the level_id populated?
Is there any correlation between level_id and Prediction_status?
DO_FORE
PREDICTION_STATUS
DO_AGG
RI
IS_FICTIVE
PROP_CHANGES
LEVEL_ID
COUN T(*)
80
265
117
97
766
97
244
97
98
98
1347
43
Debugging
DO_FORE
PREDICTION_STATUS
DO_AGGRI
IS_FICTIVE
PROP_CHANGES
LEVEL_ID
COUN T(*)
80
265
117
97
766
97
244
97
98
98
1347
44
Debugging
DO_FORE
PREDICTION_STATUS
DO_AGGRI
IS_FICTIVE
PROP_CHANGES
LEVEL_ID
COUN T(*)
80
265
117
97
766
97
244
97
98
98
1347
Demantra sets a flag for each combination to indicate whether that combination is real or not.
In mdp_matrix, the is_fictive flag has one of the following values:
0 - Combination is real and it has non zero sales data.
1 - Combination is fictive (not real). This combination was created via Member Management.
2 - Combination is real but all sales are zero or null.
3 - Errors occurred while loading this combination.
45
MDP_MATRIX Prediction_Status
Is_Fictive=1
Is_Fictive=0 or 2
Do_Fore=0
N
Choice Not Available
Do_Fore=1
N
Do_Fore=2
N
Dying_Time?
Mature_Age=Y
N
46
47
proport_missing
Controls how missing dates are treated when calculating Glob_Prop parameter
(Average demand in the last hist_glob_prop time buckets)
48
I need to set up how Demantra split the data in the lowest levels
How forecast is generated by the engine if split down to lowest levels
If you are referring to analytical engine, then it first try to calculate the forecast at lowest level and most of the combination
should succeed to generate a forecast at lowest level.
If it cannot calculate a forecast at the lowest level item/location, then it will begin to move up the item/location hierarchy
Forecast Tree until it can calculate the forecast. In this case, it is still necessary to generate the forecast at the lowest level
item/location combination, so after generating the forecast at the higher hierarchy level, it will use the values in columns P1
through P12 to allocate forecast down at the lowest level item/location combination.
The override series updated by users at an aggregated level for proportional series in the worksheets
If you are referring to override series at an aggregated level, first check if the series is proportional on some other series or not.
If it is proportional on some other series, then use the bellow sequence:
1. First will use the proportions at the lowest level of the other series, unless all the values of the other series are 0 or null (in the
DB)
2. If all the values of the other series are 0 or null (in the DB, not what customer sees), use glob_prop , unless all glob_props are 0
or null for all the combinations.
3. If also the glob_props are 0 or null for all the combinations at the lowest level, then use equal split.
49
Even so, verify the def_delta parameter that is set in the init_params_0 table.
Copyright 2016, Oracle and/or its affiliates. All rights reserved. |
50
Case Scenario where you can use proport to manipulate forecast horizon
Want to compare the forecast with the actuals.
Must have the engine to do a forecast from say Jan 1 2015 instead. That way they can
compare the forecast for the 1st qtr (Jan 2016 to Mar 2016) with that of the actuals.
You want the engine to ignore the history loaded for the period Jan to Mar 2016 and
use only historical data up to Dec 31 2015 to do forecast there of.
How can I achieve the same ( historical fit forecasts )
You would need to set history back to Dec 31 2015.
51
Case Scenario where you can use proport to manipulate forecast horizon
1) set parameters Max_sales_date,last_date_backup to Dec 31 2015
3) Rerun proport from sqlplus
3.1) Update mdp_matrix set prop_changes = 1;
3.2) Commit;
3.3) exec proport
4) Ensure parameters above are still set to Dec 31 2015
5) Run the engine.
After the test customer must repeat steps above to restore end of history date to
current end of history week.
52
53
Summary
54
55
Q&A
To ask a question on the phone
line, select *1 on your phone.
To ask a question online, use the
Q&A area at the top.
Your question will be read aloud in
the order received.
Question can also be asked on the
My Oracle Support Communities
56
57
58
Stay Connected
https://blogs.oracle.com/ebs/
Twitter:
https://twitter.com/Oracle_EBS
Facebook
https://www.facebook.com/OracleEBusinessSuiteSupport
59
My Oracle Support
How To Series
Detailed training videos,
documentation. Latest
how-to content,
webcasts, self-paced
replay. Select a feature or
role to get started. Doc
603505.1
Oracle Support
Accreditation
learning
Leverage the Oracle
Support Accreditation
portfolio of portal and
product accreditations.
Get accredited today.
Doc 1583898.1
60
61
Q&A
To ask a question on the phone
line, select *1 on your phone.
To ask a question online, use the
Q&A area at the top.
Your question will be read aloud in
the order received.
Question can also be asked on the
My Oracle Support Communities
62
THANK YOU
Copyright 2016, Oracle and/or its affiliates. All rights reserved. |
63
64
R 255
G 255
B 255
R 95
G 95
B 95
R 220
G 227
B 228
R 127
G 127
B 127
R 248
G0
B 0
R 138
G 19
B 59
R 255
G 119
B 0
R 70
G 87
B 94
R 141
G 166
B 177
R 176
G 195
B 200
65
Theme Colors
Theme Colors are approved
Oracle primary colors
Copyright 2016, Oracle and/or its affiliates. All rights reserved. | Confidential Oracle Internal/Restricted/Highly Restricted
66
Additional Resources
my.oracle.com/site/mktg/creative/graphics/photography
my.oracle.com/site/mktg/creative/Graphics/Photography/cnt1375391.htm
Academic
Airline
Analytics
Application
ATM
my.oracle.com/site/mktg/creative/Graphics/Icons/index.html
my.oracle.com/site/mktg/creative/Logos/index.html
67