An Agent-based Model of Virtual Experiment Dazheng Wang Ruimin Shen Liping Shen Department of Computer Science ,Shanghai Jiaotong Univ. [Abstract]This paper analyzes the architecture of virtual experiment and discusses the possibility of building a standard interface for it.We also introduces an agent-based VE system ,which can integrates easily apparatus developed independently and using which a teacher can just focusing his own field even without any programming technique.This model may greatly eliminate many problems involved in software engineer and even make distributed experiment possible. [Index terms]Virtual Experiment,COM ,Agent INTRODUCTION With the development of the technology of computer and internet,various means to aid people to study on computer are devised. Virtual Experiment(VE) belongs to such domain.VE is an experiment simulated on computers for various reasons:to save money due to expensive apparatus ,to ensure safety because of dangerous chemical powders and so on.However,an interesting phenomena is that many VEs are developed in different entities though their functions are same. The components of VE,virtual apparatus,are difficult to reuse.On the other hand,the border between teacher and developer is not clear and it is usually not possible for a teacher to design an experiment with his own knowledge.This phenomena tells us a fact that we are wasting unnecessary time and energy.So it is an urgent requirement for us to devise a standard interface of virtual apparatus and a intelligent mechanism for teacher to design a VE without much unnecessary effort. Architecture of Virtual Experiment There is no doubt that VE is a complex system,so different people may have different perspectives on it.These people relevant to VE can be roughly divided into three groups:teachers ,programmers and students. On the basis of top-down analysis,VE consists of three parts:programming by programmers,designing by teachers and experimenting by students (see Figure1).Though software design is crucial in VE and the teacher also take part in making it,we should keep in mind the fact that not all of the teachers are programmers at the same time,which implies that different people with different background shoud have different responsibilities.A successful VE system must ensure designing an experiment as simple as to such an extent that the teacher can design VE using no other expertise but his own instructional field . Virtual Experiment Teacher Designing Experimenting Student Programming Programmer Figure 1 – Different Perspectives Component Object Model VE is made up of many virtual apparatus . To make them reusable and easy to integrate,the best technology to adopt might be Component Object Model.The breakdown of a project into its logical components is the essence of object-oriented analysis and design. That's also the basis for component software, which is composed of reusable pieces of software in binary form (as opposed to source code) that can be plugged into components from other vendors with relatively little effort. It is important to realize that a component-based approach to software development does not dictate the structure of an application. Rather, it is a model that makes possible the programming, use, and independent evolution of binary software components. Components are independent of the applications that use them as well as the programming languages used to create them. Though COM has so many merits of independece,scripting skill is still needed so as to design VE by gluing these virtual apparatus together. In order to eliminate the barrier between the teacher and VE,we must devise a mechanism for components to adapt to and communicate with the runtime environment of VE.The teacher can design VE by simple actions (such as drag and drop)without bothering the script technique. Virtual Apparatus The aim of our VE framework is to gain the advantage of two features: 1. A standard programming interface 2. Minimum interference into the inner structure of each virtual apparatus If we achieve this goal,we will never be trapped into the embarrassment of software engineer,that is,modules are always difficult to integrate,there is usually many bugs in the application,etc.The basic appearance of each virtual apparatus is shown in figure 2. Virtual Apparatus IDropSource IUnknown IAgent Figure 2 – Virtual Apparatus Figure 2 – Virtual Apparatus Each virtual apparatus is implemented as a COM object with some interfaces exposed to the ouside and a self-described XML file for registration.One of the interfaces ,called IDropSource,must be inherited to enable the teacher to interact with the apparatus.The IAgent interface will be discussed shortly. The special XML file is in fact a media for the virtual apparatus and VE to interact and has two sections:one is a readable section for VE to obtain the information of the COM object including its dynamic library file name,CLSID and IID,etc;the other is a writeable section filled by VE ,where the object can get the necessary run-time information such as its agent identity number , server name and port number. Agent Structure Since only minimum interference is done to each apparatus,it must do lots of work its own ,such as changing its behavior according to the environment condition.This character makes an apparatus look like an agent,so every one should implement the IAgent interface.Though several characteristics of agents have been discussed in the literature, we assume that agents exhibit the following three important properties in our modeling approach. 1. Autonomy - an agent can make decisions about what to do based on its own state, without the direct intervention of other entities. 2. Adaptation - an agent can perceive its environment,and respond to the changes in the environment in a timely fashion. 3. Cooperation - an agent can interact with other agents through a particular agent-communication language,and typically has the ability to engage in collaborative activities to achieve its goal. The agent wrapper of each apparatus is shown in figure 3. Once activated by the environment,the agent goes into the Agent Agent Deactivated Activated adaptation state.It sense the changing condition of the outside by receiving Adaptation message from other agents.Then it judges ReceivePMessage the condition variables and sees if they are ArrangeActions relevant,otherwise it just discards them.After the sensing phase,it can produces some plan by arranging a series ChangeAppearance of actions,which may result the changed appearance or its inner states.The agent SendPMessage can also give feedback to the environment by changing the experiment parameters. Figure 3 – Agent Structure The basic element of sensing and feedback states is a message queue,with which the agent can responds asynchronously without blocking other agents and the environment.The agent comes to the end of its life cycle if deactivated by the outside. Communication Only a minimum number of functions in an agent are exposed to the environment,such as Activate and Deactivate,but they cannot be accessed by other agents.The messages between agents are passive ,i.e.,they do not contain methods because agents never know each other’s structure.Once activated ,an agent just sends out massages containing measurement parameters according to its own state transitions,which are sent to another agent connected to it or to the environment.The parameters might be temperature,pressure and so on.Because the message is different from traditional method invocations,we name it as passive message or PMessage. A sample PMessage may looks like this(See Figure4). The communication mechanism is implemented on the basis of socket technique. At the beginning of its life cycle ,every agent must create a listening socket with the server address and port number assigned by the environment on registration. Those who want to communicate with it must bind to that address and port number.Such a email-like communication mechanism can make distributed experiment possible. If agents want to have a conversation ,they must send their identity numbers to each other via run-time environment.Figure 5 shows such scenario. Run-time Environment From:30001 To: 30002 Category:physics Name:temperature Unit:FD Value:45 4: ID1 2: ID1 3: ID2 1: ID2 6: PMessage Agent1 : coclass Figure 4 – Sample PMessage Agent2 : coclass 5: PMessage Figure 5 – Conversation scenario Conclusion and Futrue Work Since our virtual apparatus component is highly autonomous and possesses a clean programming interface,potential trouble for integrating them into a virtual experiment system is avoided.At the same time,we have achieved the feature for teacher to design an experiment with little effort.Futrue work will focus on the concurrency and responsiveness of attention to the analysis of heterogeneous our agent model.We will also pay much experiment platforms and realize the distributed virtual experiment system. References [1] [Burmeister, 1993] B. Burmeister, A. Haddadi, and K.Sundermeyer. Generic, Configurable, Cooperation Protocols for Multi-Agent Systems. Proceedings MAAMAW'93, pp. 157-171, Springer, 1993. [2] COM Specification http://www.microsoft.com [3] [Brazier, 1998] F. M. T. Brazier, C. M. Jonker, and J.[Odell, 1999] J. Odell. Agent Technology, green paper,produced by the OMG Agent Working Group, ed., 1999. [4] [Garijo, 1999] F. J. Garijo, and M. Boman. Multi-Agent System Engineering. Proceedings of MAAMAW'99.Springer, ed., 1999. [5] [Jonker, 1997] C. M. Jonker, and J. Treur. Compositional Verification of Multi-Agent Systems: a Formal Analysis of Pro-activeness and Reactiveness. Proceedings of International Workshop on Compositionality (COMPOS'97), Springer, 1997. [6] [Bauer, 1999] B. Bauer. Extending UML for the Specification of Interaction Protocols. submission for the 6th Call for Proposal of FIPA and revised version part of FIPA 99, 1999.
© Copyright 2026 Paperzz