Commit 1250b47b authored by pfreon's avatar pfreon
Browse files

Correction of a bug of exclusion of MSY-MSE graphs

Correction of a bug of exclusion of MSY-MSE  graphs for models CPUE=f(V) and the additive exponential model.
parent 3985745a
......@@ -23,7 +23,7 @@ public class TexteRegles {
private static int indexEnCours;
public static boolean Flag_Modele_Lineaire_deja_recherche;
public static boolean Flag_Modele_Exponentiel_deja_recherche;
public static boolean Flag_Q_cpue_sous_sur_production_asked;
public static boolean Flag_Q_cpue_sous_sur_production_asked;
private static int Flag_Modele_General_deja_recherche=0;
private static String scriptEnCours;
private static String[] itemEnCours;
......@@ -223,12 +223,12 @@ public static boolean isTrue(){
case 10:
//System.out.println(Global.relationCPU_E+" "+Global.pessimiste+" "+Global.stock_deja_effondre+" "+Global.lifespan+" "+Global.fecondite_faible);
result = (Global.relationCPU_E==RechercheModele.exponentiel && Global.pessimiste!=1 && Global.stock_deja_effondre!=1 && Global.lifespan>10 && Global.fecondite_faible!=1);
if (Global.envir_preponderant == 1) Global.environmental_influence = "";
if (Global.envir_preponderant == 1) Global.environmental_influence = "";
if(result) Flag_Modele_Exponentiel_deja_recherche=true;
break;
case 11:
result = (Global.relationCPU_E==RechercheModele.exponentiel && Global.pessimiste!=1 && Global.stock_deja_effondre!=1 && Global.lifespan>4 && Global.lifespan<11 && Global.fecondite_faible!=1 && Global.rapport_vie_exploitee_inferieur_deux==2);
System.out.println("Global.relationCPU_E = " + Global.relationCPU_E + " Global.pessimiste = " + Global.pessimiste + " Global.stock_deja_effondre = " + Global.stock_deja_effondre + " Global.lifespan = " + Global.lifespan + " Global.fecondite_faible = " + Global.fecondite_faible + " Global.rapport_vie_exploitee_inferieur_deux = " + Global.rapport_vie_exploitee_inferieur_deux);
//System.out.println("Global.relationCPU_E = " + Global.relationCPU_E + " Global.pessimiste = " + Global.pessimiste + " Global.stock_deja_effondre = " + Global.stock_deja_effondre + " Global.lifespan = " + Global.lifespan + " Global.fecondite_faible = " + Global.fecondite_faible + " Global.rapport_vie_exploitee_inferieur_deux = " + Global.rapport_vie_exploitee_inferieur_deux);
if(result) Flag_Modele_Exponentiel_deja_recherche=true;
break;
case 12:
......@@ -387,7 +387,7 @@ System.out.println("Global.relationCPU_E = " + Global.relationCPU_E + " Global.p
case 53:
// Pour cas modèle simple influence Environnement (V) > Effort (E)
result=(Global.coeff_determination<0.4);
if (Global.envir_preponderant == 1) Global.environmental_influence = "";
if (Global.envir_preponderant == 1) Global.environmental_influence = "";
if(result)
{
commentaireEnCours="The coefficient of determination of the model " + RechercheModele.getEquation()+ " is " +nf.format(Global.coeff_determination)+".\n";
......@@ -455,9 +455,9 @@ if (Global.envir_preponderant == 1) Global.environmental_influence = "";
break;
case 56:
result=(Global.environmental_influence.equals("abundance") && Flag_Modele_Exponentiel_deja_recherche == true && Global.relationCPU_V == 1 && Modele.Flag_additive_model_fitted == false);
if(result) { Flag_Q_cpue_sous_sur_production_asked = true;
System.out.println("Flag_Modele_Exponentiel_deja_recherche: " + Flag_Modele_Exponentiel_deja_recherche + " Modele.Flag_additive_model_fitted = " + Modele.Flag_additive_model_fitted + " Global.relationCPU_V: " + Global.relationCPU_V);
}
if(result) { Flag_Q_cpue_sous_sur_production_asked = true;
//System.out.println("Flag_Modele_Exponentiel_deja_recherche: " + Flag_Modele_Exponentiel_deja_recherche + " Modele.Flag_additive_model_fitted = " + Modele.Flag_additive_model_fitted + " Global.relationCPU_V: " + Global.relationCPU_V);
}
break;
case 57:
result=(Global.linear_relationship!=1);
......@@ -480,17 +480,17 @@ System.out.println("Flag_Modele_Exponentiel_deja_recherche: " + Flag_Modele_Expo
}
break;
case 58:
result=(((Global.numero_modele > 5) || (Global.numero_modele < 2)) && (Global.numero_modele != 20 && (Global.numero_modele != 33))); // Exclusion modèles CPUE=f(V) et modèle exponentiel additif
if(!result)
result=(((Global.numero_modele > 1) && (Global.numero_modele < 6)) || (Global.numero_modele == 20 || (Global.numero_modele == 33))); // Exclusion modèles CPUE=f(V) et modèle exponentiel additif
if(result)
{
commentaireEnCours="There is no possibility of drawing MSY and MS-E graphs for this particular model.\n";
commentaireEnCours="MSY and MSE graphs are not justified or available for this model.\nPlease continue.\n";
}
break;
case 59:
result=(Global.environmental_influence.equals("catchability"));
break;
case 60: // Idem case 56 + Flag
result=(Flag_Q_cpue_sous_sur_production_asked == false && Global.environmental_influence.equals("abundance") && Flag_Modele_Exponentiel_deja_recherche == true && Global.relationCPU_V == 1 && Modele.Flag_additive_model_fitted == false);
case 60: // Idem case 56 + Flag
result=(Flag_Q_cpue_sous_sur_production_asked == false && Global.environmental_influence.equals("abundance") && Flag_Modele_Exponentiel_deja_recherche == true && Global.relationCPU_V == 1 && Modele.Flag_additive_model_fitted == false);
break;
/*case 56:
result = (Global.relationCPU_E==RechercheModele.general && Global.coeff_determination>0.4);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment