Presentation is loading. Please wait.

Presentation is loading. Please wait.

Communication thread core thread Spawn N negotiation threads... negotiation threads active inactive Initialize An Agent and Its Threads execution thread.

Similar presentations


Presentation on theme: "Communication thread core thread Spawn N negotiation threads... negotiation threads active inactive Initialize An Agent and Its Threads execution thread."— Presentation transcript:

1 communication thread core thread Spawn N negotiation threads... negotiation threads active inactive Initialize An Agent and Its Threads execution thread

2 Communication Thread Get message via socket Parse message Message? yes no Add to message queue... Message queue Accesses by other threads of the agent

3 Execution Thread Setup and Reset yes no Get first job From queue... Job queue Accesses by core thread of the agent job’s startTime< currentTime? Sleep Apply Execution heuristics Abandon? Execute no yes Remove Job Executed? Wait for data to be uploaded yes Remove job Apply Persistence heuristics no Commited? Sleep no yes from job queue

4 Execution Thread: Execution Heuristics Time Conflict If the job is not a tracking task and the expected stop time is later than the start of the next job plus a predefined relax_time, then Abandon = true. Negotiation Conflict If the job is not a tracking task and the agent is currently initiating a tracking coalition, then Abandon = true. Look-Ahead Conflict If the job is not a tracking task and the agent has a tracking task already planned for the near future, then Abandon = true.

5 Execution Thread: Persistence Heuristics Persistent Commitment If the job is a tracking task and tracking is still viable, then Committed = true.

6 Execution Thread: Execution Behavior SD1, SD2, SD3 Task type? Search and Detect Target Detected? Calibrate Sensor Target Detected? C1, C2, C3 Do nothing Success I Measure Initial Target Target Detected? M1, M2, M3 Track Target Disappeared or Terminated as planned T1, T2, T3 Executed = true Executed = true Executed = true Executed = true Executed = true Job confirmed? yes Executed = false no

7 Core Thread Setup Check Messages Check Tasks Check Execution Check Coalition

8 Core Thread: Setup Setup Profile Manager initializes the agent’s status and configures its neighbors Comm Manager sets up comm. channel with Radsim, creates a socket, allocates msg. queue, sets msg. observer, and activates receiver Task Manager Think Manager Negotiation Manager spawns all negotiation threads and links data to each thread; CLIPS processes are forked and pre- defined templates and rules are loaded RTSS Manager sets up data stream access for Real-Time Scheduling Service (RTSS) interface and registers threads and agent process IDs CBR Manager loads two case bases, for initiating and responding cases of negotiation Radar Manager initializes the sensor that the agent controls, measures background noise for each sector, turns on the radar observer, adds all neighboring sensors to its radar model has a lesser role now because the radar tasks are managed by the Execution Manager Execution Manager sets up the execution thread and executes tasks off the job queue Coalition Manager initializes the coalition vector

9 Core Thread: Check Messages Access message queue msg. for prof? Parse message type yes Check messages completed no A negotiation request Check messages completed Active Negotiation? Discard message no yes An acknowledgment Respond to request Respond to ack

10 Core Thread: Check Messages: Respond to Ack Ack type? Confirm tracking task Confirm completed Discard tracking task Discard acknowledgment... Job queue

11 Core Thread: Check Messages: Respond to Request CPU? Feasibility Study Feasible & neg. idle? yes no request no already doing? Agree to request yes no Decline to negotiate Modify request? yes no Modify Request Retrieve best case via CBR Upload data Activate negotiation threads thread activated? completed noyes

12 Core Thread: Check Tasks (Negotiation Tasks Only) Status? Initiating & success Negotiation task Check Tasks Completed Download & Update Data Store Case Update Coalition Remove Task Download & Update Data Store Case Update Coalition Remove Task Clear Negotiation Thread Download & Update Data Store Case Transition Task Download & Update Data Store Case Remove Task Initiating & failure Responding & success Responding & failure... Task queue

