Download presentation
Presentation is loading. Please wait.
1
boris - additional timers, scope & brokering Simon Lynch s.c.lynch@tees.ac.uk
2
timers why, what & how? 1.agent timers 2.countdown timers 3.alarm timers
3
agent timers Agent a = new Agent( name ); a.addAgentTimerListener( new AgentTimerListener() {public void timerElapsed( Agent a ) {...code body... } }); a.setDelay( delay );... a.start();... a.stop();...
4
the ball example Agent a = new Agent( "anon" ); a.addAgentTimerListener( new AgentTimerListener() {public void timerElapsed( Agent a ) {erase(); x = (x+dx) % bounds; y = (y+dy) % bounds; display(); } }); a.setDelay( delay ); display(); a.start(); }
5
a countdown timer Agent a = new Agent( name ); a.addAgentTimerListener( new AgentTimerListener() {public void timerElapsed( Agent a ) {if( coundown-elapsed ) {a.stop(); switchOff(); } else {...code body... } } }); a.setDelay( delay ); switchOn(); a.start();
6
alarm timer given: Calendar alarmTime... Agent a = new Agent( name ); a.addAgentTimerListener( new AgentTimerListener() {public void timerElapsed( Agent a ) {a.stop(); alarmOn(); } }); long alarmMS = alarmTime.getTime().getTime(); long nowMS = new Date().getTime(); a.setDelay( alarmMS – nowMS ); if (delay > 0 ) a.start(); else alarmOn();
7
scope why, what & how? MAS partitions holons reduced complexity tailored partitions (eg: localised brokers) enhanced security
8
scope in Boris why, what & how? internal- behind portal local- behind router global- the default
9
scope
10
scope in Boris why, what & how? portal.addAgent( agent ) portal.addAgent( agent, Portal.INTERNAL ) portal.addAgent( agent, Portal.LOCAL )
11
Brokers yellow pages agents some are localised (in holons, etc) some keep record of providers need for central service? in boris / java map agents to services services to agents etc
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.