@@ -349,34 +349,34 @@ def feasible(PI, avion, listePassagers, listeGroupes):
349349 y_sup = - sum (passager .poids * y * PI [x ,y ,passager .id_passager ] for x ,y in avion ['seats' ]['real' ] for passager in listePassagers ) + avion ['barycentre' ][3 ]* masseTotalePassagers
350350
351351 if x_inf < 0 or x_sup < 0 or y_inf < 0 or y_sup < 0 :
352- print ("cas 1" )
352+ # print("cas 1")
353353 return False
354354
355355 # sièges fictifs
356356 delta_fictif = sum (PI [x ,y ,passager .id_passager ] for x ,y in avion ['seats' ]['fictive' ] for passager in listePassagers )
357357
358358 if delta_fictif != 0 :
359- print ("cas 2" )
359+ # print("cas 2")
360360 return False
361361
362362 # au plus un passager par siège
363363
364364 for x ,y in avion ['seats' ]['real' ]:
365365 if sum (PI [x ,y ,passager .id_passager ] for passager in listePassagers ) > 1 :
366- print ("cas 3" )
366+ # print("cas 3")
367367 return False
368368
369369 # exactement un siège par passager
370370
371371 for passager in listePassagers :
372372 if sum (PI [x ,y ,passager .id_passager ] for x ,y in avion ['seats' ]['real' ]) != 1 :
373- print ("cas 4" )
373+ # print("cas 4")
374374 return False
375375
376376 # pas d'enfant au niveau des issues de secours
377377
378378 if sum (PI [x ,y ,passager .id_passager ] for x ,y in avion ['seats' ]['exit' ] for passager in listePassagers if passager .categorie == "enfants" ) != 0 :
379- print ("cas 5" )
379+ # print("cas 5")
380380 return False
381381
382382 # pas d'enfant isolé
@@ -395,11 +395,11 @@ def feasible(PI, avion, listePassagers, listeGroupes):
395395 voisinage = voisinage_lateral (x ,y , avion )
396396 if nombre_enfants > 2 * nombre_adultes :
397397 if sum (PI [x , y + i , passager .id_passager ] for i in voisinage for passager in listeGroupes [groupe ].list_passagers if passager .id_passager != e ) < PI [x , y , e ]:
398- print ("cas 6" )
398+ # print("cas 6")
399399 return False
400400 else :
401401 if sum (PI [x , y + i , adulte .id_passager ] for i in voisinage for adulte in listeGroupes [groupe ].list_passagers if adulte .categorie != 'enfants' ) < PI [x , y , e ]:
402- print ("cas 7" )
402+ # print("cas 7")
403403 return False
404404
405405 # pas de passager Business en classe économique
@@ -411,23 +411,23 @@ def feasible(PI, avion, listePassagers, listeGroupes):
411411 # pas de passager économique en classe Business
412412
413413 if sum (PI [x ,y ,passager .id_passager ] for x ,y in avion ['seats' ]['business' ] for passager in listePassagers if passager .classe == "Y" ) != 0 :
414- print ("cas 9" )
414+ # print("cas 9")
415415 return False
416416
417417 # contraintes sur les wheelchaires
418418
419419 val_interdites_y = [1 ,3 ,5 ,7 ]
420420
421421 if sum (PI [x ,y ,w .id_passager ] for x ,y in avion ['seats' ]['real' ] for w in listePassagers if w .categorie == 'WHCR' and y in val_interdites_y ) != 0 :
422- print ("cas 10" )
422+ # print("cas 10")
423423 return False
424424
425425 for x ,y in avion ['seats' ]['real' ]:
426426 if y in [2 ,6 ]:
427427 for passager in listePassagers :
428428 if passager .categorie == 'WHCR' :
429429 if sum ((y == 2 ) * (PI [x ,y + 1 ,p .id_passager ] + PI [x - 1 ,y + 1 ,p .id_passager ]) + (y == 6 ) * (PI [x ,y - 1 ,p .id_passager ] + PI [x - 1 ,y - 1 ,p .id_passager ]) + PI [x - 1 ,y ,p .id_passager ] for p in listePassagers if p .id_passager != passager .id_passager ) > 3 * (1 - PI [x ,y ,passager .id_passager ]):
430- print ("cas 11" )
430+ # print("cas 11")
431431 return False
432432
433433 # contraintes pour les x_max,x_min etc
0 commit comments