Optimize the automatic schedule schedule?

Overall plan

Get my class information to automatically optimize and select my uni class schedule

General algorithm

  • Login to the site using the Enterprise login login
  • Find my current semester and its (preset)
  • Go to the desired page and get data from each related subject (lecture, practice and working hours)
  • Divide data useless information
  • Rank the classes that are closer to each other above, those that are random days below
  • Decide the optimal time table solution
  • Show me a detailed list BEST BUSINESS INFORMATION
  • Show me a detailed list of possible class information (some can be filled in, for example)
  • Get the program to choose the best classes automatically
  • Keep checking if we can achieve 7.

6 in detail Get all classes, using lectures as focus, will have the highest rating (only one for each subject) and try to organize the classes around that.

Questions

Can anyone provide me with links on what might be similar to this hopefully written in python? Regarding 6 .: What data structure would you recommend storing this information? Linked list, where is each uniclass object? Should I write all information to a text file?

I think uniclass will be configured like this attributes:

  • Topic
  • a place
  • Time
  • A type
  • Teacher

I am not very experienced in Python and thought it would be a good tutorial project to try and follow. Thanks for any help and links to help me get started, open tags for editing accordingly, or whatever is ever needed (not sure if this falls under programming and python?)

EDIT: Can't get the correct formatting I want for this SO post> <

0


source to share


3 answers


Depending on how much you plan to adopt # 6 and how large the dataset is, it might not be trivial; this certainly brings me NP-hard global optimizations ...

However, if you are talking about tens (not hundreds) of nodes, a rather stupid algorithm should give good enough performance.

So you have two limitations:

  • General ordering by grade by score; it's flexible.
  • Class encounters; it is not flexible.


What I mean by flexible is that you can move to more spaced grades (with lower scores), but you cannot be in two grades at the same time. Interestingly, there is likely to be a positive correlation between scores and collisions; higher grade grades are more prone to collision.

My first pass through the algorithm:

selected_classes = []
classes = sorted(classes, key=lambda c: c.score)
for clas in classes:
    if not clas.clashes_with(selected_classes):
        selected_classes.append(clas)

      

Development conflicts can be awkward if classes are of uneven length, start at odd times, and so on. Mapping the start and end times into a simplified view of "blocks" of time (every 15 minutes / 30 minutes or whatever you want) would make it easier to find matches between the start and end of different classes.

+2


source


BeautifulSoup has been mentioned here several times, like get-list-of-xml-attribute-values-in-python .



Beautiful Soup is a Python HTML / XML parser for quickly transforming projects like screen scripting. Three features make it powerful:

  • A beautiful soup won't suffocate if you give it bad markup. It gives a parse tree that makes roughly the same meaning as the original document. This is usually good enough to gather the data you want and run away.
  • Beautiful Soup offers some simple Pythonic methods and idioms for navigating, finding, and modifying the parse tree: a toolkit to parse the document and extract what you want. You don't need to create your own parser for every application.
  • Beautiful Soup automatically converts incoming documents to Unicode and outgoing documents to UTF-8. You don't need to think about encodings if the document does not specify an encoding and Beautiful Soup cannot autodetect it. Then you just need to specify the source encoding.

The beautiful soup takes apart whatever you give it and makes wood a workaround for you. You can say "Find all links" or "Find all links of the externalLink class" or "Find all links whose URLs match" foo.com "or" Find the table title that got bold text and then give me that text ... "

Valuable data that was once blocked on poorly designed websites is now within reach. Projects that would take hours take just minutes with Beautiful Soup.

0


source


There are too many questions here.

Please divide this up into subject areas and ask specific questions for each subject. Please focus on one of these with specific questions. Please define your terms: "best" means nothing other than some specific measurements for optimization.

This is what I think I see on your topic list.

  • HTML scraper

    1 Login to the site using the Enterprise Sign On Engine login

    2 Find my current semester and related topics (preset)

    3 Go to the right page and get data on each subject related to it (lecture, practical and working hours)

    4 Share data useless information

  • Some algorithms are "ranked" based on "closer together" looking for "best times". Since these terms are undefined, it is almost impossible to provide any help on this.

    5 Rate the classes that are closer together above, those that are on random days below

    6 Decide the optimal time table solution

  • Bring out something.

    7 Give me a detailed list of BEST CASE information

    8 Give me a detailed list of possible class information (some can be filled in, for example)

  • Optimize something by looking for the "best". Another indefinable term.

    9 Get a program to automatically select the best classes

    10 Keep checking if we can reach 7.

By the way, Python has lists . "Whether they are related or not, they really are not part of it.

0


source







All Articles