Author Topic: How to create formula? Need help!  (Read 580 times)

Caipiroska

  • Newbie
  • *
  • Posts: 2
    • View Profile
How to create formula? Need help!
« on: July 13, 2010, 04:33:33 PM »
Hi

I read some topics fere at the forum but I really don't understand how this work. I look for a formula which lokks like that:

The base value (100%) of a tournament is determined by the buy-in (no rake) and the number of tables at Tournament Start calculated.

Example: A tournament starts with 21 players with three tables, the buy-in 20 +5. The basic value of this Tournament is 60 = 3 x 20.

At the tournaments, players receive points for the ranking according to their classification.
1. Rang 100% 2. Rang 80% 3. Rang 60% 4. Rang 50%
5. Rang 40% 6. Rang 30% 7. Rang 20% 8. Rang 10%

Thanks for your help!
Regards Patrick




Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5381
    • View Profile
Re: How to create formula? Need help!
« Reply #1 on: July 14, 2010, 10:40:21 AM »
So, there should be a calculated amount of points that is the buy-in times the initial number of tables, and then 1st place should receive 100% of those, 2nd place should receive 80% of those, etc.  Right?

If so, here's a formula:

(buyinCost * ceil(n / 10)) * switch(r, 1, 1, 2, .8, 3, .6, 4, .5, 5, .4, 6, .3, 7, .2, 8, .1)

The only problem is the formula cannot know how many tables the tournament started out with.  In version 2.6 (currently in beta testing), the variable tablesLeft is available, but the value of this variable will change as tables are consolidated and at the end of the tournament when the final points are calculated (points are continuously recalculated throughout the tournament) this variable will likely be "1" and thus won't be valid for your formula.

So you have to code into the formula how many seats are at each table (and of course it assumes each table has the same number of seats).  So, this part of the formula:

ceil(n / 10)

computes the number of tables needed at the start of the tournament.  If your tables have, say, 8 seats each, change the 10 in the formula to 8.

Caipiroska

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: How to create formula? Need help!
« Reply #2 on: July 25, 2010, 09:54:54 AM »
Thanks for your help! Your answer was the formula I looking for.