Originally posted by: BLAIS
In want to know if there exist an efficient way to extract different sub tupleset from one unique tupleset. Below here is the inefficient implementation. I want to create four tuplesets (relAPH, relDEM, relACP and relVEP) from the tupleset relDonneesIntrants that contain all the data.
setof(rvDonneesContinuesIntrants) relDonneesIntrants= ... ;
//APH
setof(rvMvtEau) relAPH= { <espSource,espDestination,pas,valeur> | <variante, espSource,espDestination,pas,typedonnee,0,valeur> in relDonneesIntrants : typedonnee=="APH"&& variante==prmVariante[0]};
//DEM
setof(rvMvtEnergieClasse) relDEM= { <espSource,espDestination,pas,classe,valeur> | <variante, espSource,espDestination,pas,typedonnee,classe,valeur> in relDonneesIntrants : typedonnee=="DEM"&& variante==0};
//ACP
setof(rvMvtEnergieClasse) relACP= { <espSource,espDestination,pas,classe,valeur> | <variante, espSource,espDestination,pas,typedonnee,classe,valeur> in relDonneesIntrants : typedonnee=="ACP"&& variante==0};
//VEP
setof(rvMvtEnergieClasse) relVEP= { <espSource,espDestination,pas,classe,valeur> | <variante, espSource,espDestination,pas,typedonnee,classe,valeur> in relDonneesIntrants : typedonnee=="VEP"&& variante==0};
In want to know if there exist an efficient way of extraction different sub tupleset from one unique tupleset. Below here is the inefficient implementation. I want to create four tupleset (relAPH, relDEM, relACP and relVEP) from the tupleset relDonneesIntrants that contain all the data.
setof(rvDonneesContinuesIntrants) relDonneesIntrants= ... ;
//APH
setof(rvMvtEau) relAPH= { <espSource,espDestination,pas,valeur> | <variante, espSource,espDestination,pas,typedonnee,0,valeur> in relDonneesIntrants : typedonnee=="APH"&& variante==prmVariante[0]};
//DEM
setof(rvMvtEnergieClasse) relDEM= { <espSource,espDestination,pas,classe,valeur> | <variante, espSource,espDestination,pas,typedonnee,classe,valeur> in relDonneesIntrants : typedonnee=="DEM"&& variante==0};
//ACP
setof(rvMvtEnergieClasse) relACP= { <espSource,espDestination,pas,classe,valeur> | <variante, espSource,espDestination,pas,typedonnee,classe,valeur> in relDonneesIntrants : typedonnee=="ACP"&& variante==0};
//VEP
setof(rvMvtEnergieClasse) relVEP= { <espSource,espDestination,pas,classe,valeur> | <variante, espSource,espDestination,pas,typedonnee,classe,valeur> in relDonneesIntrants : typedonnee=="VEP"&& variante==0};
#DecisionOptimization#OPLusingCPLEXOptimizer