Esper generating episodes

Posted by Jasonojh on Stack Overflow See other posts from Stack Overflow or by Jasonojh
Published on 2013-10-20T09:45:24Z Indexed on 2013/10/20 15:54 UTC
Read the original article Hit count: 203

Filed under:
|

I would like to use Esper to generate episodes of events. I am trying to detect the changes in robot movement during each time period and was wondering what would be the best way of implementation.

The rules for generation of episodes from the events would be

  • If the new event time(eg. 7sec, robot A) of a robot is more than 3 sec than the latest event(eg. 3 sec, robot A) of the same robot, the new event belongs to a new episode.
  • Each episode should represent only one robot (eg. 2sec, robotA and 3sec, robotB should output 2 episodes)

Input data:

Event   Time     Robot     Position
1         1        A         0
2         2        A         1
3         6        A         2

Output data should be:

Array[0]={Event 1,Event 2}
Array[1]={Event 3} //more than 3 sec

Input data:

Event     Time     Robot     Position
1         1        A         0
2         2        A         1
3         4        B         0
4         6        A         2

Output data should be:

Array[0]={Event 1,Event 2}
Array[1]={Event 3} //different robot
Array[2]={Event 4}

Please help provide suggestions. I have tried using mulitple listeners, one for each robot, to create episodes and it works but I am trying to use a single EPL statement to do it. I have tried win:time_accum(3sec) group by robot but the second example output:

Array[0]={Event 1,Event 2, Event 4}
Array[1]={Event 3}

as the time window is shifted everytime an event comes in, the system still thinks that event 4 is less than 3 sec due to event 3. how do I create a unique time window for each robot?


Thank you for your suggestions and any help is greatly appreciated.

© Stack Overflow or respective owner

Related posts about esper

  • Esper generating episodes

    as seen on Stack Overflow - Search for 'Stack Overflow'
    I would like to use Esper to generate episodes of events. I am trying to detect the changes in robot movement during each time period and was wondering what would be the best way of implementation. The rules for generation of episodes from the events would be If the new event time(eg. 7sec, robot… >>> More

  • ETL , Esper or Drools?

    as seen on Stack Overflow - Search for 'Stack Overflow'
    Hello, The question environment relates to JavaEE, Spring I am developing a system which can start and stop arbitrary TCP (or other) listeners for incoming messages. There could be a need to authenticate these messages. These messages need to be parsed and stored in some other entities. These entities… >>> More

  • Which CEP product to start with?

    as seen on Stack Overflow - Search for 'Stack Overflow'
    Hi, I want to learn more on how to build CEP based applications. So I looked around and found several products (overview found here: http://rulecore.com/CEPblog/?page_id=47). But as there are quite a few at the moment, I don't know which is the best to start with. And overall I just would consider… >>> More

  • Big Data: Size isn’t everything

    as seen on Simple Talk - Search for 'Simple Talk'
    Big Data has a big problem; it’s the word “Big”. These days, a quick Google search will uncover terabytes of negative opinion about the futility of relying on huge volumes of data to produce magical, meaningful insight. There are also many clichéd but correct assertions about the… >>> More

  • CodePlex Daily Summary for Saturday, June 30, 2012

    as seen on Code Plex - Search for 'Code Plex'
    CodePlex Daily Summary for Saturday, June 30, 2012Popular ReleasesDotChess: DotChess v0.5.0: v0.5.0 Rearchitected the domain. Updated solution to Framework 4. Initiated test project. Implemented exceptions for errors. Improved coding style. Fixed minor bugs. Fixed setup shortcuts… >>> More

Related posts about nesper

  • Esper generating episodes

    as seen on Stack Overflow - Search for 'Stack Overflow'
    I would like to use Esper to generate episodes of events. I am trying to detect the changes in robot movement during each time period and was wondering what would be the best way of implementation. The rules for generation of episodes from the events would be If the new event time(eg. 7sec, robot… >>> More