From: <fa...@us...> - 2008-09-30 14:22:56
|
Revision: 4010 http://fudaa.svn.sourceforge.net/fudaa/?rev=4010&view=rev Author: fargeix Date: 2008-09-30 14:22:41 +0000 (Tue, 30 Sep 2008) Log Message: ----------- Modifications importantes sur les graphes et histogrammes, dont les ?\195?\169chelles ?\195?\169taient fausses Modified Paths: -------------- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3DessinerPortFrame.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonAttenteElement.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonAttentetrajet.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonDureeParcours.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonGenerationBateaux.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatGenerationBateaux.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleCategories.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteGeneraleElement.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsAttenteTrajet.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatsDureesParcours.java trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3TraduitHoraires.java Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3DessinerPortFrame.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3DessinerPortFrame.java 2008-09-29 21:38:52 UTC (rev 4009) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3DessinerPortFrame.java 2008-09-30 14:22:41 UTC (rev 4010) @@ -36,6 +36,8 @@ import org.fudaa.fudaa.ressource.FudaaResource; import org.jdesktop.swingx.ScrollPaneSelector; +import sun.text.Normalizer.QuickCheckResult; + import com.memoire.bu.BuButton; import com.memoire.bu.BuDialogMessage; import com.memoire.bu.BuToolBar; @@ -59,8 +61,10 @@ JLabel labelMessage1_=new JLabel(); JLabel labelMessage2_=new JLabel(); JLabel labelMessage3_=new JLabel(); + //BuPanel panelBoutons_=new BuPanel(); JMenuItem menuaffichageNoms_; + private final BuButton quitter_ = new BuButton(FudaaResource.FUDAA.getIcon("crystal_quitter"), "Quitter"); final BuButton rafraichir_ = new BuButton(FudaaResource.FUDAA.getIcon("rafraichir_18"), "rafraichir"); final BuButton validation_ = new BuButton(FudaaResource.FUDAA.getIcon("crystal_generer"), "exporter Ps"); final BuButton validation2_ = new BuButton(FudaaResource.FUDAA.getIcon("crystal_generer"), "exporter"); @@ -109,25 +113,28 @@ donnees_ = _donnees; this.getContentPane().setLayout(new BorderLayout()); - this.setTitle("Sch\xE9ma du r\xE9seau"); - this.setSize(800, 640); + this.setTitle("Mod\xE9lisation du r\xE9seau"); + this.setSize(820, 640); this.setBorder(Sinavi3Bordures.compound_); // insertion des composants dans la frame - final JPanel controlPanel = new JPanel(new GridLayout(2,1)); - controlPanel.setBorder(Sinavi3Bordures.compound_); + final JPanel controlPanel = new JPanel(new GridLayout(1,2)); + //controlPanel.setBorder(Sinavi3Bordures.compound_); // controlPanel.add(new JLabel("Nombre de gares \xE0 ins\xE9rer: ")); labelCompteur_ = new JLabel(""); - labelCompteur_.setBorder(Sinavi3Bordures.bordnormal_); + //labelCompteur_.setBorder(Sinavi3Bordures.bordnormal_); JPanel panelLabel=new JPanel(new FlowLayout(FlowLayout.LEFT)); panelLabel.add(labelCompteur_); panelLabel.add(labelMessage1_); - labelMessage1_.setBorder(Sinavi3Bordures.bordnormal_); - labelMessage2_.setBorder(Sinavi3Bordures.bordnormal_); - labelMessage3_.setBorder(Sinavi3Bordures.bordnormal_); + //labelMessage1_.setBorder(Sinavi3Bordures.bordnormal_); + //labelMessage2_.setBorder(Sinavi3Bordures.bordnormal_); + //labelMessage3_.setBorder(Sinavi3Bordures.bordnormal_); + JPanel panelBoutons=new JPanel(new FlowLayout(FlowLayout.LEFT)); + panelBoutons.add(quitter_); + controlPanel.add(panelBoutons); controlPanel.add(panelLabel); - JPanel panelLabel2=new JPanel(new FlowLayout(FlowLayout.LEFT)); - panelLabel2.add(labelMessage2_); - controlPanel.add(panelLabel2); + //JPanel panelLabel2=new JPanel(new FlowLayout(FlowLayout.LEFT)); + panelLabel.add(labelMessage2_); + //controlPanel.add(panelLabel2); //controlPanel.add(this.rafraichir_); //controlPanel.add(validation_); //controlPanel.add(validation2_); @@ -190,6 +197,15 @@ initialisation_.setToolTipText("R\xE9initialiser la mod\xE9lisation du r\xE9seau"); initialisation_.addActionListener(listenerInit_); + + /** listener des boutons quitter */ + this.quitter_.setToolTipText("Ferme la sous-fen\xEAtre"); + final ActionListener actionQuitter = new ActionListener() { + public void actionPerformed(ActionEvent e) { + Sinavi3DessinerPortFrame.this.windowClosed(); + } + }; + this.quitter_.addActionListener(actionQuitter); validation_.setToolTipText("Permet de generer un fichier PostScript a partir de la modelisation du port"); validation_.addActionListener(new ActionListener() { @@ -238,7 +254,7 @@ panelDessin_.tableauGare_ = new ArrayList(); panelDessin_.nbGares_ = donnees_.listeGare_.listeGares_.size();; System.out.println("REINITIAlISATION***********"); - labelMessage1_.setText("Cliquez sur le dessin pour positionner les gares"); + labelMessage1_.setText("Cliquer sur le dessin pour positionner les gares."); labelMessage2_.setText(""); panelDessin_.repaint(); } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonAttenteElement.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonAttenteElement.java 2008-09-29 21:38:52 UTC (rev 4009) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonAttenteElement.java 2008-09-30 14:22:41 UTC (rev 4010) @@ -163,7 +163,7 @@ JComboBox ListeNavires_ = new JComboBox(); - String[] listeaction = {"Attente de s\xE9curit\xE9", "Attente d'acc\xE8s", "Attente d'occupation","Attente d'indisponibilit\xE9", "Attente totale" }; + String[] listeaction = {"Attentes de s\xE9curit\xE9", "Attentes d'acc\xE8s", "Attentes d'occupation","Attentes d'indisponibilit\xE9", "Attentes totales" }; /** * liste des actions a realiser */ @@ -193,14 +193,14 @@ boolean seuil_ = false; JTextField valSeuil_ = new JTextField(6); - JCheckBox valideSeuil_ = new JCheckBox("seuil", false); + JCheckBox valideSeuil_ = new JCheckBox("Afficher", false); float valeurSeuil = 0; /** * constructeur de la sous fenetre de gestion des resultats: */ Sinavi3ResultatComparaisonAttenteElement(final Sinavi3DataSimulation _donnees) { - super("Comparaison Attentes par \xE9l\xE9ment", true, true, true, true); + super("Comparaison des attentes par \xE9l\xE9ment", true, true, true, true); // recuperation des donn\xE9es de la simulation donnees_ = _donnees; @@ -270,7 +270,7 @@ } this.tableauChoixSimulations_[nbProjets] = new JCheckBox(this.listeProjet_[nbProjets].getFichier().substring( - debut, this.listeProjet_[nbProjets].getFichier().lastIndexOf(".sipor")), true); + debut, this.listeProjet_[nbProjets].getFichier().lastIndexOf(".sinavi")), true); this.tableauChoixSimulations_[nbProjets].addActionListener(this); nombreSimulationsComparees_++; nbProjets++; @@ -283,7 +283,7 @@ comparePossible2_ = VerificationComparaisonSimulationsPossibleEntreNavires(); - setSize(700, 500); + setSize(820, 600); setBorder(Sinavi3Bordures.compound_); this.getContentPane().setLayout(new BorderLayout()); @@ -295,9 +295,9 @@ // ajout des courbes dans le panel de la sous fenetre + panelPrincipal_.addTab("Graphe", FudaaResource.FUDAA.getIcon("crystal_graphe"), panelCourbe_); panelPrincipal_.addTab("Histogramme", FudaaResource.FUDAA.getIcon("crystal_graphe"), panelHisto_); - panelPrincipal_.addTab("Graphe", FudaaResource.FUDAA.getIcon("crystal_graphe"), panelCourbe_); - + /******************************************************************************************************************* * gestion du panel du haut ******************************************************************************************************************/ @@ -314,11 +314,12 @@ panel2.add(new JLabel("Cat\xE9gorie de bateaux:")); panel2.add(this.ListeNavires_); - panel2.add(new JLabel(" Type d'attente:")); + panel2.add(new JLabel(" Type d'attentes:")); panel2.add(this.ListeActions_); panel2.add(validation_); this.controlPanel_.add(panel1); this.controlPanel_.add(panel2); + this.ListeActions_.setSelectedIndex(4); final TitledBorder bordurea = BorderFactory.createTitledBorder(BorderFactory .createEtchedBorder(EtchedBorder.LOWERED), "D\xE9finition de la recherche"); @@ -378,18 +379,30 @@ // panoption.setLayout(new GridLayout(2,1)); // JScrollPane pcnasc=new JScrollPane(panoption); - final Box bVert2 = Box.createVerticalBox(); + final Box panoption = Box.createVerticalBox(); + this.optionPanel_.add(panoption); + + final Box bVert2 = Box.createVerticalBox(); // bVert2.add(new JLabel("Affichage navires:")); // bVert2.setBorder(this.bordnormal_); for (int i = 0; i < nombreSimulationsComparees_; i++) { bVert2.add(this.tableauChoixSimulations_[i]); } final TitledBorder bordure1 = BorderFactory.createTitledBorder(BorderFactory - .createEtchedBorder(EtchedBorder.LOWERED), "simu"); + .createEtchedBorder(EtchedBorder.LOWERED), "Simulations"); bVert2.setBorder(bordure1); - final JScrollPane pcnasc = new JScrollPane(bVert2); - this.optionPanel_.add(pcnasc); + //final JScrollPane pcnasc = new JScrollPane(bVert2); + panoption.add(bVert2); this.optionPanel_.setBorder(this.compound_); + + final Box bVert3 = Box.createVerticalBox(); + final TitledBorder bordure2 = BorderFactory.createTitledBorder(BorderFactory + .createEtchedBorder(EtchedBorder.LOWERED), "Seuil"); + bVert3.setBorder(bordure2); + bVert3.add(new JLabel("Valeur (h.min):")); + bVert3.add(valSeuil_); + bVert3.add(valideSeuil_); + panoption.add(bVert3); /******************************************************************************************************************* * gestion du panel courbes panelCourbe_ @@ -408,7 +421,7 @@ this.panelCourbe_.add(this.graphe_, BorderLayout.CENTER); // etape 5: bouton de generation du fichier image - exportationgraphe_.setToolTipText("permet de g\xE9n\xE9rer un fichier image \xE0 partir du graphe"); + exportationgraphe_.setToolTipText("Exporte le graphe au format image"); exportationgraphe_.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { @@ -437,7 +450,7 @@ this.panelHisto_.add(this.histo_, BorderLayout.CENTER); // etape 5: bouton de generation du fichier image - exportationHisto_.setToolTipText("permet de g\xE9n\xE9rer un fichier image \xE0 partir de l'histogramme"); + exportationHisto_.setToolTipText("Exporte l'histogramme au format image"); exportationHisto_.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { @@ -474,14 +487,14 @@ }); valideSeuil_.addActionListener(this); - this.controlPanelHisto_.add(new JLabel(" seuil:")); - this.controlPanelHisto_.add(valSeuil_); - this.controlPanelHisto_.add(valideSeuil_); + //this.controlPanelHisto_.add(new JLabel(" Seuil (h.min):")); + //this.controlPanelHisto_.add(valSeuil_); + //this.controlPanelHisto_.add(valideSeuil_); /** listener des boutons quitter */ - this.quitter_.setToolTipText("cliquez sur ce bouton pour fermer la sous fen\xEAtre"); - this.quitter2_.setToolTipText("cliquez sur ce bouton pour fermer la sous fen\xEAtre"); - this.quitter3_.setToolTipText("cliquez sur ce bouton pour fermer la sous fen\xEAtre"); + this.quitter_.setToolTipText("Ferme la sous-fen\xEAtre"); + this.quitter2_.setToolTipText("Ferme la sous-fen\xEAtre"); + this.quitter3_.setToolTipText("Ferme la sous-fen\xEAtre"); final ActionListener actionQuitter = new ActionListener() { public void actionPerformed(ActionEvent e) { Sinavi3ResultatComparaisonAttenteElement.this.windowClosed(); @@ -493,7 +506,7 @@ // ajout d'un menuBar // petite barre de menu agreable - final JMenuBar menuBar = new JMenuBar(); +/* final JMenuBar menuBar = new JMenuBar(); final JMenu menuFile = new JMenu("Fichier"); final JMenuItem menuFileExit = new JMenuItem("Quitter"); final JMenu menuOption = new JMenu("Options"); @@ -514,7 +527,7 @@ menuBar.add(menuOption); menuBar.add(menuInfo); setJMenuBar(menuBar); - +*/ } /** @@ -530,6 +543,9 @@ * @return chaine: chaine qui contient la des cription de la chaine de caracteres. */ String affichageGraphe() { + + boolean echelleHeures_=false; + if (Sinavi3AlgorithmesComparaisonSimulation.determinerMaxAttente(this.listeParamsSimu_, this.nombreSimulationsComparees_) >= 240) echelleHeures_=true; String g = ""; @@ -539,16 +555,19 @@ int indiceElement = 0; g += "graphe\n{\n"; - g += " titre \" Comparaison de simulation \"\n"; - g += " sous-titre \"" + (String) this.ListeActions_.getSelectedItem() + " Element: " - + (String) this.ListetypeElem1_.getSelectedItem()+ (String) this.ListeElement_.getSelectedItem() + ", cat\xE9gorie: " + (String) this.ListeNavires_.getSelectedItem() + g += " titre \"Comparaison de simulations\"\n"; + g += " sous-titre \"" + (String) this.ListeActions_.getSelectedItem() + " : \xE9l\xE9ment " + + (String) this.ListeElement_.getSelectedItem() + " (" + (String) this.ListetypeElem1_.getSelectedItem()+ " " + "), cat\xE9gorie " + (String) this.ListeNavires_.getSelectedItem() + " \"\n"; g += " animation non\n"; g += " legende " + "oui" + "\n"; + + g += " marges\n {\n"; + g += " gauche 100\n"; g += " droite 100\n"; g += " haut 50\n"; g += " bas 30\n }\n"; g += " axe\n {\n"; // abscisses - g += " titre \" " + "\"\n"; - g += " unite \" simu \"\n"; + g += " titre \"Simulation" + "\"\n"; + g += " unite \"num\xE9ro\"\n"; g += " orientation " + "horizontal" + "\n"; g += " graduations oui\n"; g += " minimum " + 0 + "\n"; @@ -560,16 +579,21 @@ g += " axe\n {\n"; // Ordonn\xE9es - g += " titre \" " + "\"\n"; - g += " unite \"" + " H.MIN" + "\"\n"; + g += " titre \"Dur\xE9e" + "\"\n"; + g += " unite \""; + if (echelleHeures_==true) g += "heures"; else g += "minutes"; + g += "\"\n"; g += " orientation " + "vertical" + "\n"; g += " graduations oui\n"; g += " minimum " + 0 + "\n"; - g += " maximum " - + Sinavi3TraduitHoraires + g += " maximum "; + if (echelleHeures_==true) g+= (Sinavi3AlgorithmesComparaisonSimulation.determinerMaxAttente(this.listeParamsSimu_, this.nombreSimulationsComparees_))/60; + else g+= (Sinavi3AlgorithmesComparaisonSimulation.determinerMaxAttente(this.listeParamsSimu_, this.nombreSimulationsComparees_)); + /*+ Sinavi3TraduitHoraires .traduitMinutesEnHeuresMinutes((float)Sinavi3AlgorithmesComparaisonSimulation.determinerMaxAttente(this.listeParamsSimu_, - this.nombreSimulationsComparees_)) + "\n"; + this.nombreSimulationsComparees_)) + "\n";*/ //} + g += "\n"; g += " }\n"; @@ -581,7 +605,7 @@ g += " courbe\n {\n"; g += " titre \""; - g += "" + (String) this.ListeActions_.getSelectedItem()+" maxi"; + g += "" + (String) this.ListeActions_.getSelectedItem()+" maximales"; g += "\"\n"; @@ -602,20 +626,20 @@ g += (indiceElement + 1)// numero de la cat\xE9gorie + " "; if (this.ListeActions_.getSelectedIndex() == 0) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuMaxi); + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuMaxi)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuMaxi); } else if (this.ListeActions_.getSelectedIndex() == 1) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesMaxi); + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesMaxi)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesMaxi); } else if (this.ListeActions_.getSelectedIndex() == 2) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupMaxi); + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupMaxi)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupMaxi); } else if (this.ListeActions_.getSelectedIndex() == 3) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneMaxi); + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneMaxi)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneMaxi); } else if (this.ListeActions_.getSelectedIndex() == 4) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteTotaleMaxi); + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteTotaleMaxi)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteTotaleMaxi); } final String os = System.getProperty("os.name"); @@ -628,7 +652,7 @@ g += "\n etiquette \n \"" + this.listeProjet_[n].getFichier().substring(debut, - this.listeProjet_[n].getFichier().lastIndexOf(".sipor")) + "\" \n" + "\n"; + this.listeProjet_[n].getFichier().lastIndexOf(".sinavi")) + "\" \n" + "\n"; indiceElement++; } }// din du pour remplissage des coordonn\xE9es @@ -645,7 +669,7 @@ g += " courbe\n {\n"; g += " titre \""; - g += "" + (String) this.ListeActions_.getSelectedItem()+" moyen"; + g += "" + (String) this.ListeActions_.getSelectedItem()+" moyennes"; g += "\"\n"; g += " type " + "courbe" + "\n"; @@ -667,29 +691,49 @@ + " "; if (this.ListeActions_.getSelectedIndex() == 0) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuTotale - /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteSecu)); - }else + if (this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuTotale == 0) g+=0; + else { + if (echelleHeures_) g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteSecu))/60; + else g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteSecu));; + } + } else if (this.ListeActions_.getSelectedIndex() == 1) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesTotale - /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteAcces)); + if (this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteAcces == 0) g+=0; + else { + if (echelleHeures_) g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteAcces))/60; + else g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteAcces)); + } }else if (this.ListeActions_.getSelectedIndex() == 2) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupTotale - /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAtenteOccup)); + if (this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAtenteOccup == 0) g+=0; + else { + if (echelleHeures_) g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAtenteOccup))/60; + else g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAtenteOccup)); + } }else if (this.ListeActions_.getSelectedIndex() == 3) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneTotale + if (this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttentePanne == 0) g+=0; + else { + if (echelleHeures_) g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttentePanne))/60; + else g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneTotale /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttentePanne)); + } }else if (this.ListeActions_.getSelectedIndex() == 4) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteMegaTotale - /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteTotale)); + if (this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteTotale == 0) g+=0; + else { + if (echelleHeures_) g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteMegaTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteTotale))/60; + else g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteMegaTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteTotale)); + } } @@ -711,7 +755,7 @@ g += " courbe\n {\n"; g += " titre \""; - g += "" + (String) this.ListeActions_.getSelectedItem()+" mini"; + g += "" + (String) this.ListeActions_.getSelectedItem()+" minimales"; g += "\"\n"; g += " type " + "courbe" + "\n"; @@ -732,21 +776,21 @@ + " "; if (this.ListeActions_.getSelectedIndex() == 0) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuMini); - } else if (this.ListeActions_.getSelectedIndex() == 1) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesMini); - } else if (this.ListeActions_.getSelectedIndex() == 2) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupMini); - } else if (this.ListeActions_.getSelectedIndex() == 3) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneMini); - } else if (this.ListeActions_.getSelectedIndex() == 4) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteTotaleMini); - } + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuMini)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuMini); + } else if (this.ListeActions_.getSelectedIndex() == 1) { + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesMini)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesMini); + } else if (this.ListeActions_.getSelectedIndex() == 2) { + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupMini)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupMini); + } else if (this.ListeActions_.getSelectedIndex() == 3) { + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneMini)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneMini); + } else if (this.ListeActions_.getSelectedIndex() == 4) { + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteTotaleMini)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteTotaleMini); + } g += "\n"; indiceElement++; @@ -774,7 +818,9 @@ g += "titre \"seuil \"\n"; // str+="orientation horizontal \n"; g += " type max\n"; - g += " valeur " + valeurSeuil + CtuluLibString.LINE_SEP_SIMPLE;// /la valeur ordonn\xE9e du seuil + //g += " valeur " + valeurSeuil + CtuluLibString.LINE_SEP_SIMPLE;// /la valeur ordonn\xE9e du seuil + if(echelleHeures_==true) g += " valeur " + Sinavi3TraduitHoraires.traduitHeuresMinutesEnHeures(valeurSeuil) + CtuluLibString.LINE_SEP_SIMPLE;// /la valeur ordonn\xE9e du seuil + else g += " valeur " + Sinavi3TraduitHoraires.traduitHeuresMinutesEnMinutes(valeurSeuil) + CtuluLibString.LINE_SEP_SIMPLE; g += " \n }\n"; // }//fin du for @@ -789,6 +835,9 @@ * @return */ String affichageHistogramme() { + + boolean echelleHeures_=false; + if (Sinavi3AlgorithmesComparaisonSimulation.determinerMaxAttente(this.listeParamsSimu_, this.nombreSimulationsComparees_) >= 240) echelleHeures_=true; String g = ""; @@ -798,16 +847,19 @@ int indiceElement = 0; g += "graphe\n{\n"; - g += " titre \" Comparaison de simulation \"\n"; - g += " sous-titre \"" + (String) this.ListeActions_.getSelectedItem() + " Element: " - + (String) this.ListetypeElem1_.getSelectedItem()+ (String) this.ListeElement_.getSelectedItem() + ", cat\xE9gorie: " + (String) this.ListeNavires_.getSelectedItem() + g += " titre \"Comparaison de simulations\"\n"; + g += " sous-titre \"" + (String) this.ListeActions_.getSelectedItem() + " : \xE9l\xE9ment " + + (String) this.ListeElement_.getSelectedItem() + " (" + (String) this.ListetypeElem1_.getSelectedItem()+ " " + "), cat\xE9gorie " + (String) this.ListeNavires_.getSelectedItem() + " \"\n"; g += " animation non\n"; g += " legende " + "oui" + "\n"; + + g += " marges\n {\n"; + g += " gauche 100\n"; g += " droite 100\n"; g += " haut 50\n"; g += " bas 30\n }\n"; g += " axe\n {\n"; // abscisses - g += " titre \" " + "\"\n"; - g += " unite \" simu \"\n"; + g += " titre \"Simulation" + "\"\n"; + g += " unite \"num\xE9ro\"\n"; g += " orientation " + "horizontal" + "\n"; g += " graduations oui\n"; g += " minimum " + 0 + "\n"; @@ -819,16 +871,21 @@ g += " axe\n {\n"; // Ordonn\xE9es - g += " titre \" " + "\"\n"; - g += " unite \"" + " H.MIN" + "\"\n"; + g += " titre \"Dur\xE9e" + "\"\n"; + g += " unite \""; + if (echelleHeures_==true) g += "heures"; else g += "minutes"; + g += "\"\n"; g += " orientation " + "vertical" + "\n"; g += " graduations oui\n"; g += " minimum " + 0 + "\n"; - g += " maximum " - + Sinavi3TraduitHoraires + g += " maximum "; + if (echelleHeures_==true) g+= (Sinavi3AlgorithmesComparaisonSimulation.determinerMaxAttente(this.listeParamsSimu_, this.nombreSimulationsComparees_))/60; + else g+= (Sinavi3AlgorithmesComparaisonSimulation.determinerMaxAttente(this.listeParamsSimu_, this.nombreSimulationsComparees_)); + /*+ Sinavi3TraduitHoraires .traduitMinutesEnHeuresMinutes((float)Sinavi3AlgorithmesComparaisonSimulation.determinerMaxAttente(this.listeParamsSimu_, - this.nombreSimulationsComparees_)) + "\n"; + this.nombreSimulationsComparees_)) + "\n";*/ //} + g += "\n"; g += " }\n"; @@ -840,7 +897,7 @@ g += " courbe\n {\n"; g += " titre \""; - g += "" + (String) this.ListeActions_.getSelectedItem()+" maxi"; + g += "" + (String) this.ListeActions_.getSelectedItem()+" maximales"; g += "\"\n"; @@ -861,21 +918,21 @@ g += (indiceElement + 1)// numero de la cat\xE9gorie + " "; if (this.ListeActions_.getSelectedIndex() == 0) { - g +=Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float) this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuMaxi); - } else if (this.ListeActions_.getSelectedIndex() == 1) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesMaxi); - } else if (this.ListeActions_.getSelectedIndex() == 2) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupMaxi); - } else if (this.ListeActions_.getSelectedIndex() == 3) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneMaxi); - } else if (this.ListeActions_.getSelectedIndex() == 4) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteTotaleMaxi); - } + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuMaxi)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuMaxi); + } else if (this.ListeActions_.getSelectedIndex() == 1) { + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesMaxi)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesMaxi); + } else if (this.ListeActions_.getSelectedIndex() == 2) { + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupMaxi)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupMaxi); + } else if (this.ListeActions_.getSelectedIndex() == 3) { + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneMaxi)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneMaxi); + } else if (this.ListeActions_.getSelectedIndex() == 4) { + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteTotaleMaxi)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteTotaleMaxi); + } final String os = System.getProperty("os.name"); int debut = 0; @@ -887,7 +944,7 @@ g += "\n etiquette \n \"" + this.listeProjet_[n].getFichier().substring(debut, - this.listeProjet_[n].getFichier().lastIndexOf(".sipor")) + "\" \n" + "\n"; + this.listeProjet_[n].getFichier().lastIndexOf(".sinavi")) + "\" \n" + "\n"; indiceElement++; } }// din du pour remplissage des coordonn\xE9es @@ -904,7 +961,7 @@ g += " courbe\n {\n"; g += " titre \""; - g += "" + (String) this.ListeActions_.getSelectedItem()+" moyen"; + g += "" + (String) this.ListeActions_.getSelectedItem()+" moyennes"; g += "\"\n"; g += " type " + "histogramme" + "\n"; @@ -925,30 +982,50 @@ g += (indiceElement + 1)// numero de la cat\xE9gorie + " "; - if (this.ListeActions_.getSelectedIndex() == 0) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuTotale - /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteSecu)); - }else + if (this.ListeActions_.getSelectedIndex() == 0) { + if (this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuTotale == 0) g+=0; + else { + if (echelleHeures_) g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteSecu))/60; + else g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteSecu));; + } + } else if (this.ListeActions_.getSelectedIndex() == 1) { - g +=Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float) (this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesTotale - /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteAcces)); + if (this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteAcces == 0) g+=0; + else { + if (echelleHeures_) g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteAcces))/60; + else g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteAcces)); + } }else if (this.ListeActions_.getSelectedIndex() == 2) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupTotale - /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAtenteOccup)); + if (this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAtenteOccup == 0) g+=0; + else { + if (echelleHeures_) g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAtenteOccup))/60; + else g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAtenteOccup)); + } }else if (this.ListeActions_.getSelectedIndex() == 3) { - g +=Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float) (this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneTotale + if (this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttentePanne == 0) g+=0; + else { + if (echelleHeures_) g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttentePanne))/60; + else g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneTotale /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttentePanne)); + } }else if (this.ListeActions_.getSelectedIndex() == 4) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteMegaTotale - /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteTotale)); + if (this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteTotale == 0) g+=0; + else { + if (echelleHeures_) g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteMegaTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteTotale))/60; + else g += ((float)(this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteMegaTotale + /this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].nbNaviresAttenteTotale)); + } } @@ -970,7 +1047,7 @@ g += " courbe\n {\n"; g += " titre \""; - g += "" + (String) this.ListeActions_.getSelectedItem()+" mini"; + g += "" + (String) this.ListeActions_.getSelectedItem()+" minimales"; g += "\"\n"; g += " type " + "histogramme" + "\n"; @@ -991,21 +1068,21 @@ + " "; if (this.ListeActions_.getSelectedIndex() == 0) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuMini); - } else if (this.ListeActions_.getSelectedIndex() == 1) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesMini); - } else if (this.ListeActions_.getSelectedIndex() == 2) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupMini); - } else if (this.ListeActions_.getSelectedIndex() == 3) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneMini); - } else if (this.ListeActions_.getSelectedIndex() == 4) { - g += Sinavi3TraduitHoraires - .traduitMinutesEnHeuresMinutes((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteTotaleMini); - } + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuMini)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteSecuMini); + } else if (this.ListeActions_.getSelectedIndex() == 1) { + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesMini)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteAccesMini); + } else if (this.ListeActions_.getSelectedIndex() == 2) { + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupMini)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteOccupMini); + } else if (this.ListeActions_.getSelectedIndex() == 3) { + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneMini)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attentePanneMini); + } else if (this.ListeActions_.getSelectedIndex() == 4) { + if (echelleHeures_) g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteTotaleMini)/60; + else g += ((float)this.listeParamsSimu_[n].ResultatsCompletsSimulation.AttentesTousElementsToutesCategories[this.comparePossible_[n]].tableauAttenteCategories[this.comparePossible2_[n]].attenteTotaleMini); + } g += "\n"; indiceElement++; @@ -1026,7 +1103,9 @@ g += "titre \"seuil \"\n"; // str+="orientation horizontal \n"; g += " type max\n"; - g += " valeur " + valeurSeuil + CtuluLibString.LINE_SEP_SIMPLE;// /la valeur ordonn\xE9e du seuil + //g += " valeur " + valeurSeuil + CtuluLibString.LINE_SEP_SIMPLE;// /la valeur ordonn\xE9e du seuil + if(echelleHeures_==true) g += " valeur " + Sinavi3TraduitHoraires.traduitHeuresMinutesEnHeures(valeurSeuil) + CtuluLibString.LINE_SEP_SIMPLE;// /la valeur ordonn\xE9e du seuil + else g += " valeur " + Sinavi3TraduitHoraires.traduitHeuresMinutesEnMinutes(valeurSeuil) + CtuluLibString.LINE_SEP_SIMPLE; g += " \n }\n"; // }//fin du for @@ -1079,13 +1158,17 @@ // on recupere al valeure du seuil choisie par l utilisateur valeurSeuil = Float.parseFloat(this.valSeuil_.getText()); // on redesssinne l histogramme en tenant compte du seuil de l utilisateur + final String descriptionGraphe = this.affichageGraphe(); final String descriptionHisto = this.affichageHistogramme(); + this.graphe_.setFluxDonnees(new ByteArrayInputStream(descriptionGraphe.getBytes())); this.histo_.setFluxDonnees(new ByteArrayInputStream(descriptionHisto.getBytes())); } else { // booleen passe a false this.seuil_ = false; // on redesssinne l histogramme en tenant compte du seuil de l utilisateur + final String descriptionGraphe = this.affichageGraphe(); final String descriptionHisto = this.affichageHistogramme(); + this.graphe_.setFluxDonnees(new ByteArrayInputStream(descriptionGraphe.getBytes())); this.histo_.setFluxDonnees(new ByteArrayInputStream(descriptionHisto.getBytes())); } } Modified: trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonAttentetrajet.java =================================================================== --- trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonAttentetrajet.java 2008-09-29 21:38:52 UTC (rev 4009) +++ trunk/fudaa_devel/fudaa/src/org/fudaa/fudaa/sinavi3/Sinavi3ResultatComparaisonAttentetrajet.java 2008-09-30 14:22:41 UTC (rev 4010) @@ -166,7 +166,7 @@ JComboBox ListeNavires_ = new JComboBox(); - String[] listeaction = { "Attente s\xE9curit\xE9", "Attente acc\xE8s", "Attente occupation","Attente Indisponibilit\xE9","Attente totale" }; + String[] listeaction = { "Attentes de s\xE9curit\xE9", "Attentes d'acc\xE8s", "Attentes d'occupation","Attentes d'indisponibilit\xE9","Attentes totales" }; /** * liste des actions a realiser */ @@ -175,15 +175,15 @@ /** * bouton de generation des resultats */ - private final BuButton exportationExcel_ = new BuBu... [truncated message content] |