[rules-users] Subject: Drools Planner - Design Suggestions

Dave Wellman dave.wellman at gmail.com
Mon Jan 3 13:32:38 EST 2011


Actually the historical data is actually quite accurate in forecasting
future traffic patterns only little variation week over week (< 0.3%)

A weeks traffic pattern looks like:

+
+
        ****
+
      ********
+     ******                   *****                    **
    ************
+   **********               *********                *******
   **************              ******
+  ************           *************            ************
 *****************          **********                 ******
        *****
+  ***************       ****************         **************
**********************     **************             **********
       **********
+  *****************************************
******************************************************************
    **************          *************
+  *****************************************************************************************************************
   *******************     *****************
+  *****************************************************************************************************************************************************************
+  **********************************************************************************************************************************************************************
+  ***********************************************************************************************************************************************************************
+  ***********************************************************************************************************************************************************************
+  ***********************************************************************************************************************************************************************
+  ***********************************************************************************************************************************************************************
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Using this data I am looking ahead for the peaks and "Mountaintop
Removal" for each ad.  So given 15 ads I can initialize them to the
peaks biased to 1 hour

AD      AVal    SVal    Price   Disc    Max     Bid     Start           Finish
------------------------------------------------------------------------------------
00      25460   15551   13.0    0.67    3.8     0.0     Thu  4:00 PM
 Thu  5:00 PM
01      11372   15527   51.0    0.38    2.32    0.0     Thu  5:00 PM
 Thu  6:00 PM
02      23690   15329   58.0    0.58    3.89    0.0     Thu  3:00 PM
 Thu  4:00 PM
03      11956   15281   18.0    0.57    3.04    0.0     Thu  6:00 PM
 Thu  7:00 PM
04      24323   14866   40.0    0.32    6.13    0.0     Thu  2:00 PM
 Thu  3:00 PM
05      11891   14856   54.0    0.42    2.42    0.0     Thu  7:00 PM
 Thu  8:00 PM
06      46770   14476   29.0    0.66    8.24    0.0     Thu  8:00 PM
 Thu  9:00 PM
07      23575   14220   48.0    0.21    8.91    0.0     Thu  1:00 PM
 Thu  2:00 PM
08      3519    13836   29.0    0.49    1.33    0.0     Thu  9:00 PM
 Thu 10:00 PM
09      20162   13836   29.0    0.44    7.16    0.0     Mon  5:00 PM
 Mon  6:00 PM
10      36654   13806   13.0    0.53    10.64   0.0     Mon  4:00 PM
 Mon  5:00 PM
11      72209   13642   41.0    0.69    9.18    0.0     Thu 12:00 PM
 Thu  1:00 PM
12      18438   13655   59.0    0.4     3.44    0.0     Mon  6:00 PM
 Mon  7:00 PM
13      10351   13589   29.0    0.27    7.1     0.0     Mon  3:00 PM
 Mon  4:00 PM
14      24239   13667   25.0    0.58    6.53    0.0     Tue  5:00 PM
 Tue  6:00 PM


AD = Ad #
AVal = Ad Value - simple formula based on price discount value and bid
price.  The better the deal the better the score. Better deals win
over bid price. (good for users)
SVal = Time Slot value.  Score based on traffic.
Price = price of the ad
Disc = discount value
Max = Bid Ratio (used for keyword bidding)
Bid = Current Bid - new ads have no bid value
Start = Est. Start Time
Finish = Est. Finish Time.

Once ads are positioned they are swapped around so that the most
valuable ad take the most valuable time slot.  As well as the most
valuable time slots filled first.

New ads can be submitted up to 24 hours in advanced and they continue
to play "king of the hill".

This is where it gets tricky.

Once an ad is in play, it will run for at least 10 minutes and no more
than 60.  Each ad has a limited number of clicks.  Once those clicks
are gone and it has been more then 10 minutes we "shift and shuffle"
the other ads to fill the gap.


We have about 60 seconds after an ad finishes to shift and shuffle.
Should be plenty of time to get the work done.

I really like the idea of adding in smarts - limit to weekends,
weekdays, work hours, nights.  Avoid running Windows mobile after a
iPhone ad.  One day add in features like if MS then always outbid
Apple. (it does happen)

We have a homegrown Java solution, but its limited and brittle so
moving to Drools seems like a great move for us.


Again, thank you all for the great feedback on this problem.

-D

On Mon, Jan 3, 2011 at 4:29 AM, Gabor Szokoli <szocske at gmail.com> wrote:
> On Sat, Jan 1, 2011 at 1:43 PM, ge0ffrey <ge0ffrey.spam at gmail.com> wrote:
>>
>> I agree on the normal constraints with vincent. The 100% sold is like nurses
>> falling sick.
>> You cannot plan it in advance.
>
> I could be misunderstanding the domain, but I though that's exactly
> what he wants the most :-)
> And the historical data is not a precise prediction of how traffic
> will turn out this week, just a clue.
> No use tailoring a tight plan to imprecise data.
>
> What I'd do is try to guesstimate the weekly amount of "prime time",
> when ads are likely to sell out within the hour.
> Reserve enough of the highest-paying ads, serve them up during actual
> high traffic periods in the order of profitability.
>
> In general, I'd partition the week into traffic buckets (likely to
> sell out 100%: 10 hours a week. between 99-80%: 20 hours, 79-60%: 40
> hours, etc), with corresponding ad pools. You size the pools based on
> historical data (the amount of ads you are likely to need to schedule
> during such traffic in a week) and fill up based on profitability (I
> guess pay/click * click probability)
> Then as the week goes by, you can simply pick any ad from the pool
> that belongs to the currently observable traffic rate, obeying other
> placement rules, borrowing from neighboring pools if needed.
>
> Depending on the CPU power you have available, you can make corrective
> adjustments to the pools either periodically or on the fly.
>
>
> The problem I see is skewing your click probability statistics by
> consistently placing certain ads in certain periods. You may need to
> place some ads totally randomly to have a more objective view.
>
>
> Hard to tell what your next step should be: Building in-house
> expertise is probably the best long term investment, but how much you
> must invest depends heavily on where your guys are now.
>
>
> Happy New Year!
>
> Gabor
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



More information about the rules-users mailing list