chart error

18 views
Skip to first unread message

Chris Harvey

unread,
Jan 19, 2019, 12:28:48 PM1/19/19
to GAMA
I'm getting an error message stating 'Unknown field 'F_t' for type species <Tarpon>'. I don't understand why I'm getting the error. I've tried declaring the variable in the global section, as well as the species section and it made no difference. I followed the format for the chart from the Lotka-Volterra(Simple) model....I don't see where I went wrong. Anybody know where the error is?

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};
}

}

}
}

Chris Harvey

unread,
Jan 19, 2019, 11:55:41 PM1/19/19
to GAMA
I have it working.


I did this:   data 'Function of Temperature' value: {first_with(Tarpon).F_t, first_with(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.
Reply all
Reply to author
Forward
0 new messages