Statechart Problem

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Statechart Problem

Olusola Faboya-2

 

Hello everyone,

I’m developing a project in repast symphony using Statechart. The project involves comparing level of satisfactions of Car Users and Train Users. If the satisfaction goes down beyond certain value (double) the passenger has to switch mode of transportation.

In my statechart, I set the transition trigger with the condition: agent.updateTransistion<=0.60 for Car user to switch to Train and agent.updateTransistion<=0.45 for train users to move to car. I also have a method agent.switchMode() on the On Transition tab of the statechart with the following codes at (On Transition):

 

public void switchMode() throws Exception  {

                    if ((this.prefferedMode instanceof ModeCar)){

                           this.prefferedMode= new ModeTrain();

                    }else if ((this.prefferedMode instanceof ModeTrain)){

                           this.prefferedMode= new ModeCar();            

                    }

                    updateTransition();

             }

But I keep receiving the following errors even if setup few agents (as few as 2 agents) as long as the condition for transition is satisfied.

 

I have searched the forum’s past discussions if there’s similar problems resolved, but none.

 

Errors:

at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)

        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)

        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)

        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)

        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)

        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)

        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)

        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)

 

Olusola

 



This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|

Re: Statechart Problem

Ozik, Jonathan
Hi Olusola,

I'm not sure I understand what you've described. Just to clarify, is the content of the On Transition tab only "agent.switchMode()" or does it include the method body as well?
Also, is that the full stack trace? If not, can you please post the rest of it?

Jonathan

On Jan 16, 2017, at 11:23 AM, Olusola Faboya <[hidden email]> wrote:

 
Hello everyone, 
I’m developing a project in repast symphony using Statechart. The project involves comparing level of satisfactions of Car Users and Train Users. If the satisfaction goes down beyond certain value (double) the passenger has to switch mode of transportation.
In my statechart, I set the transition trigger with the condition: agent.updateTransistion<=0.60 for Car user to switch to Train and agent.updateTransistion<=0.45 for train users to move to car. I also have a method agent.switchMode() on the On Transition tab of the statechart with the following codes at (On Transition):
 
public void switchMode() throws Exception  {
                    if ((this.prefferedMode instanceof ModeCar)){
                           this.prefferedMode= new ModeTrain();
                    }else if ((this.prefferedMode instanceof ModeTrain)){
                           this.prefferedMode= new ModeCar();            
                    }
                    updateTransition();
             }
But I keep receiving the following errors even if setup few agents (as few as 2 agents) as long as the condition for transition is satisfied.
 
I have searched the forum’s past discussions if there’s similar problems resolved, but none.
 
Errors:
at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
 
Olusola
 
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|

Re: Statechart Problem

Ozik, Jonathan
Is the agent.updateTransistion < 0.45? If so, you'll see an infinite loop from Car to Train and back. Try modifying the conditions to be exclusive of each other.

On Jan 16, 2017, at 1:34 PM, Olusola Faboya <[hidden email]> wrote:

Hi Jonathan,
The On Transition tab only has agent.switchMode(), while the method body is contained in the agent class. The first part of the error message is given below.
 
I guess it’s whenever the statechart tries to switch. That was why I put the print statement ------SWITCH----- to indicate it actually access the method.
 
-----SWITCH-----
Exception in thread "Thread-7" java.lang.StackOverflowError
       at repast.simphony.statecharts.StateChartScheduler$ResolveActionsMapValue.removeListener(StateChartScheduler.java:55)
       at repast.simphony.statecharts.StateChartScheduler.removeResolveTime(StateChartScheduler.java:309)
       at repast.simphony.statecharts.DefaultStateChart.removeResolveTime(DefaultStateChart.java:623)
       at repast.simphony.statecharts.DefaultStateChart.deactivateTransitions(DefaultStateChart.java:337)
       at repast.simphony.statecharts.DefaultStateChart.clearTransitions(DefaultStateChart.java:314)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:440)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
 
From: Ozik, Jonathan [[hidden email]] 
Sent: 16 January 2017 19:19
To: Faboya Olusola <[hidden email]>
Cc: [hidden email]
Subject: Re: [Repast-interest] Statechart Problem
 
Hi Olusola, 
 
I'm not sure I understand what you've described. Just to clarify, is the content of the On Transition tab only "agent.switchMode()" or does it include the method body as well?
Also, is that the full stack trace? If not, can you please post the rest of it?
 
Jonathan
 
On Jan 16, 2017, at 11:23 AM, Olusola Faboya <[hidden email]> wrote:
 
 
Hello everyone, 
I’m developing a project in repast symphony using Statechart. The project involves comparing level of satisfactions of Car Users and Train Users. If the satisfaction goes down beyond certain value (double) the passenger has to switch mode of transportation.
In my statechart, I set the transition trigger with the condition: agent.updateTransistion<=0.60 for Car user to switch to Train and agent.updateTransistion<=0.45 for train users to move to car. I also have a method agent.switchMode() on the On Transition tab of the statechart with the following codes at (On Transition):
 
