Commit d296ad38 authored by patrick.lambert's avatar patrick.lambert
Browse files

add @ to depcrecated classes

parent 74b8e7a0
......@@ -32,12 +32,6 @@ public abstract class BasinNetwork extends Environment<Basin, DiadromousFish> {
public abstract Basin getAssociatedRiverBasin(Basin basin);
public abstract Basin getAssociatedInshoreBasin(Basin basin);
public abstract Basin getAssociatedOffshoreBasin(Basin basin);
public abstract Map<Basin, Double> getNeighboursWithDistance(Basin basin);
......@@ -47,15 +41,9 @@ public abstract class BasinNetwork extends Environment<Basin, DiadromousFish> {
public abstract RiverBasin getRiverBasin(String basinName);
public abstract InshoreBasin getInshoreBasin(String riverBasinName);
public abstract RiverBasin[] getRiverBasins();
public abstract InshoreBasin[] getInshoreBasins();
public abstract String[] getRiverBasinNames();
......
......@@ -14,6 +14,7 @@ import environment.OffshoreBasin.OffshoreBasinFunction;
import fr.cemagref.simaqualife.kernel.util.TransientParameters.InitTransientParameters;
import fr.cemagref.simaqualife.pilot.Pilot;
@Deprecated
public class BasinNetworkWithnBasins extends GridBasinNetwork {
private String basinNetworkFileName = "data/input/BasinNetwork.csv";
......
......@@ -6,12 +6,11 @@ import java.util.Map;
import java.util.TreeMap;
import fr.cemagref.simaqualife.kernel.AquaNismsGroup;
import fr.cemagref.simaqualife.kernel.spatial.Environment;
import fr.cemagref.simaqualife.kernel.util.TransientParameters.InitTransientParameters;
import fr.cemagref.simaqualife.pilot.Pilot;
import species.DiadromousFish;
public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish> {
public abstract class GridBasinNetwork extends BasinNetwork {
protected int nbBasin;
protected int memorySize; // size of all the queues
......@@ -28,6 +27,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
protected transient Time time;
@Override
@InitTransientParameters
public void initTransientParameters(Pilot pilot) {
time = new Time();
......@@ -49,6 +49,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public Basin getAssociatedRiverBasin(Basin basin) {
int i = getRow(basin.getId());
return (grid[getId(i, 0)]);
......@@ -87,6 +88,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public Map<Basin, Double> getNeighboursWithDistance(Basin basin) {
int j = getColumn(basin.getId());
if (j == 0) // that means for a river basin
......@@ -111,11 +113,13 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public Basin[] getBasins() {
return grid;
}
@Override
public RiverBasin getRiverBasin(String basinName) {
RiverBasin basin = null;
for (int i = 0; i < nbBasin; i++) {
......@@ -141,6 +145,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public RiverBasin[] getRiverBasins() {
RiverBasin[] riverGrid = new RiverBasin[nbBasin];
......@@ -163,6 +168,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public String[] getRiverBasinNames() {
RiverBasin[] riverBasins = getRiverBasins();
String[] names = new String[riverBasins.length];
......@@ -173,6 +179,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public int[] getFinalStates() {
// TODO ask to Nicolas to be able to use ReflectUtils with arguments
......@@ -193,6 +200,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public int[] getFinalStatesWithStochasticity() {
// TODO ask to Nicolas to be able to use ReflectUtils with arguments
......@@ -213,6 +221,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public int[] getFinalStatesForKappa() {
// TODO ask to Nicolas to be able to use ReflectUtils with arguments
......@@ -230,6 +239,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public double[] getMeanLastRecruitments() {
RiverBasin[] riverBasins = getRiverBasins();
double[] data = new double[riverBasins.length];
......@@ -240,6 +250,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public double[] getProbOfNonNulRecruitmentDuringLastYears() {
RiverBasin[] riverBasins = getRiverBasins();
double[] data = new double[riverBasins.length];
......@@ -258,6 +269,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public double[] getFinalProbabilityOfPresence() { // function computed for obtain probability of presence in 2100
// for the allis shad case study
RiverBasin[] riverBasins = getRiverBasins();
......@@ -270,6 +282,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public double getMeanLastRecruitmentsBV2() {
RiverBasin[] riverBasins = getRiverBasins();
double data = riverBasins[1].getLastRecruitments().getMean();
......@@ -277,6 +290,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public double[] getMeanLastRecruitmentExpectations() {
RiverBasin[] riverBasins = getRiverBasins();
double[] data = new double[riverBasins.length];
......@@ -287,6 +301,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public double[] getGeoMeansLastRecsOverProdCaps() {
// TODO ask to Nicolas to be able to use ReflectUtils with arguments
......@@ -299,6 +314,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public double[] getMeanLastPercOfAut() { // give the mean of the last % of autochtone spawners
RiverBasin[] riverBasins = getRiverBasins();
double[] data = new double[riverBasins.length];
......@@ -309,6 +325,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public long[] getYearsOfFirstNonNulRep() {
RiverBasin[] riverBasins = getRiverBasins();
long[] data = new long[riverBasins.length];
......@@ -319,6 +336,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public long[] getYearsOfLastNulRep() {
RiverBasin[] riverBasins = getRiverBasins();
long[] data = new long[riverBasins.length];
......@@ -332,6 +350,7 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
/**
* @return the yearOfTheBegin
*/
@Override
public long getYearOfTheBegin() {
return yearOfTheBegin;
}
......@@ -355,15 +374,18 @@ public abstract class GridBasinNetwork extends Environment<Basin, DiadromousFish
}
@Override
public abstract Map<String, Double[]> getTemperaturesBasin(long year);
@Override
public abstract String getTemperatureCatchmentFile();
/**
* @return the time
*/
@Override
public Time getTime() {
return time;
......
......@@ -85,7 +85,6 @@ public abstract class RIOBasinNetwork extends BasinNetwork {
}
@Override
public InshoreBasin[] getInshoreBasins() {
return inshoreBasins;
}
......@@ -106,7 +105,6 @@ public abstract class RIOBasinNetwork extends BasinNetwork {
}
@Override
@Deprecated
public Basin getAssociatedOffshoreBasin(Basin basin) {
Basin associatedBasin = null;
......@@ -180,7 +178,6 @@ public abstract class RIOBasinNetwork extends BasinNetwork {
}
@Override
public InshoreBasin getInshoreBasin(String basinName) {
InshoreBasin basin = null;
for (InshoreBasin inshoreBasin : inshoreBasins) {
......
......@@ -600,12 +600,4 @@ public class RIOBasinNetworkWithContinent extends RIOBasinNetwork {
public Map<String, Path2D.Double> getMapContinent() {
return mapContinent;
}
@Override
@Deprecated
public Basin getAssociatedInshoreBasin(Basin basin) {
// TODO Auto-generated method stub
return null;
}
}
......@@ -17,6 +17,7 @@ import fr.cemagref.simaqualife.kernel.processes.AquaNismsGroupProcess;
import miscellaneous.BinomialForSuperIndividualGen;
@ServiceProvider(service = AquaNismsGroupProcess.class)
@Deprecated
public class DisperseAndMigrateToRiver extends DisperseAndMigrateToRiverBasic {
private double pHoming = 0.5;
......
......@@ -23,6 +23,7 @@ import fr.cemagref.simaqualife.kernel.util.TransientParameters.InitTransientPara
import fr.cemagref.simaqualife.pilot.Pilot;
import miscellaneous.BinomialForSuperIndividualGen;
@Deprecated
@ServiceProvider(service = AquaNismsGroupProcess.class)
public class DisperseAndMigrateToRiverStandardization extends AquaNismsGroupProcess<DiadromousFish, DiadromousFishGroup> {
......@@ -129,7 +130,7 @@ public class DisperseAndMigrateToRiverStandardization extends AquaNismsGroupProc
// distance from departure basin to destination basin
Map<RiverBasin, Double> distanceBasinFromDeparture = basinDistancesPerBasin.get(departure);
RiverBasin homingDestination = (RiverBasin) bn.getAssociatedRiverBasin(departure);
RiverBasin homingDestination = bn.getAssociatedRiverBasin(departure);
ListIterator<DiadromousFish> fishIterator = departure.getFishs(group).listIterator();
while (fishIterator.hasNext()) {
......
......@@ -14,6 +14,7 @@ import com.thoughtworks.xstream.io.xml.DomDriver;
import fr.cemagref.simaqualife.kernel.processes.AquaNismsGroupProcess;
@Deprecated
public class WriteNutrientExportFluxes extends AquaNismsGroupProcess<DiadromousFish, DiadromousFishGroup> {
private String fileName = "nutrientExportFluxes";
......
......@@ -14,6 +14,7 @@ import com.thoughtworks.xstream.io.xml.DomDriver;
import fr.cemagref.simaqualife.kernel.processes.AquaNismsGroupProcess;
@Deprecated
public class WriteNutrientImportFluxes extends AquaNismsGroupProcess<DiadromousFish, DiadromousFishGroup> {
private String fileName = "fluxes";
......
Markdown is supported
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