Answers.Body: <p>What you're looking for is most likely <a href="https://en.wikipedia.org/wiki/Constraint_programming" rel="nofollow noreferrer">constraint programming</a> (CP). Essentially, with a CP model you declare a set of variables and a set of constraints (and an objective, optionally). Then a solver will solve your model and find a solution if one exists (if you had specified an objective, it will find the best solution).</p>
  
  <p><a href="http://csplib.org/Problems/prob068/" rel="nofollow noreferrer">Here</a> is an example which is very silimar to your problem (a MiniZinc model which solves the problem is included). You can download <a href="http://www.minizinc.org" rel="nofollow noreferrer">MiniZinc</a> and try it out for yourself.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-05T22:39:32.317Z
Answers.Text: I been researching this, I found some great material on Google. Thanks so much for the direction. Constraint programming looks very close! https://developers.google.com/optimization/cp/
Answers.UserDisplayName: killerbarney
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-01T12:25:11.790Z
Answers.LastActivityDate: 2018-03-01T12:25:11.790Z
Answers.UserDisplayName: Philippe Olivier
Body: <p>I want to plot a schedule of races based on rules. Rules like "each team needs at least 2 races between their next race" and some teams (e.g. collegiate) need to be clumped near each other.</p>
  
  <p>What would be the best algorithm to approach this? So far, all I've found is genetic algorithm. Are there any other alternatives I could look into? </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-01T22:18:03.450Z
Comments.Text: I'm not sure of the optimal ML method for this, but can I ask have you looked at the usage of Latin squares in scheduling?  *(PS- Welcome to AI!)*
Comments.UserDisplayName: DukeZhou
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-02T21:56:34.400Z
Comments.Text: thanks!! ill see if I can make sense of Latin square
Comments.UserDisplayName: killerbarney
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-02T22:36:35.657Z
Comments.Text: Some links: [Latin Squares & Their Applications](https://books.google.com/books?id=hsxLCgAAQBAJ&pg=PA319&lpg=PA319&dq=latin+squares+scheduling&source=bl&ots=POxR1zGEDT&sig=vMeMKQrMYoLYCMxeSFPFjI0irmk&hl=en&sa=X&ved=0ahUKEwjjl-Hy2M7ZAhVGGt8KHdqZDA04ChDoAQgxMAQ#v=onepage&q=latin%20squares%20scheduling&f=false), [Multiple Access Scheduling Based on Latin Squares](http://ieeexplore.ieee.org/document/1493287/?reload=true), [Diagonal and Pandiagonal Tournament Latin Squares](https://www.sciencedirect.com/science/article/pii/S0195669885800056)
Comments.UserDisplayName: DukeZhou
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-02T22:38:04.450Z
Comments.Text: Also: [Handbook of Scheduling: Algorithms, Models, and Performance Analysis <Latin squares chapter>](https://books.google.com/books?id=0UV5AgAAQBAJ&pg=SA52-PA4&lpg=SA52-PA4&dq=latin+squares+scheduling&source=bl&ots=028AXOa1Jz&sig=ozfJryaWTssRfwTJD-ztZFuj2oE&hl=en&sa=X&ved=0ahUKEwjjl-Hy2M7ZAhVGGt8KHdqZDA04ChDoAQgmMAA#v=onepage&q=latin%20squares%20scheduling&f=false).  May not be the approach you're looking for, but there should at least be some useful insights :)
Comments.UserDisplayName: DukeZhou
Tags: <algorithm><genetic-algorithms>
Title: Which algorithm for scheduling race grid?
UserDisplayName: killerbarney
ThreadText: # Which algorithm for scheduling race grid?
  
  (Asked by: username_0 on 2018-02-28)
  
  I want to plot a schedule of races based on rules. Rules like "each team needs at least 2 races between their next race" and some teams (e.g. collegiate) need to be clumped near each other.
  
  What would be the best algorithm to approach this? So far, all I've found is genetic algorithm. Are there any other alternatives I could look into?
  
  **Tags:** algorithm, genetic-algorithms
  > **Comments:**
  > **username_1**: I'm not sure of the optimal ML method for this, but can I ask have you looked at the usage of Latin squares in scheduling?  *(PS- Welcome to AI!)*  
  > **username_0**: thanks!! ill see if I can make sense of Latin square  
  > **username_1**: Some links: [Latin Squares & Their Applications](https://books.google.com/books?id=hsxLCgAAQBAJ&pg=PA319&lpg=PA319&dq=latin+squares+scheduling&source=bl&ots=POxR1zGEDT&sig=vMeMKQrMYoLYCMxeSFPFjI0irmk&hl=en&sa=X&ved=0ahUKEwjjl-Hy2M7ZAhVGGt8KHdqZDA04ChDoAQgxMAQ#v=onepage&q=latin%20squares%20scheduling&f=false), [Multiple Access Scheduling Based on Latin Squares](http://ieeexplore.ieee.org/document/1493287/?reload=true), [Diagonal and Pandiagonal Tournament Latin Squares](https://www.sciencedirect.com/science/article/pii/S0195669885800056)  
  > **username_1**: Also: [Handbook of Scheduling: Algorithms, Models, and Performance Analysis <Latin squares chapter>](https://books.google.com/books?id=0UV5AgAAQBAJ&pg=SA52-PA4&lpg=SA52-PA4&dq=latin+squares+scheduling&source=bl&ots=028AXOa1Jz&sig=ozfJryaWTssRfwTJD-ztZFuj2oE&hl=en&sa=X&ved=0ahUKEwjjl-Hy2M7ZAhVGGt8KHdqZDA04ChDoAQgmMAA#v=onepage&q=latin%20squares%20scheduling&f=false).  May not be the approach you're looking for, but there should at least be some useful insights :)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-03-01. Score: 2
  
  What you're looking for is most likely [constraint programming](https://en.wikipedia.org/wiki/Constraint_programming) (CP). Essentially, with a CP model you declare a set of variables and a set of constraints (and an objective, optionally). Then a solver will solve your model and find a solution if one exists (if you had specified an objective, it will find the best solution).
  
  [Here](http://csplib.org/Problems/prob068/) is an example which is very silimar to your problem (a MiniZinc model which solves the problem is included). You can download [MiniZinc](http://www.minizinc.org) and try it out for yourself.
  
  > **Comments:**
  > **username_0**: I been researching this, I found some great material on Google. Thanks so much for the direction. Constraint programming looks very close! https://developers.google.com/optimization/cp/  
  
  ---
  
  