public void switchMode() throws Exception  {
                    if ((this.prefferedMode instanceof ModeCar)){
                           this.prefferedMode= new ModeTrain();
                    }else if ((this.prefferedMode instanceof ModeTrain)){
                           this.prefferedMode= new ModeCar();            
                    }
                    updateTransition();
             }
But I keep receiving the following errors even if setup few agents (as few as 2 agents) as long as the condition for transition is satisfied.
 
I have searched the forum’s past discussions if there’s similar problems resolved, but none.
 
Errors:
at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
 
Olusola
 
 
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 
 
Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.
 
This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, 
SlashDot.org! http://sdm.link/slashdot_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
 
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|

Re: Statechart Problem

Olusola Faboya-2

Yes I noticed that for the few agents that have values <0.45, the debug statement "--Switch---" I included will scroll for a few minutes before the error message comes up.

I will look into the conditions as advised and get back to you.


Thanks

 



From: Ozik, Jonathan <[hidden email]>
Sent: Monday, January 16, 2017 8:29:11 AM
To: Faboya Olusola
Cc: [hidden email]
Subject: Re: [Repast-interest] Statechart Problem
 
Is the agent.updateTransistion < 0.45? If so, you'll see an infinite loop from Car to Train and back. Try modifying the conditions to be exclusive of each other.

On Jan 16, 2017, at 1:34 PM, Olusola Faboya <[hidden email]> wrote:

Hi Jonathan,
The On Transition tab only has agent.switchMode(), while the method body is contained in the agent class. The first part of the error message is given below.
 
I guess it’s whenever the statechart tries to switch. That was why I put the print statement ------SWITCH----- to indicate it actually access the method.
 
-----SWITCH-----
Exception in thread "Thread-7" java.lang.StackOverflowError
       at repast.simphony.statecharts.StateChartScheduler$ResolveActionsMapValue.removeListener(StateChartScheduler.java:55)
       at repast.simphony.statecharts.StateChartScheduler.removeResolveTime(StateChartScheduler.java:309)
       at repast.simphony.statecharts.DefaultStateChart.removeResolveTime(DefaultStateChart.java:623)
       at repast.simphony.statecharts.DefaultStateChart.deactivateTransitions(DefaultStateChart.java:337)
       at repast.simphony.statecharts.DefaultStateChart.clearTransitions(DefaultStateChart.java:314)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:440)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
 
From: Ozik, Jonathan [[hidden email]] 
Sent: 16 January 2017 19:19
To: Faboya Olusola <[hidden email]>
Cc: [hidden email]
Subject: Re: [Repast-interest] Statechart Problem
 
Hi Olusola, 
 
I'm not sure I understand what you've described. Just to clarify, is the content of the On Transition tab only "agent.switchMode()" or does it include the method body as well?
Also, is that the full stack trace? If not, can you please post the rest of it?
 
Jonathan
 
On Jan 16, 2017, at 11:23 AM, Olusola Faboya <[hidden email]> wrote:
 
 
Hello everyone, 
I’m developing a project in repast symphony using Statechart. The project involves comparing level of satisfactions of Car Users and Train Users. If the satisfaction goes down beyond certain value (double) the passenger has to switch mode of transportation.
In my statechart, I set the transition trigger with the condition: agent.updateTransistion<=0.60 for Car user to switch to Train and agent.updateTransistion<=0.45 for train users to move to car. I also have a method agent.switchMode() on the On Transition tab of the statechart with the following codes at (On Transition):
 
public void switchMode() throws Exception  {
                    if ((this.prefferedMode instanceof ModeCar)){
                           this.prefferedMode= new ModeTrain();
                    }else if ((this.prefferedMode instanceof ModeTrain)){
                           this.prefferedMode= new ModeCar();            
                    }
                    updateTransition();
             }
But I keep receiving the following errors even if setup few agents (as few as 2 agents) as long as the condition for transition is satisfied.
 
I have searched the forum’s past discussions if there’s similar problems resolved, but none.
 
Errors:
at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
 
Olusola
 
 
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 
 
Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.
 
This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, 
SlashDot.org! http://sdm.link/slashdot_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
 
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.



This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|

Re: Statechart Problem

Ozik, Jonathan
In reply to this post by Ozik, Jonathan
Hi Olusola,

Olusola,

Those conditions would still result in an infinite loop if the agent.modeSatisfaction<=0.3. You'd need to check to see if the agent.modeSatisfaction>0.3 && agent.modeSatisfaction<=0.45 for a Train users to transit to Car condition.

