关于多代理系统的实现 [英] regarding the implementation of multi agent system

查看:186
本文介绍了关于多代理系统的实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何处理代理编码



多代理环境,特别是航空预订。

how we do he coding of agent

in multi agent environment, specifically for air line reservation.

推荐答案

过去我实现了基于代理的系统。我工作的原则是有三个级别,经理,代理和工人。



经理收到所有请求并确保将它们传递给正确的代理然后将回复传递给呼叫者。简单且易于定义的责任,在那里不会出错。

代理维护FIFO请求队列,并有一个或多个工作人员来管理工作负载。当工人有空时,它会收到一个新请求。

工人处理个别请求。这是系统中唯一不同类型的部分。



简单,有效且可扩展性强。看看未来几个月,如果我完成它,将会有一篇文章。
I have implemented agent based systems in the past. The principle I have worked to is that there are three levels, Manager, Agent and Worker.

The Manager receives all the requests and ensures they are passed to the correct Agent then passes the replies back to the callers. Simple and easily defined responsibility, can''t go too wrong there.
The Agent maintains a FIFO queue of requests and has one or more Workers to manage the work load. When a Worker is free, it receives a new request.
The Workers process the individual requests. This is the only part of the system that changes for different types.

Simple, effective and very expandable. Look out in the coming months and there will be an article on this if I ever get it finished.


#include<iostream.h>
using namespace std;

int main() {
  int x, y;
  cout<<"what is your height?"<<"\nyour feet: ";
  cin>>x;
  cout<<"your inches: ";
  cin>>y;
  cout<<"your height is: "<<x<<"'"<<" and "<<y<<"''";
  cout<<"\nYou are tall!";

  return 0;
}


这篇关于关于多代理系统的实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