Errors when run project on GAMA 1.6

84 views
Skip to first unread message

Trần Huy

unread,
Nov 20, 2013, 11:06:05 AM11/20/13
to gama-p...@googlegroups.com
Dear GAMA developers team,

I have a project which run on GAMA 1.5.1 (Microorganism 3.0.gaml). But when I run it on GAMA 1.6 (Microorganism EBM.gaml), some errors occur as image below and I don't know how to resolve. Please help me. Thank you very much!

​Note: All projects was zipped in .rar attached. When I run it on GAMA 1.6, I fixed syntax code as guide "From GAMA 1.5.1 to GAMA 1.6"​.

Inline image 1



TRAN QUANG HUY
Hanoi University of Sciene and Technology
School of Applied Mathematics and Informatics
No 1, Dai Co Viet Road
Hanoi, Vietnam
Mobile: 090.203.0095

Capture.PNG
life.rar

HUYNH Nghi

unread,
Nov 20, 2013, 3:48:30 PM11/20/13
to gama-p...@googlegroups.com
Hi,
When you say "run it on GAMA", you meant that you just open it or you've clicked on Experiment button to launch simulation? Because your model have some syntax errors (it's not your fault, just the evolve of GAMA). I've correct and it works on my GAMA svn 1.6.1. Please find the model in attach.
Cheers.

--
You received this message because you are subscribed to the Google Groups "GAMA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platfor...@googlegroups.com.
To post to this group, send email to gama-p...@googlegroups.com.
Visit this group at http://groups.google.com/group/gama-platform.
For more options, visit https://groups.google.com/groups/opt_out.

Capture.PNG
Microorganism EBM.gaml

Trần Quang Huy

unread,
Nov 20, 2013, 11:36:17 PM11/20/13
to gama-p...@googlegroups.com
Hi Huynh Nghi,
On my laptop, I clicked on Experiment button to launch simulation. Then I clicked to Run icon (green triangle icon). The simulation run only 1 step and stop. It display errors as image below. Can you run more than 1 simulation step?




Vào 03:48:30 UTC+7 Thứ năm, ngày 21 tháng mười một năm 2013, HUYNH Nghi đã viết:

HUYNH Nghi

unread,
Nov 21, 2013, 2:29:55 AM11/21/13
to gama-p...@googlegroups.com
Hi Huy,
Yes, the model that i attached run well , of course more than 1 step. Can you specific version of GAMA (download or svn version) and OS

Trần Quang Huy

unread,
Nov 21, 2013, 3:44:50 AM11/21/13
to gama-p...@googlegroups.com
Hi HUYNH Nghi,

Somehow, I download "GAMA 1.6 PR 64" and errors occured when I ran that version of GAMA. Few minutes ago, I redownloaded "GAMA 1.6 64 bit windows" and ran your code you sent. It ran very well as I expect. I have spent 3 weeks for this errors. Tonight, I can sleep well. Thank you very much! 



Vào 14:29:55 UTC+7 Thứ năm, ngày 21 tháng mười một năm 2013, HUYNH Nghi đã viết:

HUYNH Nghi

unread,
Nov 21, 2013, 3:49:09 AM11/21/13
to gama-p...@googlegroups.com
Arghh, I'm sorry for 3 weeks when i know that you still use Pre-release ;). But anyway, it's fixed. For info, we have one newer , 1.6.1, would be release in some weeks, so please stay up date and keep report any issue that you have.
Thanks.
Cheers. 

Trần Quang Huy

unread,
Dec 5, 2013, 3:20:23 AM12/5/13
to gama-p...@googlegroups.com
Em chào anh Nghị,

Em muốn hỏi anh thêm một chút nữa về mô hình của em hôm trước. Mô hình này em làm về 2 loài vi sinh vật A và B cạnh tranh thức ăn trong môi trường đất. Giả sử từ bước n tới bước n+1, em muốn biết loài A đã chết bao nhiêu cá thể thì có thể dùng cách nào ạ?

