Hello There, Guest! Register



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Server subdivisions
#6
Hi everyone, first post here. Let me just first say I absolutely love this App! <3

Now to the problem at hand, I thought of a robust algorithm for fair splitting. Works for any tracks, any number of drivers, any number of servers, providing a 'fair' split, with top drivers in more packed server whenever possible, no servers at less than half grid, and of course mimimum number of servers is use!

Let's say you have
  • A track whose start grid can accomodate G drivers (for my example G=20)
  • A group of N ranked drivers (formy example N=12,18,25,...,64)
  • A number of servers S (for my example S=3)
Here's how it would work:
  1. If N>G*S: fill all servers (not enough servers for all the drivers!)
  2. If 0<N<=G: everyone on server 1
  3. If G<N<=1.5xG : split 50%/50% on servers: S1=S2= N/2 (with uneven N, favor highest split server)
  4. If 1.5xG<N : fill Server 1, rest is split between remaining servers as per rule 2&3&4 recursively
Exemples (G=20, S=3) with increasing number of drivers N:
Code:
N=12: S1=12 | S2=0  | S3=0  | rule2: all on S1
N=18: S1=18 | S2=0  | S3=0  | rule2: all on S1
N=25: S1=13 | S2=12 | S3=0  | rule3: 50/50 split on S1&S2 (round towards S1)
N=28: S1=14 | S2=14 | S3=0  | rule3: 50/50 split S1&S2
N=35: S1=20 | S2=15 | S3=0  | rule4: fill S1, 15 drivers remain, rule 2: all on S2
N=42: S1=20 | S2=11 | S3=11 | rule4: fill S1, 22 drivers remain, rule 3: 50/50 on S2&S3
N=49: S1=20 | S2=15 | S3=14 | rule4: fill S1, 21 drivers remain, rule 3: 50/50 on S2&S3 (round towards S2)
N=57: S1=20 | S2=20 | S3=17 | rule4: fill S1, 37 drivers remain, rule 4: fill S2, rule 2: all on S3
N=64: S1=20 | S2=20 | S3=20 | rule1: fill all (not enough servers)

I hope I am being clear!
As you can see, load is spread, so no secondary server is left with a handful of drivers. At the same time, higher splits are favored : Server 1 load is always high.

Any thoughts? I am willing to provide pseudo-code or actual tested code for this, in any language.
Reply


Messages In This Thread
Server subdivisions - by Michele Mangili - 05-23-2016, 02:37 PM
RE: Server subdivisions - by Michael Pierce - 05-24-2016, 01:14 PM
RE: Server subdivisions - by Dietmar Auferkorte - 05-24-2016, 10:52 PM
RE: Server subdivisions - by Kevin Cox - 05-25-2016, 07:12 PM
RE: Server subdivisions - by John Thornborrow - 05-29-2016, 12:35 AM
RE: Server subdivisions - by Sylvain Boisse - 06-12-2016, 09:19 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)