hello une aide ? merci Stephanie 1. ERROR in C:\Users\smahevas\C-ISISFish\isis-fish-4\isis-temp\tmp-20221201094535-853357926\checkPopulationReproductionEquation10797508798142475965Equation.java (at line 52) case 5,6,7,8,9,10,11,12,13,14 : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Multi-constant case labels supported from Java 14 onwards only avec java version "17.0.2" 2022-01-18 LTS Java(TM) SE Runtime Environment (build 17.0.2+8-LTS-86) Java HotSpot(TM) 64-Bit Server VM (build 17.0.2+8-LTS-86, mixed mode, sharing) et le script reproduction complet : double Ktemp = context.getValueAndCompute("nephrops.reproductionEquation.Ktemp", 1); int Kint = (int)Ktemp; TimeStep step = context.getSimulationControl().getStep(); int y = step.getYear(); MatrixND Biom = context.getResultManager().getMatrix(step,pop,"matrixBiomass"); for (MatrixIterator i=Biom.iterator(); i.hasNext();) { i.next(); Object [] sems = i.getSemanticsCoordinates(); PopulationGroup group = (PopulationGroup)sems[0]; i.setValue(i.getValue()* group.getMaturityOgive()); } MatrixND prop = Biom.sumOverDim(0).reduceDims(0); double ssb = Biom.sumAll(); prop = prop.divs(ssb); double Rtot=0.0; switch(Kint){ case 1 : // Beverton & Holt double abv = 1; double bbv = 1; Rtot = abv*ssb/(bbv+ssb); break; case 2 : // a*ssb*exp(-b*ssb) - Ricker double ar=0.5; double br=0.005; Rtot = ar*ssb*Math.exp(-br*ssb); break; case 3 : // Hockey Stick double ahs=10; double ssbt = 7.3E7 ; if (ssb < ssbt) {Rtot = ahs*ssb;} else {Rtot = ahs*ssbt;} break; case 4 : // repro fecondite double compt=0; for (Zone zone : zoneRepro){ compt=0; for (PopulationGroup group : groups){ double cf = Ktemp * group.getReproductionRate(); compt += N.getValue(group, zone) * cf; } result.setValue(zone, compt*prepro); } break; case 5,6,7,8,9,10,11,12,13,14 : // aleatoire unif[min-max] double [][] matrixR = {{0.11178995, 0.95123978, 0.05388496, 0.30427033, 0.88097277}, {0.61318827, 0.86325772, 0.59521774, 0.97951352, 0.39522985}, {0.84762444, 0.81945931, 0.17035498, 0.98107093, 0.30626818}, {0.73545519, 0.52408773, 0.56679328, 0.90386484, 0.94130219}, {0.84378708, 0.14061830, 0.23156422, 0.71417364, 0.54878101}, {0.64332233, 0.01433846, 0.22262234, 0.65167476, 0.22910183}, {0.06130198, 0.40996938, 0.97397125, 0.69185333, 0.29951089}, {0.67789114, 0.43629884, 0.52475169, 0.14057724, 0.98577644}, {0.90164408, 0.68106970, 0.85784589, 0.20025039, 0.97989699}, {0.54700931, 0.07277969, 0.04077778, 0.37232379, 0.95016336} }; double ssbtmin = 7.3E7; double ssbtmax = 9.0E7; Rtot = matrixR[Kint][y]*(ssbtmax-ssbtmin)+ssbtmin; break; } // fin du switch if (Kint!=4) { for(Zone zone:zoneRepro){ double propZone=prop.getValue(zone); result.setValue(zone,propZone*Rtot); } } return 0; -- ...................................................................... Stephanie MAHEVAS UMR DECOD (Dynamique et durabilité des écosystèmes : de la source à l'océan) IFREMER/HALGO/EMH (Ecologie et Modèles pour l'Halieutique) https://annuaire.ifremer.fr/cv/16343/ Tel: (33) 2 40 37 41 81 - 06 75 83 59 33 o \ o / _ o __| \ / |__ o _ \ o / o /|\ | /\ ___\o \o | o/ o/__ /\ | /|\ / \ / \ | \ /) | ( \ /o\ / ) | (\ / | / \ / \ ......................................................................