From 608a4e0706719d43184e7d4eade8490ad0586c16 Mon Sep 17 00:00:00 2001 From: Lukian Date: Fri, 17 Jan 2025 13:39:32 +0100 Subject: [PATCH] added new constraints --- projet.use | 7 +- projet_default.clt | 646 ++++++++++++++++++++++++--------------------- 2 files changed, 349 insertions(+), 304 deletions(-) diff --git a/projet.use b/projet.use index 771b205..9bdeba3 100644 --- a/projet.use +++ b/projet.use @@ -70,7 +70,12 @@ attributes longueur: Integer Etat: EtatBateau constraints - inv longueur: type = TypeBateau::Torpilleur implies longueur = 2 + inv longueur: + if type = TypeBateau::Torpilleur then longueur = 2 + else if type = TypeBateau::Contre_Torpilleur then longueur = 3 + else if type = TypeBateau::Croiseur then longueur = 4 + else longueur = 5 + endif endif endif end association Utilise between diff --git a/projet_default.clt b/projet_default.clt index f51221c..da40e34 100644 --- a/projet_default.clt +++ b/projet_default.clt @@ -4,7 +4,7 @@ false false true - false + true false true false @@ -12,88 +12,88 @@ Plateau - 78.0 - 52.0 + 566.0 + 36.0 false Flotte - 3.0 - 40.0 + 379.0 + 420.0 false Coup - 35.0 - 90.0 + 528.0 + 282.0 false Bateau - 21.0 - 47.0 + 709.0 + 396.0 false Jeu - 30.0 - 24.0 + 155.0 + 242.0 false Joueur - 90.0 - 39.0 + 318.0 + 211.0 false Case - 98.0 - 71.0 + 734.0 + 166.0 false TypeCoup - 70.0 - 88.0 + 876.0 + 311.0 false TypeCase - 74.0 - 2.0 + 874.0 + 76.0 false EtatBateau - 50.0 - 23.0 + 875.0 + 411.0 false TypeBateau - 17.0 - 94.0 + 877.0 + 192.0 false @@ -102,30 +102,6 @@ Bateau Repartit - - cases - - 0.0 - 0.0 - Repartit::WayPoint::0 - 8 - 8 - TOP - - false - - - 0..1 - - 0.0 - 0.0 - Repartit::WayPoint::0 - 8 - 8 - BOTTOM - - false - Repartit @@ -140,11 +116,11 @@ false - + bateau - 0.0 - 0.0 + -7.0 + -33.0 Repartit::WayPoint::1 8 8 @@ -164,6 +140,30 @@ false + + cases + + 3.0 + 24.0 + Repartit::WayPoint::0 + 8 + 8 + TOP + + false + + + 0..1 + + 0.0 + 0.0 + Repartit::WayPoint::0 + 8 + 8 + BOTTOM + + false + @@ -194,30 +194,6 @@ Plateau Compose - - 100 - - 0.0 - 0.0 - Compose::WayPoint::0 - 8 - 8 - BOTTOM - - false - - - cases - - 0.0 - 0.0 - Compose::WayPoint::0 - 8 - 8 - TOP - - false - Compose @@ -232,11 +208,11 @@ false - + plateau - 0.0 - 0.0 + -21.0 + 18.0 Compose::WayPoint::1 8 8 @@ -256,6 +232,30 @@ false + + 100 + + 0.0 + 0.0 + Compose::WayPoint::0 + 8 + 8 + BOTTOM + + false + + + cases + + 45.0 + -21.0 + Compose::WayPoint::0 + 8 + 8 + TOP + + false + @@ -286,30 +286,6 @@ Coup Etat - - 1 - - 0.0 - 0.0 - Etat::WayPoint::0 - 8 - 8 - BOTTOM - - false - - - case - - 0.0 - 0.0 - Etat::WayPoint::0 - 8 - 8 - TOP - - false - Etat @@ -324,11 +300,11 @@ false - + coup - 0.0 - 0.0 + 18.0 + 21.0 Etat::WayPoint::1 8 8 @@ -348,6 +324,30 @@ false + + case + + -13.0 + -12.0 + Etat::WayPoint::0 + 8 + 8 + TOP + + false + + + 1 + + 0.0 + 0.0 + Etat::WayPoint::0 + 8 + 8 + BOTTOM + + false + @@ -378,30 +378,6 @@ Flotte Appartient - - joueur - - 0.0 - 0.0 - Appartient::WayPoint::0 - 8 - 8 - TOP - - false - - - 1 - - 0.0 - 0.0 - Appartient::WayPoint::0 - 8 - 8 - BOTTOM - - false - Appartient @@ -416,10 +392,10 @@ false - + flotte - 0.0 + 105.0 0.0 Appartient::WayPoint::1 8 @@ -440,6 +416,30 @@ false + + joueur + + 51.0 + 29.0 + Appartient::WayPoint::0 + 8 + 8 + TOP + + false + + + 1 + + 0.0 + 0.0 + Appartient::WayPoint::0 + 8 + 8 + BOTTOM + + false + @@ -470,11 +470,49 @@ Plateau Utilise - - joueur + + Utilise + + 0.0 + 0.0 + 0.0 + -10.0 + + Utilise::WayPoint::0 + Utilise::WayPoint::1 + + + false + + + plateau + + -24.0 + -11.0 + Utilise::WayPoint::1 + 8 + 8 + TOP + + false + + + 1 0.0 0.0 + Utilise::WayPoint::1 + 8 + 8 + BOTTOM + + false + + + joueur + + -16.0 + -10.0 Utilise::WayPoint::0 8 8 @@ -494,44 +532,6 @@ false - - Utilise - - 0.0 - 0.0 - 0.0 - -10.0 - - Utilise::WayPoint::0 - Utilise::WayPoint::1 - - - false - - - 1 - - 0.0 - 0.0 - Utilise::WayPoint::1 - 8 - 8 - BOTTOM - - false - - - plateau - - 0.0 - 0.0 - Utilise::WayPoint::1 - 8 - 8 - TOP - - false - @@ -562,11 +562,49 @@ Jeu Joue2 - - joueur2 + + Joue2 + + 0.0 + 0.0 + 0.0 + -10.0 + + Joue2::WayPoint::0 + Joue2::WayPoint::3 + + + false + + + 1 0.0 0.0 + Joue2::WayPoint::3 + 8 + 8 + BOTTOM + + false + + + jeu1 + + 0.0 + 0.0 + Joue2::WayPoint::3 + 8 + 8 + TOP + + false + + + joueur2 + + -15.0 + 15.0 Joue2::WayPoint::0 8 8 @@ -586,44 +624,6 @@ false - - Joue2 - - 0.0 - 0.0 - 0.0 - -10.0 - - Joue2::WayPoint::0 - Joue2::WayPoint::1 - - - false - - - jeu1 - - 0.0 - 0.0 - Joue2::WayPoint::1 - 8 - 8 - TOP - - false - - - 1 - - 0.0 - 0.0 - Joue2::WayPoint::1 - 8 - 8 - BOTTOM - - false - @@ -636,13 +636,33 @@ 1 false - + 1 + + 268.0 + 312.0 + + 1 + 0 + false + + + 2 + + 183.0 + 311.0 + + 2 + 0 + false + + + 3 0.0 0.0 - 1 + 3 2 false @@ -654,30 +674,6 @@ Bateau Appartient2 - - 1 - - 0.0 - 0.0 - Appartient2::WayPoint::0 - 8 - 8 - BOTTOM - - false - - - flotte - - 0.0 - 0.0 - Appartient2::WayPoint::0 - 8 - 8 - TOP - - false - Appartient2 @@ -692,6 +688,18 @@ false + + bateaux + + -4.0 + 18.0 + Appartient2::WayPoint::1 + 8 + 8 + TOP + + false + * @@ -704,18 +712,30 @@ false - - bateaux + + flotte - 0.0 - 0.0 - Appartient2::WayPoint::1 + 24.0 + 30.0 + Appartient2::WayPoint::0 8 8 TOP false + + 1 + + 0.0 + 0.0 + Appartient2::WayPoint::0 + 8 + 8 + BOTTOM + + false + @@ -746,18 +766,44 @@ Jeu Joue1 - - joueur1 - + + Joue1 + 0.0 0.0 - Joue1::WayPoint::0 + 0.0 + -10.0 + + Joue1::WayPoint::0 + Joue1::WayPoint::3 + + + false + + + jeu2 + + -4.0 + -20.0 + Joue1::WayPoint::3 8 8 TOP false + + 1 + + 0.0 + 0.0 + Joue1::WayPoint::3 + 8 + 8 + BOTTOM + + false + 1 @@ -770,38 +816,12 @@ false - - Joue1 - - 0.0 - 0.0 - 0.0 - -10.0 - - Joue1::WayPoint::0 - Joue1::WayPoint::1 - - - false - - - 1 + + joueur1 0.0 0.0 - Joue1::WayPoint::1 - 8 - 8 - BOTTOM - - false - - - jeu2 - - 0.0 - 0.0 - Joue1::WayPoint::1 + Joue1::WayPoint::0 8 8 TOP @@ -820,13 +840,33 @@ 1 false - + 1 + + 282.0 + 150.0 + + 1 + 0 + false + + + 2 + + 154.0 + 176.0 + + 2 + 0 + false + + + 3 0.0 0.0 - 1 + 3 2 false @@ -838,30 +878,6 @@ Coup Tire - - joueur - - 0.0 - 0.0 - Tire::WayPoint::0 - 8 - 8 - TOP - - false - - - * - - 0.0 - 0.0 - Tire::WayPoint::0 - 8 - 8 - BOTTOM - - false - Tire @@ -876,6 +892,18 @@ false + + coups + + -23.0 + 28.0 + Tire::WayPoint::1 + 8 + 8 + TOP + + false + 1 @@ -888,12 +916,24 @@ false - - coups + + * 0.0 0.0 - Tire::WayPoint::1 + Tire::WayPoint::0 + 8 + 8 + BOTTOM + + false + + + joueur + + 16.0 + -21.0 + Tire::WayPoint::0 8 8 TOP