This is my code:
global
{
init
{
create Tarpon number: 1;
step <- 20 #mn;
}
}
species Tarpon
{
float Wt;
float F_t;
float Monthly_waterTemp_Avg <- 21 update: self.Monthly_waterTemp_Avg +1;
init
{
Wt <- 760;
}
reflex calculations
{
F_t <- f_T_consumption (Monthly_waterTemp_Avg);
}
action f_T_consumption(float W_temp)
{
float W;
float Y;
float V;
float X;
float CQ;
float CTM;
float CTO;
float f_Temp;
CQ <- 3.2;
CTM <- 31;
CTO <- 28.72;
W <- ln(CQ) * (CTM - CTO);
Y <- ln(CQ) * (CTM - CTO + 2);
V <- (CTM - W_temp) / (CTM - CTO);
X <- ((W ^ 2) * (1 + (1 + 40 / Y) ^ 0.5) ^ 2) / 400;
f_Temp <- V ^ X * (exp(X * (1 - V)));
return f_Temp;
}
}
experiment checkFunctions type: gui {
output {
display chart_display
{
chart "chart" type: xy x_tick_unit: 1
{
data 'Function of Temperature' value: {(Tarpon).F_t, (Tarpon).Monthly_waterTemp_Avg};
}
}
}
}
--
You received this message because you are subscribed to a topic in the Google Groups "GAMA" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gama-platform/cAzXYWtZ3us/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gama-platfor...@googlegroups.com.
To post to this group, send email to gama-p...@googlegroups.com.
Visit this group at https://groups.google.com/group/gama-platform.
For more options, visit https://groups.google.com/d/optout.