Jonathan

On Jan 17, 2017, at 5:11 AM, Olusola Faboya <[hidden email]> wrote:

agent.isModeTrain()&&agent.modeSatisfaction<=0.45;
 
Hi Jonathan,
I changed the previous conditions in the two transitions to:
“agent.isModeCar()&&agent.modeSatisfaction<=0.45” for Car transitions to Train and “agent.isModeTrain()&&agent.modeSatisfaction<=0.30”, for Train users to transit to Car. The problem still persist. 
 
However, I forgot to tell you that my “Train users’ state” in the statechart is a composite state that has others sub-states such as “InFrequent Users”, “Average User” and “Regular Users states” with varying levels of modesatisfactions to transit within the Train composite state. Maybe these could contribute to the problem.
 
Thanks
 
Olusola
 
 
From: Ozik, Jonathan [[hidden email]] 
Sent: 16 January 2017 20:29
To: Faboya Olusola <[hidden email]>
Cc: [hidden email]
Subject: Re: [Repast-interest] Statechart Problem
 
Is the agent.updateTransistion < 0.45? If so, you'll see an infinite loop from Car to Train and back. Try modifying the conditions to be exclusive of each other.
 
On Jan 16, 2017, at 1:34 PM, Olusola Faboya <[hidden email]> wrote:
 
Hi Jonathan,
The On Transition tab only has agent.switchMode(), while the method body is contained in the agent class. The first part of the error message is given below.
 
I guess it’s whenever the statechart tries to switch. That was why I put the print statement ------SWITCH----- to indicate it actually access the method.
 
-----SWITCH-----
Exception in thread "Thread-7" java.lang.StackOverflowError
       at repast.simphony.statecharts.StateChartScheduler$ResolveActionsMapValue.removeListener(StateChartScheduler.java:55)
       at repast.simphony.statecharts.StateChartScheduler.removeResolveTime(StateChartScheduler.java:309)
       at repast.simphony.statecharts.DefaultStateChart.removeResolveTime(DefaultStateChart.java:623)
       at repast.simphony.statecharts.DefaultStateChart.deactivateTransitions(DefaultStateChart.java:337)
       at repast.simphony.statecharts.DefaultStateChart.clearTransitions(DefaultStateChart.java:314)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:440)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
 
From: Ozik, Jonathan [[hidden email]] 
Sent: 16 January 2017 19:19
To: Faboya Olusola <[hidden email]>
Cc: [hidden email]
Subject: Re: [Repast-interest] Statechart Problem
 
Hi Olusola, 
 
I'm not sure I understand what you've described. Just to clarify, is the content of the On Transition tab only "agent.switchMode()" or does it include the method body as well?
Also, is that the full stack trace? If not, can you please post the rest of it?
 
Jonathan
 
On Jan 16, 2017, at 11:23 AM, Olusola Faboya <[hidden email]> wrote:
 
 
Hello everyone, 
I’m developing a project in repast symphony using Statechart. The project involves comparing level of satisfactions of Car Users and Train Users. If the satisfaction goes down beyond certain value (double) the passenger has to switch mode of transportation.
In my statechart, I set the transition trigger with the condition: agent.updateTransistion<=0.60 for Car user to switch to Train and agent.updateTransistion<=0.45 for train users to move to car. I also have a method agent.switchMode() on the On Transition tab of the statechart with the following codes at (On Transition):
 
public void switchMode() throws Exception  {
                    if ((this.prefferedMode instanceof ModeCar)){
                           this.prefferedMode= new ModeTrain();
                    }else if ((this.prefferedMode instanceof ModeTrain)){
                           this.prefferedMode= new ModeCar();            
                    }
                    updateTransition();
             }
But I keep receiving the following errors even if setup few agents (as few as 2 agents) as long as the condition for transition is satisfied.
 
I have searched the forum’s past discussions if there’s similar problems resolved, but none.
 
Errors:
at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
 
Olusola
 
 
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 
 
Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.
 
This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, 
SlashDot.org! http://sdm.link/slashdot_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
 
 
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 
 
Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.
 
This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.
 
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|

Re: Statechart Problem

Ozik, Jonathan
Glad to hear it.
I'm copying the list in case someone else experiences something similar.

Jonathan

On Jan 19, 2017, at 9:48 AM, Olusola Faboya <[hidden email]> wrote:

Hi Jonathan,
Thank you for your assistance. The issue is resolved now following you advice. The agents are now switching as expected.
 
Best Regards
 
Olusola
 
 
From: Ozik, Jonathan [[hidden email]] 
Sent: 17 January 2017 16:37
To: Faboya Olusola <[hidden email]>
Cc: [hidden email]
Subject: Re: [Repast-interest] Statechart Problem
 
