The Blue Line

Generating league schedules

Discuss all aspects of editing the data in EHM here. Have a question about the Pre Game Editor, editing the .cfg files, hex editing the .dat files? Want to tweak the EHM exe file to change league rules/structure, start date etc? This is the place!
Forum rules
This is the forum to discuss all aspects of editing the EHM data and tweaking the game.

Please note that discussion about roster updates belongs in the Game Add-ons Forum.

Generating league schedules

Postby andda715 » Wed Dec 21, 2016 5:56 pm

I got a pm asking about the schedule template generator I wrote, as I'm a new member apparently I can't reply (?) to the pm.

But here is the (very) quick and (very) dirty python code if someone is interested.
There is very likely much easier/better ways to do it, but the below did what I wanted. :-D
Note that it is quite hardcoded to do the Swedish First Division/HockeyEttan at the moment.
But feel free to use it in anyway you like.

Code: Select all
#!env python3
import copy
import random

# See way below for start of script
def generate_schedule(matches):
    schedule = ""
    ri = 1
    for day,month in dates:
        if len(matches) is 0:
            return schedule
        print('Generating day {:d}: {:d}/{:d} [remaining:{:d}]'.format(ri, day, month, len(matches)))
        ri += 1
        busyteams = []
        # Each round should have half the teams amount of matches
        toschedule = hteams
        if len(matches) < toschedule:
            # Schedule remaining matches
            toschedule = len(matches)
        for match in range(toschedule):
            (home,road) = matches.pop(0)
            # Avoid scheduling same team twice the same date
            # This is lazy, but seems to work ok...
            # Constraint programming much better but not worth the effort
            ok = False
            if home in busyteams or road in busyteams:
                # Try teams x 2 times, then givup and continue with next date
                for i in range(teams * 2):
                    if home in busyteams or road in busyteams:
                        matches.append((home,road))
                        (home,road) = matches.pop(0)
                    else:
                        ok = True
                        break

            else:
                ok = True

            if not ok:
                # Don't forget any matches...
                matches.append((home,road))
                continue
            busyteams.append(home)
            busyteams.append(road)
           
            for division in range(divisions):
                offset = division * 100
                divhome = offset + home
                divroad = offset + road
                schedule += '{:d},{:d},{:d},{:d},{:d}\n'.format(divroad, divhome, day, month, year)

    # This should be zero, otherwise tweak script or run again
    print('Remaining matches to be scheduled: {:d}'.format(len(matches)))
    return schedule

# Header
sl = open('schedule_list_he.csv', 'w')
sl.write('schedule_list,,,,\n')
sl.write('Road Team ID,Home Team ID,Day of Month,Month,Year Offset\n')

# Hard-coded dates day, month
dates = [[26, 9],[ 1,10],[ 4,10],[ 8,10],[10,10],
         [13,10],[15,10],[17,10],[22,10],[24,10],
         [27,10],[29,10],[31,10],[ 3,11],[ 7,11],
         [17,11],[21,11],[24,11],[28,11],[ 5,12],
         [10,12],[13,12],[15,12],[19,12],[22,12],
         [26,12],[28,12]]
year = 0
rounds = 1
# assumption: even number of teams
# assumption; conference = division
teams = 12
divisions = 4

# Generate matches to draw from
hteams = int(teams / 2)
matches = []
for round in range(rounds):
    for home in range(teams):
        for road in range(teams):
            if not home == road:
                matches.append((home, road))
           
print('Generated {:d} matches'.format(len(matches)))

schedule = generate_schedule(matches)
sl.write(schedule)

print('-----')
print(len(matches))
print(len(matches)/6)


EDIT: Minor bugfix...
Last edited by andda715 on Wed Dec 21, 2016 6:42 pm, edited 1 time in total.
andda715
Junior League
 
Posts: 44
Joined: Fri Apr 10, 2015 11:07 pm
Points: 0.46

Re: Editing league rules and structures in EHM 1

Postby Alessandro » Wed Dec 21, 2016 7:03 pm

