Originally posted by: SystemAdmin
[arnaud.schulz said:]
Hi,
To get a tuple from the tuple map you could do:
tuple T {
int a;
int b;
};
T toto[ i in 1..3 ][ j in 10..13 ] = <i, j*2>;
ITupleMap tupleMap = opl.GetElement( "toto" ).AsTupleMap();
IMapIndexArray indexArray = oplF.MapIndexArray( 0 );
indexArray.Add( 1 );
indexArray.Add( 12 );
// Before calling ITuple.GetAt(...), you must use ITuple.MakeTuple()
// to create an empty tuple
ITuple tuple = tupleMap.MakeTuple();
tupleMap.GetAt( indexArray, tuple );
Arnaud.
#ConstraintProgramming-General#DecisionOptimization