Hi Olusola, 
 
Olusola,
 
Those conditions would still result in an infinite loop if the agent.modeSatisfaction<=0.3. You'd need to check to see if the agent.modeSatisfaction>0.3 && agent.modeSatisfaction<=0.45 for a Train users to transit to Car condition.
 
Jonathan
 
On Jan 17, 2017, at 5:11 AM, Olusola Faboya <[hidden email]> wrote:
 
agent.isModeTrain()&&agent.modeSatisfaction<=0.45;
 
Hi Jonathan,
I changed the previous conditions in the two transitions to:
“agent.isModeCar()&&agent.modeSatisfaction<=0.45” for Car transitions to Train and “agent.isModeTrain()&&agent.modeSatisfaction<=0.30”, for Train users to transit to Car. The problem still persist. 
 
However, I forgot to tell you that my “Train users’ state” in the statechart is a composite state that has others sub-states such as “InFrequent Users”, “Average User” and “Regular Users states” with varying levels of modesatisfactions to transit within the Train composite state. Maybe these could contribute to the problem.
 
Thanks
 
Olusola
 
 
From: Ozik, Jonathan [[hidden email]] 
Sent: 16 January 2017 20:29
To: Faboya Olusola <[hidden email]>
Cc: [hidden email]
Subject: Re: [Repast-interest] Statechart Problem
 
Is the agent.updateTransistion < 0.45? If so, you'll see an infinite loop from Car to Train and back. Try modifying the conditions to be exclusive of each other.
 
On Jan 16, 2017, at 1:34 PM, Olusola Faboya <[hidden email]> wrote:
 
Hi Jonathan,
The On Transition tab only has agent.switchMode(), while the method body is contained in the agent class. The first part of the error message is given below.
 
I guess it’s whenever the statechart tries to switch. That was why I put the print statement ------SWITCH----- to indicate it actually access the method.
 
-----SWITCH-----
Exception in thread "Thread-7" java.lang.StackOverflowError
       at repast.simphony.statecharts.StateChartScheduler$ResolveActionsMapValue.removeListener(StateChartScheduler.java:55)
       at repast.simphony.statecharts.StateChartScheduler.removeResolveTime(StateChartScheduler.java:309)
       at repast.simphony.statecharts.DefaultStateChart.removeResolveTime(DefaultStateChart.java:623)
       at repast.simphony.statecharts.DefaultStateChart.deactivateTransitions(DefaultStateChart.java:337)
       at repast.simphony.statecharts.DefaultStateChart.clearTransitions(DefaultStateChart.java:314)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:440)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
       at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
       at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
 
From: Ozik, Jonathan [[hidden email]] 
Sent: 16 January 2017 19:19
To: Faboya Olusola <[hidden email]>
Cc: [hidden email]
Subject: Re: [Repast-interest] Statechart Problem
 
Hi Olusola, 
 
I'm not sure I understand what you've described. Just to clarify, is the content of the On Transition tab only "agent.switchMode()" or does it include the method body as well?
Also, is that the full stack trace? If not, can you please post the rest of it?
 
Jonathan
 
On Jan 16, 2017, at 11:23 AM, Olusola Faboya <[hidden email]> wrote:
 
 
Hello everyone, 
I’m developing a project in repast symphony using Statechart. The project involves comparing level of satisfactions of Car Users and Train Users. If the satisfaction goes down beyond certain value (double) the passenger has to switch mode of transportation.
In my statechart, I set the transition trigger with the condition: agent.updateTransistion<=0.60 for Car user to switch to Train and agent.updateTransistion<=0.45 for train users to move to car. I also have a method agent.switchMode() on the On Transition tab of the statechart with the following codes at (On Transition):
 
public void switchMode() throws Exception  {
                    if ((this.prefferedMode instanceof ModeCar)){
                           this.prefferedMode= new ModeTrain();
                    }else if ((this.prefferedMode instanceof ModeTrain)){
                           this.prefferedMode= new ModeCar();            
                    }
                    updateTransition();
             }
But I keep receiving the following errors even if setup few agents (as few as 2 agents) as long as the condition for transition is satisfied.
 
I have searched the forum’s past discussions if there’s similar problems resolved, but none.
 
Errors:
at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
        at repast.simphony.statecharts.DefaultStateChart.makeRegularTransition(DefaultStateChart.java:449)
        at repast.simphony.statecharts.DefaultStateChart.stateInit(DefaultStateChart.java:306)
 
Olusola
 
 
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 
 
Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.
 
This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, 
SlashDot.org! http://sdm.link/slashdot_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
 
 
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 
 
Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.
 
This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.
 
 
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 
 
Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.
 
This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.
 
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest