An error occurred while loading the file. Please try again.
-
guillaume.garbay authoredc5ea7333
package pikelake.pikes;
import fr.cemagref.simaqualife.kernel.AquaNismsGroup;
import fr.cemagref.simaqualife.kernel.processes.LoopAquaNismsGroupProcess;
public class PikeGrowthProcess extends LoopAquaNismsGroupProcess<Pike,AquaNismsGroup<Pike,?>> {
/**
* <code>convertionFactor</code> proportion of the ingested food transformed into pike weight
*/
private double convertionFactor = 0.25;
private double slimRate = 0.90;
@Override
protected void doProcess(Pike pike, AquaNismsGroup<Pike, ?> group) {
pike.incAge();
//System.out.print(" "+ (double) pike.getAge()/12. +"y "+pike.getWeight()+ " " );
pike.setWeight( pike.getWeight() * slimRate + pike.getIngestedFood()* convertionFactor);
//System.out.print(pike.getIngestedFood() +" " + pike.getWeight());
//double ratio = 12* pike.getWeight()/(pike.getAge()+12);
//System.out.println("("+ ((double) Math.round(ratio*100))/100 +")");
pike.setIngestedFood(0.0);
}
}