Commit 4bac0727 authored by patrick.lambert's avatar patrick.lambert
Browse files

growt with a temperature effect

parent 97625378
......@@ -234,10 +234,12 @@
</species.Age>
<species.Grow>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<tempMinGrow>1.7</tempMinGrow>
<tempMaxGrow>27.9</tempMaxGrow>
<tempOptGrow>13.37</tempOptGrow>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<temperatureEffectGrow class="temperatureEffect.Rosso">
<Tmin>1.7</Tmin>
<Topt>13.37</Topt>
<Tmax>27.9</Tmax>
</temperatureEffectGrow>
<kOptForFemale>0.35</kOptForFemale>
<kOptForMale>0.25</kOptForMale>
<sigmaDeltaLVonBert>0.4</sigmaDeltaLVonBert>
......
......@@ -9,9 +9,10 @@ import environment.Basin;
import fr.cemagref.simaqualife.kernel.processes.AquaNismsGroupProcess;
import fr.cemagref.simaqualife.kernel.util.TransientParameters.InitTransientParameters;
import fr.cemagref.simaqualife.pilot.Pilot;
import miscellaneous.Miscellaneous;
import species.DiadromousFish.Gender;
import species.DiadromousFish.Stage;
import temperatureEffect.Rosso;
import temperatureEffect.TemperatureEffect;
import umontreal.iro.lecuyer.probdist.NormalDist;
import umontreal.iro.lecuyer.randvar.NormalACRGen;
import umontreal.iro.lecuyer.randvar.NormalGen;
......@@ -20,25 +21,11 @@ import umontreal.iro.lecuyer.randvar.NormalGen;
public class Grow extends AquaNismsGroupProcess<DiadromousFish, DiadromousFishGroup> {
/**
* temperature minimum for growth
* temperature effect for growth
*
* @unit °C
* @unit
*/
private double tempMinGrow = 3.;
/**
* temperature maximum for growth
*
* @unit °C
*/
private double tempMaxGrow = 26.;
/**
* temperature optimal for growth
*
* @unit °C
*/
private double tempOptGrow = 17.;
private TemperatureEffect temperatureEffectGrow;
/**
* K, Brody growth rate at optimal temperature L = Linf *(1-exp(-K*(t-t0))
......@@ -97,7 +84,10 @@ public class Grow extends AquaNismsGroupProcess<DiadromousFish, DiadromousFishGr
private transient NormalGen genNormal;
public static void main(String[] args) {
System.out.println((new XStream(new DomDriver())).toXML(new Grow()));
Grow grow = new Grow();
grow.temperatureEffectGrow = new Rosso(3, 17, 27);
System.out.println((new XStream(new DomDriver())).toXML(grow));
}
......@@ -121,8 +111,8 @@ public class Grow extends AquaNismsGroupProcess<DiadromousFish, DiadromousFishGr
// 1) calculate the kVonBert
// System.out.println(this.getKOpt(fish, group) );
kVonBert = this.getKOpt(fish, group)
* Miscellaneous.temperatureEffect(currentTemperature, tempMinGrow, tempOptGrow, tempMaxGrow);
kVonBert = this.getKOpt(fish, group) * temperatureEffectGrow.getTemperatureEffect(currentTemperature);
;
// 2) Update the fish length with a lognormal normal draw of increment
// limit the fish length to Linf
......
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