top of page

Gathering Data

The first step of my project was gathering information about all classes in the mechanical engineering curriculum at CU. The main source I used was a flowchart given to me by the MCEN advisors, which I compiled data from and then met with the advisors to confirm. After verifying, I sorted the data into as few distinct categories as I could to help with program efficiency. The final spreadsheet had to be easily readable by the advisors to ensure it could be modified by them in the future.

Red: Math, Blue: Comp Sci, Orange: Physics, Brown: Solid Mechanics & Thermo, Yellow: Materials Science, Grey: Electives, Green: Senior Projects

Finding a Data Structure

When I initially learned about this project, I though that a linked list or graph would work well for storing classes. With both of these structures, classes can be stored as nodes.  A node for a class would contain information about said class from the spreadsheet, and a pointer to the next class if the current class was a pre-requisite. First, I worked on creating a linked list as that seemed easier in terms of programming logic. I created 7 separate lists based on the categories from the spreadsheet I compiled. This worked well except for the solid mechanics and thermodynamics track, because this category had pre-req overlap with 5 other lists, which meant it was very inefficient when running through the list. Due to this, I moved on to the graph data structure. A graph is a little like a linked list, except each node can have pointers to multiple other nodes. This is quite beneficial as there would be no need to overlap lists with this method, as it would contain just a singular list of all 41 class nodes. Based on this research, I began looking for applications that would easily facilitate the creation of graphs.

Representing a Graph

After settling on the graph data structure, I needed to research which programming language would support generating a visual representation of a graph. I first tried using Boost libraries for C++, as that is the language I'm most familiar with. Some of the benefits were that Boost had many algorithms to make graphs neater, such as shortening edge distance, and that it had quick generating times. However, setting up Boost was a very long process. To get Boost working, I had to install Visual Studio 2019, extract Boost into my program files, create file paths in Visual Studios to Boost, and install a graphviz viewer. This was quite tedious, and most likely difficult for the MCEN advisors to set up on a server. As a result I gravitated toward Python for creating graphs. A library I found that could generate visual graphs was networkx. Working with this library was much simpler, as all you had to do was include it in your header. The positives of using Python were that it was easy to set up, more commonly used, and would have better ingratiation into a server. Based off these experiences with Boost and networkx, I decided to go with Python for this project.

BoostMaxFlow1.jpg
tutorial-34.hires.png

Coding Logic

To make this application interactive, I included a column in my data spreadsheet that records if a student has already taken a class. This gets filled using Excel Forms. If a class is taken, it is omitted from the web of classes that a students must take. After this logic was implemented, I had to code up how pre-requisites interact with each other. I did this by first creating a segment of code that recorded every class as a node, and then if the class had a pre-req a directional edge was drawn from the pre-req to the current class.

Figure 2020-08-02 223502.png

Top: Resulting graph with all the classes a student must take

Right: My code for generating the graph in Python

11.png

Future Work

While the program does generate a custom graph of classes for each student as per my client's requirements, I still think it could use improvement. The graphs generated are messy, so my first goal is to make them neater by using sorting algorithms on networkx. My next goal is to work with the MCEN website administrator to port my Python script and survey on to their website to make it accessible to any student who wishes to use it. I'm excited to take this application to the next level through these steps. Below are some on my latest revisions.

Untitled.png
bottom of page