13 Core Thread: Check Tasks: Update Coalition If the negotiation is successful, the update involves modifying the coalition information to reflect the success. If the negotiation is not successful, the update removes the coalition member (the negotiation partner) from the coalition.

14 Core Thread: Check Tasks: Transition Task CPU? yes New task no Configure Tracking Task Reorganize Thread Allocation Insert Task to Job Queue... Job queue Clean up Job Queue Remove Task

15 Core Thread: Check Execution A job is completed? no Execution thread’s current status yes Check Execution Completed Job type? Clear Execution Thread Clear Execution Thread Finish Measure Init. Target Clear Execution Thread Calibrate Sensor Or Search and Detect Measure Initial Target Tracking Idle Target detected? Handle Target Check Execution Completed

16 Core Thread: Handle Target Configure Measuring Task Insert Task to Job Queue Handle target completed success? Clean up Job Queue yes... Job queue

17 Core Thread: Finish Measure Initial Target Update target w/ Radar Manager Compute sensor-sector list Determine sample size Analyze feasible partners Initiate negotiations completed Target detected? completed no Clear Execution Thread Execution thread’s current status Download Target Information yes

18 Core Thread: Initiate Negotiations Retrieve best case via CBR completed Upload data Sort feasible partners (utility) Neg. thread idle? Activate negotiation thread activated? yes no Create negotiation task Initialize coalition For all partners Update coalition Done Add task to task queue... Task queue

19 Core Thread: Check Coalition decided? no Coalition’s current status yes Check Coalition Completed coalition fulfilled? Acknowledge to Discard Coalition Acknowledge to Confirm Coalition Configure Tracking Task Confirm Coalition no Send to all agreed coalition members Discard Coalition yes Insert it to Job Queue Clean up Job Queue Confirm the Task Send to all agreed coalition members... Job queue

20 Negotiation Thread Setup and Reset Wait to be activated Download data Responding Behavior Mode? Responding to a negotiation request Initiating a negotiation request Initiating Behavior Update data Wait for data to be uploaded

21 Negotiation Thread: Initiating Behavior Compose first initiating message Done? Done = no Send Message Wait for response response? Parse response React & Compose Message no yes no React & compose message Negotiation completed Check Coalition abort? yes no time? expired still okay

22 Negotiation Thread: Initiating Behavior: Check Coalition If the coalition has gathered enough help for CPU reallocation, then Abort = true. If the tracking coalition has been satisfied, then Abort = true. If the tracking coalition is no longer possible, then Abort = true.

23 Negotiation Thread: Initiating Behavior: React & Compose Message type? Response message Check Coalition Acceptability modify time accept? Failure no Update Coalition Initiate yes Failure no go out of time stop Check Coalition Acceptability accept? Update Coalition Success yes counter agree Compose More Info more info no null? Info_NullInfo yesno

24 Negotiation Thread: Responding Behavior Compose first responding message Done? Done = no Send Message Wait for response response? Parse response React & Compose Message no yes no React & compose message Negotiation completed time? expired still okay Reset CLIPS

25 Negotiation Thread: Responding Behavior: React & Compose Message type? Response message info yes abort out of time stop yes agree yes info null CLIPS: Rule-Based Reasoning Compute evidence support > persuas. thresh? Agree More Info no CPU? no React CPU CPU? Counter Stop no Failure Success

26 Negotiation Thread: Responding Behavior: React CPU If the current CPU willing to give up is greater than or equal to the desired CPU (by the initiator), and the desired CPU is smaller than or equal to the maximum CPU willing to give up, then Agree. If the current CPU willing to give up is greater than the maximum CPU willing to give up, then Counter with maximum CPU willing to give up. If time allocated for the negotiation is running out, then Counter. If the current CPU willing to give up is grater than the maximum CPU willing to give up, Counter with the latter value. Otherwise, Counter with the former.


Download ppt "Communication thread core thread Spawn N negotiation threads... negotiation threads active inactive Initialize An Agent and Its Threads execution thread."

Similar presentations


Ads by Google