src/Controller/Visiteur/SiteclientController.php line 526

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Visiteur;
  3. use App\DTO\AffichageGraphiqueDTO;
  4. use App\Entity\PluvioDatabase;
  5. use App\Form\AffichageGraphiqueType;
  6. use App\Entity\Infiltration;
  7. use App\Entity\Pluvio;
  8. use App\DTO\ReutilisationDTO;
  9. use App\Form\InfiltrationType;
  10. use App\Repository\Fiche\FicheBatimentExempleRepository;
  11. use App\Repository\Fiche\FicheBatimentRepository;
  12. use App\Service\Fiche\FicheExempleService;
  13. use App\Service\Fiche\FicheBatimentImportService;
  14. use Doctrine\ORM\EntityManagerInterface;
  15. use http\Env\Response;
  16. use Knp\Bundle\SnappyBundle\KnpSnappyBundle;
  17. use Knp\Component\Pager\PaginatorInterface;
  18. use PhpOffice\PhpSpreadsheet\Writer\Pdf\Dompdf;
  19. use Spipu\Html2Pdf\Html2Pdf;
  20. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  21. use Symfony\Component\HttpFoundation\Request;
  22. use Symfony\Component\HttpFoundation\Session\Session;
  23. use Symfony\Component\Routing\Annotation\Route;
  24. use Symfony\Component\Security\Core\Security;
  25. use Psr\Log\LoggerInterface;
  26. use Symfony\Component\String\Slugger\AsciiSlugger;
  27. use ZipArchive;
  28. use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
  29. use Symfony\Component\Serializer\SerializerInterface;
  30. use Knp\Snappy\Pdf;
  31. use Knp\Snappy\Bundle\Snappy\Response\PdfResponse;
  32. class SiteclientController extends AbstractController {
  33.     const NB_FICHE_HOMEPAGE 15;
  34.     const NB_INDEX 20;
  35.     /**
  36.      * @Route("/apropos", name="apropos")
  37.      */
  38.     public function apropos() {
  39.         return $this->render('apropos.html.twig');
  40.     }
  41.     
  42.     
  43.     
  44.     /**
  45.  * Convertit la valeur de certivea en booléen.
  46.  *
  47.  * @param mixed $certivea La valeur de certivea
  48.  * @return bool Le booléen correspondant
  49.  */
  50. private function toBool($certivea)
  51. {
  52.     return filter_var($certiveaFILTER_VALIDATE_BOOLEAN);
  53. }
  54.     /**
  55.      * @Route("/workinprogress", name="workinprogress")
  56.      */
  57.     public function workinprogress() {
  58.         return $this->render('workinprogress.html.twig');
  59.     }
  60.     /**
  61.      * @Route("/aide", name="aide")
  62.      */
  63.     public function aide() {
  64.         return $this->render('aide.html.twig');
  65.     }
  66.     
  67.      /**
  68.      * @Route("/listePluvio", name="listePluvio")
  69.      */
  70.     public function listePluvio(\App\Repository\PluvioDatabaseRepository $pluvioRepo
  71.             Request $theRequestPaginatorInterface $thePaginator,
  72.             Session $session) {
  73.    
  74.         $session->start();
  75.         $session->set("lastPage""listePluvio");
  76.         
  77.         if (!$this->isGranted('ROLE_ADMIN')) {
  78.             $typeFormFilter 'utilisateur';
  79.             $idUser $this->getUser()->getId();
  80.         } else {
  81.             $typeFormFilter 'admin';
  82.             $idUser null;
  83.         }
  84.         
  85.         $listFichePluvioBuilder $pluvioRepo->findAllIndexBuilder($idUser);
  86.         
  87.         
  88.         $listFichePluvio $thePaginator->paginate(
  89.             $listFichePluvioBuilder,
  90.             $theRequest->get('page'1),
  91.             self::NB_INDEX
  92.         );
  93.         
  94.         return $this->render('listePluvio.html.twig', [
  95.             'listFichePluvio' => $listFichePluvio
  96.         ]);
  97.     }
  98.     
  99.         /**
  100.      * @Route("/pluvioId/{id}", name="pluvioId", options={"expose" : true})
  101.      */
  102.     public function pluvioId(Session $session$id) {
  103.         
  104.         $session->start();
  105.         $session->set("pluvioId"$id);
  106.         return $this->redirectToRoute('reutilisation');
  107.     }
  108.     
  109.      /**
  110.      * @Route("/postConnexion", name="postConnexion")
  111.      */
  112.     public function postConnexion(Session $session) {
  113.         
  114.         $session->start();
  115.         $lastPage $session->get("lastPage");
  116.         //dump($lastPage);
  117.         $array = [];
  118.         if ($lastPage === "tri"){
  119.             $idProjet $session->get("idProjet");
  120.             $array = ["idProjet" => $idProjet];
  121.             return $this->redirectToRoute($lastPage,$array);
  122.         } 
  123.         if ($lastPage === "lot"){
  124.             $idProjet $session->get("idProjet");
  125.             $lot $session->get("lot");
  126.             $array = ["idProjet" => $idProjet"lot" => $lot];
  127.             return $this->redirectToRoute($lastPage,$array);
  128.         }
  129.         return $this->redirectToRoute($lastPage);
  130.     }
  131.     
  132.     /**
  133.      * @Route("/", name="index")
  134.      */
  135.     public function index(Session $session) {
  136.         $session->start();
  137.         $session->set("lastPage""index");
  138.         
  139.         return $this->render('base.html.twig'
  140.         );
  141.     }
  142.     /**
  143.      * @Route("/admin", name="admin")
  144.      */
  145.     public function admin(FicheBatimentRepository $fb) {
  146.         $fb->supprimerdoublon();
  147. //        return $this->render('admin.html.twig');
  148.     }
  149.     /**
  150.      * @Route("/quiplusest", name="quiplusest")
  151.      */
  152.     public function quiplusest() {
  153.         return $this->redirect('http://www.quiplusest.coop');
  154.     }
  155.     
  156.     /**
  157.      * @Route("/QEBOK", name="QEBOK")
  158.      */
  159.     public function qebok() {
  160.         return $this->redirect('http://www.qebok.fr');
  161.     }
  162.     
  163.         /**
  164.      * @Route("/QUVEO", name="QUVEO")
  165.      */
  166.     public function quveo() {
  167.         return $this->redirect('http://www.quveo.fr');
  168.     }
  169.     /**
  170.      * @Route("/emaarchitectes", name="emaarchitectes")
  171.      */
  172.     public function emaarchitectes() {
  173.         return $this->redirect('http://www.emaarchitectes.com');
  174.     }
  175.     /**
  176.      * @Route("/upload-dropzone", name="upload-dropzone")
  177.      */
  178.     public function uploadDropzone(Request $req,
  179.             FicheBatimentImportService $service,
  180.             FicheBatimentRepository $ficheBatRep,
  181.             EntityManagerInterface $em,
  182.             Session $session) {
  183.         $session->start();
  184.         $idFicheBatiments $session->get("idFicheBatiments");
  185.         $time date('YmdHis');
  186.         // Récup contenu du fichier temporaire crée et 
  187.         $fichier $req->files->get('fichier');
  188.         
  189.         
  190.         //si c'est un fichier zip, on extrait le XML
  191.         $extension pathinfo($fichierPATHINFO_EXTENSION);
  192.         
  193.         if ($extension "zip") {
  194.             $zip = new ZipArchive();
  195.             if ($zip->open($fichier) === TRUE) {
  196.                 $zip->extractTo('EXTRACTION''fiche.xml');
  197.                 $zip->close();
  198.                 $nomFichier uniqid() . '.xml';
  199.                 rename("EXTRACTION/fiche.xml"'IMPORTS/' $nomFichier);
  200.                 $nomInitialFichier 'fiche.xml';
  201.             }
  202. //                
  203.         } else {
  204.             $nomFichier uniqid() . '.xml';
  205.             $nomInitialFichier $fichier->getClientOriginalName();
  206.             $fichier->move('IMPORTS'$nomFichier);
  207.         }
  208.         //analyse que s'il est conforme RT2012
  209.         $xml simplexml_load_file('IMPORTS/' $nomFichier);
  210.         
  211.         if (isset($xml->Entree_Projet->Index) or isset($xml->RSET->Entree_Projet->Index)) {
  212.             $fichesBatiment $service->importer('IMPORTS/' $nomFichier$time$nomInitialFichier);
  213.             foreach ($fichesBatiment as $ficheBatiment) {
  214.                 $fichesOps[] = $ficheBatiment;
  215.                 $idFicheBatiments[] = $ficheBatiment->getId();
  216.             }
  217.         }
  218.         $session->set("idFicheBatiments"$idFicheBatiments);
  219.         return $this->json($fichesOps);
  220.     }
  221.     /**
  222.      * @Route("/homepage", name="homepage")
  223.      */
  224.     public function homepage(
  225.             Request $req,
  226.             FicheBatimentRepository $fichebatimentRepository,
  227.             FicheBatimentRepository $ficheBatRep,
  228.             FicheBatimentExempleRepository $theFicheBatimentExempleRepository,
  229.             Session $session,
  230.             PaginatorInterface $thePaginator
  231.     ) {
  232.         $session->start();
  233.         $session->set("lastPage""homepage");
  234.         $page $req->get('page'1);
  235.         if ($this->getUser() == null) {
  236.             $idFicheBatimentsUser $session->get("idFicheBatiments");
  237.             if ($idFicheBatimentsUser != null) {
  238.                 $listFicheBatimentUser $fichebatimentRepository->findByIds($idFicheBatimentsUser);
  239.             } else {
  240.                 $listFicheBatimentUser = [];
  241.                 $idFicheBatimentsUser = [];
  242.             }
  243.             if (count($listFicheBatimentUser) == 0) {
  244.                 $listFicheBatimentUser[] = $theFicheBatimentExempleRepository->findSingleton()->getTheFicheBatiment();
  245.             }
  246.             $listFicheBatimentUser $thePaginator->paginate(
  247.                 $listFicheBatimentUser,
  248.                 $page,
  249.                 self::NB_FICHE_HOMEPAGE
  250.             );
  251.         } else {
  252.             $idFicheBatimentsUser $fichebatimentRepository->findIdsByUser($this->getUser()->getId());
  253.             $listFicheBatimentUserBuilder $fichebatimentRepository->findByUserBuilder($this->getUser()->getId());
  254.             $idFicheBatimentsUser array_column($idFicheBatimentsUser'id');
  255.             $listFicheBatimentUser $thePaginator->paginate(
  256.                 $listFicheBatimentUserBuilder,
  257.                 $page,
  258.                 self::NB_FICHE_HOMEPAGE
  259.             );
  260.         }
  261.         //******************************************        
  262.         // Mise en place du formulaire de filtre
  263.         //******************************************
  264.         $filtreDTO = new AffichageGraphiqueDTO();
  265.         $filtreForm $this->createForm(AffichageGraphiqueType::class, $filtreDTO);
  266.         $filtreForm->handleRequest($req);
  267.         // Insitialise fichesBatiments soit avec tous soit via critères submitted
  268.         if ($filtreForm->isSubmitted()) {
  269.             $listFicheBatimentAll $ficheBatRep->filtrer($filtreDTO->getUsage(), $filtreDTO->getZoneClimatique(), $filtreDTO->getEtancheiteMin(),
  270.                     $filtreDTO->getEtancheiteMax(), $filtreDTO->getTauxVitreeMin(), $filtreDTO->getTauxVitreeMax());
  271.             if ($filtreDTO->getAbscisse() == 'compacite') {
  272.                 $abscisse 'Compacité en m² enveloppe par m² SHONRT';
  273.             } elseif ($filtreDTO->getAbscisse() == 'tauxVitre') {
  274.                 $abscisse 'Taux de vitrage en m² de vitrage par m² SHONRT';
  275.             } elseif ($filtreDTO->getAbscisse() == 'orientationSud') {
  276.                 $abscisse 'Pourcentage de baies au sud';
  277.             } elseif ($filtreDTO->getAbscisse() == 'compaciteVitre') {
  278.                 $abscisse 'Compacité x Taux vitré';
  279.             } elseif ($filtreDTO->getAbscisse() == 'compaciteVitreBrassage') {
  280.                 $abscisse 'Compacité x Taux vitré x Brassage';
  281.             }
  282.             if ($filtreDTO->getOrdonnee() == 'bBioChauffage') {
  283.                 $ordonnee 'BBIO Chauffage';
  284.             } elseif ($filtreDTO->getOrdonnee() == 'bBioEclairage') {
  285.                 $ordonnee 'BBIO Eclairage';
  286.             }
  287.         } else {
  288.             $listFicheBatimentAll $ficheBatRep->findAll();
  289.             $abscisse "Compacité en m² enveloppe par m² SHONRT";
  290.             $ordonnee "BBIO Chauffage";
  291.         }
  292.         // Prépare les données du graphique
  293.         $graphiqueAll = [];
  294.         $graphiqueUser = [];
  295.         foreach ($listFicheBatimentAll as $aFicheBatimentAll) {
  296.             $coordonnees = [];
  297.             if ($filtreForm->isSubmitted()) {
  298.                 if ($filtreDTO->getAbscisse() == 'compacite') {
  299.                     $coordonnees[] = $aFicheBatimentAll->getCompacite();
  300.                     $abscisse 'Compacité en m² enveloppe par m² SHONRT';
  301.                 } elseif ($filtreDTO->getAbscisse() == 'tauxVitre') {
  302.                     $coordonnees[] = $aFicheBatimentAll->getTauxVitrage();
  303.                     $abscisse 'Taux de vitrage en m² de vitrage par m² SHONRT';
  304.                 } elseif ($filtreDTO->getAbscisse() == 'orientationSud') {
  305.                     $coordonnees[] = $aFicheBatimentAll->getPartBaiesSudBatiment();
  306.                     $abscisse 'Pourcentage de baies au sud';
  307.                 } elseif ($filtreDTO->getAbscisse() == 'compaciteVitre') {
  308.                     $coordonnees[] = $aFicheBatimentAll->getCombinaisonCompaciteTauxVitrage();
  309.                     $abscisse 'Compacité x Taux vitré';
  310.                 } elseif ($filtreDTO->getAbscisse() == 'compaciteVitreBrassage') {
  311.                     $coordonnees[] = $aFicheBatimentAll->getCombinaisonCompaciteTauxVitrageBrassageBBIO();
  312.                     $abscisse 'Compacité x Taux vitré x Brassage';
  313.                 }
  314.                 if ($filtreDTO->getOrdonnee() == 'bBioChauffage') {
  315.                     $coordonnees[] = $aFicheBatimentAll->getBbioChaudAnnuel();
  316.                     $ordonnee 'BBIO Chauffage';
  317.                 } elseif ($filtreDTO->getOrdonnee() == 'bBioEclairage') {
  318.                     $coordonnees[] = $aFicheBatimentAll->getBbioEclairageAnnuel();
  319.                     $ordonnee 'BBIO Eclairage';
  320.                 }
  321.             } else {
  322.                 $coordonnees[] = $aFicheBatimentAll->getCompacite();
  323.                 $coordonnees[] = $aFicheBatimentAll->getBbioChaudAnnuel();
  324.                 $abscisse "Compacité en m² enveloppe par m² SHONRT";
  325.                 $ordonnee "BBIO Chauffage";
  326.             }
  327.             if (in_array($aFicheBatimentAll->getId(), $idFicheBatimentsUser)) {
  328.                 $graphique = &$graphiqueUser;
  329.             } else {
  330.                 $graphique = &$graphiqueAll;
  331.             }
  332.             $graphique['coordonnees'][] = $coordonnees;
  333.             $graphique['taux_de_vitrage'][] = $aFicheBatimentAll->getTauxVitrage();
  334.             $graphique['q_4_pasurf'][] = $aFicheBatimentAll->getQ4PaSurf();
  335.             $graphique['uw_moyen'][] = $aFicheBatimentAll->getUwMoyen();
  336.             $graphique['ids'][] = $aFicheBatimentAll->getId();
  337.         }
  338.         if (count($graphiqueAll) > 0) {
  339.             $graphiqueJsonCoordonnees json_encode($graphiqueAll['coordonnees']);
  340.             $graphiqueJsonAll = ['data' => $graphiqueJsonCoordonnees];
  341.             $graphiqueJsonAll['taux_de_vitrage'] = json_encode($graphiqueAll['taux_de_vitrage']);
  342.             $graphiqueJsonAll['q_4_pasurf'] = json_encode($graphiqueAll['q_4_pasurf']);
  343.             $graphiqueJsonAll['uw_moyen'] = json_encode($graphiqueAll['uw_moyen']);
  344.             $graphiqueJsonAll['ids'] = json_encode($graphiqueAll['ids']);
  345.             $alert null;
  346.         } else {
  347.             $graphiqueJsonAll = ['data' => '[0,0]'];
  348.             $graphiqueJsonAll['taux_de_vitrage'] = '[0,0]';
  349.             $graphiqueJsonAll['q_4_pasurf'] = '[0,0]';
  350.             $graphiqueJsonAll['uw_moyen'] = '[0,0]';
  351.             $graphiqueJsonAll['ids'] = '[0,0]';
  352.             $alert 'Encore aucune donnée pour ces filtres';
  353.         }
  354.         if (count($graphiqueUser) > 0) {
  355.             $graphiqueJsonCoordonnees json_encode($graphiqueUser['coordonnees']);
  356.             $graphiqueJsonUser = ['data' => $graphiqueJsonCoordonnees];
  357.             $graphiqueJsonUser['taux_de_vitrage'] = json_encode($graphiqueUser['taux_de_vitrage']);
  358.             $graphiqueJsonUser['q_4_pasurf'] = json_encode($graphiqueUser['q_4_pasurf']);
  359.             $graphiqueJsonUser['uw_moyen'] = json_encode($graphiqueUser['uw_moyen']);
  360.             $graphiqueJsonUser['ids'] = json_encode($graphiqueUser['ids']);
  361.             $alertUtilisateur null;
  362.         } else {
  363.             $graphiqueJsonUser = ['data' => '[0,0]'];
  364.             $graphiqueJsonUser['taux_de_vitrage'] = '[0,0]';
  365.             $graphiqueJsonUser['q_4_pasurf'] = '[0,0]';
  366.             $graphiqueJsonUser['uw_moyen'] = '[0,0]';
  367.             $graphiqueJsonUser['ids'] = '[0,0]';
  368.             $alertUtilisateur 'Encore aucune donnée pour cet utilisateur';
  369.         }
  370.         //******************************************        
  371.         // Fin du graphique avec données utilisateur
  372.         //******************************************
  373.         //
  374.         // Renvoie vers le template index
  375.         return $this->render('homepage.html.twig', [
  376.                     'all' => $listFicheBatimentAll,
  377.                     'alert' => $alert,
  378.                     'alertUtilisateur' => $alertUtilisateur,
  379.                     'graphiqueJsonAll' => $graphiqueJsonAll,
  380.                     'graphiqueJsonUser' => $graphiqueJsonUser,
  381.                     'abscisse' => $abscisse,
  382.                     'ordonnee' => $ordonnee,
  383. //                    'monForm' => $uploadForm->createView(),
  384.                     'affichage' => $filtreForm->createView(),
  385.                     'listFicheBatiment' => $listFicheBatimentUser,
  386.         ]);
  387.     }
  388.     
  389.     /**
  390.      * @Route("/infiltration", name="infiltration")
  391.      */
  392.     public function infiltration(EntityManagerInterface $emRequest $req
  393.     ) {
  394.         $infiltration = new Infiltration();
  395.         $form $this->createForm(InfiltrationType::class, $infiltration);
  396.         $form->handleRequest($req);
  397.         if ($form->isSubmitted() && $form->isValid()) {
  398.             $nbreEtage $infiltration->getNbrEtage();
  399.             $p4 $infiltration->getQ4();
  400.             $n50 1.8 $p4 * ($nbreEtage 1) / $nbreEtage;
  401.             $infiltration->setN50($n50);
  402.             $facadeExposee $infiltration->getFacadeExposee();
  403.             $localisation $infiltration->getLocalisation();
  404.             if ($facadeExposee == 'Espace chauffé sans façade exposée') {
  405.                 $exposition 0.01;
  406.             } else if ($facadeExposee == 'Espace chauffé à simple exposition') {
  407.                 if ($localisation == 'Site non abrité') {
  408.                     $exposition 0.03;
  409.                 } else if ($localisation == 'Site modérément abrité') {
  410.                     $exposition 0.02;
  411.                 } else if ($localisation == 'Site très abrité') {
  412.                     $exposition 0.02;
  413.                 }
  414.             } else if ($facadeExposee == 'Espace chauffé avec expositions multiples') {
  415.                 if ($localisation == 'Site non abrité') {
  416.                     $exposition 0.05;
  417.                 } else if ($localisation == 'Site modérément abrité') {
  418.                     $exposition 0.03;
  419.                 } else if ($localisation == 'Site très abrité') {
  420.                     $exposition 0.02;
  421.                 }
  422.             }
  423.             $infiltration->setFactExposition($exposition);
  424.             
  425.             $hauteurTotale $nbreEtage 4;
  426.             
  427.             if ($hauteurTotale <= 10){
  428.                 $factHauteur 1;
  429.             } else if ($hauteurTotale <= 30){
  430.                 $factHauteur 1.2;
  431.             } else if ($hauteurTotale 30){
  432.                 $factHauteur 1.5;
  433.             }
  434.             $infiltration->setFactCorrectifHauteur($factHauteur);
  435.             
  436.             $volumeChauffe $infiltration->getVolumeChauffe();
  437.             $debitAirInfil $volumeChauffe $n50 $exposition $factHauteur;
  438.             
  439.             $infiltration->setDebitAirInfil($debitAirInfil);
  440.             
  441.             $ratioInfil number_format($debitAirInfil $volumeChauffe2);
  442.             
  443.             $em->persist($infiltration);
  444.             $em->flush();
  445.         } else {
  446.             $ratioInfil "";
  447.             
  448.         }
  449.         return $this->render('infiltration.html.twig', [
  450.         'form' => $form->createView(),
  451.         'infiltration' => $infiltration,
  452.             'ratioInfil' => $ratioInfil
  453.         ]);
  454.     }
  455.     
  456.     protected function toFloat($value) {
  457.         $value str_replace(',''.'$value);
  458.         return floatval($value);
  459.     }
  460.         /**
  461.      * @Route("/reutilisation", name="reutilisation")
  462.      */
  463.     public function reutilisation(EntityManagerInterface $em\App\Repository\PluvioDatabaseRepository $pluvioRepo,
  464.             Request $reqSession $sessionSecurity $security) {
  465.         $idInitial 0;
  466.         $session->start();
  467.         $lastPage $session->get("lastPage");        
  468.         $calculEffectue $session->get("calculEffectue");
  469.         if ($lastPage "listePluvio"){
  470.             $idInitial $session->get("pluvioId");
  471.         } elseif ($calculEffectue 1) {
  472.             $idInitial $session->get("pluvioId");
  473.         } else {
  474.              $idInitial 0;
  475.         }
  476.         $show_complement=false;
  477.         $allowPDF=false;
  478.         $idFinal=0;
  479.         $session->set("lastPage""reutilisation");
  480.         $this->em $em;
  481.         $this->user $security->getUser();
  482.         
  483.         //dump($idInitial);
  484.         if ($idInitial != null) {
  485.         $reutilisationDTO $pluvioRepo->find($idInitial);
  486.         }
  487.         if ($idInitial == 0) {
  488.             $reutilisationDTO = new \App\Entity\PluvioDatabase();
  489.             $reutilisationDTO->setTauxRaccordement(100);
  490.             $reutilisationDTO->setCertivea(0);            
  491.             $reutilisationDTO->setCoutEau(4);
  492.             $reutilisationDTO->setCoutPompe(4000);
  493.             $reutilisationDTO->setchoixVolume(1000);
  494.             $reutilisationDTO->setCoutVolume(1000);
  495.             $reutilisationDTO->setChoixVolume2(4000);
  496.             $reutilisationDTO->setCoutVolume2(4000);            
  497.         } 
  498.         
  499.         $form $this->createForm(\App\Form\ReutilisationType::class, $reutilisationDTO);
  500.         $form->handleRequest($req);
  501.         // $fichePluvio = $pluvioRepo->find($idInitial);
  502.         
  503.         $arrayReu null;
  504.         if ($form->isSubmitted() && $form->isValid()) {
  505.         set_time_limit(100);
  506.             //climat et pluviometrie
  507.             $climat $reutilisationDTO->getClimat();
  508.             $stationMeteo $reutilisationDTO->getStationmeteo();
  509.             $ParisPluie = array(0.21.600.8000.204.82.40.46.71.40.84.200000000000001.21.40.600.26.810.10.87.12.2000.20000.61.43.20000000.40005.22.89.104.811.78.315.10.60.4000000000.80.200.21.40.212.53.60000004000000000000000.600.20.4000000.404.40.80.6010.500.8184.409.50.20.2000.813.800.8007.714.72.400000000.80.400003.22.207.23.6010.6000000000000000000.211.75.21.45.66.9100020067.71110.20000000.400350.400.210000.600.402.6000.62.46.51601.801.40.4015.44.6000000130.63.2002.2013.20.200000.215.75.91.80.2136.13.600.42.84.60.20000010.20.20.414.80.418.70.201.400.200.600000.20.2000.26.700.44.43.21.40.40001.200.20003.6000010.88.89.7000001.400006.70.40.8014.7115000.40003.62.44.625.63.2013.632.60.44.8000.61.21.600.22.25.43015.10.8114.55.7118.70.62.80.802.60.400009.75.24.43.235.69.87.20.26.71.41.60.6000.211.11.20.4600.212.70032.40.810.45.63.60003000000000.6010.27.1033.23.20.616.50.2205.62.60.410.12.400000000.678.92.80.2000.67.21.400008.10.204.800.20000004.70000.2001.215.16.80.20.20000000002.40.65.800000002.40012.60.2021.634.20.204.6007.113.44.4000.62.478.20.600.20000.400000000000000000.400000000200000.6100000010.7000000000004.91.4002.20.2001.80000.20030.4000.213.26.100000000.2000000.40.600000.2011.80.46.1000000000.20000.41.60002.200000000000.20000.60012.12.42.62.400000.64019.413.75.100.400000.6100.45.814.8115.10.40070.65.41.81.80.25.11.22.200.200.20152.402.802.23.20.69.2000000.20.40.20000000.600.801.20.80.80030040.807.4111.21.64.4019.60.41.215.9000040.81.83.68.50.200000000000000001.210.64.22.4112.100.86.40.80.82.615.80.22.82.2000000000000000.64.60.20000003.2000000000.200005.80.21.22.41.200037.25.20.802.412.4143.811.5000000.617.30.20.200001000.20000014.517.50.21.40.40.202.82.85.78.300004.81.20000000000000000000000000000.605.50000012.80.800000000019.30031.3005.90000.214.91.600000000000000000000000000000000008.104.61.66.11.20405.2010.24.21.64.25.64.20.2000.231.443.60.84.211.2000.40.20.22.67.50.20.60.22.86.52.46.600.26.90.401.80.62.66.44.83.817001.6000.43.22.200.212.31.20.20.62.40.40.20002.6012.36.22.2114.32.42.24.64.50.2012.726.20.43.6008.6000001.20.40.200000.64.20000.201.21.40.8000000003.86.21.602.83.810.511.88.30.40002.429.3202.400.66.80.25.20.42.6000.4426.48.105.1214.805.215.2003.83.201.40.60100000000000000000000002.6000001.2000000.6000000003.43.59.38.90.60001.800035.615.2000000000003.60.4000000000028.83.41.400000.48.21.2000000.4001.600000.610002000000000000000000000006.30000000000000000214.86.1007.65.100.42.20000.20.600.41.21.80.600000.200.20000000000002.40009.57.56.35.813.13.80.63.414.518.416.88102.81.61.602.21.40.600000.611.30.2001.612.80.23.83001.20.81.20.200.2000.21.22.20.400.404.40012000.21.200.200.20.20100.210.71.41.200006.17.42.20.871.42.80.40.21.86.110.417.18.82.40011.114.31.230.80000.2000.20000.65.22.22.2011.60.602.86.913.30.24.62.403.48.24.48.36.66.82.62.66.902.4211.20200000.20.41.207.6000000.210.600000.21000001.245.482.22.82.433000001.60.620000000000.40.60014.513.70.60.4000000000.20000000.8000.80.20.200.87.700.25.400.65.206.18.231.81400.42.6348.90.2000000030.72.60000000000013.512.41.4181.4016.6008.31.41.20.42.41.6006.73.2000000.605.343.30.20000000000.26.93.48.200001.47.30.60.20.407.403.20.2000000.20000000.200000.20.20000010.8002.60.20.6001.2812.40.20012.30.20000.2012.24.20.60.605.219.26.408.70.200.20.20000.200.2003.40.41.215.400200.20.207.25.74.13.85.61.43.600.200.200.200.2100.20.200.2001.600.200.21.44.20.2030.6011.744.41.82015.91.40.80.400000.2000000.27.41.25.213.31.25.20.20.2);
  510.             $MarignanePluie = array(0000000000.6000.20000000.4021012.313.40.2000001.400.4500110.5000000.20.2000000000011.400.26.13.41.21.20000020000.20.20000.2041.91.815.80.200000.414.73008.90000.2000.200000000000012.92.600013.301.60.20.2019.200000.200.200004000000000001.40004.50000000000000000000000011.51.400.2000000000000000000000000000000000003.10.2000000000000000000000000.21.8000000002.8000001.40000000.200000002.20000000000000.200.20.400000000000000000039.900000000.2000000000000000000.800.600000.40.409.46.200.200000.40000000.22.6101.81.20.4000000070000010.2000000000066.610.500001.4002.40.630000000000.23.60003.6005.61.60011.27.301.28.61.20002.40.2006.57.87.500001.200000010.60000000001.86.11.238.514.70.400000000000000011.300.2000.8010.403.200.2027.81.6000.20008.70.20.20000.40.20.42.85.50.202.61.80.61.411.40.202001.2000000000000000000000000000000006.100014.2000000000000000000015.50047.20000000000.20000000000000000000000000000000000000000000040.61.113.1071.800007.45.85.70.200.200000.20.25.28.947.618.936.17.10.21.2012.311.5508.900000.20.20.61.60039.665.221.408.5000015.80.20.200000000000.401.89.801.815.100000000000000000000000000010000000.6000001.60.607.92.800000000000000000000000000000000.600000000000000000000000000023.80119.600002.80000000000.20.22.407.30000000000001.8000.2000000.604.6000000000000000000000.208.50.2000000000000000000000000100.2000000000000000004.40000000000000000.40000000003000006.10000000000010.77.6000000000033.623.50000000.209.100000000.2000017.92.6000.801724.28.571.900000.20.20.20.2250.90.42.20.202.600.80.400040.916.30000.2213.341.220.72.803.80.80.207.560.60001.2000.4000.65.62.6000004.222.85.50000000000000000006.30.400000.207.5004.2000.27.5012.9000000.2000000000000.20.2001.80000000001.402.62.42.4004.300000000000000000002.4000003.6000000000000000000.810.714.442000014.44000.200000005.423.741.4012.205.26000000000000001.80.44.29.2011.300000010.90000000000000000000000000000000000000000000000000000000000000000000000000000.42.800000000014.320000000033.3191.420.20100000005.20006.30000000000000000.86.20200000000000086.19.80000007.50000000000000000000.6007.500111.60000.20000.412.1001.60000.61.4001.219.70.47.1000003.6000000000.63.209.51.200000010.50.40000010.4012.50.2001.2000000000.20.400000.600000000000000000001.40000002.20000000300000016.77.200006.54.4000000002.86.42.218.2526.60000.60.8000.821.3000.20.622.401.2003.402.61.2000001.204.40.60.20.20000000000000000.200000000000028.3000000000000000000000000.400.60.20009.9000.200000001.600.40.20000.40.200.40.2000000.20.215.1000.2000.22.400.20010.88.7010.20.20.200.401.224.90.200000.440.34.60.40.2000000.40.2000.20.20.404.31.600.200.2000.25.930.52.6140.20.200000220.70.20.8012.60000.205.80013.923.400.40002.201.81.60082.362.20000000000000.27.811.206.6000.20.4);
  511.             $AurillacPluie = array(000000008.97.22.610.511.610.200000000006.5704.60018.620.510.912.21.22.21.6000.2010.6000000.2001.600011.717.15.40.816.920.69.85.72.64001.65.2000000013.41.412.314.91.20000011.57.2000.2000000.40000000000000022.10.20.20022.810.32.8002.812.31.8000.412.54.90.80006.537.140.2000.20000011.21.800.849.500.4100.200001.80.8000000000.60014.370.417.510.115.67000000.4010.62.80000000024.92.61.6010.750.21.80.206.41.60.2000.201017.91.64.55.25.200.2000.200.200000000000.2191.60.46.10010.2018.210.73.890.816.96.434.63.42.60.200.200.210.200.2063.84.22.80.20.200000.20.20000000.230.25.44.20.20.200.40.604.40000033.90.20.424.205.46.811.91000000000013.31009.11.62.80.400.40007.90.8645.618.3112.311.56.44.25.416.60000002.68.37.3019.14.95.613.99.625.411.67.22.21.415.94.84.81.800.60.48.716.914.82.231.79.55.80.4010.7000006.3001.42.611.30.6102.80.83.2039.13.86.23.4030.600000003.810.310.32.42.62.24.63.201.80.42.614.80.616.12.29.99.52.41.60000.6100.4115.41.45.64.2006.75.60.60049.90.6101.21.200000000.80.400.200018.73.200000.20.66.5600011.97.88.61.820.2001.48.30100.601.419.26.23.80.60.200020.12002.269.76.80.202.2000.200000000000000.60.434.12.80.200000001.40.2320.21.60000.200000.43.60000000002.200.600314.10.20014.20.2000001.20.40.200.20.6000.20008290.2000.20000.20000001.801.4000000.200.4000012.82.40.2020001600.2000000000.22.4115.10.82.43.82.2006.33.8302.62.20200007.3000.6004.4061.40.207.31.49.9211102.62.84.48.480000.2013.914.50.24.254.611.17.80.40.2000000000000002.60.6001.240.200.42.200.20.206400.85.213.3311.76.719.67.34.80.20.200.24.81.20.270.400000000000000000.4020.6309.53.409.21.20.45.65.2121.803.83.4000000000000006.610.41.250.8204.410.20003.41.20000.4108.111.925.693.80.40002.80.65.400515.140.24.600002.814.55.21.40.23.4008.30.40.46.44.2000000012.10300.81.851.605.85.90.201.20.20.80.200000000000.40000.6003.4000.200000000.200.20002.834.8000.600.8000010.30.2014.80.210.90.800.6100104.84.200000000000.41.2002.200000.800000000000037.503.85.80.6000.80152.8020.81.800.61.60.400015.56.500.65.8014.5025.841.83.6000.80.404.6214.415.330.428.58.87.32.44.8604.62.22.810.48.7000002112.900.89.520.214.44.38.80000001.28.27.2013.326.621.9500004.417.324.625.89.7400.20.60000002.40000.40.26.92.4000001600000.20000.811.78.40.67.60.81.81.41.20.600002.66.95.8011.70004.62.81.80.600008.2212.10.22.210.5151.65206.20.210.14.61.400.6001.24.20000000.4000000.60.400000000000000000014.611.55.42.20.20.200.428.92.87.32214.710.90.20.4000007.70.21.620.90.2000000003.6000000002038.846.1040.6021.211.30.40.21.64.84.40.40000.2002.816.900.60.405.200.20000000.400001.800000000000000001.800.4000000.400.418.20.40.47.90.20.200040.40.20.200.20.21.217.256.70.200000.200000000000008.90.83.82.65114.83.826.66.30.2013.929.230.59.64.89.3001.21.85.805.61.2000000028.80.419.17.430.60.40000.40.800028.50.20.20.6000015.90.201.80.8000000000000.80.417.72.61.25.414.133.49.9181.604.417.40004.603.605.86.20.202020127.715.70001.2000000011.54.26.80.68.30.400314.713.310.510007.217.7120.22320.92.81.200171.25.211.74.4016.50000000000.20000000000007.9001.47.62.815.901.61.20.43.80.40000001.200000000000000.40.620.8000000003.62.4000004.43.62.61.420050.216.10.205.610.52.27.85.45.819.83.62.44.2403.44.205.60.20000000.201.417.20.200.2000.20000.20017.80225.52.20.250.650.20.227.638.30.202.26.10.62.60.67.600.20.20.812.136.65.200.20.200000000.20.25.60.20.25.74.60012.910.50.219.50.20100.80.20.20.42.200.20.200.20.20.20.200.20000003.45.90.20.2008.16.20.40.20.20.257.90.22.2012.511.113.2010030.80.20.606.100017.70.25.8000000000000005.51.40.40000000.42.423.611.322.80.80000.800100.22.400000000004.81.24.26.83.600.2151.47.517.45.62.418.3611.72.20000000000000015.835.18.78.700);
  512.             $BordeauxPluie = array(0000000050.2211.3104.20.200000000000.21.801.600.49.925.84.23.47.43.2000000.60000000000.8000.47.211.73.4015.35.461.710.30003.2100000000.40.43.83.6000000001.87.73.20000000000000000000001.8100007.84.8000120000.240.2410005.619.45.20.40.20.4000000501.202.816.40.62.40013.200001.81.600000000.2000.61035.413.526.4120.4000007.601.60.8000.800003.80.20004.22.402.40.40003.20000004.92.83.9000003.2000.6000000006.308.30.203.802.81.20.80015.62.83.63.22.85.62411.630000000.65.10.2001.81.62.60.60.400.8000000.40.20.20.200.20.62.80.201.61.600.200.2000.600000.21060.43.40.802.22.25.40000000000021.60.40010.302.4000.800011.52.211.351.41815.67.69.300.21.6000.21003.214.33.8212.305.410.910.92.69.152.60.800.452.201.40.29.18.81.43.84.418.93.21.80012.13.600003.61.406.7000001.421.205.614.94.42.804.40.40.800000003.87.30.64.210.22.2300.803.27.3024.20.211.30.47.100011.93.63.81.69.36.63.898.700.21.20.201.411.70.8422.10.6014.900.20000001.200001.84.46.26.701.61.600000001.29.32.82.60000004.70.2004.811.91.840.20.20.20005.16.21.7001.23.848.33.61.61.8001.2000000000007.46.20.2017.22.20.400000000.234.5000.200.400000000.80000000000.47.710.2000.20000000002.200.2007.30000000010020.200000000000000000000000004901.89.71.40019.31.4000.60000000.40.6017.100105.800011.514.96.95.436.447.900.40.200.2000005.26.240005.80.48.910.8202.60.61.60.8100.20.25.806.84.60312.714.614.22.800000000000000000.4000.40.40.80.202.23.51.23.20.2011.61.810.239.8113.37.411.511.50.809.210.6000.241.2000000000000000000.402.41.2053.20.21.81.401.831.81.4034.4000000000000002.83.80.816.94.12.4300.40000.49.50000000292.64.88.51.600001.802.6001.664.20100001.21.22.414.410.7000.20.400.60.8200000011.3218.70.80.80318.43.88.500004.400.63.60000000000.60002.800.20.200000000000000002.428.14.8002.503.2000004.8006.59.22.301.40.40.2050.20000000.2000001.400000.28.70.214.90.2000000000015.88.32.25.88.80.4100.801.40.610.802.4011.60.20.20025.66.11.60.41.411.370.218.84.37.90.20.410.20.21.41.615182513.613.112.215.82.883.67.52.611.19.1214.90000.42513.31.226.3441015.13.8000000.610.32.8012.540.618.33.8000.2013.73910.31.60.40000000001.6000005.80.6000002.43.86.20008.12.200.20.611.33.813.143.61.200000000.60.42.811000.430.400.20000.89.213.116.918.711.38.812.5619.85.4024.80.600.2002310000000000002.25.9000002.25.60.2000020.4000.25.629.20.45.81.60.21.43.411.65.74.812.740.8134.80.22.80006.911.3715.804.200000000020000000014.801.611.40.801.67.70.220.25.46.300.28.66.315.100.200000.200000000010.20000000000.20.200000.20000.600.6000000.2000000021.619.912.301.200000.42.40.20.200.601.63.62.60000000000.20000.2000002.23.91.628.60.60.213.119.311.5000916.82323.214.27.412.3002.6026.97.82.400002.87.80.4182.2016.16.86.200.200.200.40.80001.200.21.200.20.4011.7000.80000000000002.42.449.714.811.33.220.8011.924.310.32.407.200.8001.60.40.600.84.20028.115.12.816.110.16.205.4000000002.64.62.803.20.2006.3820.112.48.100.46.45.25.81611.77.40.614.2011.96.84.217.66.78.28.3000000.20000.20000000000001.8000.23.61.44.830000.40.40000001.600000000000001.811.52000000000.400000.42.202.62.800006.7017.50.2024.411.33.93.29.18.514.70.80.80.80.8064.80.41.210000.4000013.15.800000000003.41.238.3443.312.12.22.22.6004.81.670000.64.82.8006.10.40029.69.40.80.2000000000.60.200.20.200.252013.7100.46.91.60002.40.200.40.4000000.2000000000010.60.2000111.83.200020.200.24.216.45.4000.2003.61.60.22.43.900.21.89.33.25.20000.2000000000023.2000.43.40.2001.40.41.211.722.96.30001.2000000.40.600000.200.400.4721521.11.51.570.419.118.45.22.417.9714.75000000000000004.414.125.49.11.200);
  513.             $NantesPluie = array(1.600000.201300.25.200.40.810000000000.22.20.2316.15.11.26.28.98.239.31.200001.82.201.20000.210.200.6000.815.45.211.702410.90.840.40.200.212.50.20000002.62.88.45.80.2000000.22.22.6000.4000000000000000000000.60.20.800.87.62.80002400000.83.40.40.400071.60.20000000.22.616.914.30.2000.40.8013.51.200.40.20000.80.60000000000.600115.11.42.80.40.800000021.10.62.40.40000001.806.11.211.9013.8002.80.40010.21.600010.80.2000.60000.220.60.800.200000.200.80.801.82.60.609.10.20.601.619.30.820.64.46.400.641.20.40.20.20.20.2082.60.21.20.64.41.61.61.20.20.20.400.211.400.81.20.60.200.20.80.48.74.29.80.21.20.40.20.20.200.6000039.30.402.800.40.21.40.800.200.2000000.613.30.800.25.61.20.20.80.20.20.2000.212.7011.316.3133.69.20.21.20.20.40.20.400.400.44.824.202.214.126.47.14.294.41.27.710.203.23.20.203.6010.91.60.6512.54.81.40.83.83.41.80.20.422.60.48.11180.2001043.20.20.616.790.611.36.51.41.40000000004.80.42.23.20.660.40.601.40.81.8010.92.80.811.90.600004.20029.33.218.716.31.20.278.84.40014.12.22.4702.6021.40000000000.20.22.6070.40.64.6000000.2001.66.40.800000000001430.801.6200.6009.38.7412.61.81.216.40.270.14.80.21.20020.200000000000060.10.80.2000.20000000000005.80.20000006.102.41.20.200000006.720010.20.20.20.20.20000000002.6013.10000.2000000000.20.200000000.45.601.21.600000.6000000017.72.2000.87.3000.20.60.20.60000000.200.2050.20.20.60.200.2009.18.5021.722.817.40.40.200.4000000.22.223.432.94.408.411.41.633.56.24.909.10.47.83.400.20001.612.32.40.611.5712.722.40.200000.400.200.200000.2000.400.20.200000.800.61.203.80.200.80530.29.50.271008.70.61.60.47.315.92.400.200000.210.200.4000000.20.44.2013.95.4014.752.21.4003.40.20.20.23.21.40.6000000000000001.81.62.236.41.20.20.20.200002.4000000010.58.92.2400.20.202.66.70.20.2005.411.903.2000000100.41.2002.80021.61.60.40.200.216.97.81.811.56.40.40.60.26.43.600.20.2000.20.40002.61.8000000.60.40000000000.40000000.600.200002.25.60.4021.60.200002.8102.48.400.41.400.80.22.616.310000000000.2000.2000000.2009.5000.2000000003.20.814.138.29.13.41.46.97.93.601.6030.443.41.20.2000.217.299.35.4602.201.20.65.201.45.60.83.412.95.69.5243.46.20.48.115.7010.30.43.409.70.230.20.200.21.816.22.40.27.83.629.38.420.211.50000.4031.89.807.83.412.73.462.23.20.40.220.7516513.30.20000.200.61.60.60.60.600.21.432.8400.24.410.311.62.49.10.60.2000000.219.461.24.43.821.816.32.82.40006.54.43.60.41.62007.76.732.800.80.20.20.87.966.51.61.66.247.43.23.8298.35.90.43.45.40.80.600.81.40.4000.2000000000000000000.4100000.25.80001.60.2015.92.200.2000.20.213.81.88.44.40.47.408.50.4001.418.210.200000000000.60.2000000000000.20.200.600632.79.84.716.37.95.46.61.20.601.60000.22.251.20.40.20.6002.20.4000000000.200000000002.800.4000000.600.20.200.4000.41.221.44.40.26.58.20.210.312.9011.6001.40.42.63.82.90000.20.20000.200000000.2000.417.310.701.65.660000.21.613.915.88.922.81.830.2001.801.24.4100000018.20.200.812.11.24.85.60008.15.6400000010.21.82.81.20.819.600100.200.20.20.20.20.40.20.200.20.20.213.50.82.402011.315.74.616.2302.20.23.41.63.811.3145002.819.411.45.200.20.25.60.4000.20.2000.20010.26.400.20.47.925.42.822.200.87.614.77.89.97.415.59.240000011.9020.20.20.40.20.606.800020000.20000.80.6000000.24.61.22.81.800001.40.400.2000.202.20.200.20000000000.22.43.60.80000000000000000000.80019.79.32.60.200.65.64.293.46.30.610.90.83002.436.9500.20000001.614.80000000000000.221013.518.18.10.2000.62.62.650.2000.41.812.74.23.2001.27.33.810.400.200000000.84.600.83.200.600.21.60.85.60.84.62.83.20.20.20.20.20000.20000.205.200000000000000.2009.71.93.40.6000.40.200.20.40.60.4000.20030.43.26.500.24.896.70.611.32.40.2000.20.400.2000000.83.27.70.4001.20.200.23.40.21.410.95.67.80000000000000000008.7000011.60.206.100.813.30.210.611.51.28.700.6000000000000.41.86.413.819.812.91.200);
  514.             $LyonPluie = array(0000.2000025.30301.20000000000000002.4004.80.42.21.601.200.400000000000.4000.20001.65.50.41.6068.47000000000000.60022.625.80.21.40000006.44.20000000000000000000000290.60009.52.26.23.80015.53000.410.113.50.8200017.93.30000000000001.6016.40.21.45.300000020.218.5000000005.300.413.58.10.41.82.40000000011.5000000000.60.21.610.71.60.6100005.60001.803.5013.813.200.61.60001009.9000001.60.400008.92.802.40000006.200.2002.600.62.601.2000003.6000013.31.60.8201.400.8000000000000011.400000000000030.91.600.2000.23.85.50.600000000004.86.7004.64.60.60000003.80.403.86.81.623.405.264.900.20.60.20000.2209.74.41.60.8025.82.40.2004.420.200001.84.60.22.60.210.13.40.8006.926.400.20.407.50.81013.43.60.202030.21.42.83.814.200000000001.64.210.72.28.10.26.10.8013.72.230.40020.67.76.300000.20000.41.86011.7100013.300004.60.23.20.61.80.60000000000000.605.61.40.60.20.600000.67.1007.421.3120.21.20000024.58.9000.63.63.8016.10.2002.24.80.408.92.800.411.944.2000000000000000000040.60.83.25.40.400000004.95.9000014.2000000014.10000000000014.2001.212.51.202.6000000.61.6000006.30000000.85.20000001.400000000.20300000010000025.75.800.21.40000000000000000.62.213.145.80.211.200001.29.9003.20.6010001009.30025.4032.60003.810.36.62.601.4220.610.600002.62.80.40.411.907.21.200000000000000001.62.80065.91.6000.200001.64.8000.21.40.20.206.29.712.90.80002.6002.21.20000000000000000002.800010.70.200.80.20.22.81.47.10.201.60000000000000000.218.31.6002.800000000.6100000021.845.71.60.63.20002.604.90.201.415.550.26.1000002.27.30.40.20000002.80.40000000300.4014.911.316.10015.726.700001.25.70000000003.800001.400000000000000.4000000.8280.400000009.124.44.2021.4010.90.4000008.65.612.50000.2000000000000001.400000000000008.500.82.80000010.20.80005.6009.9000020.421.80144.431.72.80.619.400002.4005.26.21.85.6212.40.200.400.200480000002.4010003.60.63.23.616.74.70000001.4109.177.76.6000.20011.76.32.61.41.400.43.20000000000000.400000006.3000000001.60.22.21.24.801.44.80.21.8000001.80.801.40006.301.80.200002.201.201.418.903.46.8000.222.20300000000000000000.600000000000000000000.23000003.801.420.11.412.710.615.8000.400007.11.21.221.80000000006.1000000000014.621.7010.505.67.900.416.49.20036.310.600000005.114.3004.9000000003.200001.2000000.41.40000000003.60.23.20000000.2007.5001.800001.800000023.9000000000000000000000.82326.51.8073.47.610.74.20.40.21.448.600.820.4000.20.60.6001.2000000014.512.1041.81.62.20000002.200006.10000008.70000.800000000000.42.60.82.67.4050.40.2006.21.200.819.802.208.312.74.203.44.40.800.20.206.38.20000000000055.83.82.611.90.40000.614.50.40.2005.28.606.51.68.83.840050.80.44.4005.400000000000000000000003.6000403.80.82.68.80.2000000006.400000000000000022.6000000000.20.20000.20.203.64.419.47.50.802.4010.71.600105.92.80.44.82.47.99.20.60.860.212.51010.20000002.2304.800000.2000000000.4014.25.80.82.8000020.80.8002.87.42363.85.908.9048.812580.800000051.4009.90015.44008.914.40016.400006.1005.7000000.2000000000000.80.800000140.2001.23.8408.913.118.70000500.20000079.413.44.3000000000000003.600000.400004.8414.414.101.2000000002.40.200000000001.40.21.411.5002.615.43.25.61.212.58.26.11.8000000000000001.80.615.9196.70.20);
  515.             $pluieBDD = ['Paris' => $ParisPluie'Marignane' => $MarignanePluie'Aurillac' => $AurillacPluie'Bordeaux' => $BordeauxPluie'Nantes' => $NantesPluie'Lyon' => $LyonPluie
  516.             ];
  517.             $pluieBaseBDD = ['Paris' => 637.4'Marignane' => 515.4'Aurillac' => 1174'Bordeaux' => 944.1'Nantes' => 819.5'Lyon' => 880.9];
  518.             $pluieBase $pluieBaseBDD[$climat];
  519.             $pluviometrie $pluieBDD[$climat];            
  520.             $ParisETP= array (    0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     3.8,     3.6,     1,     2.7,     3.1,     1.1,     1.9,     2.2,     4.1,     4.6,     3.6,     3.2,     3.8,     3.7,     4.9,     5.9,     6.4,     3.1,     3.7,     3.7,     4.6,     4.9,     5.2,     4.6,     6.7,     7.2,     6.5,     6.8,     6.9,     6.1,     5.7,     6.2,     5.5,     3.4,     4.7,     6,     4.8,     5.4,     6.9,     6.4,     7.1,     8,     5.8,     5.7,     7.3,     7.9,     6.3,     5.8,     7.4,     7.8,     7.6,     7.9,     8.5,     6.1,     6.1,     6.6,     6.1,     3.3,     4.2,     4.5,     2.7,     2.9,     3,     5,     5.7,     6.8,     6.4,     8,     7,     4.5,     2.4,     4.7,     4,     4.7,     5.3,     5.5,     6.3,     6.2,     7.1,     5.9,     5.1,     6.1,     3.4,     4.2,     2.7,     3.9,     2.9,     3.5,     4.9,     6.3,     6.9,     3.9,     4.9,     6,     6.4,     5.5,     5.2,     5.2,     5.8,     2.9,     2.8,     2.4,     3.3,     2.1,     3.7,     4.4,     3.4,     3.9,     2.4,     2.7,     3.6,     4,     3,     4.5,     4.7,     3.7,     1.8,     3.7,     4.1,     4.3,     5.1,     2.4,     3.6,     3.4,     3.3,     3.1,     3.8,     2.8,     3.4,     3,     2.2,     2.8,     2.6,     3,     3.1,     1.3,     2.6,     2.8,     2.2,     2,     1.7,     2.3,     1.5,     2.4,     2.5,     2.4,     3,     2.8,     2.4,     1.6,     1.3,     2.7,     2.7,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     2.8,     3.5,     4.3,     4.8,     5.2,     5.5,     6.5,     6.5,     4.9,     4.7,     4.9,     3.7,     2.8,     1.3,     3.6,     4.8,     5.3,     4.8,     4.7,     5,     4.4,     3.8,     4.3,     4.8,     4.8,     5.1,     5.8,     4.7,     2.8,     4.4,     4.8,     2.6,     4.2,     5.5,     4.8,     2.4,     2.5,     5,     4.9,     4,     3.7,     1.5,     2.5,     3,     2.9,     5,     5.5,     4.7,     4.8,     4.5,     5.8,     6,     5.9,     5.6,     5.9,     6,     7.3,     7,     7.7,     7.3,     7.1,     7.7,     7.1,     7,     6.6,     5,     6.5,     7.1,     6.9,     7.1,     6.6,     4.4,     5.6,     6,     6.6,     6.7,     7.4,     6.4,     6.8,     7.4,     4.4,     5.7,     5.6,     6.5,     6.2,     7.6,     6.9,     7.4,     6.8,     6.8,     5.7,     6.5,     6.4,     7.4,     8,     8.8,     7.2,     7.3,     7.9,     6.2,     2.2,     4.7,     4.9,     6.5,     5,     4.3,     4.4,     5.8,     5.9,     4.9,     5.1,     3.5,     3.9,     4.9,     4.7,     4.3,     4.5,     4.4,     4.3,     4.4,     2.5,     2.5,     4.1,     4.6,     4.6,     4.5,     1.9,     3.8,     3.2,     4,     3.6,     4.6,     4,     4.5,     4.4,     1.6,     3.7,     3.3,     3.6,     4.6,     3,     4.2,     3.8,     3.7,     3,     2.3,     3.1,     3.3,     2.9,     2.8,     3.2,     3.5,     2.8,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     3.6,     2.5,     2.8,     1.7,     2.7,     2.5,     3.8,     2.1,     2.2,     2.6,     3,     4.1,     5.2,     5.7,     5.7,     4.9,     3.2,     2.4,     2.1,     3.2,     3.3,     4.1,     4.6,     5.6,     4,     3.9,     5,     4,     3.9,     3,     4.6,     5.8,     7.9,     3.6,     4.9,     1.3,     4.6,     3.8,     4.5,     3.6,     3.9,     3.2,     2.6,     2.8,     4.5,     5.2,     4.7,     5.1,     5.8,     6.1,     4.3,     5.4,     5.7,     6,     6.4,     7,     7.5,     7.8,     8.2,     8.4,     6.7,     6.1,     6.6,     7.1,     7.2,     7.6,     7.7,     6.5,     7.3,     6.9,     6.4,     6,     6.4,     6.3,     4.7,     5.9,     5.7,     6.6,     5.9,     5.9,     5.5,     6.1,     6.7,     8.7,     8.5,     9,     7,     3.6,     5.2,     6.6,     6,     5.1,     5.5,     6.5,     4.8,     6.2,     5.6,     2.8,     5.2,     5.2,     3.2,     6.8,     3.6,     3.4,     3.6,     4.8,     4.7,     4.6,     1.3,     3,     4.7,     5,     4.3,     5.2,     5.5,     5.5,     5.8,     6,     6,     5.2,     4.8,     5.2,     6.7,     5.1,     4.3,     4.1,     4.3,     3.6,     3.7,     3.7,     3.7,     3.2,     4.1,     4.2,     2.7,     3,     3.8,     4.3,     4.3,     4.1,     4.4,     4.1,     5.5,     4.1,     2.3,     3.1,     1.8,     1.9,     2.6,     2.5,     2.7,     2.2,     2.3,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     3.4,     3.9,     3,     3.7,     2.7,     5.7,     5.1,     4.9,     3.7,     3.1,     4.1,     4.1,     4.7,     4.7,     5,     4.7,     4.8,     5.6,     5.8,     5.9,     5.8,     5.5,     4.8,     4.6,     5.1,     6.6,     6.8,     6.7,     7.4,     6.9,     7.2,     6.8,     7.3,     6.6,     2.2,     3.2,     5.2,     3.8,     4,     4.2,     4,     4.8,     3,     4.9,     4.2,     4,     4.6,     3.8,     4.6,     3.5,     5.1,     3.7,     5.5,     7.1,     8.4,     8.2,     6.7,     4.1,     5.9,     6,     4.5,     3.6,     4.3,     4.9,     3.9,     4.2,     5.3,     5.8,     5.8,     7.3,     5.8,     6.3,     6.6,     7.4,     4.8,     4.4,     3,     4.8,     6.5,     7,     7.1,     7.4,     6.4,     6.6,     4.9,     5.6,     5.7,     8.1,     6.4,     5.9,     7.2,     8.1,     5.6,     6.2,     5.4,     5.7,     6.8,     7.1,     8.1,     7.5,     9,     7,     6.4,     7,     4.8,     4,     4.4,     4,     3.7,     5,     3.1,     5.6,     6.8,     5.4,     4.1,     3.9,     5.8,     5.4,     4.8,     3.7,     2.4,     3.1,     3.8,     3.7,     3.9,     5.1,     5.7,     4.4,     2.9,     3.8,     3.8,     5.1,     3.8,     3.8,     3.5,     4.1,     4.8,     5.6,     5.2,     5.5,     4.3,     4.8,     3.8,     4.9,     3.7,     2.7,     2.1,     2.2,     2.9,     0.9,     1.2,     0.9,     2.4,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     2.4,     2.6,     4.1,     3.5,     3.2,     1.4,     3.8,     4.2,     5.6,     4.3,     2.6,     2.8,     3.4,     2,     2.9,     3.2,     3.4,     3.5,     3.4,     3.5,     5.2,     4.1,     4.3,     3.5,     3.3,     3.1,     4.5,     5.6,     5.7,     6.4,     7.1,     6.8,     5.6,     5.6,     3.1,     3.2,     5.3,     5.2,     5.6,     6.2,     6.6,     5.9,     5.3,     7,     7.3,     6.7,     7.6,     5.2,     5.2,     3.6,     4.5,     5.8,     2.1,     2,     4.1,     2.9,     2.8,     3.4,     4.7,     2.8,     2.6,     4.2,     4.9,     4.2,     4,     3.4,     5.9,     5,     4.9,     3.8,     3,     4.1,     3.2,     1.2,     3.6,     5.3,     4.1,     4.5,     6.8,     6.7,     6.7,     6.6,     7,     6.5,     5.7,     4,     4,     2,     5.1,     4.8,     5,     4.8,     4.9,     3.8,     3.3,     2.8,     4.7,     4.9,     3.8,     4.9,     4,     3.8,     4.6,     5.1,     5.8,     6,     5.8,     4.6,     2.7,     2.9,     2.9,     3.8,     3.9,     4,     2.8,     5.3,     5.3,     3.6,     4.6,     3.6,     2.9,     3.4,     4.8,     4.6,     4.5,     4.2,     4.4,     4.7,     5,     5.6,     4.7,     3.8,     3.6,     3.6,     3.2,     3.6,     2.8,     1.7,     3.5,     3.2,     3.5,     3.5,     2,     2.8,     2.9,     2.8,     2.7,     2.5,     2,     1.9,     2.3,     3,     2.5,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,     0    );
  521.             $MarignaneETP = array(0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004.62.43.53.43.73.36.37.65.73.33.85.34.44.87.25.86.76.76.68.46.356.15.95.86.677.97.26.55.35.765.67.98.18.696.76.67.97.27.87.47.8899997.26.66.97.58.497.68.46.57.48.39997.48.58.48.58.58.97.36.4999998.78.48.48.66.85.99999997.18.59988.18.89997.799997.36.16.667.27.5997.17.35.15.16.86.76.46.65.67.44.87.997.55.45.6996.13.26.98.58.14.45.83.244.33.36.45.83.12.833.52.23.53.74.13.92.2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003.55.66.14.34.23.83.34.75.46.64.45.11.83.14.85.83.94.95.45.43.73.74.75.45.34.34.73.853.74.35.54.844.55.25.92.65.95.67.355.77.28.28.37.4998.37.98.197.96.77.67.17.17.66.77.77.76.76.87.49998.99997.98.48.17.84.198.2878.1997.38.77.77.96.87.56.97.98.497.18.397.77.46.63.58.18.66.36.896.87.16.46.86.76.76.86.17.1998.96.15.95.28.298.75.85.45.84.23.77.24.843.85.14.25.375.84.83.93.94.64.65876.84.54.13.25.23.73.2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003.23.95.47.66.36.63.52.94.34.66.37.96.75.94.14.53.34.62.85.77.55.44.73.94.55.46.598.86.35.95.36.36.38.296.87.98.35.77.32.25.45.38.25.88.45.97.57.8667.56.57.88.88.68.898.797.97.18.57.67.76.87.88.46.497.999996.97.68.76.76.26.96.67.388.27698.9896.1998.17.68.67.28.27.77.377.49998.25.26.15.16.16.75.75.76.16.26.34.44.86.26.56.87.797.45.6988.98.56.32.35.855.34.14.64.94.43.75.14.63.835.64.54.84.83.64.42.64.60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002.95.76.45.43.36.85.76.74.22.12.24.54.73.75.13.43.95.96.15.75.85.85.37.65.96.46.65.45.45.95.25.55.14.63.175.86.48.67.37.55.37.43.57.297.47.35.67.29997.67.17.47.56.96.88.38.96.26.898.99997.776.896.37.37.68.1996.96.96.16.46.87.798.47.47.35.37.26.8899997.76.87.16.47.36.46.67.37.47.56.86.17.27.66.37.78.18.49966.37.15.92.37.48.27.15.25.354.57.27.55.73.81.93.34.8555.24.54.85.27.73.53.61.93.33.65.864.344.12.7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.15.55.145.63.76.75.18.534.85.265.52.22.26.94.976.63.93.95.847.45.85.94.36.15.46.16.16.46.94.87.77.377.87.48.37.36.87.76.66.26.57.38.46.57.57.27.86.37.596.887.38.898.87.86.13.87.97.55.88.496.98.18.78.37.48.78.77.98.17.37.46.97.1998.17.976.36.85.9897.962.36.96.36.16.77.27.17.57.37.97.87998.166.34.66.195.35.26.697.96.96.35.84.64.54.94.354.74.97.87.2354.73.84.96.8254.25.75.33.84.23.73.94.32.33.24.15.65.100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);
  522.             $AurillacETP = array(0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.522.32.74.72.22.13.43.63.423.53.23.34.45.35.52.82.22.33.753.14.85.66.267.46.83.12.94.54.40.83.84.33.53.25.43.85.15.73.55.74.94.86.15.767.66.76.36.82.14.86.24.44.72.52.51.621.94.75.37.76.36.45.43.31.93.32.54.74.94.84.96.88.15.41.52.43.14.13.53.43.12.54.54.23.863.35.24.74.33.34.74.73.121.71.433.45.33.4343.24.23.23.9644.55.565.3552.41.93.12.22.62.823.52.31.82.11.91.92.30.41.81.51.40.61.71.422.61.92.42.61.51.42.52.52.90.9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002.332.13.61.43.92.52.50.92.43.52.41.30.30.31.52.33.53.43.63.833.53.44.37.23.31.82.62.42.53.84.53.94.12.533.73.35.44.32.83.34.73.323.63.53.34.86.15.65.65.25.45.46.95.75.75.86.76.65.666.33.14.555.155.15.15.44.95.35.42.24.75.35.24.64.53.74.65.65.36.25.93.35.55.65.64.95.85.86.26.17.57.14.42.74.44.65.91.93.34.54.82.13.24.24.24.65.84.73.91.73.83.55.13.23.12.93.83.54.14.43.11.53.644.13.64.34.82.73.63.34.84.74.23.73.82.83.13.23.12.544.43.12.63.3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003.51.91.91.82.73.23.91.41.72.62.13.64.64.74.541.11.40.61.92.63.44.22.63.33.72.22.33.13.14.35.56.43.572.84.42.73.731.82.12.15.531.945.375.24.32.94.45.67.17.598.98.47.27.35.44.85.66.47.85.95.55.83.25.45.25.45.65.75.44.95.84.25.24.75.36.48.68.694.41.84.54.92.94.43.24.75.26.24.643.65.26.842.13.63.83.733.84.9531.93.44.25.25.655.83.53.74.14.65.12.943.94.13.73.32.93.42.62.53.53.85.23.64.74.14.45.154.54.91.82.20.91.721.82.63.12.30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.91.42.54.33.73.74.15.84.51.63.81.81.32.62.43.13.53.84.44.244.51.33.34.34.85.35.15.15.25.44.14.93.12.112.94.12.232.81.62.12.43.32.732.72.23.243.75.14.875.85.44.43.34.94.43.43.74.344.25.74.75.55.64.35.55.25.652.22.43.24.85.76.36.255.25.8546.85.15.57.18.25.44.44.14.85.57.38.96.56.47.776.53.44.45.23.12.74.15.67.46.74.23.43.55.13.83.90.92.52.532.92.83.15.14.42.93.63.22.53.93.53.54.46.24.544.46.53.71.82.31.72.71.21.41.30.111.21.6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.22.63.13.13.30.23.14.55.42.81.92.12.32.80.71.82.81.32.43.13.52.22.51.73.12.93.94.94.74.14.53.93.24.21.5432.73.84.14.35.2555.55.65.83.74.74.933.53.63.52.33.84.23.21.92.22.73.83.92.63.33.923.53.53.93.24.50.80.81.51.53.24.45.54.86.95.85.96.43.52.642.83.23.81.71.53.13.40.822.73.82.13.13.64.24.33.93.853.22.43.32.72.73.74.53.13.32.93.13.93.22.933.43.34.43.12.63.13.74.34.54.92.52.72.62.93.33.72.91.82.81.40.91.52.22.32.62.52.71.72.31.60.91.600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);
  523.             $BordeauxETP = array(0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002.83.13.44.73.44.14.245.33.15.35.43.54.95.66.74.81.13.44.15.664.15.67.67.95.47.73.74.73.95.15.52.12.74.75.14.26.93.55.875.85.46.14.96.18.27.797.57.973.92.95.74.734.53.82.62.53.44.16.68.34.175.55.14.25.23.43.55.25.37.18.494.353.244.34.74.41.52.74.75.254.85.25.74.855.364.95.14.34.34.94.24.47.42.73.73.92.84.24.56.785.55.75.26.14.75.95.33.64.22.43.63.83.22.43.13.43.33.42.53.33.11.83.72.52.41.53.12.72.632.62.833.42.13.33.13.22.4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003.12.123.94.44.35.34.34.74.44.6131.63.94.12.9555.44.244.64.12.53.23.22.23.33.82.94.355.23.81.83.54.34.75.34.22.83.13.63.52.83.84.93.34.66.15.887.578.27.86.57.36.87.96.45.94.43.84.14.25.77.66.66.86.86.567.45.64.64.856.35.83.94.25.86.46.175.24.84.85.25.56.87.37.77.88.37.55.54.44.74.25.86.24.55.455.35.85.25.84.96.15.65.54.82.24.43.66.64.544.34.85.85.45.13.42.344.23.43.845.13.43.54.244.6444.42.13.43.543.9453.64.13.7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004.233.42.63.244.22.12.63.23.44.76.16.96.85.42.62.32.22.53.24.14.14.14.54.22.83.43.94.65.76.67.14.45.11.34.34.24.463.83.23.24.73.44.84.86.58.34.951.84.56.8658.78.14.65.63.83.43.26.67.78.26.95.85.67.17.26.86.26.68.47.36.86.75.55.85.66.57.397.8922.95.16.25.34.94.75.265.94.84.14.86.76.74.62.84.33.44.64.24.44.83.74.45.55.85.966.65.75.25.6455.25.82.44.64.84.84.44.423.93.23.34.33.95.14.45.34.765.55.96.54.23.12.22.92.33.52.53.42.73.10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.61.44.85.45.15.254.54.40.60.81.11.92.54.75.34.75.15.75.65.65.42.856.57.17.47.38.36.87.25.85.964.33.143.72.93.23.113.82.854.13.83.73.13.64.74.166.576.14.75.13.85.84.93.84.53.54.55.36.16.16.86.95.17.37.87.95.95.73.14.66.48.17.27.15.86.86.44.85.27.14.95.68.57.74.95.34.75.86.57.58.87766.55.1256.25.14.357.27.43.24.33.744.754.24.83.23.93.654.34.25.44.34.94.14.855.24.74.35.97.33.64.86.24.33.32.71.92.33.63.31.70.91.632.32.4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003.23.44.12.641.12.84.91.94.23.43.81.33.50.93.33.92.53.45.11.52.943.83.93.84.76.44.76.165.653.91.74.55.45.26.16.25.95.76.17.77.86.96.42.25.33.65.54.93.72.63.54.44.81.534.34.23.65.14.33.26.15.13.33.84.14.25.53.32.33.24.15.25.96.57.37.267.13.94.54.34.52.24.93.44.42.13.63.52.23.44.34.94.24.43.65.65.93.14.75.74.13.54.12.82.85.44.54.24.44.85.25.45.45.65.15.35.55.323.53.64.85.76.43.31.83.43.44.55.44.13.73.53.41.733.32.92.92.72.94.22.73.31.72.72.400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);
  524.             $NantesETP = array(0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002.42.63.13.14.53.13.13.84.43.52.63.23.84.74.35.92.81.733.44.55.14.85.47.57.65.44.72.53.24.755.32.93.83.44.44.24.34.75.13.95.34.855.45.67.18.88.66.56.45.14.94.94.84.54.24.94.12.72.93.645.87.64.16.77.35.74.44.43.83.955.66.47.493.75.13.64.11.63.43.92.64.63.93.44.83.55.14.35.71.95.14.85.84.83.64.33.61.44.354.541.44.33.13.54.66.443.54.43.85.564.71.23.13.13.21.333.23.32.41.32.72.23.22.61.53.42.32.12.31.92.62.12.72.42.92.21.222.21.912.2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002.90.93.13.74.24.43.93.33.743.21.22.53.54.73.93.65.14.94.85.14.454.11.93.64.243.23.11.74.14.64.42.52.20.93.13.44.43.70.22.23.91.64.53.33.83.23.95.95.76.576.36.67.47.57.98.17.86.73.35.14.73.73.75.57.37.35.85.95.15.25.76.45.45.74.33.24.63.74.35.16.55.45.13.44.62.33.95.24.56.17.56.86.96.95.353.444.133.433.73.64.13.83.62.44.45.33.33.73.32.844.32.73.23.43.95.14.453.94.33.14.23.93.13.23.62.73.93.73.143.43.1330.71.42.84.24.13.73.43.72.6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002.62.62.23.32.933.13.53.40.73.73.95.46.66.354.23.12.62.54.13.944.83.51.74.33.82.14.14.75.84.24.62.63.43.32.53.92.83.81.22.93.93.92.74.156.43.15.3567.224.98.697.45.36.666.78.296.26.77.17.98.77.46.74.96.47.46.86.96.32.64.74.14.76.28.66.87.41.35.24.84.74.64.33.95.35.94.33.52.34.34.73.75.94.14.23.61.83.62.91.34.63.84.15.15.176.73.95.64.83.13.64.44.14.744.12.73.33.14.53.21.83.93.22.53.74.84.74.94.366.36.55.43.51.23.111.32.52.71.60.80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002.51.11.93.43.22.74.73.13.53.53.24.24.94.84.54.14.24.95.35.15.54.24.64.266.77.77.48.77.98.57.66.75.83.93.65.42.73.34.62.61.23.4332.43.42.33.43.63.634.66.26.95.71.73.31.93.22.43.84.64.113.44.74.65.14.65.35.76.85.94.34.63.65.45.76.26.57.67.66.152.44.83.55.55.98.55.35.65.25.64.84.56.48.56.26.16.45.92.834.64.12.44.23.12.24.25.53.93.43.3341.63.62.32.23.643.73.43.74.12.43.23.74.43.83.33.54.76.12.446.64.12.62.32.62.71.81.93.132.20.91.31.7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003.62.831.12.82.32.64.93.73.83.22.32.92.42.92.83.62.73.834.53.93.33.53.22.13.54.95.47.16.46.33.813.34.13.94.85.45.44.45.85.96.96.86.54.74.12.332.12.722.44.43.31.33.63.43.63.94.53.33.73.11.643.23.22.61.82.83.93.444.24.65.36.87.487.586.32.84.34.22.8444.63.43.33.51.71.81.94.13.73.942.83.94.24.65.13.94.532.53.14.61.43.63.74.65.64.74.34.94.23.34.35.35.64.843.85.97.44.22.43.733.53.72.82.432.93.42.72.73.93.22.62.80.633.92.632.100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);
  525.             $LyonETP = array(0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002.61.72.32.73.81.323.143.91.61.82.43.64.64.66.66.733.84.35.65.96.96.35.97.58.18.76.25.35.15.94.63.75.95.44.86.36.37.16.46.86.64.95.67.37.96.4998.38.58.37.96.93.87.24.75.44.83.13.85.95.79987.35.94.25.67.26.97.77.87.57.6996.74.13.45.15.63.74.95.46.36.56.26.16.67.37.86.86.38.16.524.55.23.54.44.56.874.35.75.15.96.355.26.45995.75.776.31.34.33.23.34.34.24.94.33.72.63.53.73.94.92.82.52.822.62.12.72.62.72.732.22.53.234.31.6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002.94.73.64.754.55.65.54.73.14.15.810.92.52.73.44.55.34.94.75.12.74.64.86.25.13.44.93.344.55.44.94.54.65.95.645.37.24.33.94.766.65.66.15.76.86.77.37.56.87.17.47.17.88.36.16.98.48.35.26.25.45.27.288.68.67.26.26.46.15.56.97.46.66.65.74.56.78.46.37.27.17.93.45.96.57.68.787.3998.497.32.75.366.84.45.16.364.77.37.26.96.46.25.36.13.85.34.65.56.24.75.85.54.94.44.452.64.83.84.25.14.76.45.45.263.95.36.14.24.45.83.66.14.73.433.34.23.91.5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004.13.14.32.13.14.14.72.42.53.94.14.966.35.84.12.33.32.63.14.55.955.66.66.64.44.25.255.55.88.35.8994.97.35.70.90.71.156.333.35.15.47.294.94.35.15.36.78.58.67.58.58.28.68.67.78.27.876.86.47.57.98.75.26.68.47.97.57.37.26.678.76.67.98.19994.755.45.46.75.56.96.66.26.16.23.95.48.34.84.445.15.34.84.37.17.41.10.93.24.14.24.855.24.95.44.75.16.14.77.35.94.354.55.132.63.74.34.13.93.84.54.76.55.35.23.95.44.832.32.73.24.13.74.13.30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.91.73.54.65.93.84.57.47.13.93.91.90.71.52.94.46.56.787.56.15.92.64.45.66.25.566.95.45.65.86.55.23.72.84.644.91.23.44.92.7355.353.94.35.35.667.26.57.58.9786.36.36.15.96.27.46.36.67.77.96.67.388.37.67.67.14.25.95.87.777.67.74.96.68.16.87.598.48.48.597.94.65.46.16.46.77.187.77.97.88.75.25.46.53.95.25.97.3996.36.85.776.661.73.44.74.55.24.74.76.16.76.16.34.53.85.75.35.44.95.95.95.856.15.62.92.83.23.63.23.32.10.70.521.8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.93.63.64.24.31.63.85.181.42.93.63.53.41.73.63.92.73.64.53.14.344.43.64.65.85.26.46.15.77.13.56.97.64.64.84.45.95.96.26.97.18.17.17.67.87.18.67.74.25.254.64.24.35.57.22.54.93.65.16.22.83.66.81.25.14.35.455.44.53.10.91.14.25.16.76.8765.97.35.95.865.14.95.73.44.53.94.22.91.94.35.71.34.54.34.85.35.24.85.56.65.453.8445.55.85.33.444.75.454.73.54.73.843.54.54.24.45.484.13.143.855.24.62.43.53.42.313.32.72.62.73.93.23.32.83.63.300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);
  526.             $ETPBDD = ['Paris' => $ParisETP'Marignane' => $MarignaneETP'Aurillac' => $AurillacETP'Bordeaux' => $BordeauxETP'Nantes' => $NantesETP'Lyon' => $LyonETP];
  527.             $ETP $ETPBDD[$climat];
  528.             ////////fin climat
  529.             
  530.             // Besoins en eau            
  531.             $besoinWc 0;
  532.             $nbreUtilisateur $reutilisationDTO->getNbreUtilisateur();
  533.             $tauxRaccordement $reutilisationDTO->getTauxRaccordement()/100;
  534.             $volumeParUtilisation =  $this->toFloat($reutilisationDTO->getVolumeParUtilisation());
  535.             $scenarioUtilisation $reutilisationDTO->getScenarioUtilisation();            
  536.             $scenario5sur7 = array(111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001,1111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100111110011111001111100);
  537.             $scenarioEnseignement = array(0000000110.51100110.51100110.5100110.51100110.5110000000000000111111111110.51100110.5110110.51100110.5110011000000000000000100110.51100110.5110110.51100110.51100110.51100110.5100110.51100110.51100110.5110010.511000000000000000000000000000000000000000000000000000000000000000110.5110110.51100110.51100110.51100111100110.51100110.510000000000000000110.51100110.51100110.5100110.51100110.51100110.5110010.5110000000000000000000000000000000110.51100110.51100110.5100110.51100110.5110000000000000111111111110.51100110.5110110.51100110.5110011000000000000000100110.51100110.5110110.51100110.51100110.51100110.5100110.51100110.51100110.5110010.511000000000000000000000000000000000000000000000000000000000000000110.5110110.51100110.51100110.51100111100110.51100110.510000000000000000110.51100110.51100110.5100110.51100110.51100110.5110010.5110000000000000000000000000000000110.51100110.51100110.5100110.51100110.5110000000000000111111111110.51100110.5110110.51100110.5110011000000000000000100110.51100110.5110110.51100110.51100110.51100110.5100110.51100110.51100110.5110010.511000000000000000000000000000000000000000000000000000000000000000110.5110110.51100110.51100110.51100111100110.51100110.510000000000000000110.51100110.51100110.5100110.51100110.51100110.5110010.5110000000000000000000000000000000110.51100110.51100110.5100110.51100110.5110000000000000111111111110.51100110.5110110.51100110.5110011000000000000000100110.51100110.5110110.51100110.51100110.51100110.5100110.51100110.51100110.5110010.511000000000000000000000000000000000000000000000000000000000000000110.5110110.51100110.51100110.51100111100110.51100110.510000000000000000110.51100110.51100110.5100110.51100110.51100110.5110010.5110000000000000000000000000000000110.51100110.51100110.5100110.51100110.5110000000000000111111111110.51100110.5110110.51100110.5110011000000000000000100110.51100110.5110110.51100110.51100110.51100110.5100110.51100110.51100110.5110010.511000000000000000000000000000000000000000000000000000000000000000110.5110110.51100110.51100110.51100111100110.51100110.510000000000000000110.51100110.51100110.5100110.51100110.51100110.5110010.5110000000000000000000000000);
  538.             
  539.             //Transformation du besoin en eau libre
  540.                 $besoinEau $reutilisationDTO->getBesoinEau();
  541.                 // Besoin en eau séparé par des points-virgules
  542.                 if (!empty($besoinEau)) {
  543.                     // Supprimer les espaces et remplacer les virgules par des points
  544.                     $besoinEau str_replace(" """$besoinEau);
  545.                     $besoinEau str_replace(",""."$besoinEau);
  546.                     // Transformer la chaîne en tableau
  547.                     $besoinEauArray explode(";"$besoinEau);
  548.                     // Répéter la série jusqu'à obtenir 1825 éléments dans le tableau
  549.                     $i 0;
  550.                     while (count($besoinEauArray) < 1826) {
  551.                         // Ajouter les éléments de la série à la fin du tableau
  552.                         $besoinEauArray[] = $besoinEauArray[$i count($besoinEauArray)];
  553.                         $i++;
  554.                     }
  555.                 } else {
  556.                     // Créer un tableau de 1825 zéros
  557.                     $besoinEauArray array_fill(018260);
  558.                 }
  559. //dump($reutilisationDTO->getCertivea());                
  560. // Apports toiture
  561. if ($reutilisationDTO->getCertivea()){
  562.     $surfaceRecuperee =
  563.         (
  564.         $this->toFloat($reutilisationDTO->getSurfaceRecuperee())
  565.         + $this->toFloat($reutilisationDTO->getSurfaceRecuperee2())
  566.         + $this->toFloat($reutilisationDTO->getSurfaceRecuperee3())
  567.         );
  568.     //dump($reutilisationDTO->getCertivea()); 
  569. else 
  570. {
  571.     $surfaceRecuperee =
  572.         (
  573.         $this->toFloat($reutilisationDTO->getSurfaceRecuperee()) * $this->toFloat($reutilisationDTO->getRendementToiture())
  574.         + $this->toFloat($reutilisationDTO->getSurfaceRecuperee2()) * $this->toFloat($reutilisationDTO->getRendementToiture2())
  575.         + $this->toFloat($reutilisationDTO->getSurfaceRecuperee3()) * $this->toFloat($reutilisationDTO->getRendementToiture3())
  576.         ) * 0.9// 0.9 pour le filtre Kf
  577.             
  578.             // Autres paramètres
  579.             $volumeCuveUser =  $this->toFloat($reutilisationDTO->getVolumeCuve());
  580.             $tauxRecupObjectif =  $this->toFloat($reutilisationDTO->getTauxObjectif());
  581.         $show_complement=true;
  582.             $time date('d/m/y H:i');
  583.             $reutilisationDTO->setTime($time);
  584.             
  585.             // Données économiques récupérées :
  586.             $coutEau =  $this->toFloat($reutilisationDTO->getCoutEau());
  587.             $coutPompe =  $this->toFloat($reutilisationDTO->getCoutPompe());
  588.             $coutVolume =  $this->toFloat($reutilisationDTO->getCoutVolume());
  589.             $choixVolume =  $this->toFloat($reutilisationDTO->getChoixVolume());
  590.             $coutVolume2  =  $this->toFloat($reutilisationDTO->getCoutVolume2());
  591.             $choixVolume2  =  $this->toFloat($reutilisationDTO->getChoixVolume2());
  592.             //////////////        
  593.                         
  594.             // Arrosage 
  595.             $sArrosage $this->toFloat($reutilisationDTO->getSArrosage());
  596.             $typePlante $reutilisationDTO->getTypePlante();
  597.             $profondeurTerre $reutilisationDTO->getProfondeurTerre();
  598.             $ru $reutilisationDTO->getRu();
  599.             $kcArray = array('Gazon Kc=0.8 racines=20cm' => '0.8''Vivaces Kc=0.2 racines=40cm' => '0.2''Arbustes Kc=0.2 racines=70cm' => '0.2''Graminees Kc=0.8 racines=80cm' => '0.8');
  600.             $profondeurRacineArray = array('Gazon Kc=0.8 racines=20cm' => '0.2''Vivaces Kc=0.2 racines=40cm' => '0.4''Arbustes Kc=0.2 racines=70cm' => '0.7''Graminees Kc=0.8 racines=80cm' => '0.8');            
  601.             $kc $kcArray[$typePlante];
  602.             $profondeurRacine $profondeurRacineArray[$typePlante];  
  603.             $RFUmax min($profondeurRacine,$profondeurTerre) * $ru 2/3;
  604.             //////////////
  605.             $iteration 0;
  606.             $victoire 0;
  607.             Do {
  608.             $volumeEauInitial 0//Litres
  609.             $tauxRecup null;
  610.             $tempsDeRetour null;
  611.             $volumeCuveGraph null;
  612.             
  613.             $besoinArrosageCinqAnsSurfacique 0;            
  614.             $besoinArrosageAnnuel 0;
  615.             $ETPstring implode(",",$ETP);
  616.             $ETPmax max($ETP);
  617.             $besoinJournalierMax $nbreUtilisateur $volumeParUtilisation $tauxRaccordement max($besoinEauArray) + $sArrosage $ETPmax;
  618.                 $volumeTheorique round(min($besoinJournalierMax$surfaceRecuperee)/10)*10;
  619.                 $volumeCuveArray = [0.25 $volumeTheorique0.5 $volumeTheorique$volumeTheorique,
  620.                     $volumeTheorique$volumeTheorique27 $volumeTheorique];
  621.                 if ($volumeCuveUser != null) {
  622.                     $volumeCuveArray [] = $volumeCuveUser;
  623.                     $volumeCuveArray [] = $volumeCuveUser 2;
  624.                     $volumeCuveArray [] = $volumeCuveUser 0.5;
  625.                     asort($volumeCuveArray);
  626.                 }
  627.                 if ($tauxRecupObjectif != null) {
  628.                     if ($iteration 0) {
  629.                         $yObjectif max(2,$tauxRecupObjectif * ($ya $yb) / ($xa $xb) + ($xa $yb $xb $ya) / ($xa $xb));
  630.                         $yObjectifInf max(1$yObjectif 0.25 $yObjectif);
  631.                         $yObjectifSup max(3,$yObjectif 0.25 $yObjectif);
  632.                         $volumeCuveArray = [0.25 $volumeTheorique0.5 $volumeTheorique$volumeTheorique,
  633.                             $volumeTheorique$volumeTheorique27 $volumeTheorique$yObjectifInf$yObjectif$yObjectifSup];
  634.                         asort($volumeCuveArray);
  635. //                        
  636.                     }
  637.                 } else {
  638.                     $victoire 2;
  639.                 }
  640.                 
  641.                 // Calcul volume par volume de cuve :
  642.                 foreach ($volumeCuveArray as $volumeCuve) {
  643.                     $volumeEauInitial 0;
  644.                     $SommeTropPleinNuitEtJour 0;
  645.                     $sommeManqueEau 0;
  646.                     
  647.                     $besoinEauAnnuel 0;
  648.                     $jour 0;
  649.                     $besoinEauJournalier 0;
  650.                     $apportEauAnnuel 0;
  651.                     $RFUJournalier 0;
  652.                     $graphVolumeEau null;
  653.                     $graphTropPleinNuitEtJour null;
  654.                     $graphManqueEau null;
  655.                     $arrayReuJournalier null;
  656.                     $graphApportCuve null;
  657.                     $besoinArrosageAnnuel 0;
  658.                     $besoinWcAnnuel 0;
  659.                     $besoinEauAutreAnnuel 0;
  660.                     $besoinArrosageCinqAnsSurfacique 0;
  661.                     
  662.                     //Calcul jour par jour :
  663.                     foreach ($pluviometrie as $pluieDuJour) {
  664.                         //Calcul des besoins WC : 
  665.                         if ($scenarioUtilisation == 1) {// ajouter également ici le taux
  666.                             $besoinWc $nbreUtilisateur $volumeParUtilisation $tauxRaccordement;
  667.                         } else if ($scenarioUtilisation == 2) {
  668.                             $besoinWc $nbreUtilisateur $volumeParUtilisation $tauxRaccordement $scenario5sur7[$jour];
  669.                         } else if ($scenarioUtilisation == 3) {
  670.                             $besoinWc $nbreUtilisateur $volumeParUtilisation $tauxRaccordement $scenarioEnseignement[$jour];
  671.                         }
  672.                         //calcul des besoins d'arrosage :
  673.                         $besoinArrosageJournalierSurfacique 0;
  674.                         $ConsoPlanteJournalier $kc $ETP[$jour];
  675.                         $RFUJournalier $RFUJournalier $ConsoPlanteJournalier $pluieDuJour $stationMeteo $pluieBase;
  676.                         if ($RFUJournalier 0) {
  677.                             $besoinArrosageJournalierSurfacique abs($RFUJournalier);
  678.                             $RFUJournalier 0;
  679.                         } else if ($RFUJournalier $RFUmax) {
  680.                             $RFUJournalier $RFUmax;
  681.                         }
  682.                         $besoinArrosageCinqAnsSurfacique $besoinArrosageJournalierSurfacique $besoinArrosageCinqAnsSurfacique;
  683.                         
  684.                         $besoinEauJournalier $besoinEauArray[$jour] + $besoinWc $besoinArrosageJournalierSurfacique $sArrosage;
  685.                         $apportEauJournalier $surfaceRecuperee $pluieDuJour $stationMeteo $pluieBase;
  686.                                                 
  687.                         //nouveau calcul :
  688.                         $manqueEauDuJour 0;
  689.                         $tropPleinNuit =0;
  690.                         $tropPleinJour 0;
  691.                         $volumeEau $volumeEauInitial $apportEauJournalier *0.3 ;
  692.                         if ($volumeEau >= $volumeCuve) {
  693.                             $tropPleinNuit $volumeEau $volumeCuve;
  694.                             $volumeEau $volumeCuve;
  695.                         } 
  696.                         $volumeEau $volumeEau $besoinEauJournalier $apportEauJournalier *0.7;
  697.                         if ($volumeEau >= $volumeCuve) {
  698.                             $tropPleinJour $volumeEau $volumeCuve;
  699.                             $volumeEau $volumeCuve;
  700.                         }
  701.                         if ($volumeEau <= 0) {
  702.                             $manqueEauDuJour abs($volumeEau);
  703.                             $volumeEau 0;
  704.                         }
  705.                         $TropPleinNuitEtJour $tropPleinNuit $tropPleinJour;
  706.                         $SommeTropPleinNuitEtJour $SommeTropPleinNuitEtJour $TropPleinNuitEtJour;
  707.                         $besoinWCnonRaccordeJournalier $besoinWc/$tauxRaccordement*(1-$tauxRaccordement);
  708.                         
  709.                         $sommeManqueEau $manqueEauDuJour $sommeManqueEau $besoinWCnonRaccordeJournalier;
  710.                          
  711.                         //somme annuelle
  712.                         $besoinArrosageAnnuel $besoinArrosageJournalierSurfacique$sArrosage $besoinArrosageAnnuel;
  713.                         $besoinWcAnnuel $besoinWcAnnuel $besoinWc;
  714.                         $besoinEauAutreAnnuel $besoinEauAutreAnnuel $besoinEauArray[$jour];
  715.                         $apportEauAnnuel $apportEauAnnuel $apportEauJournalier;
  716.                         $besoinEauAnnuel $besoinEauAnnuel $besoinEauJournalier $besoinWCnonRaccordeJournalier
  717.                         //préparation graphique et tableau
  718.                         $graphVolumeEau[] = $volumeEau;
  719.                         $graphVolumeEauArray [$volumeCuve] = $graphVolumeEau;
  720.                         if ($volumeCuve == $volumeEau){
  721.                             $graphTropPleinNuitEtJour[] = $TropPleinNuitEtJour $volumeEau;
  722.                         } else {
  723.                             $graphTropPleinNuitEtJour[] = $volumeEau;
  724.                         }
  725.                         
  726.                         $graphTropPleinArray[$volumeCuve] = $graphTropPleinNuitEtJour;
  727.                         
  728.                         $graphManqueEau[] = - $manqueEauDuJour;
  729.                         $graphManqueEauArray[$volumeCuve] = $graphManqueEau;
  730.                          $graphApportCuve[] = $besoinEauJournalier $manqueEauDuJour;
  731.                          $graphApportCuveArray[$volumeCuve] = $graphApportCuve;
  732.                        
  733.                         //tableau d'analyse jour par jour
  734.                         $arrayReuJournalier = array($jour$pluieDuJour$RFUJournalier$ETP[$jour], $ConsoPlanteJournalier$besoinArrosageJournalierSurfacique,
  735.                             $besoinEauJournalier$pluieDuJour $surfaceRecuperee$volumeEau,  $manqueEauDuJour); //$bilanEau,
  736.                         $arrayReu [] = $arrayReuJournalier;
  737.                         $arrayReuAnnuel[$volumeCuve]=$arrayReu;                        
  738.                         $jour $jour 1;
  739.                         $volumeEauInitial $volumeEau;
  740.                     }  //on change de jour
  741.                     
  742.                     $tauxRecup [$volumeCuve] =$besoinEauAnnuel ? ($besoinEauAnnuel $sommeManqueEau) / $besoinEauAnnuel 100 0;
  743.                     $volumeCuveGraph [] = $volumeCuve;
  744.                     if ($volumeCuveUser != null AND $volumeCuve == $volumeCuveUser) {
  745.                         $tauxRecupUser =$besoinEauAnnuel ? ($besoinEauAnnuel $sommeManqueEau) / $besoinEauAnnuel 100 0;
  746.                     } else if ($volumeCuveUser == null) {
  747.                         $tauxRecupUser 0;
  748.                         $volumeCuveUser 0;
  749.                     }
  750.                     //calcul du temps de retour
  751.                     
  752.                     $eauReutilisee $apportEauAnnuel $SommeTropPleinNuitEtJour;
  753.                     $gainAnnuel $coutEau $eauReutilisee 1000 /5;
  754.                     $coutCuve $coutPompe + ($coutVolume2 $coutVolume)/($choixVolume2 $choixVolume) * ($volumeCuve $choixVolume) + $coutVolume;
  755.                     $tempsDeRetour [$volumeCuve] = $coutCuve max($gainAnnuel1);
  756.                     $arrayVerif ['volumeCuve'] = $volumeCuve;
  757.                     $arrayVerif ['$tauxRecup'] = $besoinEauAnnuel round(($besoinEauAnnuel $sommeManqueEau) / $besoinEauAnnuel 1001) : 0;
  758.                     $arrayVerif ['eau reutilisée'] = round($eauReutilisee //1000);
  759.                     $arrayVerif ['$sommeManqueEau'] = round($sommeManqueEau //1000);
  760.                     $arrayVerif ['$SommeTropPleinNuitEtJour'] = round($SommeTropPleinNuitEtJour //1000);
  761.                     $arrayVerif ['$gainAnnuel'] = round($gainAnnuel);
  762.                     $arrayVerif ['coutcuve'] = round($coutCuve);
  763.                     $arrayVerif ['tempsDeRetour'] = round($coutCuve max($gainAnnuel1), 1);
  764.                     $tableauParametrique[$volumeCuve] = $arrayVerif;
  765.                     
  766.                 } //on change de volume de cuve
  767.                 
  768.                 
  769.                 $x 1;
  770.                 $xMax count($tauxRecup);
  771.                 
  772.                 $position reset($tauxRecup);
  773.                 
  774.                 foreach ($tauxRecup as $y) {
  775.                     $yRound round($y);
  776.                     if ($yRound == $tauxRecupObjectif) {
  777.                         $victoire++;
  778.                         $tauxRecupUser $y;
  779.                         $volumeCuveUser array_search($y$tauxRecup);
  780.                     }
  781.                     if ($x == and $tauxRecupObjectif $yRound) {
  782.                         $position next($tauxRecup);
  783.                         goto a;
  784.                     }
  785.                     if ($tauxRecupObjectif $yRound) {
  786.                         goto a;
  787.                     }
  788.                     if ($y $tauxRecupObjectif) {
  789.                         if ($x == $xMax) {
  790.                             $position prev($tauxRecup);
  791.                             goto a;
  792.                         } else {
  793.                             $position next($tauxRecup);
  794.                         }
  795.                     }
  796. //                    
  797.                     $x++;
  798.                 }
  799.                 a:
  800.                 $xa prev($tauxRecup);
  801.                 $xb next($tauxRecup);
  802.                 $ya array_search($xa$tauxRecup);
  803.                 $yb array_search($xb$tauxRecup);
  804.                 if ($iteration 5) {
  805.                     goto finDesIterations;
  806.                 };
  807.                 if ($xa == $xb) {
  808.                     goto finDesIterations;
  809.                 };
  810.                 $iteration++;
  811.             } while ($victoire 1.9);
  812.             
  813.             finDesIterations:
  814.             //Mise en graphique de l'étude paramétrique
  815.             $x 0;
  816.             $chaineCaractere null;
  817.             $cles array_keys($tauxRecup);
  818.             foreach ($tauxRecup as $y) {
  819.                 $chaineCaractere [] = "{ x: ";
  820.                 $chaineCaractere [] = $cles[$x];
  821.                 $chaineCaractere [] = ", y: ";
  822.                 $chaineCaractere [] = $y;
  823.                 $chaineCaractere [] = "}";
  824.                 $pointJson [] = implode($chaineCaractere);
  825.                 $chaineCaractere null;
  826.                 $x $x 1;
  827.             }
  828.             $graphParametriqueJson implode(","$pointJson);
  829.             $graphParametriqueUserJson = array("{ x: "$volumeCuveUser", y: "$tauxRecupUser"}");
  830.             $graphParametriqueUserJson implode($graphParametriqueUserJson);
  831.             //dump($tauxRecup);
  832.             //dump($graphParametriqueJson);
  833.             //Mise en graphique de l'étude paramétrique Temps de retour
  834.             $pointJson null;
  835.             $x 0;
  836.             $chaineCaractere null;
  837.             $cles array_keys($tempsDeRetour);
  838.             foreach ($tempsDeRetour as $y) {
  839.                 $chaineCaractere [] = "{ x: ";
  840.                 $chaineCaractere [] = $cles[$x];
  841.                 $chaineCaractere [] = ", y: ";
  842.                 $chaineCaractere [] = $y;
  843.                 $chaineCaractere [] = "}";
  844.                 $pointJson [] = implode($chaineCaractere);
  845.                 $chaineCaractere null;
  846.                 $x $x 1;
  847.             }
  848.             $graphTempsDeRetour implode(","$pointJson);
  849.             
  850.             //Mise en graphique du volume de cuve avec un coef de 1
  851.             $pointJson null;
  852.             $x 1;
  853.             $chaineCaractere null;
  854.             if ($volumeCuveUser != null){
  855.                 $graphVolumeEau $graphVolumeEauArray[$volumeCuveUser];
  856.                 $arrayReu $arrayReuAnnuel [$volumeCuveUser];
  857.                 $graphManqueEau $graphManqueEauArray[$volumeCuveUser];
  858.                 $graphTropPlein $graphTropPleinArray[$volumeCuveUser];
  859.                 $graphApportCuve $graphApportCuveArray[$volumeCuveUser];
  860.                 $maxGraph $volumeCuveUser 5;
  861.             } else {
  862.                 $graphVolumeEau $graphVolumeEauArray[$volumeTheorique];
  863.                 $arrayReu $arrayReuAnnuel [$volumeTheorique];
  864.                 $graphManqueEau $graphManqueEauArray[$volumeTheorique];
  865.                 $graphTropPlein $graphTropPleinArray[$volumeTheorique];
  866.                 $graphApportCuve $graphApportCuveArray[$volumeTheorique];
  867.                 $maxGraph $volumeTheorique 5;
  868.             }
  869.             
  870.             
  871.             foreach ($graphVolumeEau as $y) {
  872.                 $chaineCaractere [] = "{ x: ";
  873.                 $chaineCaractere [] = $x;
  874.                 $chaineCaractere [] = ", y: ";
  875.                 $chaineCaractere [] = $y;
  876.                 $chaineCaractere [] = "}";
  877.                 $pointJson [] = implode($chaineCaractere);
  878.                 $chaineCaractere null;
  879.                 $x $x 1;
  880.                 if ($x 364) {
  881.                     goto fin1;
  882.                 };
  883.             }
  884.             fin1:
  885.             $graphVolumeEauJson implode(","$pointJson);
  886.             $graphJourParJour['volumeEau']=$graphVolumeEauJson;
  887.             
  888.             //mise en graphique du manque d'eau
  889.             $pointJson null;
  890.             $x 1;
  891.             $chaineCaractere null;
  892.             foreach ($graphManqueEau as $y) {
  893.                 $chaineCaractere [] = "{ x: ";
  894.                 $chaineCaractere [] = $x;
  895.                 $chaineCaractere [] = ", y: ";
  896.                 $chaineCaractere [] = $y;
  897.                 $chaineCaractere [] = "}";
  898.                 $pointJson [] = implode($chaineCaractere);
  899.                 $chaineCaractere null;
  900.                 $x $x 1;
  901.                                 if ($x 364) {
  902.                     goto fin2;
  903.                 };
  904.             }
  905.             fin2:            
  906.             $graphManqueEauJson implode(","$pointJson);
  907.             $graphJourParJour['manqueEau']=$graphManqueEauJson;
  908.             $pointJson null;
  909.             $x 1;
  910.             $chaineCaractere null;
  911.             foreach ($graphManqueEau as $y) {
  912.                 $chaineCaractere [] = "{ x: ";
  913.                 $chaineCaractere [] = $x;
  914.                 $chaineCaractere [] = ", y: ";
  915.                 $chaineCaractere [] = - $y;
  916.                 $chaineCaractere [] = "}";
  917.                 $pointJson [] = implode($chaineCaractere);
  918.                 $chaineCaractere null;
  919.                 $x $x 1;
  920.                             if ($x 364) {
  921.                     goto fin3;
  922.                 };
  923.             }
  924.             fin3:
  925.             $graphManqueEauJson implode(","$pointJson);
  926.             $graphJourParJour['manqueEauPositif']=$graphManqueEauJson;
  927.             
  928.             //mise en graphique du trop plein
  929.             $pointJson null;
  930.             $x 1;
  931.             $chaineCaractere null;
  932.             foreach ($graphTropPlein as $y) {
  933.                 $chaineCaractere [] = "{ x: ";
  934.                 $chaineCaractere [] = $x;
  935.                 $chaineCaractere [] = ", y: ";
  936.                 $chaineCaractere [] = $y;
  937.                 $chaineCaractere [] = "}";
  938.                 $pointJson [] = implode($chaineCaractere);
  939.                 $chaineCaractere null;
  940.                 $x $x 1;
  941.                             if ($x 364) {
  942.                     goto fin4;
  943.                 };
  944.             }
  945.             fin4:
  946.             $graphTropPleinJson implode(","$pointJson);
  947.             $graphJourParJour['tropPlein']=$graphTropPleinJson;
  948.             
  949.             //mise en graphique de la pluviometrie
  950.             $pointJson null;
  951.             $x 1;
  952.             $chaineCaractere null;
  953.             foreach ($pluviometrie as $y) {
  954.                 $chaineCaractere [] = "{ x: ";
  955.                 $chaineCaractere [] = $x;
  956.                 $chaineCaractere [] = ", y: ";
  957.                 $chaineCaractere [] = $y $stationMeteo $pluieBase;
  958.                 $chaineCaractere [] = "}";
  959.                 $pointJson [] = implode($chaineCaractere);
  960.                 $chaineCaractere null;
  961.                 $x $x 1;
  962.                             if ($x 364) {
  963.                     goto fin5;
  964.                 };
  965.             }
  966.             fin5:
  967.             $graphPluviometrieJson implode(","$pointJson);
  968.             $graphJourParJour['pluviometrie']=$graphPluviometrieJson;
  969.             
  970.               //mise en graphique de l'apport cuve
  971.             $pointJson null;
  972.             $x 1;
  973.             $chaineCaractere null;
  974.             foreach ($graphApportCuve as $y) {
  975.                 $chaineCaractere [] = "{ x: ";
  976.                 $chaineCaractere [] = $x;
  977.                 $chaineCaractere [] = ", y: ";
  978.                 $chaineCaractere [] = $y;
  979.                 $chaineCaractere [] = "}";
  980.                 $pointJson [] = implode($chaineCaractere);
  981.                 $chaineCaractere null;
  982.                 $x $x 1;
  983.                             if ($x 364) {
  984.                     goto fin6;
  985.                 };
  986.             }
  987.             fin6:
  988.             $graphApportCuveJson implode(","$pointJson);
  989.             $graphJourParJour['apportCuve']=$graphApportCuveJson;
  990.             $graphJourParJour['maximum']= $maxGraph
  991.             
  992.             
  993.             //mise en graphique de la tarte
  994.             $totalDesBesoins $besoinArrosageAnnuel $besoinWcAnnuel $besoinEauAutreAnnuel;
  995.             $graphTarte['tauxArrosage'] = $totalDesBesoins $besoinArrosageAnnuel $totalDesBesoins 0;
  996.             $graphTarte['tauxWc'] = $totalDesBesoins $besoinWcAnnuel $totalDesBesoins 0;
  997.             $graphTarte['tauxAutres'] = $totalDesBesoins $besoinEauAutreAnnuel $totalDesBesoins 0;
  998.             $graphTarte['Arrosage'] = round($besoinArrosageAnnuel/1000/5) ;
  999.             $graphTarte['Wc'] = round($besoinWcAnnuel/1000/5);
  1000.             $graphTarte['Autres'] = round($besoinEauAutreAnnuel/1000/5) ;
  1001.             
  1002.             $pluviometrieTotale array_sum($pluviometrie)* $stationMeteo $pluieBase;
  1003.             $tableauSynthese['pluviometrieMoyenne'] = round($pluviometrieTotale /5);
  1004.             $tableauSynthese['besoinArrosage'] = round($besoinArrosageCinqAnsSurfacique /5);
  1005.             $tableauSynthese['besoinAnnuel'] = round($totalDesBesoins /1000);
  1006.             if ($this->user != null) {
  1007.                 $reutilisationDTO->setTheUser($this->user);
  1008.             }
  1009.             
  1010.             
  1011.             // Stockage des données des graphiques pour ré-uitilisation ( pdf, ... )
  1012.             $dataGraphique['graphJourParJour'] = $graphJourParJour;
  1013.             $dataGraphique['graphParametrique'] = $graphParametriqueJson;
  1014.             $dataGraphique['graphParametriqueUserJson'] = $graphParametriqueUserJson;
  1015.             $dataGraphique['graphTempsDeRetour'] = $graphTempsDeRetour;
  1016.             $dataGraphique['graphPluviometrie'] = $graphPluviometrieJson;
  1017.             $dataGraphique['tauxRecupUser'] = $tauxRecupUser;
  1018.             $dataGraphique['besoinArrosageTotal'] = $besoinArrosageCinqAnsSurfacique;
  1019.             $dataGraphique['tableau'] = $arrayReu;
  1020.             $dataGraphique['volumeCuveUser'] = $volumeCuveUser;
  1021.             $dataGraphique['graphTarte'] = $graphTarte;
  1022.             $dataGraphique['besoinEauAnnuel'] = $besoinEauAnnuel;
  1023.             $dataGraphique['sommeManqueEau'] = $sommeManqueEau;
  1024.             $dataGraphique['apportEauAnnuel'] = $apportEauAnnuel;
  1025.             $dataGraphique['fichePluvio'] = $reutilisationDTO;
  1026.             $dataGraphique['tableauSynthese'] = $tableauSynthese;
  1027.             $dataGraphique['tableauParametrique'] = $tableauParametrique;
  1028.             $session->set('GraphData'$dataGraphique);
  1029.             // Stockage des données des graphiques pour ré-uitilisation ( pdf, ... )
  1030. //            $reutilisationDTO->setGraphData(
  1031. //                ['graphJourParJour' => $graphJourParJour,
  1032. //                    'graphParametrique' => $graphParametriqueJson,
  1033. //                    'graphParametriqueUserJson' => $graphParametriqueUserJson,
  1034. //                    'graphTempsDeRetour' => $graphTempsDeRetour,
  1035. //                    'graphPluviometrie' => $graphPluviometrieJson,
  1036. //                    'tauxRecupUser' => $tauxRecupUser,
  1037. //                    'besoinArrosageTotal' => $besoinArrosageCinqAnsSurfacique,
  1038. //                    'tableau' => $arrayReu,
  1039. //                    'volumeCuveUser' => $volumeCuveUser,
  1040. //                    'graphTarte' => $graphTarte,
  1041. //                    'besoinEauAnnuel' => $besoinEauAnnuel,
  1042. //                    'sommeManqueEau' => $sommeManqueEau,
  1043. //                    'apportEauAnnuel' => $apportEauAnnuel,
  1044. //                    'fichePluvio' => $reutilisationDTO,
  1045. //                    'tableauSynthese' => $tableauSynthese,
  1046. //                    'tableauParametrique' => $tableauParametrique]
  1047. //            );
  1048.             $em->persist($reutilisationDTO);
  1049.             $em->flush();
  1050.         $allowPDF true;
  1051.             $session->set("calculEffectue"1);
  1052.             $idFinal $reutilisationDTO->getId();
  1053.             $session->set("pluvioId"$idFinal);
  1054.             $fichePluvioAffichage $reutilisationDTO;
  1055.         } else {
  1056.             $graphVolumeEauJson "";
  1057.             $graphParametriqueJson "";
  1058.             $graphParametriqueUserJson "";
  1059.             $graphPluviometrieJson "";
  1060.             $graphTempsDeRetour "";
  1061.             $graphTarte['tauxArrosage'] = "";
  1062.             $graphTarte['tauxWc'] = "";
  1063.             $graphTarte['tauxAutres'] = "";
  1064.             $graphTarte['Arrosage'] = "";
  1065.             $graphTarte['Wc'] = "";
  1066.             $graphTarte['Autres'] = "";
  1067.             $volumeCuveUser "";
  1068.             $tauxRecupUser null;
  1069.             $besoinArrosageCinqAnsSurfacique 0;
  1070.             $besoinEauAnnuel ="";
  1071.             $sommeManqueEau "";
  1072.             $apportEauAnnuel ="";
  1073.             $graphJourParJour['pluviometrie'] ="";
  1074.             $graphJourParJour['tropPlein'] ="";
  1075.             $graphJourParJour['manqueEau'] ="";
  1076.             $graphJourParJour['manqueEauPositif']="";
  1077.             $graphJourParJour['volumeEau'] ="";
  1078.             $graphJourParJour['apportCuve']="";
  1079.             $graphJourParJour['maximum']="";
  1080.             $tableauSynthese['pluviometrieMoyenne'] = 0;
  1081.             $tableauSynthese['besoinArrosage'] = 0;
  1082.             $tableauSynthese['besoinAnnuel'] = 0;
  1083.             $tableauParametrique null;
  1084.             $fichePluvioAffichage $reutilisationDTO;
  1085.         }
  1086.         // Stockage en session des données de la fiche pluvio
  1087.         // récupération des données de la fiche pluvio
  1088.         return $this->render('reutilisation.html.twig',
  1089.                         ['form' => $form->createView(),
  1090.                 'show_complement' => $show_complement,
  1091.                 'allowPDF' => $allowPDF,
  1092.                     'idPluvio' => $idFinal,
  1093.                             'graphJourParJour' => $graphJourParJour,
  1094.                             'graphParametrique' => $graphParametriqueJson,
  1095.                             'graphParametriqueUserJson' => $graphParametriqueUserJson,
  1096.                             'graphTempsDeRetour' => $graphTempsDeRetour,
  1097.                             'graphPluviometrie' => $graphPluviometrieJson,
  1098.                             'tauxRecupUser' => $tauxRecupUser,
  1099.                             'besoinArrosageTotal' => $besoinArrosageCinqAnsSurfacique,
  1100.                             'tableau' => $arrayReu,
  1101.                             'volumeCuveUser' => $volumeCuveUser,
  1102.                             'graphTarte' => $graphTarte,
  1103.                             'besoinEauAnnuel' => $besoinEauAnnuel,
  1104.                             'manqueEau' => $sommeManqueEau,
  1105.                             'apportEauAnnuel' => $apportEauAnnuel,
  1106.                             'tableauSynthese' => $tableauSynthese,
  1107.                             'tableauParametrique' => $tableauParametrique,
  1108.                             'fichePluvio' => $fichePluvioAffichage                                            
  1109.         ]);
  1110.     }
  1111.     /**
  1112.      * Génération du PDF de la fiche pluvio
  1113.      *
  1114.      * @Route("/bilan_reutilisation/{idFiche}", name="RetutilisationBilanPdf")
  1115.      */
  1116.     public function retutilisationBilanPdf(
  1117.         Request $req,
  1118.         \App\Repository\PluvioDatabaseRepository $pluvioDatabaseRepository,
  1119.         LoggerInterface $logger,
  1120.         Pdf  $knpSnappyPdf,
  1121.         Request $requestSession $session,
  1122.         $idFiche,
  1123.         SerializerInterface $serializer) {
  1124.         $session->start();
  1125.         $fiche $pluvioDatabaseRepository->findOneById($idFiche);
  1126.         if($fiche) {
  1127.             $slugger = new AsciiSlugger('fr_FR');
  1128.             // Récupère les infos de la session pour les passer à la vue
  1129.             $dataReutilisation $session->get('GraphData');
  1130.             $dataReutilisation['form'] = $fiche;
  1131.             // Récupère les infos de la session pour les passer à la vue
  1132.             $form $this->createForm(\App\Form\ReutilisationType::class, $fiche);
  1133.             $formKeys array_keys($form->all());
  1134.             $fields = [
  1135.                 'rendementToiture',
  1136.                 'climat',
  1137.                 'stationmeteo',
  1138.                 'scenarioUtilisation',
  1139.                 'ru',
  1140.                 'typePlante',
  1141.                 'profondeurTerre',
  1142.             ];
  1143.             $customChoices = [];
  1144.             foreach($fields as $field) {
  1145.                 $selectedValue $form->get($field)->getData();
  1146.                 $choices $form->get($field)->getConfig()->getOption('choices');
  1147.                 $customChoices[$field] = array_search($selectedValue$choices);
  1148.             }
  1149.             foreach($formKeys as $key) {
  1150.                 if(!in_array($key$fields)) {
  1151.                     $customChoices[$key] = $form->get($key)->getData();
  1152.                 }
  1153.             }
  1154. //            $selectedValue = $fiche->getClimat();
  1155. //            $choices = $form->get('climat')->getConfig()->getOption('choices');
  1156. //            dump(array_search($selectedValue, $choices));
  1157. //            $selectedValue = $fiche->getStationMeteo();
  1158. //            $choices = $form->get('stationmeteo')->getConfig()->getOption('choices');
  1159. //            dump(array_search($selectedValue, $choices));
  1160. //            stationmeteo
  1161. //            dd('ok');
  1162.             //dd('test');
  1163.             $params $request->request->all();
  1164.             $dataReutilisation['form'] = $customChoices;
  1165.             $dataReutilisation['img']='';
  1166.             if(isset($params['img'])) $dataReutilisation['img']=$params['img'];
  1167. //            $dataReutilisation['customChoices'] = $customChoices;
  1168.             $content $this->renderView('bilan_reutilisation.html.twig'$dataReutilisation);
  1169.             
  1170. //            $content = '<pre>';
  1171. //            $content .= print_r($request->files, true);
  1172. //            $content .= print_r($request->request->all(),true);
  1173. //            $content .='</pre>';
  1174.             $filename $slugger->slug("Bilan_reutilisation_".$fiche->getNomDuProjet()."-".$fiche->getTime()).".pdf";
  1175.             $pdf = new Html2Pdf('P''A4''fr'true'UTF-8', array(5555));
  1176.             $pdf->pdf->SetDisplayMode('fullpage');
  1177.             $pdf->writeHTML($content);
  1178.             $pdf->output($filename'D');
  1179. //            $knpSnappyPdf->setTemporaryFolder('../var/');
  1180. //            // $dompdf->setPaper('A4', 'portrait');
  1181. //            $knpSnappyPdf->setLogger($logger);
  1182. //            $knpSnappyPdf->setOption('encoding', 'utf-8');
  1183. //            $knpSnappyPdf->setOption('page-size', 'A4');
  1184. //            $knpSnappyPdf->setOption('orientation', 'portrait');
  1185. //
  1186. //            $output = $knpSnappyPdf->getOutputFromHtml($content);
  1187. //            $knpSnappyPdf->removeTemporaryFiles();
  1188.             return new \Knp\Bundle\SnappyBundle\Snappy\Response\PdfResponse($output,$filename);
  1189.             //return new Response($pdf->generatePdf($content, $filename));
  1190.         }
  1191.         die('Pas de pdf à générer');
  1192.     }
  1193.         
  1194. //        /**
  1195. //     * Copie de la fiche Pluvio
  1196. //     *
  1197. //     * @Route("/CopieCalcul/{idFiche}", name="CopieCalcul")
  1198. //     */
  1199. //    public function CopieCalcul(
  1200. //        Request $req,
  1201. //        \App\Repository\PluvioDatabaseRepository $pluvioDatabaseRepository,
  1202. //        LoggerInterface $logger,
  1203. //        Request $request, Session $session,
  1204. //        $idFiche,
  1205. //        SerializerInterface $serializer) {
  1206. //        $session->start();
  1207. //
  1208. //        $fiche = $pluvioDatabaseRepository->findOneById($idFiche);
  1209. //        
  1210. //                
  1211. //    }
  1212.        /**
  1213.      * @Route("/efae/{idFiche}", name="efae")
  1214.      */
  1215.     public function efae(Request $reqEntityManagerInterface $emFicheBatimentRepository $rep$idFiche) {
  1216.         $ficheOpsManaged $rep->findOneById($idFiche);
  1217.         if ($ficheOpsManaged->getOCefgazimpchannuel() != 0) {
  1218.             $conso $ficheOpsManaged->getOCefgazimpchannuel();
  1219.             $prod 'Gaz';
  1220.             $usage 'Chauffage';
  1221.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1222.             $tab[] = $data;
  1223.         }
  1224.         if ($ficheOpsManaged->getOCefgazimpfrannuel() != 0) {
  1225.             $conso $ficheOpsManaged->getOCefgazimpfrannuel();
  1226.             $prod 'Gaz';
  1227.             $usage 'Froid';
  1228.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1229.             $tab[] = $data;
  1230.         }
  1231.         if ($ficheOpsManaged->getOCefgazimpecsannuel() != 0) {
  1232.             $conso $ficheOpsManaged->getOCefgazimpecsannuel();
  1233.             $prod 'Gaz';
  1234.             $usage 'ECS';
  1235.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1236.             $tab[] = $data;
  1237.         }
  1238.         if ($ficheOpsManaged->getOCeffioulimpchannuel() != 0) {
  1239.             $conso $ficheOpsManaged->getOCeffioulimpchannuel();
  1240.             $prod 'Fioul';
  1241.             $usage 'Chauffage';
  1242.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1243.             $tab[] = $data;
  1244.         }
  1245.         if ($ficheOpsManaged->getOCeffioulimpfrannuel() != 0) {
  1246.             $conso $ficheOpsManaged->getOCeffioulimpfrannuel();
  1247.             $prod 'Fioul';
  1248.             $usage 'Froid';
  1249.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1250.             $tab[] = $data;
  1251.         }
  1252.         if ($ficheOpsManaged->getOCeffioulimpecsannuel() != 0) {
  1253.             $conso $ficheOpsManaged->getOCeffioulimpecsannuel();
  1254.             $prod 'Fioul';
  1255.             $usage 'ECS';
  1256.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1257.             $tab[] = $data;
  1258.         }
  1259.         if ($ficheOpsManaged->getOCefcharbonimpchannuel() != 0) {
  1260.             $conso $ficheOpsManaged->getOCefcharbonimpchannuel();
  1261.             $prod 'Charbon';
  1262.             $usage 'Chauffage';
  1263.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1264.             $tab[] = $data;
  1265.         }
  1266.         if ($ficheOpsManaged->getOCefcharbonimpfrannuel() != 0) {
  1267.             $conso $ficheOpsManaged->getOCefcharbonimpfrannuel();
  1268.             $prod 'Charbon';
  1269.             $usage 'Froid';
  1270.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1271.             $tab[] = $data;
  1272.         }
  1273.         if ($ficheOpsManaged->getOCefcharbonimpecsannuel() != 0) {
  1274.             $conso $ficheOpsManaged->getOCefcharbonimpecsannuel();
  1275.             $prod 'Charbon';
  1276.             $usage 'ECS';
  1277.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1278.             $tab[] = $data;
  1279.         }
  1280.         if ($ficheOpsManaged->getOCefboisgranimpchannuel() != 0) {
  1281.             $conso $ficheOpsManaged->getOCefboisgranimpchannuel();
  1282.             $prod 'Chaudière Bois granulé';
  1283.             $usage 'Chauffage';
  1284.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1285.             $tab[] = $data;
  1286.         }
  1287.         if ($ficheOpsManaged->getOCefboisgranimpfrannuel() != 0) {
  1288.             $conso $ficheOpsManaged->getOCefboisgranimpfrannuel();
  1289.             $prod 'Chaudière Bois granulé';
  1290.             $usage 'Froid';
  1291.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1292.             $tab[] = $data;
  1293.         }
  1294.         if ($ficheOpsManaged->getOCefboisgranimpecsannuel() != 0) {
  1295.             $conso $ficheOpsManaged->getOCefboisgranimpecsannuel();
  1296.             $prod 'Chaudière Bois granulé';
  1297.             $usage 'ECS';
  1298.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1299.             $tab[] = $data;
  1300.         }
  1301.         if ($ficheOpsManaged->getOCefboisbuchimpchannuel() != 0) {
  1302.             $conso $ficheOpsManaged->getOCefboisbuchimpchannuel();
  1303.             $prod 'Chaudière Bois buche';
  1304.             $usage 'Chauffage';
  1305.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1306.             $tab[] = $data;
  1307.         }
  1308.         if ($ficheOpsManaged->getOCefboisbuchimpfrannuel() != 0) {
  1309.             $conso $ficheOpsManaged->getOCefboisbuchimpfrannuel();
  1310.             $prod 'Chaudière Bois buche';
  1311.             $usage 'Froid';
  1312.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1313.             $tab[] = $data;
  1314.         }
  1315.         if ($ficheOpsManaged->getOCefboisbuchimpecsannuel() != 0) {
  1316.             $conso $ficheOpsManaged->getOCefboisbuchimpecsannuel();
  1317.             $prod 'Chaudière Bois buche';
  1318.             $usage 'ECS';
  1319.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1320.             $tab[] = $data;
  1321.         }
  1322.         if ($ficheOpsManaged->getOCefboisplaqimpchannuel() != 0) {
  1323.             $conso $ficheOpsManaged->getOCefboisplaqimpchannuel();
  1324.             $prod 'Chaudière Bois plaquette';
  1325.             $usage 'Chauffage';
  1326.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1327.             $tab[] = $data;
  1328.         }
  1329.         if ($ficheOpsManaged->getOCefboisplaqimpfrannuel() != 0) {
  1330.             $conso $ficheOpsManaged->getOCefboisplaqimpfrannuel();
  1331.             $prod 'Chaudière Bois plaquette';
  1332.             $usage 'Froid';
  1333.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1334.             $tab[] = $data;
  1335.         }
  1336.         if ($ficheOpsManaged->getOCefboisplaqimpecsannuel() != 0) {
  1337.             $conso $ficheOpsManaged->getOCefboisplaqimpecsannuel();
  1338.             $prod 'Chaudière Bois plaquette';
  1339.             $usage 'ECS';
  1340.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1341.             $tab[] = $data;
  1342.         }
  1343.         if ($ficheOpsManaged->getOCefboisgranpoelimpchannuel() != 0) {
  1344.             $conso $ficheOpsManaged->getOCefboisgranpoelimpchannuel();
  1345.             $prod 'Poele Bois granulé';
  1346.             $usage 'Chauffage';
  1347.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1348.             $tab[] = $data;
  1349.         }
  1350.         if ($ficheOpsManaged->getOCefboisgranpoelimpfrannuel() != 0) {
  1351.             $conso $ficheOpsManaged->getOCefboisgranpoelimpfrannuel();
  1352.             $prod 'Poele Bois granulé';
  1353.             $usage 'Froid';
  1354.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1355.             $tab[] = $data;
  1356.         }
  1357.         if ($ficheOpsManaged->getOCefboisgranpoelimpecsannuel() != 0) {
  1358.             $conso $ficheOpsManaged->getOCefboisgranpoelimpecsannuel();
  1359.             $prod 'Poele Bois granulé';
  1360.             $usage 'ECS';
  1361.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1362.             $tab[] = $data;
  1363.         }
  1364.         if ($ficheOpsManaged->getOCefboisbuchpoelimpchannuel() != 0) {
  1365.             $conso $ficheOpsManaged->getOCefboisbuchpoelimpchannuel();
  1366.             $prod 'Poele Bois buche';
  1367.             $usage 'Chauffage';
  1368.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1369.             $tab[] = $data;
  1370.         }
  1371.         if ($ficheOpsManaged->getOCefboisbuchpoelimpfrannuel() != 0) {
  1372.             $conso $ficheOpsManaged->getOCefboisbuchpoelimpfrannuel();
  1373.             $prod 'Poele Bois buche';
  1374.             $usage 'Froid';
  1375.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1376.             $tab[] = $data;
  1377.         }
  1378.         if ($ficheOpsManaged->getOCefboisbuchpoelimpecsannuel() != 0) {
  1379.             $conso $ficheOpsManaged->getOCefboisbuchpoelimpecsannuel();
  1380.             $prod 'Poele Bois buche';
  1381.             $usage 'ECS';
  1382.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1383.             $tab[] = $data;
  1384.         }
  1385.         if ($ficheOpsManaged->getOCefboisplaqpoelimpchannuel() != 0) {
  1386.             $conso $ficheOpsManaged->getOCefboisplaqpoelimpchannuel();
  1387.             $prod 'Poele Bois plaquette';
  1388.             $usage 'Chauffage';
  1389.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1390.             $tab[] = $data;
  1391.         }
  1392.         if ($ficheOpsManaged->getOCefboisplaqpoelimpfrannuel() != 0) {
  1393.             $conso $ficheOpsManaged->getOCefboisplaqpoelimpfrannuel();
  1394.             $prod 'Poele Bois plaquette';
  1395.             $usage 'Froid';
  1396.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1397.             $tab[] = $data;
  1398.         }
  1399.         if ($ficheOpsManaged->getOCefboisplaqpoelimpecsannuel() != 0) {
  1400.             $conso $ficheOpsManaged->getOCefboisplaqpoelimpecsannuel();
  1401.             $prod 'Poele Bois plaquette';
  1402.             $usage 'ECS';
  1403.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1404.             $tab[] = $data;
  1405.         }
  1406.         if ($ficheOpsManaged->getOCefelecimpchannuel() != 0) {
  1407.             $conso $ficheOpsManaged->getOCefelecimpchannuel();
  1408.             $prod 'Electricité';
  1409.             $usage 'Chauffage';
  1410.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1411.             $tab[] = $data;
  1412.         }
  1413.         if ($ficheOpsManaged->getOCefelecimpfrannuel() != 0) {
  1414.             $conso $ficheOpsManaged->getOCefelecimpfrannuel();
  1415.             $prod 'Electricité';
  1416.             $usage 'Froid';
  1417.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1418.             $tab[] = $data;
  1419.         }
  1420.         if ($ficheOpsManaged->getOCefelecimpecsannuel() != 0) {
  1421.             $conso $ficheOpsManaged->getOCefelecimpecsannuel();
  1422.             $prod 'Electricité';
  1423.             $usage 'ECS';
  1424.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1425.             $tab[] = $data;
  1426.         }
  1427.         if ($ficheOpsManaged->getOCefelecimpeclannuel() != 0) {
  1428.             $conso $ficheOpsManaged->getOCefelecimpeclannuel();
  1429.             $prod 'Electricité';
  1430.             $usage 'Eclairage';
  1431.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1432.             $tab[] = $data;
  1433.         }
  1434.         if ($ficheOpsManaged->getOCefelecimpauxvannuel() != 0) {
  1435.             $conso $ficheOpsManaged->getOCefelecimpauxvannuel();
  1436.             $prod 'Electricité';
  1437.             $usage 'Ventilation';
  1438.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1439.             $tab[] = $data;
  1440.         }
  1441.         if ($ficheOpsManaged->getOCefelecimpauxsannuel() != 0) {
  1442.             $conso $ficheOpsManaged->getOCefelecimpauxsannuel();
  1443.             $prod 'Electricité';
  1444.             $usage 'Distribution';
  1445.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1446.             $tab[] = $data;
  1447.         }
  1448.         if ($ficheOpsManaged->getOCefelecimpAUEannuel() != 0) {
  1449.             $conso $ficheOpsManaged->getOCefelecimpAUEannuel();
  1450.             $prod 'Electricité';
  1451.             $usage 'AUE';
  1452.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1453.             $tab[] = $data;
  1454.         }
  1455.         if ($ficheOpsManaged->getOCefreseauchaleurimpchannuel() != 0) {
  1456.             $conso $ficheOpsManaged->getOCefreseauchaleurimpchannuel();
  1457.             $prod 'Réseau de chaleur';
  1458.             $usage 'Chauffage';
  1459.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1460.             $tab[] = $data;
  1461.         }
  1462.         if ($ficheOpsManaged->getOCefreseauchaleurimpfrannuel() != 0) {
  1463.             $conso $ficheOpsManaged->getOCefreseauchaleurimpfrannuel();
  1464.             $prod 'Réseau de chaleur';
  1465.             $usage 'Froid';
  1466.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1467.             $tab[] = $data;
  1468.         }
  1469.         if ($ficheOpsManaged->getOCefreseauchaleurimpecsannuel() != 0) {
  1470.             $conso $ficheOpsManaged->getOCefreseauchaleurimpecsannuel();
  1471.             $prod 'Réseau de chaleur';
  1472.             $usage 'ECS';
  1473.             $data = ['conso' => $conso'prod' => $prod'usage' => $usage];
  1474.             $tab[] = $data;
  1475.         }
  1476.         return $this->render('efae.html.twig');
  1477.     }
  1478.     /**
  1479.      * @Route("/upload-dropzone-test", name="upload-dropzone-test")
  1480.      */
  1481.     public function uploadDropzoneTest(Request $req,
  1482.             FicheBatimentRepository $ficheBatRep,
  1483.             EntityManagerInterface $em,
  1484.             Session $session) {
  1485.         $session->start();
  1486.         $idFicheBatiments $session->get("idFicheBatiments");
  1487.         $time date('YmdHis');
  1488.         // Récup contenu du fichier temporaire crée et 
  1489.         $fichier $req->files->get('fichier');
  1490.         $nomFichier uniqid() . '.xml';
  1491.         $nomInitialFichier $fichier->getClientOriginalName();
  1492.         $fichier->move('IMPORTSTEST'$nomFichier);
  1493. //        $xml = simplexml_load_file('IMPORTSTEST/' .$nomFichier);
  1494. //        
  1495. //        $ficheTest[] = $nomInitialFichier;    
  1496. //        $ficheTest[] = $xml->Entree_Projet->Version;
  1497. //            
  1498. //            $ficheTest[] = $xml->Sortie_Projet->Name;        
  1499. //            $ficheTest[] = $xml->Datas_Comp->donnees_generales->maitre_ouvrage->nom;
  1500. //            $ficheTest[] = $xml->Datas_Comp->donnees_generales->operation->adresse->ville;
  1501. //            $ficheTest[] = $xml->Sortie_Projet->Departement;
  1502. //            
  1503. //            $ficheTest['SHONRT'] = $xml->Entree_Projet->Batiment_Collection->Batiment->Zone_Collection->Zone->SHON_RT;
  1504. //            $ficheTest['SURT'] = $xml->Entree_Projet->Batiment_Collection->Batiment->Zone_Collection->Zone->Groupe_Collection->Groupe->SURT;
  1505. //            $ficheTest['V'] = $xml->Entree_Projet->Batiment_Collection->Batiment->Zone_Collection->Zone->Groupe_Collection->Groupe->V;
  1506. //            $ficheTest['Qv_occ_BBIO'] = $xml->Entree_Projet->Batiment_Collection->Batiment->Zone_Collection->Zone->Groupe_Collection->Groupe->Qv_occ_BBIO;
  1507. //            $ficheTest['Ak'] = $xml->Entree_Projet->Batiment_Collection->Batiment->Zone_Collection->Zone->Groupe_Collection->Groupe->Paroi_opaque_Collection->Paroi_Opaque->Ak;
  1508. //            $ficheTest['Uk'] = $xml->Entree_Projet->Batiment_Collection->Batiment->Zone_Collection->Zone->Groupe_Collection->Groupe->Paroi_opaque_Collection->Paroi_Opaque->Uk;
  1509. //            if ($xml->Entree_Projet->Batiment_Collection->Batiment->Zone_Collection->Zone->Groupe_Collection->Groupe->Paroi_opaque_Collection->Paroi_Opaque->Alpha > 0) {
  1510. //              $ficheTest['Gamma'] = $xml->Entree_Projet->Batiment_Collection->Batiment->Zone_Collection->Zone->Groupe_Collection->Groupe->Paroi_opaque_Collection->Paroi_Opaque->Masque_Collection->Masque_Lointain_Azimutal->Gamma;  
  1511. //            };
  1512. //            $ficheTest['Ab'] = $xml->Entree_Projet->Batiment_Collection->Batiment->Zone_Collection->Zone->Groupe_Collection->Groupe->Baie_Collection->Baie->Ab;
  1513. //            $ficheTest['Usp_vert'] = $xml->Entree_Projet->Batiment_Collection->Batiment->Zone_Collection->Zone->Groupe_Collection->Groupe->Baie_Collection->Baie->Usp_Vert;
  1514. //            $ficheTest['Ratio_ecl_nat'] = $xml->Entree_Projet->Batiment_Collection->Batiment->Zone_Collection->Zone->Groupe_Collection->Groupe->Eclairage_Collection->Eclairage->Ratio_ecl_nat;
  1515. //            $ficheTest['Rat_local'] = $xml->Entree_Projet->Batiment_Collection->Batiment->Zone_Collection->Zone->Groupe_Collection->Groupe->Eclairage_Collection->Eclairage->Rat_local;//// 
  1516. //            
  1517. //        //analyse que s'il est conforme RT2012
  1518. //        $xml = simplexml_load_file('IMPORTS/' . $nomFichier);
  1519. //        if (isset($xml->Entree_Projet->Index)) {
  1520. //            $fichesBatiment = $service->importer('IMPORTS/' . $nomFichier, $time, $nomInitialFichier);
  1521. //            foreach ($fichesBatiment as $ficheBatiment) {
  1522. //                $fichesOps[] = $ficheBatiment;
  1523. //                $idFicheBatiments[] = $ficheBatiment->getId();
  1524. //            }
  1525. //        }
  1526. //        $session->set("idFicheBatiments", $idFicheBatiments);
  1527. //
  1528. //        return $this->json($fichesOps);
  1529.         return $this->render('workinprogress.html.twig');
  1530.     }
  1531.     
  1532.     
  1533.     
  1534. }