Help me.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Help me.

Ying Min Jin
Hello.
I am beginner for development on Repast.
I have completed small Repast work with GIS. In fact, I am a GIS expert so I am interesting in the Repast.I would like to know the way for add new visualization and simulate on that.
In this situation, one simulation was finished yet, and but I want to continue to make new simulation on new visualization. I want to know about the way for that programmatically add new display, new context and new agents, new schedule etc.
I have finished like this.
 
    JPanel incidentPanel=new JPanel();
   RSApplication.getRSApplicationInstance().getGui().addVizualization("fire incident", incidentPanel);

So new visualization was added. I want to draw new shapes with new agents.
after, How I shall do it?
I am looking forward at reply.
Thank you.


Sent from Windows Mail


------------------------------------------------------------------------------

_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help me.

Jing 'Eric' Du
"Help me" often relates to life-threatening situations...Sorry my comment is irrelevant.

On Tue, Sep 6, 2016 at 10:56 AM, Ying Min Jin <[hidden email]> wrote:
Hello.
I am beginner for development on Repast.
I have completed small Repast work with GIS. In fact, I am a GIS expert so I am interesting in the Repast.I would like to know the way for add new visualization and simulate on that.
In this situation, one simulation was finished yet, and but I want to continue to make new simulation on new visualization. I want to know about the way for that programmatically add new display, new context and new agents, new schedule etc.
I have finished like this.
 
    JPanel incidentPanel=new JPanel();
   RSApplication.getRSApplicationInstance().getGui().addVizualization("fire incident", incidentPanel);

So new visualization was added. I want to draw new shapes with new agents.
after, How I shall do it?
I am looking forward at reply.
Thank you.


Sent from Windows Mail


------------------------------------------------------------------------------

_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest




--
Jing "Eric" Du, Ph.D.
Cell: (517)599-0486
[hidden email]
www.linkedin.com/in/jingdu

------------------------------------------------------------------------------

_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help me.

srcnick
In reply to this post by Ying Min Jin
The demo model “Mousetrap” includes a custom display. You can install the demo model in Simphony’s eclipse with File->Import Repast Examples.

All simphony displays implement IDisplay. In the mousetrap model, CustomDisplay.java is an example that displays a panel with a simple label in it. Note that most of the methods are empty or return null. The important methods are render, update and getPanel. When update is called the display should update its internal state to reflect the latest state of whatever its displaying. When render is called, the display should draw those updates. getPanel is called during initialization to put a panel into a display tab.

The next step then is telling simphony to load this display during initialization. You do that with a ModelInitializer. The model initializer is run once just after your scenario is loaded. It can be used to add additional items to the scenario tree that’s displayed on the left hand side of simphony. Its not immediately obvious but this is actually a tree of actions that simphony executes when it initializes a model prior to a run. A model initializer then can add a custom action that initializes a custom display. TrapInitializer.java does just that. The second added controller action is what sets up the custom display. Lastly, you need tell Simphony to run your ModelInitializer and you do that in the scenario.xml file located in your scenario directory (e.g. mousetrap.rs) by adding a model.initializer entry. For example,

⟨model.initializer class=”repast.simphony.demo.mousetrap.TrapInitializer”⟩

Nick
On Sep 6, 2016, at 11:56 AM, Ying Min Jin <[hidden email]> wrote:

Hello.
I am beginner for development on Repast. 
I have completed small Repast work with GIS. In fact, I am a GIS expert so I am interesting in the Repast.I would like to know the way for add new visualization and simulate on that.
In this situation, one simulation was finished yet, and but I want to continue to make new simulation on new visualization. I want to know about the way for that programmatically add new display, new context and new agents, new schedule etc.
I have finished like this.
 
    JPanel incidentPanel=new JPanel();
   RSApplication.getRSApplicationInstance().getGui().addVizualization("fire incident", incidentPanel);

So new visualization was added. I want to draw new shapes with new agents.
after, How I shall do it?
I am looking forward at reply.
Thank you.


Sent from Windows Mail

------------------------------------------------------------------------------
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest


------------------------------------------------------------------------------

_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Loading...