//EGS 01/06/12 //Pacific Oyster (Crassostrea gigas) model converted from DEB (dynamic Energy Budget) model from Pouvreau et al 2006. //Experiment A batch 1 //Parameters //Temperature parameters Units T1 =273 + 20; //Reference temperature (K,Kelvin) TA =5800; //Arrhenius temperature (K) TAH =30000; //Rate of decrease at upper boundary (K) TAL =75000; //Rate of decrease at lower boundary (K) TH =305; //Upper boundary of tolerance range (K) TL =281; //Lower boundary of tolerance range (K) changeTemp= H(80-time); //Heaviside step function used for the behaviour of the actual temperature Actual_temperature =((24 - (time/20)+ (randomTemp/3)-(randomTemp/2))* changeTemp) + ((20 - ((time-80)/6.666)+ (randomTemp/5))* (1-changeTemp)); // (Celsius) Ts = 20; //Temperature threshold triggering spawning (Celsius) //Arrhenius-type equation extended to include a species-specific tolerance range. Temperature_correction_20oC =exp((TA/T1)-(TA/(273+Actual_temperature))) * ((1 + exp((TAL/(273+Actual_temperature))-(TAL/TL)) + exp((TAH/TH)-(TAH/(273+Actual_temperature))))^(-1)); //Other parameters related to the biological processes ae =0.75; //Assimilation efficiency //Pxm depends on temperature Pxm =5.6 * Temperature_correction_20oC; //Maximum surface area-specific ingestion rate (J cm^-2 d^-1) Pam =((ae)* Pxm); //Maximum surface area-specific assimilation rate {PAm} (J cm^-2 d^-1) Kappa =0.45; //(k-rule)Fraction of PC spent on maintenance plus growth Eg =1.900; //Volume-specific costs of growth [EG] (J cm^-3) Em =2.295; // Maximum Energy Density [Em] (J cm^-3) // Volume-specific maintenance rate/costs [PM]=PM/V,depends on temperature (J cm^-3 d^-1) Vol_costs_maintenance_Pm =(0.024 * Temperature_correction_20oC); Pm =Vol_costs_maintenance_Pm* Structural_volume_V; //Somatic maintenance rate (J d^-1) //[E] according to the food density in the environment it may vary between 0 and the [Em] (J cm^-3) Energy_Density_in_Organism =Energy_storage_E/Structural_volume_V; //Utilisation rate Pc =(Energy_Density_in_Organism/(Eg+(Kappa*Energy_Density_in_Organism))) * (((Eg * Pam * (Structural_volume_V ^(2/3)))/Em) + (Vol_costs_maintenance_Pm*Structural_volume_V)); //Food density behaviour parameters first=H(time-30); second=H(time - 30)- H(time - 35); third=H(time - 35)- H(time - 45); fourth=H(time - 45)- H(time - 52); fifth=H(time - 52)- H(time - 59); sixth =H(time - 59)- H(time - 62); seventh =H(time - 62)- H(time - 72); eighth =H(time - 72)- H(time - 121); Food_density_chloa =((20-(time/1.76))*(1-first)) + ((3 + ((time-30)/0.172))*second) + ((32-((time-35)/0.344))*third) + ((3 + ((time-45)/0.19))*fourth) + ((39-((time-52)/0.194))*fifth) + ((3 + ((time-59)/0.0714))*sixth) + ((45-((time-62)/0.238))*seventh) + (3*eighth) ; //Food density (ug chl-a l^-1) //Half saturation coefficient (ug chl-a l^-1) saturation_coefficient =8; functional_response =Food_density_chloa /(Food_density_chloa + saturation_coefficient); Pa =functional_response * Pam*( Structural_volume_V^(2/3)); //Assimilation rate Vp =400; //Structural volume at sexual maturity (cm^3) maturity =H(Structural_volume_V - Vp);// min(V,Vp) function //Maturity maintenance rate Pj =((((1-Kappa)/Kappa)* Structural_volume_V * Vol_costs_maintenance_Pm)* (1- maturity)) + ((((1-Kappa)/Kappa)* Vp * Vol_costs_maintenance_Pm) * (maturity)) ; //Calculating Dry Flesh Weight UE =17500;//Energy content of reserves (g^-1) KR =0.7; // Fraction of reproduction energy/reserves fixed in eggs p =0.2; // Volume-specific dry flesh weight (g cm^-3) E_DFW =(Energy_storage_E/UE); // Reserve E dry flesh weight (g) Er_DFW =((KR * Energy_allocated_to_dev_and_rep_Er)/UE); // Reproduction buffer dry flesh weight (g) V_DFW =((Structural_volume_V/1000) * p); //Structural volume dry flesh weight (g) Total_DFW =E_DFW + V_DFW + Er_DFW;//Total Dry Flesh Weight (g) GI = 35;//Gonado somatic index triggering spawning (%) Percentage_Er =(Er_DFW/Total_DFW) * 100 ; //Percentage of DFW of ER in the total DFW (%) //Heaviside step functions used for the conditions of the spawning event Er_start_spawn = H(Percentage_Er - GI); stop_spawn = H(1 - Percentage_Er); T_start_spawn = H(Actual_temperature - Ts); //Actions and their associated rates kineticLawOf a1 : (Kappa * Pc)/Eg ; //(k * utilisation)/EG kineticLawOf a2 : Pm/Eg;//PM/EG kineticLawOf a3 : Pa;//PA kineticLawOf a4 : Pc;//PC kineticLawOf a5 : ((1-Kappa)*Pc)* maturity;//(Utilisation * (1-k)) kineticLawOf a6 : Pj * maturity * (1-stop_spawn);//ER becomes active when individual has reached Vp hence (* maturity) and action can't take place if ER=0 kineticLawOf empty : fMA(100 * maturity); // Where (Percentage_Er > GI) AND (Actual_temperature>Ts) kineticLawOf switch_on : fMA(10 * Er_start_spawn * T_start_spawn) ; // Where (Percentage_Er <= 0) kineticLawOf switch_off : fMA(10 * stop_spawn) ; //Rates of actions for randomTemp agent kineticLawOf down2 : 1; kineticLawOf up2 : 1; //Behaviour of each agent with respect to each of these actions // V is increased by a1, decreased by a2 and is a generic modifier in a3,a4,a5,a6 and empty. Structural_volume_V = a1 >> + a2 << + a3(.) + a4(.) + a5(.) + a6(.) + empty(.); // E is increased by a3, decreased by a4 and is a generic modifier in a1 and a5 Energy_storage_E = a3 >> + a4 << + a1(.) + a5 (.); // Er is increased by a5 and decreased by a6 and empty Energy_allocated_to_dev_and_rep_Er = a5 >> + a6 << + (empty, 1) << ; // Note Tracker_off + Tracker_on always equals exactly 1 in a simulation Tracker_off = (switch_on, 1) << + (switch_off, 1) >> ; Tracker_on = (switch_on, 1) >> + (switch_off, 1) << + (empty, 1) (+) ; //randomTemp agent is used in the Actual_temperature behaviour randomTemp = up2 >> + down2 << ; //Initial values of agents Structural_volume_V[2300] <*> Energy_storage_E[2000] <*> Energy_allocated_to_dev_and_rep_Er[4000] <*> Tracker_off[1] <*> Tracker_on[0] <*> randomTemp[1]