andda715 wrote:I got a pm asking about the schedule template generator I wrote, as I'm a new member apparently I can't reply (?) to the pm.

But here is the (very) quick and (very) dirty python code if someone is interested.
There is very likely much easier/better ways to do it, but the below did what I wanted. :-D
Note that it is quite hardcoded to do the Swedish First Division/HockeyEttan at the moment.
But feel free to use it in anyway you like.


How does one use a python command?
I have no clue, today is literally the first time I heard about python
User avatar
Alessandro
TBL Rosters Man
Olympic Gold
 
Posts: 2,846
Joined: Sat Aug 27, 2005 2:54 pm
Points: 79.35

Re: Editing league rules and structures in EHM 1

Postby andda715 » Wed Dec 21, 2016 7:40 pm

Alessandro wrote:How does one use a python command?
I have no clue, today is literally the first time I heard about python


Hrm, the script is perhaps not very beginner friendly but if you want to jump in with both feet I'd start here:
https://www.python.org/

There you can get the environment downloaded and setup.
The script requires the 3.5 version (i.e. don't use 2.7).
andda715
Junior League
 
Posts: 44
Joined: Fri Apr 10, 2015 11:07 pm
Points: 0.46

Re: Editing league rules and structures in EHM 1

Postby archibalduk » Wed Dec 21, 2016 11:54 pm

I need to do some testing tomorrow and, provided all is ok, I should be able to release a new version of the Editor with some improvements and fixes relating to Rules & Structures editing.

I'll mention this again when I release, but I thought I'd flag up that the Stage Indexes are now displayed differently (e.g. the Linked Stages options on the Stages tab). Zero means no index, 1 = stage 1, etc. Hopefully this is a little more user-friendly than -7 = no index, -1 = stage 1, etc.

zbguy wrote:Hi Archi, on a separate issue, I've been experimenting with making Continental leagues (like the Euro Champions Cup). I think I'm closer to figuring out how they work vis-a-vis EHM. I was able to create a few North American continental leagues, but trying to make continental leagues in South America and Africa does not allow for those leagues to be accessed by the drop-down menu, nor do they function like other fully detailed leagues. I'm thinking Continental leagues only work fully for NA and European leagues. (I haven't tried Asia yet.) I don't know how useful this knowledge is but I can post the DB if you want to take a look at it.


Did you add a Ruling Body, Finance Rules and Transfer Rules for Africa/South America?

Alessandro wrote:Archi, gift us a schedule maker :notworthy:


A Schedule Dates generator is something I definitely plan to add. I'm not entirely sure about a Schedule Templates generator. Somebody once told me they were notoriously difficult to do well (it might have been Sebastian?). I don't think you can just randomly pick matches as you can end up with things like weird runs of road trips, playing the same team too frequently in a small space of time, etc. And dealing with things like conferences and divisions makes things more complex. There are online schedule generators which might however do the job. If we found a decent one, it would be straightforward to add the ability to import that site's output into the database.

marksbros6 wrote:Arch: can we add international competitions to the editor? I tried adding more Junior World Championship divisions last night and when I tried adding rule-sets to them the extra divisions I created weren't displayed.


I haven't tested it, but the options are there. And all of the existing international tournaments are already there. But of course you're limited to senior national teams and U20 teams as these are the only national teams in the DB.

BKarchitect wrote:Nevermind, I'm an idiot. There's a number of team per conference selection you have to make in the Stage under League Structure. Hopefully that fixed it.

Edit: working perfectly thus far! :joy:


:notworthy:

andda715 wrote:But here is the (very) quick and (very) dirty python code if someone is interested.


:notworthy:
User avatar
archibalduk
Seaside + Fruit Juice Mode
TBL Admin Team
 
Posts: 18,445
Joined: Tue Jul 06, 2004 9:44 pm
Points: 195.62
Trophies:  1   2   1

Re: Editing league rules and structures in EHM 1

Postby BKarchitect » Wed Dec 21, 2016 11:59 pm

