Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - scheduling script

Reply
 
Old 02-15-2008   #1 (permalink)
Ben Christian


 
 

scheduling script

OK...this is a tough one...basically what i want to do is write a script to
automate the creation of a schedule (for example, for a sports league),
because it's a pain to do it by hand

each team is associated with a location, as well as a division. each team
would play each other team within their own division twice, and each team
plays an equivalent amount of home/away games (or closest possible if the
number of matches for the season is odd).

some teams may have the same location, and locations can accomodate more
than one match at once (but generally limited to 2 matches/4 teams at the
same time).

The number of games played varies depending on how many teams join the
league...

Basically the ideal input would be:
Team Properties for each team
-Name
-Division
-Home 'court'
Location Properties
-max simultaneous matches

the script would then determine how many matches to schedule for the season
depending on the number of teams in a division, and schedule match ups with
home/away locations, while at the same time, not overpopulating a location.
and match the scheduling criteria above

So...i haven't even gotten started, because i'm not really even sure what
the logic behind this should look like in a script...anyone have suggestions
to get me going? =)

Thanks!

p.s. if you want to just get me started on something a little less complex,
like scheduling a single division instead of multiples, that would also be
super helpful, although the multiple divisions thing would need to be added
in at some point due to overbooking issues and teams on different divisions
may play out of the same home locations...

My System SpecsSystem Spec
Old 02-17-2008   #2 (permalink)
Jon


 
 

Re: scheduling script

I think the way to do it would be to first clarify your logic with no code
on paper, and then when you've worked out the sequence of steps clearly in
your head, then and only then go about translating it into code. If you jump
into code straight away you're liable to get lost, or for it to take much
longer. So that would be my tip.

Other than that it's really a question of just reading the documentation for
PowerShell, and knowing what can be done with it. If you run into any
particular issues, then post back and I'm sure there will be many people
willing to get you over the next hurdle.

--
Jon


"Ben Christian" <BenChristian@xxxxxx> wrote in message
news:CA6BDB72-E43C-492C-9D62-6A69BDD5E3A1@xxxxxx
Quote:

> OK...this is a tough one...basically what i want to do is write a script
> to
> automate the creation of a schedule (for example, for a sports league),
> because it's a pain to do it by hand
>
> each team is associated with a location, as well as a division. each team
> would play each other team within their own division twice, and each team
> plays an equivalent amount of home/away games (or closest possible if the
> number of matches for the season is odd).
>
> some teams may have the same location, and locations can accomodate more
> than one match at once (but generally limited to 2 matches/4 teams at the
> same time).
>
> The number of games played varies depending on how many teams join the
> league...
>
> Basically the ideal input would be:
> Team Properties for each team
> -Name
> -Division
> -Home 'court'
> Location Properties
> -max simultaneous matches
>
> the script would then determine how many matches to schedule for the
> season
> depending on the number of teams in a division, and schedule match ups
> with
> home/away locations, while at the same time, not overpopulating a
> location.
> and match the scheduling criteria above
>
> So...i haven't even gotten started, because i'm not really even sure what
> the logic behind this should look like in a script...anyone have
> suggestions
> to get me going? =)
>
> Thanks!
>
> p.s. if you want to just get me started on something a little less
> complex,
> like scheduling a single division instead of multiples, that would also be
> super helpful, although the multiple divisions thing would need to be
> added
> in at some point due to overbooking issues and teams on different
> divisions
> may play out of the same home locations...
My System SpecsSystem Spec
Old 02-17-2008   #3 (permalink)
Marco Shaw [MVP]


 
 

Re: scheduling script

> some teams may have the same location, and locations can accomodate more
Quote:

> than one match at once (but generally limited to 2 matches/4 teams at the
> same time).
>
> The number of games played varies depending on how many teams join the
> league...
>
> Basically the ideal input would be:
> Team Properties for each team
> -Name
> -Division
> -Home 'court'
> Location Properties
> -max simultaneous matches
I'll help...

Do the games have to be somewhat random?

What would you like the output to look like roughly?

Marco
My System SpecsSystem Spec
Old 02-21-2008   #4 (permalink)
Ben Christian


 
 

Re: scheduling script

Thanks...A CSV would do...I'm still not really sure on the logic behind
it...that's probably where i need the most help

