hi list
I am developping a scheduling algorithm using boost When probleme is
that I want to use the adresses of boost nodes. I have writen this code.
then I put the node number 2 in the ready tasks list and the iterator
make the next iteration , I found that the node number 3 is in the ready
list.
any advice will be helpful
thanks
void allocate2(Graph &g,vector<MACHINE> &m,fstream &f){
///////////////////////////// declarations
///////////////////////////////
cerr << "in function allocate 2 " << endl;
typedef typename property_map::type NamePA;
NamePA name = get(vertex_first_name, g);
typedef typename boost::property_traits<NamePA>::value_type NameType;
typename boost::property_map::type id =
get(vertex_index, g);
typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex;
NameType src_name;
typename boost::graph_traits<Graph>::vertex_iterator vi;
list readyTasks;
///////////////////////// initialisation /////////////////////
for (vi=vertices(g).first;vi!=vertices(g).second;++vi){
if (in_degree(*vi,g)==0){
vertex v = *vi;
readyTasks.push_back(&v);
}
}
for (list::iterator it=readyTasks.begin();
it!=readyTasks.end();
++it){
vertex *temp = *it;
cerr << name[*temp].Id()<< endl;
}
while(readyTasks.size()){
vertex *head=readyTasks.front();
vector<int> times(m.size());
//////////////// determine the best allocations time
for (int i=0;i::iterator
itr=readyTasks.begin();itr!=readyTasks.end();++itr){
vertex *currentRt = *itr;
cerr << "\t\ttraitement de la tache
"<