I can't imagine a schedule template generator being able to handle something like a 31-team NHL league schedule with the variety of odd scheduling differences between teams (I mean - take a look at the link I posted above - getting 31 to work is pretty complex and there is variety in scheduling differences between teams in the same division even). Then you have to take into account games off for breaks, not having games back-to-back to back, trying to mix in home and roads, etc.

I mean - maybe it is possible but the generator program would need to be either be extremely robust or intended for only simple league scheduling maths.
BKarchitect
Minor League
 
Posts: 297
Joined: Sun Jan 08, 2012 1:21 am
Points: 2.99

Re: Editing league rules and structures in EHM 1

Postby archibalduk » Thu Dec 22, 2016 12:23 am

Funnily enough I was reading recently that the NFL uses 136 computers to generate their schedule (see here). Admittedly they have a fairly complex system where you don't play every team each season, but the fact it needs so much hardware to calculate possible schedules is crazy. Generating a very simple schedule is easy - but I think it gets complex when you want to make something more realistic or with anything other than a simple league structure. A lot of leagues' schedules can generally be found somewhere online. E.g. I managed to find the USHL schedule online which was relatively simple to convert into EHM format (it was just a case of splitting out the dates into separate columns and using find any replace to convert the team names to indexes).
User avatar
archibalduk
Seaside + Fruit Juice Mode
TBL Admin Team
 
Posts: 18,445
Joined: Tue Jul 06, 2004 9:44 pm
Points: 195.62
Trophies:  1   2   1

Re: Editing league rules and structures in EHM 1

Postby riz_si » Thu Dec 22, 2016 10:00 am

The exact reason schedule templates (which can be based on real life schedules) were introduced to EHM back in the day is that with a certain amount of complexity in schedule generation, it becomes nigh impossible to create realistic schedules via automation only. Iirc, the NHL always finetune their schedules manually as there are a lot of other factors involved aside from the normal constraints of divisional games, intra-conference games, road trips (that need to happen when the home teams are not on their own road trips) and back-to-back games. The other factors include arena availability (consider Madison Square Garden for example, even the circus being in town has an affect on the Rangers schedules) and other weird things that cannot be modelled really in a game.

It is possible to automate it to a certain degree and I think we tried it to a point with EHM at one stage and still have some code for it, but the templates just make it so much faster to provide the game with realistic schedules for leagues that have complex scheduling.
User avatar
riz_si
SI Games
 
Posts: 410
Joined: Mon Mar 14, 2005 12:58 pm
Points: 4.10

Re: Editing league rules and structures in EHM 1

Postby Alessandro » Thu Dec 22, 2016 10:40 am

archibalduk wrote:Funnily enough I was reading recently that the NFL uses 136 computers to generate their schedule (see here). Admittedly they have a fairly complex system where you don't play every team each season, but the fact it needs so much hardware to calculate possible schedules is crazy. Generating a very simple schedule is easy - but I think it gets complex when you want to make something more realistic or with anything other than a simple league structure. A lot of leagues' schedules can generally be found somewhere online. E.g. I managed to find the USHL schedule online which was relatively simple to convert into EHM format (it was just a case of splitting out the dates into separate columns and using find any replace to convert the team names to indexes).


Can you share those schedule?
Well, most of what NFL says is just a desperate attempt to get in the news...
User avatar
Alessandro
TBL Rosters Man
Olympic Gold
 
Posts: 2,846
Joined: Sat Aug 27, 2005 2:54 pm
Points: 79.35

Re: Editing league rules and structures in EHM 1

Postby nino33 » Thu Dec 22, 2016 3:32 pm

Alessandro wrote:Well, most of what NFL says is just a desperate attempt to get in the news...
The NFL is massively popular and has no problems getting in the news (even their "poor ratings" dwarf everything else)...
User avatar
nino33
Retro Rosters Specialist
Mr. Goalie
 
Posts: 5,743
Joined: Sat Aug 07, 2010 4:37 am
Points: 75.48

Re: Editing league rules and structures in EHM 1

Postby Alessandro » Thu Dec 22, 2016 4:26 pm

