Commit 3f8e66df authored by pfreon's avatar pfreon
Browse files

Minor changes in time plots X labels & cosmetic changes

Changes in time plots X labels according to the length of the dataset.
Cosmetic changes in the decision tree (Arbre_decision.csv),  comment.csv & rules (regles.csv) texts with removal of unecessary spaces in the later file.
Cosmetic changes in the messages of the Validation.java file.
parent 12ffa7ba
......@@ -60,7 +60,7 @@ public class Data {
for (int i = 1; i < dataLine.length; i++) {
StringTokenizer d = new StringTokenizer(dataLine[i], ";");
if (d.countTokens() != 4) {
throw new OnError("Invalid data file (incorrect number of data in line " + i + ".");
throw new OnError("Invalid data file (incorrect number of data in line " + i + ").");
}
int k = 0;
while (d.hasMoreTokens()) {
......@@ -370,6 +370,8 @@ public class Data {
ps[1] = new PlotSerie("x", Data.year, "y", Data.pue);
ps[2] = new PlotSerie("x", Data.year, "y", Data.f);
ps[3] = new PlotSerie("x", Data.year, "y", Data.v);
double RangeYear=Global.RangeYear();
System.out.println("RangeYear = " + RangeYear);
for (int i = 0; i < 4; i++) {
Global.timePlot[i] = new Plot();
ps[i].setFigure(2);
......@@ -379,7 +381,10 @@ public class Data {
Global.timePlot[i].setTitreY(Global.titreSy[i]);
Global.timePlot[i].setDecimalsurX(0); // Years
Global.timePlot[i].setMinAxeX(minx - 1);
Global.timePlot[i].setpasX(3.0d);
if (RangeYear < 20) Global.timePlot[i].setpasX(1.0d);
else if (RangeYear < 30) Global.timePlot[i].setpasX(2.0d);
else if (RangeYear < 45) Global.timePlot[i].setpasX(3.0d);
else Global.timePlot[i].setpasX(4.0d);
//System.out.println("timePlot i=" + i + " Data.stat[8][i] = " + Data.stat[8][i]);
if (Data.stat[8][i] > 100) Global.timePlot[i].setDecimalsurY(0);
else Global.timePlot[i].setDecimalsurY(2);
......@@ -504,14 +509,14 @@ public class Data {
stat[9][j] = ext[1];
}
try {
if (stat[7][1]<1) {throw new OnError("All of your CPUE data is < 1. \nPlease change you unit(s) for catches and/or fishing effort.");}
if (stat[7][1]<1) {throw new OnError("All of your CPUE data is < 1. \nPlease change you unit(s) for catches and/or fishing effort.\nThis will facilitate the readability of your results.");}
}
catch (Exception e) {
nbData = 0;
MsgDialogBox msg = new MsgDialogBox(0, e.getMessage(), 0, Global.CadreMain);
}
try {
if (stat[6][0]<0 || stat[6][2]<0 ) {throw new OnError("Invalid data file. \nAll catches and effort data must be > O.");}
if (stat[6][0]<0 || stat[6][2]<0 ) {throw new OnError("Invalid data file. \nAll catches and effort data must be > 0.");}
}
catch (Exception e) {
nbData = 0;
......
......@@ -456,6 +456,7 @@ public static void valide_modele()
Global.message$[10] = "Warning: \nAt least one of the central values of MSE is negative for\nall noteworthy V values which suggest an unrealistic shape \nof MSY vs V and/or MSE vs V. For more details please open \nthe menu 'Modelization' and click on 'Display result tables'\nand on the tab 'Validation'.\nThe graphs MSY vs V and MSY vs V are not shown.\n\n" ;
Global.MSY_MSE_OK=false;
}
//System.out.println("Ligne 459 Validation Global.MSY_MSE_OK = " + Global.MSY_MSE_OK);
//System.out.println(" iv = " + iv + " f_ms_m2[iv] = " + f_ms_m2[iv] + "f_ms_m2[iv] > 1.0E10 || f_ms_m2[iv] < 0"); ";
vec_f_min2[iv] = f_ms_m2[iv] - 1.96 * f_ms_s2[iv];
......@@ -481,9 +482,9 @@ public static void valide_modele()
Global.message$[9] = "Please note that the width of the 95% confidence interval of MSE \ncentral values for at least one of the noteworthy V values is larger \nthan the corresponding MSE value. \nDetails available in the result table (tab 'Validation').\n\n";
//System.out.println("iv = " + iv + " Val MSY interv. 95% = " + (vec_y_max2[iv] - y_ms_m2[iv]) + " Val central MSY = " + y_ms_m2[iv]);
if(y_ms_m2[iv] > (Data.stat[7][0] * 10))
Global.message$[11] = "Please note that some MSY central values for at least\none of the noteworthy V values are 10 times larger\nthan the maximum observed catch value, which is unexpected\nfor a stock that underwent optimal and/or overexploitation.\n\n";
Global.message$[11] = "Please note that some MSY central values for at least\none of the noteworthy V values are 10 times larger\nthan the maximum observed catch value, which is unexpected\nif the stock underwent optimal and/or overexploitation.\n\n";
if(f_ms_m2[iv] > (Data.stat[7][2] * 5))
Global.message$[12] = "Please note that some MSE central values for at least\none of the noteworthy V values are 5 times larger \nthan the maximum observed fishing effort value, which is \nunexpected for a stock that underwent optimal and/or \noverexploitation.\n\n";
Global.message$[12] = "Please note that some MSE central values for at least\none of the noteworthy V values are 5 times larger \nthan the maximum observed fishing effort value, which is \nunexpected if the stock underwent optimal and/or \noverexploitation.\n\n";
}
//System.out.println("y_ms_m2[0] = " + y_ms_m2[0] + " f_ms_m2[1] = " + f_ms_m2[1] + " f_ms_m2[2] = " + f_ms_m2[2] + " f_ms_m2[3] = " + f_ms_m2[3]);
//saveResult();
......@@ -510,10 +511,11 @@ public static void valide_modele()
Global.MSY_MSE_OK=true;
makePlotMSE_MSY();
}
else {
Global.msyPlot[0]=new Plot(); // [0] MS-E versus V; & [1] MSY versus V. 2020.
else {
Global.msyPlot[0]=new Plot(); // [0] MS-E versus V; & [1] MSY versus V. 2020.
Global.msyPlot[1]=new Plot();
}
//System.out.println("Ligne 514 Validation Global.MSY_MSE_OK = " + Global.MSY_MSE_OK);
}
public static Object[][] getParamResult(){
......
......@@ -9,7 +9,7 @@
6;7;-1;46;1;metapopulation;Does the data-set applies to a metapopulation?; metapopulation.hlp ;;;;;;;;;;;
7;9;-1;45;1;sous_stock_isole;Does the data applies to the full metapopulation or at least to only one of its sub-stock with limited connectivity?; isostock.hlp ;;;;;;;;;;;
8;9;-1;34;1;;;;;;;;;;;;;;
9;11;10;35;1;under_and_over_exploited;Do you think that the data-set covers periods of both overexploitation and of underexploitation?; undover.hlp ;;;;;;;;;;;
9;11;10;35;1;under_and_over_exploited;Do you think that the data-set covers periods of both underexploitation and overexploitation?; undover.hlp ;;;;;;;;;;;
10;11;-1;49;1;under_and_optimaly;Do you think that the data-set cover periods of both underexploitation and optimal exploitation?; undopt.hlp ;;;;;;;;;;;
11;12;12;37;1;statistiques_anormales;Do you see any abnormal statistics in the statistical data table? (See the second table in the Climprod frame); abnormal.hlp ;;;;;;;;;;;
12;13;13;36;1;unstability;Is the interannual variability too large?; unstabil.hlp ;;;;;;;;;;;
......@@ -102,7 +102,7 @@
95;96;-4;0;2;good_results;Is this an acceptable model?; acceptab.hlp ;;;;;;;;;;;
96;97;-4;15;3;trend_residuals;Are there a good fit and no trend or strong autocorrelation in residuals?; fitresid.hlp ;;;;;;;;;;;
97;98;-4;1;3;coeff_determination_instable;Do you validate the model from the graphical and statistical results that appear in the Jackknife plots window (p values of t-ratios of the parameters, R2 values, p value of F)? (See help file for suggestions); valide.hlp ;;;;;;;;;;;
98;99;100;58;3;;;;;;;;;;;;;;
98;100;99;58;3;;;;;;;;;;;;;;
99;100;-4;55;3;acceptable_graphs;Are the shapes, maximum values and confidence intervals of the MSY and MSE graphs acceptable?; MSY_MSE_GRAPHS.hlp;;;;;;;;;;;
100;-5;-5;3;3;;;;;;;;;;;;;;
101;-2;45;54;2;;;;;;;;;;;;;;
......@@ -15,4 +15,4 @@
49;Model results would be inappropriate for stock assessment ;owing to the low range of exploitation levels.;Sorry, I stop the model selection routine here.
50;Maximum sustainable yield(s) will be overestimated owing to the dynamics of exploitation: ;when the effort is constantly increasing, the equilibrium state is not respected, ;and owing to the past-effort-averaging method which was retained in ;transitional state cases MSY is overestimaded (see Appendix B of the manual for discussion).
57;There is no available model fully appropriate to your case. ;This is due to your positive answer to the question: 'May the stock ;present large fluctuations in CPUE when overexploited?' and ;to your negative answer regarding the linearity of the relationship between residual CPUE ;and environment.
58;There is no possibility of drawing MSY and MS-E graphs for this particular model. Please continue.
\ No newline at end of file
58;MSY and MS-E graphs do not make sense for this model where CPUE=f(V). Please continue.
\ No newline at end of file
This diff is collapsed.
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