C++ Scheduler

I won’t quit my day job, but I was pleased with how this turned out. In a previous role, I managed about 170 student security guards. Each semester, I was responsible for collecting their availability and producing a schedule for them. By hand, the scheduling took over a week of full-time work, on top of all the other managerial stuff. After doing it once, I vowed: never again. This program does it in less than a second.

The program uses an object-oriented approach to calculate schedules. The two objects involved are “Shifts” and “Guards”. Each shift has a time, a number of desks, and a desirability ranking. Each guard has a name, an array of availability, and a maximum number of shifts per week they would like to work.

At runtime, the user provides the guards’ names, availabilities, and max desired shifts via a CSV (I was particularly proud of my pipeline here; I had all employees submit their information through a google form, and then just used the resulting CSV). Each shift’s desirability is then set to the number of guards available for that shift. Then, the shift with the lowest desirability claims all the guards it needs (or all the guards it can, depending). All affected guards’ desired shifts per week are decremented. The process is repeated by the next-least-desirable shift, and so on, with guards being taken out of the available pool as their maximum desired shifts hits zero.

The final output is 1) a list of all shifts and the guards assigned to them, 2) a list of any shifts that were not able to be completely filled, and 3) a list of all guards and their remaining availability after scheduling.

Download the source here.

viagra without a doctor prescription usa levitra without a doctor prescription best price viagra viagra best price cialis coupons printable 9 levitra at walmart is viagra federally funded viagra side effects levitra vs cialis utilisation viagra viagra 100mg tablets retail price price cialis erectile dysfunction cialis free viagra cialis samples free cialis what is levitra cialis 20mg does viagra work generic viagra 100mg viagra coupons 75 off cialis for daily use cialis effects cialis canadian pharmacy generic viagra available in usa viagra coupons viagra alternatives cialis tadalafil viagra vs cialis female viagra pills viagra vs cialis is viagra government funded in america cialis cost viagra ingredients inexpensive viagra pills viagra coupons from pfizer how to take cialis over the counter viagra levitra 20 mg buy cialis online cost of cialis viagra is viagra government funded cialis generic availability cialis for women generic cialis order online viagra cialis vs viagra liquid cialis cialis dosage online cialis viagra dose healthy man viagra viagra pills cialis trial revatio vs viagra cialis samples overnight levitra 20mg viagra on line cialis pharmacy prices viagra costs cialis generic tadalafil viagra porn what does viagra do viagra vs cialis vs levitra viagra savings offer cialis patent expiration discount viagra cialis without a doctor’s prescription sophia viagra buy viagra online generic cialis tadalafil cialis prices generic levitra viagra canada women viagra 200 cialis coupon cialis for bph when will cialis go generic viagra pill is viagra funded by government buy levitra cialis canada cialis alternative how does viagra work cialis copay card cost of levitra cialis medication viagra samples viagra 100mg price walmart cialis price online viagra viagra generic cialis for sale cialas levitra 10mg viagra coupon viagra patent expiration cialis vs viagra daily cialis viagra prices is viagra covered by insurance cialis on line cvs pharmacy viagra coupons viagra from canada cialis testimonials buy levitra online cialis professional sildenafil vs viagra viagra dosage cialis patent expiration date extended viagra pills for sale cialis dosage recommendations generic for cialis cialis for men cialis cheap levitra 10 mg cialis 5 mg levitra coupon viagra from amazon canada viagra viagra single packs cost sex viagra for women levitra viagra vs cialis vs levitra viagra without prescription viagra for sale cialis coupons levitra reviews cyalis viagra price otc viagra levitra online levitra side effects viagra government funded levitra vs viagra cealis pfizer viagra levitra vs viagra for hardness cialis 5mg how long does levitra last viagra single packs wholesale cialis cialis side effects generic for viagra cialis coupons from manufacturer canadian cialis discount cialis viamedic cialis levitra 20 mg cost walmart viagra without a doctor prescription pfizer viagra coupons cialis otc levitra coupons cialis daily how long does viagra last side effects of cialis cialis online buy cialis viagra government funding cialis what is cialis cilias levitra loc us viagra girls viagra substitute how does cialis work cialis 20 mg buy viagra cialis reviews walgreens viagra substitute levitra cost female viagra lowest cialis prices generic viagra cialis dosage strengths levitra generic viagra cialis viagra online viagra prices without insurance levitra dosage does the government fund viagra cheap cialis non prescribed viagra stendra vs viagra how much does cialis cost natural viagra cialis or viagra cialis website viagra sex cialis coupons 2017 canadian viagra cialis pills for sale cialis voucher cost of viagra cialis coupon print cialis 5mg daily generic cialis at walmart viagra activate levitra vs viagra side effects of viagra what is viagra cialis 30 day sample cialis from canada viagra pharmacy herbal viagra cialis generic how much does viagra cost cialis 30 day trial coupon cialis patent expiration 2017 viagra on line no prec cialis free trial cialis savings card cialis pills levitra prices viagra for women natural viagra alternatives that work cialis or viagra viagra cost cheap viagra cialis sample cialis coupon 20 mg cialis pricing cialis coupon where to buy viagra canada cialis cialis 20mg directions levitra canada cialis 10 mg cialis discount trial viagra sample

Leave a Reply

Your email address will not be published. Required fields are marked *