nino33 wrote:
Alessandro wrote:Well, most of what NFL says is just a desperate attempt to get in the news...
The NFL is massively popular and has no problems getting in the news (even their "poor ratings" dwarf everything else)...


Ok Nino, of course the NFL is popular and I kind of miswrote what I wanted to say, but let's not start a huge OT battle in this fantastic thread :thup:
User avatar
Alessandro
TBL Rosters Man
Olympic Gold
 
Posts: 2,846
Joined: Sat Aug 27, 2005 2:54 pm
Points: 79.35

Re: Editing league rules and structures in EHM 1

Postby Primis » Thu Dec 22, 2016 8:04 pm

Trying to not derail things too much, but the NFL also only has 16 games, and so they have to "weigh" schedules, so the worst teams the previous season gets the "easiest" schedule the next (based on how teams fared the previous season). That's a level of schedule complexity that is unnecessary in pretty much any other sport or league, because in anything else everyone plays everyone else at least once. Even in college football every school sets their own non-conference schedule, with no real restrictions at all.

I've never really had problems with schedule generation in any of the EHM's, including the freeware. It's not perfect, but it works a lot better than some other attempts I've seen games do.
User avatar
Primis
Freeware Moderator
 
Posts: 1,606
Joined: Tue Aug 03, 2010 8:46 pm
Points: 16.06

Re: Editing league rules and structures in EHM 1

Postby archibalduk » Thu Dec 22, 2016 10:01 pm

Alessandro wrote:Can you share those schedule?


Bringing this back on topic: Yes I can upload a copy. I'm busy working on and off this evening and, in between that, testing out the Editor before I upload hopefully tonight. I can try and share the schedule this weekend.

I wonder whether we should have a section in the Downloads Database for schedule templates and exported Rules and Structures (once they can be imported/exported using the Editor). :-k
User avatar
archibalduk
Seaside + Fruit Juice Mode
TBL Admin Team
 
Posts: 18,445
Joined: Tue Jul 06, 2004 9:44 pm
Points: 195.62
Trophies:  1   2   1

Re: Editing league rules and structures in EHM 1

Postby nino33 » Thu Dec 22, 2016 11:41 pm

Alessandro wrote:Ok Nino, of course the NFL is popular and I kind of miswrote what I wanted to say, but let's not start a huge OT battle in this fantastic thread :thup:
archibalduk wrote:Bringing this back on topic

Archi brought it up first! :-D
User avatar
nino33
Retro Rosters Specialist
Mr. Goalie
 
Posts: 5,743
Joined: Sat Aug 07, 2010 4:37 am
Points: 75.48

Re: Editing league rules and structures in EHM 1

Postby archibalduk » Thu Dec 22, 2016 11:53 pm

I blame Alessandro! :-D
User avatar
archibalduk
Seaside + Fruit Juice Mode
TBL Admin Team
 
Posts: 18,445
Joined: Tue Jul 06, 2004 9:44 pm
Points: 195.62
Trophies:  1   2   1

Re: Editing league rules and structures in EHM 1

Postby Alessandro » Fri Dec 23, 2016 12:03 am

archibalduk wrote:
Alessandro wrote:Can you share those schedule?



I wonder whether we should have a section in the Downloads Database for schedule templates and exported Rules and Structures (once they can be imported/exported using the Editor). :-k


Absolutely. My dream is to have it working like the EHM Updater so that we can release things that can work fast.
User avatar
Alessandro
TBL Rosters Man
Olympic Gold
 
Posts: 2,846
Joined: Sat Aug 27, 2005 2:54 pm
Points: 79.35

Re: Editing league rules and structures in EHM 1

Postby andda715 » Fri Dec 23, 2016 1:01 am

Scheduling being np hard is a very interesting problem, by using gecode (constraint programming framework, Google it) and some advanced rules including quite a lot of symmetry breaking we reduced build link times from several days to seconds. I believe that the same should apply to match scheduling. (found a research paper from this year indicating the same).

I believe, purely gut feeling based on reduced complexity, a limited version of match scheduling that only considers national team breaks, same town teams (?) while minimizing back to backs should be feasible to run quickly (seconds on current gen hw) in eg gecode.