Vào 15:49:09 UTC+7 Thứ năm, ngày 21 tháng mười một năm 2013, HUYNH Nghi đã viết:

Trần Quang Huy

unread,
Dec 5, 2013, 3:32:02 AM12/5/13
to gama-p...@googlegroups.com
Hi GAMA team,

I have a model about two competition bacteria: A and B. Bacteria A and B were born and died continously. I want to know from n step to n+1 step, how many bacteria A died? I need your help about this problem. Thank you!


Vào 15:20:23 UTC+7 Thứ năm, ngày 05 tháng mười hai năm 2013, Trần Quang Huy đã viết:

Patrick Taillandier

unread,
Dec 5, 2013, 3:41:48 AM12/5/13
to gama-p...@googlegroups.com
Hi,

You just have to define a global variable that will be incremented each time a  bacteria A die.
For example:

model bug

global {
int nb_dead_bacteriaA <- 0 update: 0;
init {
create bacteriaA number: 100;
}
reflex end when: empty(bacteriaA) {
do halt;
}
}


species bacteriaA {
reflex reproducing when: flip(0.2) {
create bacteriaA;
}
reflex dying when:flip(0.2) {
nb_dead_bacteriaA <- nb_dead_bacteriaA + 1;
do die;
}
}
experiment bug type: gui {
output {
display chart {
chart type: series {
data "nb of bacteria that die this step " value: nb_dead_bacteriaA color: rgb("red");
}
}
}
}

Cheers,

Patrick


2013/12/5 Trần Quang Huy <tranqua...@gmail.com>

HUYNH Nghi

unread,
Dec 5, 2013, 5:08:36 AM12/5/13
to gama-p...@googlegroups.com
Hi,
Patrick have solve totally your problem. I've just adjust another ways as infos: you can get the length of species's container, ex: length(A) will return the number of agent A. So we can count the deaths:
global {
         int old_population<- 0;
init {
create bacteriaA number: 100;
                old_population<-length(A);
}
reflex count_deaths {
          int  deaths<-length(A)-old_population;
                old_population<-length(A);
}
}
Cheers.

Trần Quang Huy

unread,
Dec 10, 2013, 10:50:09 AM12/10/13
to gama-p...@googlegroups.com
Hi Mr. Nghi and Mr. Patrick,

      Thank you for your helps. I name way of Patrick as method 1 and way of Huynh as method 2. With my problem, a hypothesis was given:"Bacteria A and B were born and died continously". It means: bacteria(n+1) = bacteria(n) + ( birth(n) - death(n) ).
      If problem is solved by method 2, we will count ( birth(n) - death(n) ). And I thing method 1 is more exact in order to solve my problem. Do you think so, Mr. Nghi?


Vào 17:08:36 UTC+7 Thứ năm, ngày 05 tháng mười hai năm 2013, HUYNH Nghi đã viết:

HUYNH Nghi

unread,
Dec 10, 2013, 11:09:11 AM12/10/13
to gama-p...@googlegroups.com
Hi,
Yes, you're right. Method 1 is exactly counted when a death occurs.
Cheers.

Trần Huy

unread,
Dec 12, 2013, 3:36:18 AM12/12/13
to gama-p...@googlegroups.com
Hi GAMA team,

I have resolved previous problems. Now, when ​I run my model in 2 ways (in EBM and IBM). I realize that result of EBMs modeling is same as IBM modeling (although I change parameters of EBMs in different ways). Then I think the differential equations that I insert in codes of EBMs modeling is not effective. I need your helps.
<My code of EBM and IBM are attached in this mail>

Thank you!



TRAN QUANG HUY
Hanoi University of Sciene and Technology
School of Applied Mathematics and Informatics
No 1, Dai Co Viet Road
Hanoi, Vietnam
Mobile: 090.203.0095

--
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/5SQLG_0Qzg8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gama-platfor...@googlegroups.com.
life.zip
Reply all
Reply to author
Forward
0 new messages