Exemplo n.º 1
0
// Sample from solution found above and evaluate cost function
DiscreteBayesNet::shared_ptr createSampler(size_t i,
		size_t slot, vector<Scheduler>& schedulers) {
	Scheduler scheduler = largeExample(0); // todo: wrong nr students
	addStudent(scheduler, i);
	SETDEBUG("Scheduler::buildGraph", false);
	scheduler.addStudentSpecificConstraints(0, slot);
	DiscreteBayesNet::shared_ptr chordal = scheduler.eliminate();
	// chordal->print(scheduler[i].studentKey(0).name()); // large !
	schedulers.push_back(scheduler);
	return chordal;
}
Exemplo n.º 2
0
// Sample from solution found above and evaluate cost function
DiscreteBayesNet::shared_ptr createSampler(size_t i,
        size_t slot, vector<Scheduler>& schedulers) {
    Scheduler scheduler = largeExample(1,false);
    addStudent(scheduler, i);
    cout << " creating sampler for " << scheduler.studentName(0) << endl;
    SETDEBUG("Scheduler::buildGraph", false);
//  scheduler.print();
    scheduler.addStudentSpecificConstraints(0, slot);
    DiscreteBayesNet::shared_ptr chordal = scheduler.eliminate();
    schedulers.push_back(scheduler);
    return chordal;
}