Skip to first unread message

Suhad Faisal

unread,
Oct 7, 2014, 8:22:04 AM10/7/14
to gama-p...@googlegroups.com
Hello 


I need to compute agent speed without using the (distance/ time) manually , is their any alternative operator or statement to do that ? 

thanks in advance 

cheers 
Suhad

Arnaud Grignard

unread,
Oct 7, 2014, 8:23:19 AM10/7/14
to gama-platform

--
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/d/optout.

Suhad Faisal

unread,
Oct 7, 2014, 8:33:40 AM10/7/14
to gama-p...@googlegroups.com
thanks for reply Arnaud 

well  in my data I have coordinates and time, so when I try to compute speed from distance between coordinates and their time , I have a division by zero problem, so I thought their could be any trick to avoid this.

cheers 
Suhad

Arnaud Grignard

unread,
Oct 7, 2014, 8:36:26 AM10/7/14
to gama-platform
Well if your data as the moving skill you can use what I sent. Otherwise of course Gama is not magic and it will not compute a speed for you (especially if you have some time value equal to 0)

I think you already sent a question about having a division by zero recently, no? Did you clean your data??

Arnaud

--

Suhad Faisal

unread,
Oct 7, 2014, 8:41:20 AM10/7/14
to gama-p...@googlegroups.com
yes I did ... but my data hasn't eny error; cause there is already time value equal to zero  in it , so at specific period the value will be zero mandatory.


cheers 
Suhad

--
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/-WHXA-rhbnA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gama-platfor...@googlegroups.com.

Arnaud Grignard

unread,
Oct 7, 2014, 8:48:58 AM10/7/14
to gama-platform
I don't what to say. If you divide something by zero of course you will have a problem.

So what you can do is to check before the value of your data with something like;

if(mydata!=0)
{
I do something;
}


Suhad Faisal

unread,
Oct 7, 2014, 8:56:03 AM10/7/14
to
thank you , I'm searching now for mathematical trick or any equation can keep the value indication ... like average, difference between successive events ...etc.


cheers
suhad

To unsubscribe from this group and stop receiving emails from it, send an email to gama-platform+unsubscribe@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/d/optout.

--
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/-WHXA-rhbnA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gama-platform+unsubscribe@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/d/optout.

--
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-platform+unsubscribe@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/d/optout.

--
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/-WHXA-rhbnA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gama-platform+unsubscribe@googlegroups.com.

Srirama Bhamidipati

unread,
Oct 7, 2014, 9:10:02 AM10/7/14
to gama-p...@googlegroups.com
Let us say you have three segments of your trip. A B C, if value for B is missing, you can take an average from A and C. If A or C is missing, I would just use the value of B. You don't necessarily have to do this in GAMA, you can clean it outside Gama and then bring it in. 

Second approach will be to plot your data, and check a spatial correlation, that is if your (missing) trip segment is passing through city center, and you have other data that fall in this same area, you can use those (other) values as representative value for your missing data.

Or you can make an assumption that, if there is no data, you assume average speed to be some 25km/hr. This is same as Arnaud suggested. 
if(mySpeeddata=0)
{
use 25km/hr
}

regards,
srirama

Suhad Faisal

unread,
Oct 7, 2014, 9:19:17 AM10/7/14
to gama-p...@googlegroups.com

many thanks  
dear Srirama for your argument, indeed scientific discussion is the most
important thing in developing and progress, but I don't have missing data, 
instead I have a midnight period its time equal to zero i.e. my day hours data in 
range (0-23), so Zero  value causes "division by zero" in my computations.

best regards

yours
Suahd

--

Arnaud Grignard

unread,
Oct 7, 2014, 9:28:55 AM10/7/14
to gama-platform
Why don't you do an offset by one so your data will be from 1 to 24? to avoid you division by zero? just add someting like "time + 1" or something like that. (Sorry but I don't call it a scientific discussion..)

--
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.

Suhad Faisal

unread,
Oct 7, 2014, 9:46:14 AM10/7/14
to gama-p...@googlegroups.com
thanks dear Arnaud

I'm trying a condition to assume the value as 11.59 when the value is 0 that makes it near to midnight without being zero.

well, any arguments or opinions I consider them "scientific" , as well as I respect these details and cosider it the "salt of food ".



cheers
suhad
Reply all
Reply to author
Forward
0 new messages