Edit: read above and realize it sounds like I am saying it is easy. I am not, I wholeheartedly agree that the problem is really really hard! We used the author of gecode et al to pull of the link time improvement. Maybe not NFL scale in budget but not cheap...
Last edited by andda715 on Fri Dec 23, 2016 1:16 am, edited 2 times in total.
andda715
Junior League
 
Posts: 44
Joined: Fri Apr 10, 2015 11:07 pm
Points: 0.46

Generating schedules

Postby archibalduk » Sat Jul 29, 2017 12:36 pm

I saw this very interesting article on how the top Spanish football league generates its schedule. I thought I'd post it here because maybe it'll give some inspiration on how to create a simple schedule: https://www.reddit.com/r/soccer/comment ... generates/

narron25 wrote:As many of you may know, La Liga determined the 2017/18 season schedule last week. The process consisted of a draw last week for the week 1 fixtures, and then the computer automatically generates the rest of the fixtures. But how exactly is the schedule generated? It may seem like a mystery at first, but this post will hopefully make it a lot clearer.

Here is the actual schedule for reference:
Schedule from official La Liga Site

Let's first see if we can catch some patterns. Just like the Serie A, each team faces each other team exactly once in the first half of the fixture (19 matchdays), and in the exact same order in the second half of the fixture but with home/away status reversed. For example, Barcelona faces Real Betis at home in matchday 1 and away in matchday 20, Alaves away in matchday 2 and at home in matchday 21 etc. There is more to that though. Let's take a look at Barcelona's fixtures for the first few weeks:

Real Betis (H), Alaves (A), Espanyol (H), Getafe (A), Eibar (H), Girona (A) ...

Let's compare that to the fixture of Villareal, but instead of starting at week 1, we start at week 3:

Real Betis (H), Alaves (A), Espanyol (H), Getafe (A), Eibar (H), Girona (A) ...

That's the exact same teams, in the same order. Is this a coincidence? Well, let's take Real Sociedad - they play Real Betis at home at week 7. And sure enough, they play Alaves away at week 8, Espanyol at home at week 9 etc to match up with Barcelona's schedule. Deportivo has the same 6-game sequence starting from week 23, while Eibar's starts from week 12...

That is how the computer generated schedule is supposed to work. They generate the list below from the first round matchups drawn and assign a number to each team:

1 Real Madrid
2 Levante
3 Real Sociedad
4 Real Betis
5 Alaves
6 Espanyol
7 Getafe
8 Eibar
9 Girona
10 Las Palmas
11 Atletico
12 Malaga
13 Athletic Bilbao
14 Sevilla
15 Leganes
16 Barcelona
17 Celta
18 Villarreal
19 Deportivo La Coruna

