/* ************************************************************************* */ void addStudent(Scheduler& s, size_t i) { switch (i) { case 0: s.addStudent("Pan, Yunpeng", "Controls", "Perception", "Mechanics", "Eric Johnson"); break; case 1: s.addStudent("Sawhney, Rahul", "Controls", "AI", "Perception", "Henrik Christensen"); break; case 2: s.addStudent("Akgun, Baris", "Controls", "AI", "HRI", "Andrea Thomaz"); break; case 3: s.addStudent("Jiang, Shu", "Controls", "AI", "Perception", "Ron Arkin"); break; case 4: s.addStudent("Grice, Phillip", "Controls", "Perception", "HRI", "Charlie Kemp"); break; case 5: s.addStudent("Huaman, Ana", "Controls", "AI", "Perception", "Mike Stilman"); break; case 6: s.addStudent("Levihn, Martin", "AI", "Autonomy", "Perception", "Mike Stilman"); break; case 7: s.addStudent("Nieto, Carlos", "AI", "Autonomy", "Perception", "Henrik Christensen"); break; case 8: s.addStudent("Robinette, Paul", "Controls", "AI", "HRI", "Ayanna Howard"); break; } }
/* ************************************************************************* */ void addStudent(Scheduler& s, size_t i) { switch (i) { case 0: s.addStudent("Michael N", "AI", "Autonomy", "Perception", "Tucker Balch"); break; case 1: s.addStudent("Tucker H", "Controls", "AI", "Perception", "Jim Rehg"); break; case 2: s.addStudent("Jake H", "Controls", "AI", "Perception", "Henrik Christensen"); break; case 3: s.addStudent("Tobias K", "Controls", "AI", "Autonomy", "Mike Stilman"); break; case 4: s.addStudent("Shu J", "Controls", "AI", "HRI", "N/A 1"); break; case 5: s.addStudent("Akansel C", "AI", "Autonomy", "Mechanics", "Henrik Christensen"); break; case 6: s.addStudent("Tiffany C", "Controls", "N/A 1", "N/A 2", "Charlie Kemp"); break; } }
/* ************************************************************************* */ void accomodateStudent() { // super-hack! just count... bool debug = false; // SETDEBUG("DiscreteConditional::COUNT",true); SETDEBUG("DiscreteConditional::DiscreteConditional", debug); // progress Scheduler scheduler = largeExample(0); // scheduler.addStudent("Victor E", "Autonomy", "HRI", "AI", // "Henrik Christensen"); scheduler.addStudent("Carlos N", "Perception", "AI", "Autonomy", "Henrik Christensen"); scheduler.print("scheduler"); // rule out all occupied slots vector<size_t> slots; slots += 16, 17, 11, 2, 0, 5, 9, 14; vector<double> slotsAvailable(scheduler.nrTimeSlots(), 1.0); BOOST_FOREACH(size_t s, slots) slotsAvailable[s] = 0; scheduler.setSlotsAvailable(slotsAvailable); // BUILD THE GRAPH ! scheduler.buildGraph(1); // Do EXACT INFERENCE DiscreteBayesNet::shared_ptr chordal = scheduler.eliminate(); // find root node DiscreteConditional::shared_ptr root = chordal->back(); if (debug) root->print(""/*scheduler.studentName(s)*/); // GTSAM_PRINT(*chordal); // solve root node only Scheduler::Values values; size_t bestSlot = root->solve(values); // get corresponding count DiscreteKey dkey = scheduler.studentKey(0); values[dkey.first] = bestSlot; size_t count = (*root)(values); cout << boost::format("%s = %d (%d), count = %d") % scheduler.studentName(0) % scheduler.slotName(bestSlot) % bestSlot % count << endl; // sample schedules for (size_t n = 0; n < 10; n++) { Scheduler::sharedValues sample0 = chordal->sample(); scheduler.printAssignment(sample0); } }
/* ************************************************************************* */ void addStudent(Scheduler& s, size_t i) { switch (i) { case 0: s.addStudent("Young, Carol", "Controls", "Autonomy", "Mechanics", "Fumin Zhang"); break; case 1: s.addStudent("Erdogan, Can", "Controls", "AI", "Perception", "Mike Stilman"); break; case 2: s.addStudent("Arslan, Oktay", "Controls", "AI", "Mechanics", "Panos Tsiotras"); break; case 3: s.addStudent("Bhattacharjee, Tapomayukh", "Controls", "AI", "Mechanics", "Charlie Kemp"); break; case 4: s.addStudent("Grey, Michael", "Controls", "AI", "Mechanics", "Wayne Book"); break; case 5: s.addStudent("O'Flaherty, Rowland", "Controls", "AI", "Mechanics", "Magnus Egerstedt"); break; case 6: s.addStudent("Pickem, Daniel", "Controls", "AI", "Mechanics", "Jeff Shamma"); break; case 7: s.addStudent("Lee, Kimoon", "Controls", "Autonomy", "Mechanics", "Henrik Christensen"); break; case 8: s.addStudent("Melim, Andrew Lyon", "Controls", "AI", "Perception", "Frank Dellaert"); break; case 9: s.addStudent("Jensen, David", "Controls", "Autonomy", "HRI", "Andrea Thomaz"); break; case 10: s.addStudent("Nisbett, Jared", "Controls", "Perception", "Mechanics", "Magnus Egerstedt"); break; case 11: s.addStudent("Pan, Yunpeng", "Controls", "Perception", "Mechanics", "Wayne Book"); break; // case 12: // s.addStudent("Grice, Phillip", "Controls", "None", "None", "Wayne Book"); // break; // case 13: // s.addStudent("Robinette, Paul", "Controls", "None", "None", "Ayanna Howard"); // break; // case 14: // s.addStudent("Huaman, Ana", "Autonomy", "None", "None", "Mike Stilman"); // break; } }