Commit aa8a9ff9 authored by pfreon's avatar pfreon
Browse files

Medium changes in warnings according to age and display of 3-variate plots

New warnings regarding consistency in ages.
Change display of 3-variate plots when CPUE = f(V) only.
Addition of comments
parent 98d390dd
Years;Production;Effort;Environment
1974;4880;616;7.9
1975;6560;1298;5
1976;10500;1833;5.7
1977;11720;3114;3.763648041
1978;28050;5973;4.696132597
1979;57320;15108;3.7
1980;79520;31747;2.504803603
1981;111370;37972;2.932950595
1982;125860;57434;2.191384894
1983;135130;45370;2.9
1984;163530;76378;2.141061562
1985;220080;89859;2.449170367
1986;239730;93733;2.557583775
1987;216810;117528;1.844751889
1988;246850;129765;1.9022849
1989;278650;125423;2.221681829
1990;287060;154574;1.8
1991;265900;143405;1.8
1992;266030;156053;1.704741338
1993;284830;155063;1.836866306
1994;264100;133933;1.9
1995;220160;146415;1.503671072
1996;211510;133054;1.589655328
1997;229610;143995;1.5
1998;232480;128404;1.810535497
1974;4880;616;11.9
1975;6560;1298;9
1976;10500;1833;9.7
1977;11720;3114;7.763648041
1978;28050;5973;8.696132597
1979;57320;15108;7.7
1980;79520;31747;6.504803603
1981;111370;37972;6.932950595
1982;125860;57434;6.191384894
1983;135130;45370;6.9
1984;163530;76378;6.141061562
1985;220080;89859;6.449170367
1986;239730;93733;6.557583775
1987;216810;117528;5.844751889
1988;246850;129765;5.9022849
1989;278650;125423;6.221681829
1990;287060;154574;5.8
1991;265900;143405;5.8
1992;266030;156053;5.704741338
1993;284830;155063;5.836866306
1994;264100;133933;5.9
1995;220160;146415;5.503671072
1996;211510;133054;5.589655328
1997;229610;143995;5.5
1998;232480;128404;5.810535497
Years;Production;Effort;Environment
1974;4880;616;11.9
1975;6560;1298;9
1976;10500;1833;9.7
1977;11720;3114;7.763648041
1978;28050;5973;8.696132597
1979;57320;15108;7.7
1980;79520;31747;6.504803603
1981;111370;37972;6.932950595
1982;125860;57434;6.191384894
1983;135130;45370;6.9
1984;163530;76378;6.141061562
1985;220080;89859;6.449170367
1986;239730;93733;6.557583775
1987;216810;117528;5.844751889
1988;246850;129765;5.9022849
1989;278650;125423;6.221681829
1990;287060;154574;5.8
1991;265900;143405;5.8
1992;266030;156053;5.704741338
1993;284830;155063;5.836866306
1994;264100;133933;5.9
1995;220160;146415;5.503671072
1996;211510;133054;5.589655328
1997;229610;143995;5.5
1998;232480;128404;5.810535497
......@@ -67,7 +67,7 @@ public class Cadre_ModeleDirect extends JFrame {
//JPopupMenu popup=new JPopupMenu();
// JMenuItem menuPlotFitted = new JMenuItem("Observed-Fitted and Residuals CPUE plots");
//JMenuItem menuPlotJacknife = new JMenuItem("Jacknife Plots");
// JMenuItem menuPlotThreeVariate = new JMenuItem("Three-variate plots");
// JMenuItem menuPlotThreeVariate = new JMenuItem("CPUE=f() & Y=() plots");
int nbFit;
Vector<Cadre_SplitPlot> vPlot = new Vector<Cadre_SplitPlot>();
......@@ -256,7 +256,7 @@ public class Cadre_ModeleDirect extends JFrame {
cmdEnd.setIcon(new ImageIcon(Cadre_ModeleDirect.class.getResource("resources/images/End.gif")));
cmdPredict.setIcon(new ImageIcon(Cadre_ModeleDirect.class.getResource("resources/images/Prediction.gif")));
cmdFitted.setToolTipText("Obs.-Fit. and Res. CPUE plots");
cmdTVariate.setToolTipText("Three variate plots");
cmdTVariate.setToolTipText("CPUE=f() & Y=() plots");
cmdJackniffe.setToolTipText("Jackknife plots");
cmdEnd.setToolTipText("Close (ESC)");
int condition = JComponent.WHEN_IN_FOCUSED_WINDOW;
......@@ -384,7 +384,7 @@ public class Cadre_ModeleDirect extends JFrame {
vPlot.add(dlgSp);
} else {
msg = new MsgDialogBox(0, "Please,in order to display these plots\n you have to fit a model", 0, Global.CadreMain);
msg = new MsgDialogBox(0, "In order to display these plots\n you have to fit a model", 0, Global.CadreMain);
}
}
......@@ -404,7 +404,7 @@ public class Cadre_ModeleDirect extends JFrame {
dlgSp.setVisible(true);
vPlot.add(dlgSp);
} else {
msg = new MsgDialogBox(0, "Please,in order to display these plots\n you have to fit a model", 0, Global.CadreMain);
msg = new MsgDialogBox(0, "In order to display these plots\n you have to fit a model", 0, Global.CadreMain);
}
}
......@@ -426,7 +426,7 @@ public class Cadre_ModeleDirect extends JFrame {
dlgSp.setVisible(true);
vPlot.add(dlgSp);
} else {
msg = new MsgDialogBox(0, "Please,in order to display these plots\n you have to fit a model", 0, Global.CadreMain);
msg = new MsgDialogBox(0, "In order to display these plots\n you have to fit a model", 0, Global.CadreMain);
}
}
......@@ -445,7 +445,7 @@ public class Cadre_ModeleDirect extends JFrame {
msg = new MsgDialogBox(0, "The model is not validated(bad jackknife test)\n You can't use it for prediction. ", 0, Global.CadreMain);
}
} else {
msg = new MsgDialogBox(0, "Please,in order to do prediction\n you have to fit a model.", 0, Global.CadreMain);
msg = new MsgDialogBox(0, "In order to do prediction\n you have to fit a model.", 0, Global.CadreMain);
}
}
......@@ -534,7 +534,7 @@ private void displayList(String[] liste) {
try {
MsgDialogBox msg;
if (jlstChoix.getSelectedIndex() == -1) {
msg = new MsgDialogBox(0, "Please, you have to select\n a model", 0, Global.CadreMain);
msg = new MsgDialogBox(0, "Please select a model", 0, Global.CadreMain);
return;
}
if (Global.CadreFittedPlots != null) {
......@@ -555,9 +555,9 @@ private void displayList(String[] liste) {
if (Global.CadreResultats != null) {
Global.CadreResultats.dispose();
}
Global.recruitment_age = 0;
Global.begin_influence_period = 0;
Global.end_influence_period = 0;
Global.recruitment_age = -1;
Global.begin_influence_period = -1;
Global.end_influence_period = -1;
Global.modelisationOk = false;
Global.nb_classes_exploitees = jcboExploitedYears.getSelectedIndex() + 1;
if (jcboRecrutement.isEnabled()) {
......@@ -565,19 +565,39 @@ private void displayList(String[] liste) {
Global.begin_influence_period = jcboBegining.getSelectedIndex();
Global.end_influence_period = jcboEnd.getSelectedIndex();
}
/***************************************************
Any change in age warnings here must be repeated
in the QuestionReponse.java file, cases 17, 52 & 58.
****************************************************
*/
//System.out.println("Global.recruitment_age: " + Global.recruitment_age + "Global.nb_classes_exploitees: " + Global.nb_classes_exploitees + " Global.begin_influence_period: " + Global.begin_influence_period + "Global.end_influence_period: " + Global.end_influence_period);
if (Global.nb_classes_exploitees > 5 && Global.nb_classes_exploitees < 9) {
msg = new MsgDialogBox(0, "WARNING! \nA stock with more than 5 significantly exploited year-classes is not ideal for applying \nsurplus production models that make use of the transition prediction approach (past-effort-averaging) of \nFox (1975). This method is used in CLIMPROD to fit data on non-equilibrium conditions. It simulates the \nequilibrium by using a weighted average of fishing effort (E). \nIf interanual variability of E is too large, the results are likely to be uncertain.", 0, Global.CadreMain);
// throw new OnError("WARNING! \nA stock with more than 5 significantly exploited year-classes is not ideal for applying \nsurplus production models that make use of the transition prediction approach (past-effort-averaging) of \nFox (1975). This method is used in CLIMPROD to fit data on non-equilibrium conditions. It simulates the \nequilibrium by using a weighted average of fishing effort (E). \nIf interanual variability of E is too large, the results are likely to be uncertain.");
}
if (Global.nb_classes_exploitees > 8) {
throw new OnError("WARNING! \nA stock with too many significantly exploited year-classes is not a situation compatible with the use of \nsurplus production models that make use of the transition prediction approach (past-effort-averaging) of \nFox (1975). This method is used in CLIMPROD to fit data on non-equilibrium conditions. It simulates the \nequilibrium by using a weighted average of fishing effort (E). \nIf interanual variability of E is too large, the results are likely to be uncertain.");
throw new OnError("A stock with too many significantly exploited year-classes is not a situation compatible with the use of \nsurplus production models that make use of the transition prediction approach (past-effort-averaging) \nofFox (1975). This method is used in CLIMPROD to fit data on non-equilibrium conditions. It simulate the \nequilibrium by using a weighted average of fishing effort (E). \nIt is recommanded to stop here your research or revise your selection of number(s) if necessary.");
}
if (Global.end_influence_period < Global.begin_influence_period) {
throw new OnError("Age at the end of environmental influence must be larger than or equal to \nage at the begining of environmental influence. \nPlease modify your selection(s)");
throw new OnError("Age at the end of environmental influence must be larger than or equal to \nage at the begining of environmental influence. \nPlease modify your selection of number(s)");
}
if (Global.begin_influence_period > (Global.recruitment_age + Global.nb_classes_exploitees)) {
throw new OnError("If the age at the begining of environmental influence occurs \nafter the age of the last exploited year class \n(that is age at recruitment + number of significantly exploited year classes - 1) \nthen there is no point in using a model incorporating an environmental variable. \nPlease modify your age selection(s)");
throw new OnError("If the age at the begining of environmental influence occurs \nafter the age of the last exploited year class \n(that is age at recruitment + number of significantly exploited year classes - 1) \nthen there is no point in using a model incorporating an environmental variable. \nPlease modify your selection of number(s)");
}
if (Global.end_influence_period > (Global.recruitment_age + Global.nb_classes_exploitees)) {
throw new OnError("If the age at the end of environmental influence occurs \nafter the age of the last exploited year class \n(that is age at recruitment + number of significantly exploited year classes - 1) \nthen only its influence on exploited year classes will be taken into account.");
if (Global.end_influence_period > (Global.recruitment_age + Global.nb_classes_exploitees - 1)) {
msg = new MsgDialogBox(0, "If the age at the end of environmental influence occurs \nafter the age of the last exploited year class \n(that is age at recruitment + number of significantly exploited year classes - 1) \nthen only its influence on exploited year classes will be taken into account.", 0, Global.CadreMain);
}
if (Global.recruitment_age >= 0 && Global.begin_influence_period >=0 && Global.end_influence_period < (Global.recruitment_age + Global.nb_classes_exploitees)){
if ((Global.end_influence_period - Global.begin_influence_period) >= 5){
throw new OnError ("WARNING! \nToo many year classes influenced by the environnement (V). \n\nOwing to a recruitment at age " + Global.recruitment_age + " and " + Global.nb_classes_exploitees + " exploited year classes, and the environmental influence beginning at age " + Global.begin_influence_period + " and ending at age " + Global.end_influence_period + ", \nresults in the need of averaging the environnement effect on " + (Global.end_influence_period - Global.begin_influence_period + 1) + " year classes.");
}
}
if (Global.recruitment_age >= 0 && Global.begin_influence_period >=0 && Global.end_influence_period >= (Global.recruitment_age + Global.nb_classes_exploitees)){
if ((Global.recruitment_age + Global.nb_classes_exploitees - Global.begin_influence_period) > 5) {
throw new OnError ("WARNING! \nToo many year classes influenced by the environnement (V). \n\nOwing to a recruitment at age " + Global.recruitment_age + " and " + Global.nb_classes_exploitees + " exploited year classes, and the environmental influence beginning at age " + Global.begin_influence_period + " and ending at age " + Global.end_influence_period + ", \nresults in the need of averaging the environnement effect on " + (Global.recruitment_age + Global.nb_classes_exploitees - Global.begin_influence_period) + " year classes.");
}
}
} catch (Exception ee) {
new MsgDialogBox(0, ee.getMessage(), 0, Global.CadreMain);
}
......@@ -591,26 +611,26 @@ private void displayList(String[] liste) {
nbFit++;
/* if(Global.nb_classes_exploitees==0)
{
msg=new MsgDialogBox(0,"Please, you have to give the number of significantly/n exploited year classes",0);
msg=new MsgDialogBox(0,"Please provide the number of significantly/n exploited year classes",0);
return;
}
*/
/*if(Global.recruitment_age==0)
{
msg=new MsgDialogBox(0,"Please, you have to give the age at/n recrutement",0);
msg=new MsgDialogBox(0,"Please provide the age at recrutement",0);
return;
}*/
/* if(Global.begin_influence_period==-1)
{
msg=new MsgDialogBox(0,"Please, you have to give the age age/n at the begining of environmental influence",0);
msg=new MsgDialogBox(0,"Please provide the age age at the begining of environmental influence",0);
return;
}*/
/*if(Global.end_influence_period==-1)
{
msg=new MsgDialogBox(0,"Please, you have to give the age age/n at the end of environmental influence",0);
msg=new MsgDialogBox(0,"Please provide the age age/n at the end of environmental influence",0);
return;
}*/
//popup.setBorderPainted(true);
......
......@@ -260,13 +260,6 @@ public class Data {
if (agerec < 1) {
agerec = 0;
}
if (agerec > 10) {
agerec = 10;
}
if (ending < begining) {
begining = ending;
}
double[][] t = new double[16][21];
int ageder;
double eps = 1.0E-12;
......@@ -292,8 +285,9 @@ public class Data {
}
ageder = agerec + nbexploit - 1;
dtot = 0;
//System.out.println(nbexploit+"****"+agerec+ "**********" +begining+"******"+ending+"********"+ageder);
//System.out.println(decalmax);
System.out.println("In Data.java ligne 298 nbexploit = " + nbexploit + "*** agerec = "+ agerec + "*** begining = " + begining + "****ending = "+ ending);
System.out.println("*** ageder =" + ageder + "decalmax = " + decalmax);
if (begining == -1) begining = 0;
for (int i = 0; i < nbexploit; i++) {
for (int d = begining; d <= ending; d++) {
t[i][d + i] = 1;
......
......@@ -15,7 +15,8 @@ import org.apache.commons.math3.special.Gamma;
public class Global {
static final String[] influenceEnv = {"", "abundance", "catchability", "both"};//probl�me du both
static JFrame CadreQuestion; //Une seule instance est permise pour l'instant
static JFrame CadreQuestion; //Une seule instance est permise pour l'instant
static JFrame Cadre_Question;
static JFrame CadreModeleDirect;
static JFrame CadreModele;
static JFrame CadreResultats;
......@@ -130,9 +131,9 @@ public class Global {
*/
//static int[] typePlot = {2, 2, 2, 2, 3, 3, 3, 3, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 2, 2,2,2,2,2};
//static Hashtable htPlot=new Hashtable();
static String[] titreG = {"E Time Plot", "V Time Plot", "Y Time Plot", "CPUE Time Plot", "E Distribution", "V Distribution", "Y Distribution", "CPUE Distribution", "Y vs E (unlagged)", "Y vs V (unlagged)", "CPUE vs E (unlagged)", "CPUE vs V (unlagged)", "CPUE versus E (E weighted if relevant)", "CPUE versus V (V lagged if relevant)","E versus V (unlagged)", "Observed and Fitted CPUE (lag effect if relevant)", "Time Plot of residual CPUE (lag effect if relevant)", "Residual CPUE versus E (E weighted if relevant)", "Residual CPUE versus V (V lagged and weighted if relevant)", "a (%) Time Plot (lag effect if relevant)", " b (%) Time Plot (lag effect if relevant)", "c (%) Time Plot (lag effect if relevant)", "d (%) Time Plot (lag effect if relevant)", "Plot R2 (% of %) Time Plot", "Function Y versus V & E (lagged if relevant)", "Function Y versus V & E (E weighted if relevant)", "Function CPUE versus V & E (E weighted if relevant)", "Function CPUE versus V & E (E weighted if relevant)", "MSY versus V", "MS-E versus V"};
static String[] titreG = {"E Time Plot", "V Time Plot", "Y Time Plot", "CPUE Time Plot", "E Distribution", "V Distribution", "Y Distribution", "CPUE Distribution", "Y vs E (unlagged)", "Y vs V (unlagged)", "CPUE vs E (unlagged)", "CPUE vs V (unlagged)", "CPUE versus E (E weighted if relevant)", "CPUE versus V (V lagged if relevant)","E versus V (unlagged)", "Observed and Fitted CPUE (lag effect if relevant)", "Time Plot of residual CPUE (lag effect if relevant)", "Residual CPUE versus E (E weighted if relevant)", "Residual CPUE versus V (V lagged and weighted if relevant)", "a (%) Time Plot (lag effect if relevant)", " b (%) Time Plot (lag effect if relevant)", "c (%) Time Plot (lag effect if relevant)", "d (%) Time Plot (lag effect if relevant)", "Plot R2 (% of %) Time Plot", "Function Y=f(V & E) (lagged if relevant)", "Function Y=f(V & E) (E weighted if relevant)", "Function CPUE=f(V & E)(E weighted if relevant)", "Function CPUE=f(V & E) (E weighted if relevant)", "MSY versus V", "MSE versus V"};
static String[] titreSx = {"Year", "Year", "Year", "Year", "Classes", "Classes", "Classes", "Classes", "Effort (E)", "Environment (V)", "Effort (E)", "Environment (V)", "Environment (V)", "Year", "Year", "Effort (E)", "Environment (V)", "Year", "Year", " Year", "Year", "Year", "Weighted effort (E)", "Weighted effort (E)", "Weighted effort (E)", " Weighted effort (E)", "Environment (V)", "Environment (V)"};
static String[] titreSy = {"Effort (E)", "Environment (V)", "Production (Y)", "CPUE ", "Nb", "Nb", "Nb", "Nb", "Production (Y)", "Production (Y)", "CPUE", "CPUE", "CPUE", "CPUE", " Residual", "Residual", "Residual", "a (%)", "b (%)", "c (%)", "d (%)", "R² (%)", "Production (Y)", "Production (Y)", "CPUE", "CPUE", "MSY", "MS-E"};
static String[] titreSy = {"Effort (E)", "Environment (V)", "Production (Y)", "CPUE ", "Nb", "Nb", "Nb", "Nb", "Production (Y)", "Production (Y)", "CPUE", "CPUE", "CPUE", "CPUE", " Residual", "Residual", "Residual", "a (%)", "b (%)", "c (%)", "d (%)", "R² (%)", "Production (Y)", "Production (Y)", "CPUE", "CPUE", "MSY", "MSE"};
static Plot[] timePlot = new Plot[4];
static PlotModal[] distriPlot = new PlotHisto[4];
......@@ -221,7 +222,7 @@ public class Global {
environmental_influence = ""; // Does the environment influence:
lifespan = -1; // What is the life span of the species
nb_classes_exploitees = -1;//1; // Number of significantly exploited year-classes
recruitment_age = 0;//0; // Age at recruitment
recruitment_age = -1;//0; // Age at recruitment
begin_influence_period = 0; // Age at the begining of environmental influence
end_influence_period = 0;//0; // Age at the end of environmental influence
......
......@@ -95,7 +95,7 @@ public class Modele {
r = 0;
}
if (r == 0){
message = "R2 is set to zero due to unexpected results in the variances (residual variance or total variance) computation. /This is possibly due to poor fitting by the Marquart algorithm.";
message = "R2 is set to zero due to unexpected results in the variances (residual variance or total variance) computation. This is possibly due to poor fitting by the Marquart algorithm.";
MsgDialogBox msg = new MsgDialogBox(0, message, 1, Global.CadreMain);
}
//System.out.println("Variance " + variance_pue);
......@@ -914,9 +914,15 @@ public class Modele {
pvs[0].setCouleur(Color.black);
pvs[1].setCouleur(Color.black);
Global.variatePlot[0].setValeurs(pvs[0]);
Global.variatePlot[0].setTitreGraphique("Function CPUE versus V&E (E weighted if relevant)"); // Trivariate plots. 2020
if ((Global.numero_modele == 0) || (Global.numero_modele ==1) || (Global.numero_modele ==6)) {
Global.variatePlot[0].setTitreGraphique("Function CPUE=f(E) (E weighted if relevant)");
}
else {Global.variatePlot[0].setTitreGraphique("Function CPUE=f(V & E) (E weighted if relevant)");} // Trivariate plots. 2020
Global.variatePlot[1].setValeurs(pvs[1]);
Global.variatePlot[1].setTitreGraphique("Function Y versus V&E (E weighted if relevant)"); // Trivariate plots. 2020
if ((Global.numero_modele == 0) || (Global.numero_modele ==1) || (Global.numero_modele ==6)) {
Global.variatePlot[1].setTitreGraphique("Function Y=f(E) (E weighted if relevant)"); // Trivariate plots. 2020
}
else {Global.variatePlot[1].setTitreGraphique("Function Y=f(V & E) (E weighted if relevant)");}
pvs[0].setFigure(2);
pvs[1].setFigure(2);
pvs[0].setMark(2);
......@@ -933,8 +939,14 @@ public class Modele {
pvs[3] = new PlotSerie("Weighted effort (E)", tabxx, "Vmini:" + df.format(yy).toString(), estim2);
pvs[2].setFigure(2);
pvs[3].setFigure(2);
if ((Global.numero_modele == 0) || (Global.numero_modele ==1) || (Global.numero_modele ==6)) {
pvs[2].setCouleur(Color.red);
pvs[3].setCouleur(Color.red);
}
else {
pvs[2].setCouleur(Color.blue);
pvs[3].setCouleur(Color.blue);
}
Global.variatePlot[0].setValeurs(pvs[2]);
Global.variatePlot[1].setValeurs(pvs[3]);
} else if (j == 4) {
......@@ -996,7 +1008,7 @@ public class Modele {
pvs[0].setFigure(2);
pvs[0].setMark(2);
Global.variatePlot[0].setValeurs(pvs[0]);
Global.variatePlot[0].setTitreGraphique("Function CPUE versus V lagged if relevant)");
Global.variatePlot[0].setTitreGraphique("Function CPUE=f(V) lagged if relevant)");
}
}
......
/**
* Titre : Climprod<p>
*
* Gestion de petite fenêtre de message d'erreur ou de warning
* (panneau stop rouge).
*/
package fr.ird.climprod;
......@@ -15,7 +16,7 @@ public class MsgDialogBox extends JFrame { //Pas g�nial du tout mais permet
private int reponse; //r�cup�rer l'icone climprod
public MsgDialogBox(int typeBoite, String message, int messageType, JFrame parent) {
// typeBoite: 0 avec bouton OK; 1 avec boutons Yes et No.
/*
GraphicsDevice gd = parent.getGraphicsConfiguration().getDevice();
int xscr = gd.getDisplayMode().getWidth();
......
......@@ -10,7 +10,6 @@ import java.util.Vector;
import java.io.InputStream;
public class QuestionReponse {
private static int nbData = 0;
private static int[] rTrue;
private static int[] rFalse;
......@@ -36,7 +35,7 @@ public class QuestionReponse {
Assure la lecture du fichier des questions et initialise l'ensemble des variables de l'arbre de décision.
@param un String repr�sentant le nom "compl�t" du fichier Arbre_decisions.cvs.
*/
public static void initScript(InputStream file) // public static void initScript(String file)
public static void initScript(InputStream file) // Lecture fichier Arbre_decisions.csv. Comment 2020
{
try {
......@@ -220,6 +219,7 @@ public class QuestionReponse {
@param int index which represents the selected answer item number to the question
*/
public static void setReponse(int index, String reptxt, String questxt, String commentTxt) {
MsgDialogBox msg; // Addition 2020.
selectedItem[indexEnCours] = index;
index = index + 1;
System.out.println("Answer to rule " + regle[indexEnCours] + " given to question " + numEnCours + " is " + index);
......@@ -279,10 +279,12 @@ public class QuestionReponse {
break;
case 17:
Global.nb_classes_exploitees = index;
if (Global.nb_classes_exploitees > 8) {
throw new OnError("A stock with too many significantly exploited year-classes is not a situation compatible with the use of \nsurplus production models that make use of the transition prediction approach (past-effort-averaging) of Fox (1975). \n this method is used in CLIMPROD to fit data on non-equilibrium conditions. It simulate the equilibrium by using a weighted average of fishing effort (E). \nIf interanual variability of E is too large, the results are likely to be uncertain.");
}
Data.init_val();//Pour obtenir la relation en fct du d�calage
if (Global.nb_classes_exploitees > 5 && Global.nb_classes_exploitees < 9) {
throw new OnError("WARNING! \nA stock with more than 5 significantly exploited year-classes is not ideal for applying \nsurplus production models that make use of the transition prediction approach (past-effort-averaging) of \nFox (1975). This method is used in CLIMPROD to fit data on non-equilibrium conditions. It simulates the \nequilibrium by using a weighted average of fishing effort (E). \nIf interanual variability of E is too large, the results are likely to be uncertain. \nYou can still continue by clickin on the Next(N) button.");
}
if (Global.nb_classes_exploitees > 8) {
throw new OnError("WARNING! \nA stock with too many significantly exploited year-classes is not a situation compatible with the use of \nsurplus production models that make use of the transition prediction approach (past-effort-averaging) \nofFox (1975). This method is used in CLIMPROD to fit data on non-equilibrium conditions. It simulate the \nequilibrium by using a weighted average of fishing effort (E). \nIt is recommanded to stop here your research or revise your answer if necessary.");
} Data.init_val();//Pour obtenir la relation en fct du d�calage
break;
case 18:
Global.relationCPU_E = 0; //Initialisations pour prendre
......@@ -374,15 +376,6 @@ public class QuestionReponse {
Global.relationCPU_V = RechercheModele.lineaire;
}
break;
/* case 50:
Global.linear_relationship = index;
if (index == 1) {
Global.relationCPU_V = RechercheModele.lineaire;
}
else
throw new OnError(\n(that is age at recruitment + number of significantly exploited year classes - 1) \nthen there is no point in using a model incorporating an environmental variable. \nPlease modify your age selection(s)");
break;
*/
case 49:
case 60:
Global.monotonic_relationship = index;
......@@ -399,20 +392,36 @@ public class QuestionReponse {
break;
case 52:
case 57:
/************************************************
Any change in age warnings cases 52 & 58 must be
repeated in the Cadre_ModeleDirect.java file,
line 574.
*************************************************
*/
Global.begin_influence_period = index - 1;
if (Global.begin_influence_period > (Global.recruitment_age + Global.nb_classes_exploitees)) {
throw new OnError("If the age at the begining of environmental influence occurs \nafter the age of the last exploited year class \n(that is age at recruitment + number of significantly exploited year classes - 1) \nthen there is no point in using a model incorporating an environmental variable. \nPlease modify your age selection(s)");
if (Global.begin_influence_period >= (Global.recruitment_age + Global.nb_classes_exploitees)) {
throw new OnError("If the age at the begining of environmental influence occurs \nafter the age of the last exploited year class \n(that is age at recruitment + number of significantly exploited year classes - 1) \nthen there is no point in using a model incorporating an environmental variable. \nPlease use the 'Previous' button to modify your answer(s)");
}
break;
case 53:
case 58:
Global.end_influence_period = index - 1;
if (Global.end_influence_period < Global.begin_influence_period) {
throw new OnError("Age at the end of environmental influence must be larger than or equal to \nage at the begining of environmental influence. \nPlease use the 'Previous' button to modify your answer(s)");
}
if (Global.end_influence_period > (Global.recruitment_age + Global.nb_classes_exploitees)) {
throw new OnError("If the age at the end of environmental influence occurs \nafter the age of the last exploited year class \n(that is age at recruitment + number of significantly exploited year classes - 1) \nthen only its influence on exploited year classes will be taken into account.");
}
throw new OnError("Age at the end of environmental influence must be larger than or equal to \nage at the begining of environmental influence. \nPlease modify your answer(s), using the 'Previous' button when necessary.");
}
if (Global.end_influence_period > (Global.recruitment_age + Global.nb_classes_exploitees - 1)) {
msg = new MsgDialogBox(0, "If the age at the end of environmental influence occurs \nafter the age of the last exploited year class \n(that is age at recruitment + number of significantly exploited year classes - 1) \nthen only its influence on exploited year classes will be taken into account. \nYou can still continue by clickin on the Next(N) button.", 0, Global.Cadre_Question);
}
if (Global.recruitment_age >= 0 && Global.begin_influence_period >=0 && Global.end_influence_period < (Global.recruitment_age + Global.nb_classes_exploitees)){
if ((Global.end_influence_period - Global.begin_influence_period) >= 5){
throw new OnError ("WARNING! \nToo many year classes influenced by the environnement (V). \n\nOwing to a recruitment at age " + Global.recruitment_age + " and " + Global.nb_classes_exploitees + " exploited year classes, and the environmental influence beginning at age " + Global.begin_influence_period + " and ending at age " + Global.end_influence_period + ", \nresults in the need of averaging the environnement effect on " + (Global.end_influence_period - Global.begin_influence_period + 1) + " year classes." + "\nYou can still continue by clickin on the Next(N) button.");
}
}
if (Global.recruitment_age >= 0 && Global.begin_influence_period >=0 && Global.end_influence_period >= (Global.recruitment_age + Global.nb_classes_exploitees)){
if ((Global.recruitment_age + Global.nb_classes_exploitees - Global.begin_influence_period) > 5) {
throw new OnError ("WARNING! \nToo many year classes influenced by the environnement (V). \n\nOwing to a recruitment at age " + Global.recruitment_age + " and " + Global.nb_classes_exploitees + " exploited year classes, and the environmental influence beginning at age " + Global.begin_influence_period + " and ending at age " + Global.end_influence_period + ", \nresults in the need of averaging the environnement effect on " + (Global.recruitment_age + Global.nb_classes_exploitees - Global.begin_influence_period) + " year classes." + "\nYou can still continue by clickin on the Next(N) button.");
}
}
Data.init_val();
break;
case 95:
......
......@@ -800,7 +800,7 @@ public class RapportHtml extends JDialog {
JCheckBox[] chkInclude = new JCheckBox[12];
String[] caption = {"Current known facts", "Data & statistical tables",
"Time plots", "Bivariate plots", "Observed-Fitted & Residual CPUE plots",
"Res f(E) vs V or Res f(V) vs E", "Jackknife plots", "Three-variate plots",
"Res f(E) vs V or Res f(V) vs E", "Jackknife plots", "CPUE=f() & Y=() plots",
"MSY & MS-E plots", "Modelization: Detailed results",
"Validation : Detailed results", "Questions, answers & warnings"};
......
......@@ -400,7 +400,7 @@ public static void valide_modele()
// System.out.println();
}
/*******Calcul des valeurs thoriques en fonction de V observ**********/
/*******Calcul des valeurs théoriques en fonction de V observé**********/
/******** Modification du 20/10/96*******************/
for(iv=0;iv<4;iv++){
......@@ -588,7 +588,7 @@ if(((Global.numero_modele > 5) || (Global.numero_modele < 2)) && (Global.numero_
Global.msyPlot[1].setValeurs(pms[4]);
Global.msyPlot[1].setValeurs(pms[5]);
Global.msyPlot[0].setTitreGraphique("MS-E versus V");
Global.msyPlot[0].setTitreGraphique("MSE versus V");
Global.msyPlot[1].setTitreGraphique("MSY versus V");
for(int i=0;i<2;i++)
{
......@@ -629,7 +629,7 @@ if(((Global.numero_modele > 5) || (Global.numero_modele < 2)) && (Global.numero_
public static Object[][] getMS_EResult(){
if(!Global.validationOk) return null;
Object[][] data$=new String[5][4];
String[] title$={"Remarquables values","MS_E Lower limit 95%","MS_E Central Value ","MS_E Upper limit 95%"};
String[] title$={"Noteworthy V values","MSE Lower limit 95%","MSE Central Value ","MSE Upper limit 95%"};
//String[] limitMS_V={"MS_V Lower limit 95%","MS_V Central Value ","MS_V Upper limit 95%"};
String[] stat$={" Mean: "," Median: ","Minimum: ","Maximum: "};
DecimalFormat nf= new DecimalFormat(" 0.00;-0.00");
......@@ -658,7 +658,7 @@ return data$;
public static Object[][] getMS_YResult(){
if(!Global.validationOk) return null;
Object[][] data$=new String[5][4];
String[] title$={"Remarquables values","MS_Y Lower limit 95%","MS_Y Central Value ","MS_Y Upper limit 95%"};
String[] title$={"Noteworthy V values","MSY Lower limit 95%","MSY Central Value ","MSY Upper limit 95%"};
String[] stat$={" Mean: "," Median: ","Minimum: ","Maximum: "};
DecimalFormat nf= new DecimalFormat(" 0.00;-0.00");
......@@ -680,7 +680,7 @@ return data$;
}
/*
Donne le dtails des rsultats sur les paramtres du modle suite la validation
Donne le détails des résultats sur les paramètres du modèle suite à la validation
@return un tableau Object ou null si validation non Ok
*/
public static Object[][] getParamResult(){
......
......@@ -14,12 +14,11 @@ the CPUE according to fluctuations of V.
Owing to the additive combination mentioned above, in some instances the
model having the best fit can show an abnormal behaviour: when the
fishing effort E increases, the resulting production (Y = CPUE * E) may
increase exponentialy. In such a case, the solution is to use a regression
under constraint on parameter b (option not available in this CLIMPROD
version) or to use one of the following multiplicative models:
increase exponentialy and MSY & MSE values tend to infinity (plot not available).
CPUE = a V exp(b E) or CPUE = (a + b V) exp(c E).
In such a case, the solution is to use a regression under constraint on
parameter b (option not available in this CLIMPROD version) or to use
one of the following multiplicative models:
CPUE = a V exp(b E) or CPUE = (a + b V) exp(c E).

\ No newline at end of file
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