Phase 1.2 - Implement P-Dispersion

Now that I had successfully implemented my first class I had a much better understanding of all the steps I needed to take for a proper implementation. For P-Dispersion, I decided early on that I would try to implement the model, but if I got stuck and the fomulation wasn’t quite right, I would move on to other tasks that could be done regardless of whether or not the model was built yet (until I could get assistance). I also decided to ask for help sooner rather than later. I always make it a point to put a great deal of effort into solving issues on my own, I don’t want to bother others unnecessarily. However, sometimes this causes me to lose a day or more on real progress when reaching out for help could resolve the issue in 15 minutes. With the LSCPB implementation behind me, and a new strategy for seeking assistance from my mentors, I had a lot of success in implementing the P-Dispersion class.

Coding - Week 8

I spent the beginning of the week reading about the P-Dispersion problem and familiarizing myself with a few possible formulations. I was able to get a basic dev notebook together before our Wednesday morning meeting which was attended by Levi and James. Our meeting was really productive, Levi and James walked me through solving the problem step-by-step and we discussed strategies for checking the model was solving as expected. After the meeting I did a focused sprint to try and build the model properly. I was able to get a decent formulation together, but I knew it wasn’t quite right. I reached out to my mentors for feedback and James was able to get me on track quickly. The rest of the week I worked on creating the PDispersion class, implementing new functions in the FacilityModelBuilder class, creating tests, and starting the notebooks. Even though my model still had some fine-tuning to be done I had completed a good amount of work needed for a new model implementation.

Coding - Week 9

I received a lot of great feedback from my mentors early on in the week and was able to resolve most of their comments before we met Wednesday morning. I was really happy (and a bit shocked) when my mentors gave me the green light to make a PR for the P-Dispersion implementation! I still had a good bit of work to put in before it would be ready for merging, but since I had been a bit stressed about keeping on track with my timeline this was a huge releif. I spent the remainder of my week dialing in the notebooks and double checking all of my code.

Coding - Week 10

I spent the majority of the week continuing to work on my notebooks and resolving comments on my PR. The plots in the notebooks have been a bit of a weak spot for me over the course of the summer and as a result have taken more effort to finish than other aspects of my implementation tasks. I ended up spending a lot of time modifying the existing plot_results() function in the notebooks to fit my needs. I got it working, but my solution was rather messy and overcomplicated. Germano, last years’ GSoC student, kindly provided his own solution, which was much simpler and ‘clean’. It was a great learning experience for me to see the two solutions side-by-side, and consider new strategies I can take for solving problems. I’ve learned a lot from reading Germano’s code he wrote last year and from the feedback he has been able to give me on my own work. With the final plotting issues resolved I was more or less done with P-Dispersion!


<
Previous Post
GSoC ‘22 Phase 1.1 continued…
>
Next Post
GSoC ‘22 Phase 2.1