High School Timetable using a Genetic Algorithm

梦想的初衷 提交于 2019-12-04 06:14:31

问题


I'm making a high school timetable genetic algorithm in java as a project, but I have couple questions in what direction I can approach this in.

  1. What should be my chromosome encoding? An ArrayList that holds each value or perhaps a string?

  2. How should I input and output the data? Should I hold the data in a excel and output the timetable as a GUI?

  3. Is there any essential knowledge a novice programmer should keep in mind when implementing the algorithm? So far the experience I've had with GA's is creating one which solves the Traveling Sales Man problem and evolving a population of random strings into "Hello World", but I'm afraid my lack of knowledge on databases and advanced concepts will bottleneck me from completing this project.

回答1:


  1. ArrayList because it is better for holding more data than a variable is. ArrayList is modifiable however, so make sure you really need it to be modifiable because it takes more performance than just an Array.
  2. Java can read and write to files. I wouldn't keep it in Excel format however, because I think it would be harder to read from. I would say keep it in a rawer format, maybe CSV.
  3. No project is too difficult to finish. As long as you have the time, the patience, and the willingness to learn, you will finish the project. A couple thoughts: I would look into JOptionPane or maybe even the console to present the final result. Also, look into FileWriter.



回答2:


To answer question 2 about input/output data and visualization:

Input/output data: I used the format of the ITC2007 compo. See my docs about the Curriculum Course example (which is high school timetabling).

Visualization: I used 3 tables (room, teacher and student group) as shown in this video.

But I didn't use GA's (because compo's like ITC2007 prove that they are inferior).



来源:https://stackoverflow.com/questions/27734684/high-school-timetable-using-a-genetic-algorithm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!