总体规划
获取我的课程信息,自动优化并选择我的大学课程时间表
总体算法
- 使用其登录网站
Enterprise Sign On Engine 登录
- 查找我当前的学期及其
相关主题(预先设置)
- 导航到右侧页面并从每个相关主题获取数据
主题(讲座、实践和
研讨会时间)
- 剥离无用的数据
信息 对
- 更接近的类进行排序
彼此更高,
随机天数较低
- 解决最佳时间表解决方案
- 向我输出详细的列表
BEST CASE 信息
- 向我输出一份详细的列表
可能的类信息(一些
例如可能已满)
- 让程序选择最好的
自动上课
- 继续检查我们是否可以
实现7.
详细 6
让所有课程以讲座为焦点,排名最高(每个科目只有一门),并尝试围绕该课程安排课程。
问题
任何人都可以向我提供可能类似于用 python 编写的内容的链接吗?
关于 6.:您建议使用什么数据结构来存储这些信息? 一个链表其中每个对象都是uniclass的?
我应该将所有信息写入文本文件吗?
我认为 uniclass 的设置如下
属性:
我对 Python 几乎没有经验,并且认为这将是一个值得尝试完成的很好的学习项目。
感谢您提供的任何帮助和链接来帮助我开始,开放编辑以适当标记或任何必要的内容(不确定除了编程和Python之外这属于什么?)
编辑:不能真的得到了我想要的这篇文章的正确格式><
Overall Plan
Get my class information to automatically optimize and select my uni class timetable
Overall Algorithm
- Logon to the website using its
Enterprise Sign On Engine login
- Find my current semester and its
related subjects (pre setup)
- Navigate to the right page and get the data from each related
subject (lecture, practical and
workshop times)
- Strip the data of useless
information
- Rank the classes which are closer
to each other higher, the ones on
random days lower
- Solve a best time table solution
- Output me a detailed list of the
BEST CASE information
- Output me a detailed list of the
possible class information (some
might be full for example)
- Get the program to select the best
classes automatically
- Keep checking to see if we can
achieve 7.
6 in detail
Get all the classes, using the lectures as a focus point, would be highest ranked (only one per subject), and try to arrange the classes around that.
Questions
Can anyone supply me with links to something that might be similar to this hopefully written in python?
In regards to 6.: what data structure would you recommend to store this information in? A linked list where each object of uniclass?
Should i write all information to a text file?
I am thinking uniclass to be setup like the following
attributes:
- Subject
- Rank
- Time
- Type
- Teacher
I am hardly experienced in Python and thought this would be a good learning project to try to accomplish.
Thanks for any help and links provided to help get me started, open to edits to tag appropriately or what ever is necessary (not sure what this falls under other than programming and python?)
EDIT: can't really get the proper formatting i want for this SO post ><
发布评论
评论(3)
根据您计划采取#6 的程度以及数据集有多大,这可能并不简单; 对我来说,它确实有点 NP 难全局优化的味道……
不过,如果你谈论的是数十个(而不是数百个)节点,那么一个相当愚蠢的算法应该能够提供足够好的性能。
因此,您有两个限制:
这是灵活的。
我所说的灵活是指您可以去参加间隔更远的课程(分数较低),但您不能同时参加两个课程。 有趣的是,得分和冲突之间可能存在正相关关系。 得分较高的班级更有可能发生冲突。
我对算法的第一次通过:
如果类的长度不均匀、在奇怪的时间开始等等,那么计算冲突可能会很尴尬。 将开始和结束时间映射为时间“块”的简化表示(每 15 分钟/30 分钟或您需要的任何时间)将更容易查找不同课程的开始和结束之间的重叠。
Depending on how far you plan on taking #6, and how big the dataset is, it may be non-trivial; it certainly smacks of NP-hard global optimisation to me...
Still, if you're talking about tens (rather than hundreds) of nodes, a fairly dumb algorithm should give good enough performance.
So, you have two constraints:
this is flexible.
What I mean by flexible is that you can go to more spaced out classes (with lower scores), but you cannot be in two classes at once. Interestingly, there's likely to be a positive correlation between score and clashes; higher scoring classes are more likely to clash.
My first pass at an algorithm:
Working out clashes might be awkward if classes are of uneven lengths, start at strange times and so on. Mapping start and end times into a simplified representation of "blocks" of time (every 15 minutes / 30 minutes or whatever you need) would make it easier to look for overlaps between the start and end of different classes.
BeautifulSoup 在这里被提到了几次,例如 get-list-of-xml-attribute-values-in-python。
BeautifulSoup was mentioned here a few times, e.g get-list-of-xml-attribute-values-in-python.
这里有太多问题了。
请将其分解为多个主题领域,并就每个主题提出具体问题。 请重点关注其中一项并提出具体问题。 请定义您的术语:如果没有一些特定的衡量标准来优化,“最佳”并不意味着任何东西。
这是我在您的主题列表中看到的内容。
抓取 HTML
1 使用 Enterprise Sign On Engine 登录信息登录网站
2 查找我当前学期及其相关科目(预先设置)
3 导航到右侧页面并获取每个相关主题的数据(讲座、实践和研讨会时间)
4 删除无用信息的数据
一些算法根据“彼此更接近”来“排名”,寻找“最佳时间”。 由于这些术语未定义,因此几乎不可能对此提供任何帮助。
5 将彼此距离较近的班级排名较高,随机日期的班级排名较低
6 求解最佳时间表解决方案
输出一些内容。
7 向我输出一份最佳案例信息的详细列表
8 向我输出可能的类信息的详细列表(例如,有些可能已满)
优化某些内容,寻找“最佳”。 另一个无法定义的术语。
9 让程序自动选择最好的班级
10 继续检查我们是否可以实现 7。
顺便说一句,Python 有“列表"。 它们是否“链接”并不真正参与其中。
There are waaay too many questions here.
Please break this down into subject areas and ask specific questions on each subject. Please focus on one of these with specific questions. Please define your terms: "best" doesn't mean anything without some specific measurement to optimize.
Here's what I think I see in your list of topics.
Scraping HTML
1 Logon to the website using its Enterprise Sign On Engine login
2 Find my current semester and its related subjects (pre setup)
3 Navigate to the right page and get the data from each related subject (lecture, practical and workshop times)
4 Strip the data of useless information
Some algorithm to "rank" based on "closer to each other" looking for a "best time". Since these terms are undefined, it's nearly impossible to provide any help on this.
5 Rank the classes which are closer to each other higher, the ones on random days lower
6 Solve a best time table solution
Output something.
7 Output me a detailed list of the BEST CASE information
8 Output me a detailed list of the possible class information (some might be full for example)
Optimize something, looking for "best". Another undefinable term.
9 Get the program to select the best classes automatically
10 Keep checking to see if we can achieve 7.
BTW, Python has "lists". Whether or not they're "linked" doesn't really enter into it.