As for the output...
A column for each week of the season, and an entry per match in each column
with all the team matchups, plus a part that defines the home locations for
each team:

Example:
Week 1 Week 2
Team A @ Team B Team B @ Team A
Team C @ Team D Team D @ Team C

Team A = Phoenix
Team B = Miami
Team C = LA
Team D = LA
------------------------------

Thanks!!!


"Marco Shaw [MVP]" wrote:
Quote:
Quote:

> > some teams may have the same location, and locations can accomodate more
> > than one match at once (but generally limited to 2 matches/4 teams at the
> > same time).
> >
> > The number of games played varies depending on how many teams join the
> > league...
> >
> > Basically the ideal input would be:
> > Team Properties for each team
> > -Name
> > -Division
> > -Home 'court'
> > Location Properties
> > -max simultaneous matches
>
> I'll help...
>
> Do the games have to be somewhat random?
>
> What would you like the output to look like roughly?
>
> Marco
>
My System SpecsSystem Spec
Old 02-25-2008   #5 (permalink)
Shay Levi


 
 

Re: scheduling script


Try:

http://mat.gsia.cmu.edu/sports/Software/

-----
Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com
Quote:

> Thanks...A CSV would do...I'm still not really sure on the logic
> behind it...that's probably where i need the most help
>
> As for the output...
> A column for each week of the season, and an entry per match in each
> column
> with all the team matchups, plus a part that defines the home
> locations for
> each team:
> Example:
> Week 1 Week 2
> Team A @ Team B Team B @ Team A
> Team C @ Team D Team D @ Team C
> Team A = Phoenix
> Team B = Miami
> Team C = LA
> Team D = LA
> ------------------------------
> Thanks!!!
>
> "Marco Shaw [MVP]" wrote:
>
Quote:
Quote:

>>> some teams may have the same location, and locations can accomodate
>>> more than one match at once (but generally limited to 2 matches/4
>>> teams at the same time).
>>>
>>> The number of games played varies depending on how many teams join
>>> the league...
>>>
>>> Basically the ideal input would be:
>>> Team Properties for each team
>>> -Name
>>> -Division
>>> -Home 'court'
>>> Location Properties
>>> -max simultaneous matches
>> I'll help...
>>
>> Do the games have to be somewhat random?
>>
>> What would you like the output to look like roughly?
>>
>> Marco
>>

My System SpecsSystem Spec
Old 04-09-2008   #6 (permalink)
Marco Shaw [MVP]


 
 

Re: scheduling script

Ben Christian wrote:
Quote:

> OK...this is a tough one...basically what i want to do is write a script to
> automate the creation of a schedule (for example, for a sports league),
> because it's a pain to do it by hand
>
> each team is associated with a location, as well as a division. each team
> would play each other team within their own division twice, and each team
> plays an equivalent amount of home/away games (or closest possible if the
> number of matches for the season is odd).
>
> some teams may have the same location, and locations can accomodate more
> than one match at once (but generally limited to 2 matches/4 teams at the
> same time).
>
> The number of games played varies depending on how many teams join the
> league...
>
> Basically the ideal input would be:
> Team Properties for each team
> -Name
> -Division
> -Home 'court'
> Location Properties
> -max simultaneous matches
>
> the script would then determine how many matches to schedule for the season
> depending on the number of teams in a division, and schedule match ups with
> home/away locations, while at the same time, not overpopulating a location.
> and match the scheduling criteria above
>
> So...i haven't even gotten started, because i'm not really even sure what
> the logic behind this should look like in a script...anyone have suggestions
> to get me going? =)
>
> Thanks!
>
> p.s. if you want to just get me started on something a little less complex,
> like scheduling a single division instead of multiples, that would also be
> super helpful, although the multiple divisions thing would need to be added
> in at some point due to overbooking issues and teams on different divisions
> may play out of the same home locations...
Sorry, I forgot about this. Are you still looking for something?

You can email me directly. My address on this post is valid, just
remove the "_NO_SPAM_" part.

Marco

--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Scheduling scripts VB Script
Scheduling Tasks vs UAC Vista security
scheduling a powershell script PowerShell
SyncToy Scheduling Vista General
Scheduling Tasks Vista mail


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46