All the drawn matchups (except for one... I'll explain that later) in matchday 1 has the team's numbers sum up to 20 (Deportivo(19) vs Real Madrid(1), Barcelona(16) vs Real Betis(4)). After that, we simply go downwards 1 place on the list to find their opponent for the next matchday (after reaching Deportivo, we go back to the top of the list and gets Real Madrid next); that's why Villarreal(18) faces Levante(2), Real Sociedad(3), and then Real Betis(4) and starts to follow Barcelona(16)'s schedule afterwards. To determine the home/away status, the teams on the list always alters between playing at home and away; teams numbered 1 to 9 are away on odd matchdays and at home on even matchdays, while teams numbered 10 to 19 are at home at odd matchdays and away on even matchdays (Week 1 schedule was altered by Spanish FA to ensure Villarreal and Atletico play as the away side; see note at bottom of post). So if we want to generate the schedule for say Celta(17), they will play Real Sociedad(3) at home, followed by Real Betis(4) away, Alaves(5) at home, Espanyol(6) away, etc... Easy, right?

But wait! La Liga has 20 teams, so one team is missing from that list - and it's no other than Valencia. I'd like to call them the Doppelganger team for this La Liga season, because they always play the team that's supposed to play against themselves. Remember that all drawn matchups in matchday 1 has the team's numbes sum up to 20? Well, Las Palmas(10) would be playing against themselves if we strictly follow that rule. Hence, Valencia the doppelganger steps in as the opponent and plays against Las Palmas in matchday 1. Las Palmas(10) is supposed to start the season on the road (number 10 to 19 does), so Valencia is at home. For matchday 2, Real Madrid would play at home against the team 1 number below Deportivo as their opponent, but that is themselves - so Valencia takes the place of the Imaginary Madrid team and plays away vs the Galacticos. Valencia then plays Malaga at home, Real Sociedad away etc. in similar fashion. As a reward for their special doppelganger role, Valencia get a different schedule than every other team who just plays the same opponents in the same order.

Welp, that was a much longer post than I expected. Hopefully this makes the La Liga schedule generation process a lot less mysterious. If you see your team's form suddenly drop consecutively, just sit back and relax; the same opponents in the same order is there for (almost) everyone else too, just at a different time in the season. Unless your team is Valencia, of course.

TL;DR - All La Liga's teams except Valencia play the same opponents in the same order (see the list above), just starting at different matchdays from each other. Valencia is always there to resolve the dilemma of a team playing against themselves when following that opponent order.

Note: there is a slight deviation in the actual schedule - Villarreal and Atletico requested to play away from home on week 1 due to their stadium construction work, but they were drawn to play at home. So their week 1 fixture was switched with their week 20 fixture, essentially exchanging home/away sequence vs. Levante and Girona respectively.
User avatar
archibalduk
Seaside + Fruit Juice Mode
TBL Admin Team
 
Posts: 18,445
Joined: Tue Jul 06, 2004 9:44 pm
Points: 195.62
Trophies:  1   2   1

Re: EHM 1 Database Editor (2016)

Postby ItWasJustified » Fri Nov 10, 2017 1:36 pm

archibalduk wrote:EDIT: I'm really sorry for the lengthy post. I thought I'd explain how it works in full, but it turned into a bit of an essay! :-D But hopefully this clarifies what the Templates do. The short answer is: Yes, the Templates are fully editable using the Editor - you can either edit via the Editor or import/export via spreadsheets.

<SNIP>


Will there be an easier way to create a schedule in the future? Possibly auto-generated? Say I want to edit a database and expand into 32, 34 or 36 teams, editing the full schedule is almost a full time job as it is now.
User avatar
ItWasJustified
Junior League
 
Posts: 7
Joined: Sat Mar 28, 2015 1:48 am
Points: 0.07

Re: EHM 1 Database & Saved Game Editor

Postby DarkSlimus » Fri Nov 10, 2017 2:19 pm

Or perhaps an external tool can do it and export in the spreadsheet ? I want this tool for my own DB and I' decided to learn Python and made it but I'm just a noob and it take time to learn so perhaps someone do it before me.

I search on the web programs to make league schedules and they're a lot with a minimal license of ... 90$ a year !! What the Dickens ! It's why I decide to make my own ...

I return learning Python :-D
User avatar
DarkSlimus
Junior League
 
Posts: 34
Joined: Mon Feb 02, 2009 4:47 am
Points: 2.33

Re: EHM 1 Database Editor (2016)

Postby archibalduk » Fri Nov 10, 2017 9:54 pm

ItWasJustified wrote:Will there be an easier way to create a schedule in the future? Possibly auto-generated? Say I want to edit a database and expand into 32, 34 or 36 teams, editing the full schedule is almost a full time job as it is now.


I don't know whether I'll add schedule generation to the Editor yet. I had hoped so, but it is extremely complex. See this thread for a brief summary of the complexities: viewtopic.php?f=110&t=18379&p=220833#p220875
User avatar
archibalduk
Seaside + Fruit Juice Mode
TBL Admin Team
 
Posts: 18,445
Joined: Tue Jul 06, 2004 9:44 pm
Points: 195.62
Trophies:  1   2   1

Re: EHM 1 Database Editor (2016)

Postby DarkSlimus » Fri Nov 10, 2017 11:09 pm

archibalduk wrote:I don't know whether I'll add schedule generation to the Editor yet. I had hoped so, but it is extremely complex. See this thread for a brief summary of the complexities: viewtopic.php?f=110&t=18379&p=220833#p220875


do the schedule manually is really a long time work. Do the program to do that would be too but someone else of you can perhaps do it. It's exactly my motivation in learning python language. I understand you have other things to develop for the editor, he is really great and I know you can improve it more and make an automation for schedule is secondary, other things are more important i think

with my progress in learning python, I understand the difficulty of the project but we can do it, cause we need it. Perhaps we need to make a specific subjects, perhaps some of tbl users have the competence to do it, or just have the idea how to do a realistic schedule.

I would open a subject on this but my english is limited for big message like this ^^
User avatar
DarkSlimus
Junior League
 
Posts: 34
Joined: Mon Feb 02, 2009 4:47 am
Points: 2.33

Re: Generating league schedules

Postby DarkSlimus » Sun Nov 12, 2017 12:06 am

Archi, thanks to transfer our post in this thread. I have read it and now I have a clearer picture on the work to do.

with the template of Liga create a schedule with 1 Division and even number of team would be easy and remain realistic. For NHL we can make some check to make it more realistic: home and away run between 3 and 5 matches, not the same opponent during 15 or 20, 3 days off every 15 or 20 matches, 2 matches in a row every 10 or 15 games ... but we haven't the obligation to respect shared arena with minor league or NBA and other things like that.

I progress every day in python cause I have lot of time actually. And I hope to make something soon for the most simple part of the "EHM Scheduler". When I have a functional code I will post in this thread.
User avatar
DarkSlimus
Junior League
 
Posts: 34
Joined: Mon Feb 02, 2009 4:47 am
Points: 2.33

Re: Generating league schedules

Postby archibalduk » Sun Nov 12, 2017 12:12 am

Sounds good. I think a fair few people would find an EHM Scheduler very useful. :thup:
User avatar
archibalduk
Seaside + Fruit Juice Mode
TBL Admin Team
 
Posts: 18,445
Joined: Tue Jul 06, 2004 9:44 pm
Points: 195.62
Trophies:  1   2   1

Re: Generating league schedules

Postby DarkSlimus » Mon Nov 13, 2017 12:59 am

Yes a fair few people are interested for an EHM Scheduler, but if we have one, we have more database available, and in that kind off stuff a lot of people are interested.

Today I wrote the first lines of the scheduler. Just one function to read a xlsx file where game day can be selected and so make the list of games days so it is no more hardcoded. I'm unable to do it with an GUI, it's not really user friendly but people who want this kind of tool are generally familiar with spreadsheets ...

I have some questions cause my next function is to make the list team. according of what I have read here. teams are numbers 1,2,... if we have division first division have no index and other division have one. so first team of each division are 1,101,201,301 etc ...rights?

but if we have conference? Like in an nhl 36 teams with 3 divisions, are division 0,1,2 in one conference and 3,4,5 in the other one? or it depends the names of the division so perhaps division order is mixed in conference and in this case it would be difficult to sort teams by conference.
User avatar
DarkSlimus
Junior League
 
Posts: 34
Joined: Mon Feb 02, 2009 4:47 am
Points: 2.33

Re: Generating league schedules

Postby BKarchitect » Mon Nov 13, 2017 3:06 am

Yes in my NHL36 the EC divisions are 0, 1, 2 and the WC divisions are 3, 4, 5. It's starts at 0, not 1. So the first teams in each division are 0, 100, 200, 300, 400, 500.

I believe the order has to do with how the divisions are inputted into the schedule template. In any case, I ordered in the same order in the Rules & Structure screen and the Schedule Template Screen so the EC divisions are 0, 1, 2 and the WC divisions are 3, 4, 5.

Image
BKarchitect
Minor League
 
Posts: 297
Joined: Sun Jan 08, 2012 1:21 am
Points: 2.99

Next

Return to Data Editing Forum

Who is online

Users browsing this forum: No registered users and 4 guests