}
/** For the usage of algorithms which map groups of tasks on cluster **/
+ GNode tmp = null ;
for( int i = 0 ; i < at.size() ; i++ )
{
- insertMapping( new Association( c.nextGNode(), at.get( i ) ) ) ;
+ tmp = c.nextGNode() ;
+ if( tmp != null )
+ {
+ insertMapping( new Association( tmp, at.get( i ) ) ) ;
+ } else {
+ System.err.println( "Error during reception of the next GNode !" ) ;
+ break ;
+ }
}
}
{
if( _a != null && _a.getGNode() != null && _a.getGTask() != null )
{
- int ind = _a.getGTask().getNum() ;
-
- mapping.add( ind - 1, _a ) ;
+// int ind = _a.getGTask().getNum() ;
+//
+// mapping.add( ind - 1, _a ) ;
+ mapping.add( _a ) ;
}
}
public void print()
{
System.out.println();
- System.out.println( "\t=> Mapping done :\n" ) ;
+ System.out.println( "\t=> Mapping done:\n" ) ;
if( type == 0 )
{
{
if( mapping.get( i ).getGNode().getId() == _g.getId() )
{
- i = ret ;
+ ret = i ;
break ;
}
}