The object oriented design of the integrated Water Modelling System MOHID
Object Oriented Design of the Intuitive Interface
1 Introduction
The Intuitive Interface is a research project that investigates new methods of interaction with the computer by freeing the computer from the nonflexible desktop setup and integrating the interface in the every-day physical environment of the user [3]. We focus on creative people, as users, who are often unfamiliar with computers and hesitate before getting involved with mouse and keyboard, because of the symbolic and alphanumeric abstraction that is necessary. The system makes strong use of real space in front of a rear projection screen (Figure 1). A stereo computer vision system is used for sensing user posture and simple gestures like pointing, together with a speech recognition software that is used to trigger commands. Unlike other gesture recognition sys-
Object Oriented Design for Theory Driven Hadronic Shower Models
INTRODUCTION
Theory based Monte Carlo models that are capable to predict nal states of reactions with a large variety of projectiles and nuclear targets in the energy region above the energies accessible to testbeam studies are considered an essential part of the high energy physics simulation toolkit GEANT4 1 . Theory driven models for inelastic scattering are currently available in a rst implementation, covering the full energy range of LHC experiments. The current philosophy implies the usage of parton string models at high energies, of intranuclear transport models at intermediate energies, of pre-equilibrium decay models at low energies, and of statistical break-up models for nuclear de-excitation. It is expected that in the high energy regime the inclusion of these models will allow reliable extrapolation of the simulation results beyond the test beam energy range.
软件工程双语测验试卷
软件⼯程双语测验试卷………………………………密………………………………封………………………………线………………………………得分评卷⼈Ⅰ.Multiple Choices (Each 1 Point, total 15 Points):1. Which of the items listed below is not one of the software engineering layers? ( )A)Process B)Manufacturing C)Methods D)Tools2. What are the three generic phases of software engineering?( )A)definition, development, maintenance B)what, how, whereC)programming, debugging, maintenance D)analysis, design, testing3. The unit that the software Reuse is ( ).A)software module B)Performance C)system D)function4. The prototyping model of software development is ( ).A)A reasonable approach when requirements are well definedB)A useful approach when a customer cannot define requirements clearlyC)The best approach to use for projects with large development teamsD)A risky model that rarely produces a meaningful product5.Requirement specifications should not include the contents of the description are ( ).A)Main function B)algorithm for detailed proceduresC)user interface and operating environment D)software performance6. Use-cases are scenarios that describe ( ).A)the build plan for a software productB)how CASE tools will be used to construct the system.C)how software is to be used in a given situationD)the test cases for a software product7.Which of the following is not an area of concern in the design model?( )A)architecture B)data C)interfaces D)project scope ………………………………密………………………………封………………………………线………………………………8. To achieve high modularity of software components, you need ( ).A)high coupling and high cohesion B)high coupling and low cohesionC)low coupling and low cohesion D)low coupling and high cohesion9. Encapsulation of attributes and operations within an object ( ).A)is a poor programming practice.B)increases the cost of program maintenance.C)allows for easy reuse of this information.D)none of the above10. The UML approach to object-oriented design has two major activities:( ).A)message design and system design B)interface design and message designC)architectural design and object design D)system design and object design11. Which of these is not one of the primary benefits of object-oriented architectures? ( )A)easy component reuse B)improved execution performanceC)information hiding D)simplified interfaces12. The first step in any OOA process model are to ( ).A)build an object-relationship model B)define collaborations between objectsC)elicit customer requirements D)select a representation language13. Which of these are objectives for software testing? ( )A)determine the productivity of programmers B)eliminate the need for future program maintenance C)eliminate every error prior to release D)uncover software errors14. A generalized description of a collection of similar objects is a ( ).A)class B)instance C)subclass D)super class15.The longest stage in software life cycle is ( )A)requirement analysis B)design C)test D)maintenance得分评卷⼈Ⅱ.True or False (Each 2, total 10 Points)()1.“Software” is equal to “program”.()2. In the real project developing, we need to consider the reliability and usability of the system.………………………………密………………………………封………………………………线………………………………()3.Software is a product and can be manufactured using the same technologies used for otherengineering artifacts.()4. If the test procedure does not find any errors, then the software free of errors.()5. Adding more people to a project that is already behind schedule is a good way to catch up.Ⅲ. Noun Explanation. (Each 5 points, total 20 points)1. software process2. cohesion3. Computing Return on Investment (ROI)4. fan_inⅣ.Answer the Following Questions Briefly. (Each 5 Points, total 20 Points)1. What is software maintenance? Please describe the four types of software maintenance.2. What are the three major content of the software performance properties. Please describe how to improving system performance?3. What are the benefits of using prototyping?4. Description the difference in purposes between software testing and debugging .得分评卷⼈得分评卷⼈………………………………密………………………………封………………………………线………………………………得分评卷⼈Ⅴ.Software Engineering Practice (35 Points)1.Analyse and design a simple management information system of a library using the OO methodology. The system allows the users to manage books (including adding, deleting, displaying and updating books) and readers to manage personal and Library operations (including adding, deleting, displaying and updating readers, borrowing and returning books). Write out the following Requirements specifications briefly:(1) Draw the use case diagram. (8points)………………………………密………………………………封………………………………线………………………………(2) Give the main use case description (no less than two use case) as follows:( 14 points)Use case nameUse case name:BriefdescriptionBriefdescriptionpreconditionpreconditionpost conditionpost conditionmain processmain processbranching processbranching processexceptionexception2. According to the following fault-tree, please derive a matching cut-set tree. (13 points)fault-tree、管路敷设技术保护层防腐跨接地线弯曲半径标等,要求技术交底。
托福双语阅读素材:Theoili...
托福双语阅读素材:Theoilindustrystrugglestoenterthedigitalage想要提高托福阅读能力,我们一定要在日常生活中有意识地增加英语阅读量,提升语感和熟练度,这其中比较常用也比较方便地一个方式就是利用各类英文报刊杂志文章进行精读与泛读练习。
下面我们来看一篇经济学人文章:石油工业迈向数字时代。
托福双语阅读素材:The oil industry struggles to enter the digital ageOil and technologyData drillingThe oil industry struggles to enter the digital age石油与科技数字钻探石油工业艰难迈向数字时代IT SOUNDS like a spectacular feat of engineering. Employees of Royal Dutch Shell located in Calgary, Canada, recently drilled a well 6,200 miles (10,000km) away in Vaca Muerta, Argentina. In fact, the engineers of the Anglo-Dutch oil major were using computers to perform what they call “virtual drilling”, based on their knowledge of Fox Creek, a shale bed in Alberta, which has similar geological features to Argentina’s biggest shale deposit. They used real-time data sent from a rig in Vaca Muerta to design the well and control the speed and pressure of the drilling. On their second try, they completed the well for $5.4m, down from $15m a few years ago. “It’s the cheapest well we’ve drilled in Argentina,” says Ben van Beurden, Shell’s chief executive.这听上去是一个令人叹为观止的工程壮举(第N次…别老achievement)——身在加拿大卡尔加里(Calgary)的荷兰皇家壳牌公司员工最近在10,000公里之外的阿根廷瓦卡姆尔塔(Vaca Muerta)油田远程钻探了一口油井。
Coad's Object-Oriented Analysis
VII. Implementation & Evaluation On-going Maintenance Phase
OOAD only affects phase III, IV, and V. The other phases remain the same.
© 1995 John Mylopoulos
© 1995 John Mylopoulos
Object-Oriented Analysis -- 9
s
s
Phase V: Develop and Document
s
s
s s s
The system is implemented on the basis of the design specification. Analyst works with programmers to develop any original software needed Analyst uses structured techniques (pseudo code, flowcharts,…) to communicate with the programmers Programming of the system is carried out Program testing is carried out Procedures, system manuals, software specifications and documentation are completed
Object-Oriented Analysis -- 14
Five Layers to OOA
s s s s s
Class/Object Layer Structure Layer Service Layer Attribute Layer Subject Layer
The Object-Oriented Programming on My Sight
The Object-Oriented Programming on My SightI believe, in fact, the object-oriented (OO) is a kind of method instead of programming language. And the object-oriented language is computer language who use this kind of method into the language and apply it into programming design.“Object-oriented programming is a technique - a paradigm for writing “good” programs for a set of problems. If the term “objec t-oriented language” means any thing, it must mean a language that has mechanisms that support the object-ori ented style of programming well” said Stroustrup. B, 1988.There are lots of languages which are object-oriented language. Such as: C++, Java, c# etc. Java is a kind of object-oriented language. But not all programming language scan beobject-orientedfor example C is a procedure-oriented language.One of the most important factor of java (object-oriented programming) is class and object. I think the meaning of the class is the abstraction of the object-oriented concept behindit.classes (class) is the key to the implementation of the OOP paradigm, as a kind of conceptis instantiated object. The object can not existence with out class. And there are there factors of class which are:encapsulation, inheritance and polymorphism. “Inheritance, polymorphism, and encapsulation comprise the three central characteristics of object-oriented programming. Polymorphism ensures that the proper method will be executed based on the calling object’s type.”(Fouché, G. and Nash, T, 2007.)Encapsulation allows you to contr ol access to your object’s state, while making it easier to maintain or change your implementation at a later date.That means we hide something that unnecessary to show out of the class for example, for a class person we get age, weight, name etc. But the person will not prove them to the outer world. If we want to get the age of a person, we should call some methods to get the age. By this way, we will be well organized and efficiency in very huge project and avoid logical mess.Both the structured andobject-oriented approach rely on encapsulation the technique by which a set of software components is aggregated into a structure that can be treated as a unit from an external point of view.( Page-Jones, M. 1992)Inheritance allows you to create class hierarchies, where a base class gives its behavior and attributes to a derived class. You are then free to modify or extend its functionality. In javawe can consider everything as object. For example, I am a student, so student can be a class and I am an object. The student can have many functions such as: study, take exam, doing homework. So these three function could be defined in the student class, then I can get these kind of functions as well as all the students. The teachers also have the same functions such as: teaching, grading for homework, etc. However, in the meantime, all the teachers and students are human beings, they have the same functions such as eating, sleeping, drinking, etc. So thehuman beings could be a class with the functions of eating, sleeping and drinking. Then the teacher and student could be the subclass of human being. So the teacher and student class do not have to define these functions again. Buy this way, a new class (the subclass) extends to the superclass that will improve the superclass a lot and improve the code reuse.“Object-oriented programming is a practical and useful programming methodology that encourages mod ular design and software reuse.” said Snyder, A., 1986The last but most important thing ispolymorphism. Encapsulation allows you to control access to your object’s state, while making it easier to maintain or change your implementation at a later date.(Fouché, G. and Nash, T, 2007.) in my opinion Polymorphism is the core of OOP. This is because the polymorphism enables object for the same message to have different ways of answering.Through inherits a class, the sub class can coverage, overloading its method, the super object does not have to modify the code at the same time. Polymorphismcan increase the flexibility and extensibility of the code. For example, we define a class person whose functions is eating, and another class student extends person. So student is the subclass, and person is the super animal. We can create like: Student s = new Student. Also, we can create like: Person p = new student.Although object-oriented programmingmakesthe programming much closer to the actual world, all objects are endowed with attributes and methods, there are still some disadvantage that we face.The first thing is that it will be complicate when programming for a small program. Then is over encapsulation, and we need more extra codes to call some methods, that will be reduced efficiency of programs. And maybe some programmer will use inheritance abuse for little code.In total, although the object-oriented have some problems, I still believe this kind of idea is very important for programmer. If we understand it well, we will be benefit a lot!Reference:1.Stroustrup, B., 1988. What is object-oriented programming?. IEEE software, 5(3),pp.10-20.2.Fouché, G. and Nash, T., 2007. Inheritance, Polymorphism, and Encapsulation.Accelerated VB 2005, pp.101-115.3.Allen, D., Allen, A., Burns, T. and Cardwell, L., The Efficacy of the Principles ofPolymorphism, Inheritance, and Encapsulation Polymorphism….4.Snyder, A., 1986, June. Encapsulation and inheritance in object-oriented programminglanguages. In ACM Sigplan Notices (Vol. 21, No. 11, pp. 38-45). ACM.5.Page-Jones, M., 1992. Comparing techniques by means of encapsulation and connascence.Communications of the ACM, 35(9), pp.147-151.。
Extending an Object-Oriented Model to Support Coordination.
Extending an Object−Oriented Model toSupport Coordination.Emmanuel LENORMAND, Roland BALTERUnite Mixte Bull−IMAGCentre Equation2 Avenue de Vignate38 610 GIERESFRANCEe−mail: [Emmanuel.Lenormand, Roland.Balter]@imag.frAbstract:The Guide distributed object−oriented platform provides an integrated environ-ment for building distributed applications based on the object paradigm. It is in-tended to extend this model as well as the functionalities of the run−time systemto provide better support of groupware applications involving the coordination ofcooperating activities. This paper describes the extensions to the basic ob-ject−oriented model required to achieve this objective.1Background: The Guide Object−Oriented Model.The Guide platform provides an integrated environment for the development and execu-tion of distributed applications handling persistent data. This environment allows distributed applications to be developed using a high−level object oriented language. The Guide platform comprises a run−time system, a number of applications services, built as objects, and a set of development tools, including the compiler of the language, a distributed debugger and a class browser. Two versions of the platform are available: one is running as a software layer on top of Unix; another version is implemented directly on top of the Mach 3.0 micro−kernel and provides full interoperability with the OSF−1 server.In Guide, applications are structured in terms of objects. Objects are fine−grained passive entities which are stored in a multi−site location transparent secondary storage. They are loaded on demand into a virtual memory for execution.The main execution unit used by applications is the job, which may be viewed as a mul-tiprocess virtual machine composed of distributed concurrent activities operating on objects.A basic operation in the system is object invocation. An invocation specifies the system reference of the invoked object, the name of a method and the parameters of the invocation. The reference contains a unique object identifier, called Oid, and location hints. Since the2Extending an Object−Oriented Model to Support Coordination.objects may be located on different nodes, jobs and activities may be distributed. However, the distribution is hidden from the user. At the application level, communication between jobs and activities entirely relies on object sharing. Object sharing is controlled through the use of a set of synchronization constraints, expressed in terms of guards associated with methods, which are specified in the class of the object.The Unix version of the Guide platform was intensively used for the construction of pilot cooperative applications. This included a cooperative structured document editor, a workflow application dealing with the circulation of documents and folders within an en-terprise and a multi−user distributed spreadsheet. Complementary experience was also gained from the implementation of the development environment itself, built in terms of objects. It includes a coordination service, which allows the cooperation of interdependent development tools, such as the browser, the syntactic editor, the compiler, and the debug-ger[Boyer94]. From these early experiments, it was possible to evaluate the benefits and weaknesses of the Guide approach for the expression and control of coordination. This analysis leads us to revise the Guide computational model to better fit cooperative applica-tion requirements.This study is currently in progress and we describe its guiding principles in Section 2.2Specific Requirements for Coordination.The way we understand coordination remains close to the definition given in [Malone90]:[Coordination is] the act of managing interdependencies between activities performed to achieve a goal.Our objective is not to define a coordination model but to provide a set of abstractions and tools which will allow the construction of a large variety of coordination models. Based on the current definition of the Guide model and system, the main issues to be addressed are: the ability to manage activities (section 2.1), integration of pattern−based and name−based com-munications within the name service (section 2.2) and additional communication and syn-chronization facilities based on event handling (section 2.3). Finally, section 2.4 introduces the concept of event broker which aims at combining the functionalities of the naming ser-vice and the event−based communication service. It is expected that the event broker would greatly assist application programmers in the design of coordination services.2.1Activity management.From Malone’s definition, it appears that activities (i.e. active entities) are central to the design of coordination capabilities. Thus there is a need for the actual management of activities. This includes creating, deleting, suspending, resuming a given activity, or a group3 of activities, as well as the ability for a given activity to react to external events according todefined behaviours.At the time being, activities defined in the Guide model are part of the computational model, but they are not part of the application programming interface. Consequently there is a need to make activities actually visible from the application designer.Two approaches are currently considered for activity handling. The first approach con-sists in considering activities as first−class objects and to treat them as standard objects (at least from the programmer point of view). In this approach a type "Activity" is defined which specifies a basic behaviour for an activity as well as state variables (activity variables do not exist at the time being in Guide). Behaviour definition includes not only the methods which can be applied on the activity object but also a set of event handlers for the treatment of incoming events. A given behavior may then be refined using the inheritance mechanism. However, it is anticipated that complete freedom in the definition of new behaviors may lead to severe implementation problems. Moreover, the uniformity of definition and manipulation for passive and active entities (objects and activities) may be confusing for the program-mer.An alternative approach consists in considering activities as a new category of entities besides existing ones, namely types, classes and objects. Since the nature of activity may change from one application domain to another, it would be necessary to define different basic classes of activity with their own behavior. This solution would certainly allow better control and easier implementation. At the opposite, this solution has one major drawback, insofar as it introduces a new concept at the model level, which may become quite cum-bersome. In case this approach prevails, the aims of each type of entities (active or passive) would have to be clearly separated, or the programmer could use either one or the other to reach the same goal, thus lead to a confused style of programming.A third approach would consist in considering the use of active objects, that is objects which hold their own thread of control. This was rejected because objects in Guide are usually small and the cost of implementing a large number of small active objects is pro-hibitive. Moreover, this approach could lead to the confused and mixed style of programming we condemned above.2.2Advanced naming service.Since activities are now handled at the programming level, they must be identified. The question is raised to know whether the current naming facilities are satisfactory or if they should be extended.In Guide, the communication between objects is name−based (i.e. objects are identified by their name). Object naming takes two forms which correspond to two levels of naming. At the lowest level objects are accessed through typed references which hold a unique sys-tem−wide object identifier (Oid). However objects may also have one or more symbolic names which are handled by a naming service. In its current implementation symbolic names are4Extending an Object−Oriented Model to Support Coordination.organised according to a hierarchical structure using directories. A simple name service allows the retrieval of an object identifier given its symbolic name.Name−based communication is rather insufficient for the support of certain forms of co-ordination where the identity of the cooperating activities involved in a partnership is not necessarily known. A typical example is a distributed cooperative document editor where the actual modifications carried out on a part of the document should be propagated only to those companion authors "who are interested in" this part of the document. That is why coordi-nation also requires pattern−based communication, where the identity of cooperating activities is defined by a set of properties. Properties may include type or class information, as well as public attribute or state data.2.3Communication and synchronization.Coordination combines two basic aspects: communication and synchronization. One can distinguish two kinds of interaction between agents whether the communication between them is performed directly, using events, or indirectly through shared objects.As mentioned in Section 1, the Guide model provides object sharing and the ability to specify sophisticated synchronization schemes. On the contrary, direct communication be-tween agents is not supplied; the lack of an event mechanism was already raised by experi-ments with Guide[Boyer94] and is stressed by the new orientation we are taking.An event mechanism allows activities to react to changes in the state of the system by sending particular messages which entail reactions by their addressees[Menon93].The basic principles of the event−based communication are as follows:•events are raised by activities. They can be viewed as messages which are typed and contain context data. Events are conveyed to recipient activities in two ways.They may be directly addressed to a set of selected activities or they may be addressed to an event−broker (see 2.4) which forward them to those activities which have "shown interest" in these events.•on the receiving side, the reception is allowed by the execution of a handler. These activations are dynamic, and so are the deactivations. Thus, the set of events in which an entity is interested evolves at will. Each handler is part of the interface of the activity and its execution is performed within the addressee. The definition of handlers remains crucial − should they only be defined within activities or may they also be defined within classes the activities execute? − as the problem of their (de)activation.The synchronization associated with these mechanisms indicates on which conditions an event is raised by an agent −blocking or non−blocking−, notified to an agent −queued or handled at once− or handled by an agent −handled concurrently or sequentially. Thus, this mechanism allows multiple synchronization schemes to be described, depending on the combination of properties of raise, notification and treatment of events.52.4Event Broker.In 2.3, we have introduced the notion of an event broker to perform event switching be-tween senders and receivers. The event broker integrates within a single component two functions: naming and event management.Its role comprises two functions. First, it has to manage the relationships between activities and events. From the sender point of view, it registers what activity may send what type of event. From the receiver point of view, it maintains an updated list of activities and their associated handlers. It may also register the status of each handler (activated vs de-activated). In addition, it implements the actual switching of event according to various policies as described in the OMG recommendation[OMG93].3Conclusion.We list above the extensions that may be relevant to support coordination in an extended object−oriented model. Our aim is now to integrate these features to the existing Guide language and run−time system to provide programmers with powerful tools to design coop-erative applications.This integration implies the introduction at the language level of new constructs for defining, manipulating and designating activities and events. Then, the associative naming facilities entail deep modifications in both language and run−time system. The language must propose constructs which enables such a naming, without overriding classical "per Oid" naming. The run−time system must provide support for a naming service which takes in ac-count the passivity of objects and dynamicity of activities to give a uniform naming scheme. This service can be partly inspired by X500 services. Finally, the run−time system will evolve to supply an event mechanism and a support for integrating it with the naming service in the event broker.Bibliography[Boyer94] Boyer F., Coordination entre outils dans un environnement de développement de logiciels, Thèse de Doctorat de 3ème cycle, Université Joseph Fourier, Grenoble, France, February 1994.[Malone90] Malone T.W. et Crowston K., ‘‘What is Coordination Theory and How Can It Help Design Cooperative Work Systems’’, CSCW’90: Proceedings of the Conference on Computer−Supported Cooperative Work, édité par F. Halasz, pp. 357−370, Asso-ciation for Computing Machinery, October 1990.[Menon93] Menon S., Dasgupta P. et Leblanc R.J., ‘‘Asynchronous Event Handling in Dis-tributed Object−Based Systems’’, ICDCS’93, pp. 383−390, May 1993.[OMG93] Object Management Group, Joint Object Services Submissions: Ch.1 Event Ser-vice Specification, (93.2.3), February 1993.。
英文翻译
郑州轻工业学院本科毕业设计(论文)英文翻译题目基于iWebOffice中间件的文档管理系统学生姓名黄炳全专业班级计算机科学与技术2001级2班学号01471222院(系)计算机与通信工程学院指导教师张建伟(副教授)完成时间 2005 年 6 月10 日英文原文Bruce Eckel. Thinking in Java, 2nd edition(part). America: electronic booksHiding the ImplementationA primary consideration in object-oriented design is “separating the things that change from the things that stay the same.”This is particularly important for libraries. Users (client programmers) of that library must be able to rely on the part they use, and know that they won’t need to rewrite code if a new version of the library comes out. On the flip side, the library creator must have the freedom to make modifications and improvements with the certainty that the client code won’t be affected by those changes.This can be achieved through convention. For example, the library programmer must agree to not remove existing methods when modifying a class in the library, since that would break the client programmer’s code. The reverse situation is thornier, however. In the case of a field, how can the library creator know which fields have been accessed by client programmers? This is also true with methods that are only part of the implementation of a class, and not meant to be used directly by the client programmer. But what if the library creator wants to rip out an old implementation and put in a new one? Changing any of those members might brea k a client programmer’s code. Thus the library creator is in a strait jacket and can’t change anything.To solve this problem, Java provides access specifiers to allow the library creator to say what is available to the client programmer and what is not. The levels of access control from “most access” to “least access” are public, protected, package access (which has no keyword), and private. From the previous paragraph you might think that, as a library designer, you’ll want to keep everything as “private” as possible, and expose only the methods that you want the client programmer to use. This is exactly right, even though it’s often counterintuitive for people who program in other languages (especially C) and are used to accessing everything without restriction. By the end of this chapter you should be convinced of the value of access control in Java.The concept of a library of components and the control over who can access the components of that library is not complete, however. There’s still the quest ion of how the components are bundled together into a cohesive library unit. This is controlled with the package keyword in Java, and the access specifiers are affected by whether a class is in the same package or in a separate package. So to begin this ch apter, you’ll learn how library components are placed intopackages. Then you’ll be able to understand the complete meaning of the access specifiers.package: the library unitA package is what becomes available when you use the import keyword to bring in an entire library, such asimport java.util.*;This brings in the entire utility library that’s part of the standard Java distribution. For instance, there’s a class called ArrayList in java.util, so you can now either specify the full name java.util.ArrayList (which you can do without the import statement), or you can simply say ArrayList (because of the import).If you want to bring in a single class, you can name that class in the import statementimport java.util.ArrayList;Now you can use ArrayList with no qualification. However, none of the other classes in java.util are available.The reason for all this importing is to provide a mechanism to manage name spaces. The names of all your class members are insulated from each other. A method f( ) inside a class A will not clash with an f( )that has the same signature (argument list) in class B. But what about the class names? Suppose you create a Stack class that is installed on a machine that already has a Stack class that’s written by someone else? Th is potential clashing of names is why it’s important to have complete control over the name spaces in Java, and to be able to create a completely unique name regardless of the constraints of the Internet.Most of the examples thus far in this book have existed in a single file and have been designed for local use, so they haven’t bothered with package names. (In this case the class name is placed in the “default package.”) This is certainly an option, and for simplicity’s sake this approach will be used wh enever possible throughout the rest of this book. However, if you’re planning to create libraries or programs that are friendly to other Java programs on the same machine, you must think about preventing class name clashes.When you create a source-code f ile for Java, it’s commonly called a compilation unit (sometimes a translation unit). Each compilation unit must have a name ending in .java, and inside the compilation unit there can be a public class that must have the same name as the file (including capitalization, but excludingthe .java filename extension). There can be only one public class in each compilation unit, otherwise the compiler will complain. If there are additional classes in that compilation unit, they are hidden from the world outside that package because they’re not public, and they comprise “support” classes for the main public class.When you compile a .java file, you get an output file for each class in the .java file. Each output file has the name of a class in the .java file, but with an extension of .class. Thus you can end up with quite a few .class files from a small number of .java files. If you’ve programmed with a compiled language, you might be used to the compiler spitting out an intermediate form (usually an “obj” file) th at is then packaged together with others of its kind using a linker (to create an executable file) or a librarian (to create a library). That’s not how Java works. A working program is a bunch of .class files, which can be packaged and compressed into a Ja va ARchive (JAR) file (using Java’s jar archiver). The Java interpreter is responsible for finding, loading, and interpreting[26] these files.A library is a group of these class files. Each file has one class that is public (you’re not forced to have a public class, but it’s typical), so there’s one component for each file. If you want to say that all these components (each in their own separate .java and .class files) belong together, that’s where the package keyword comes in.When you say:package mypackage;at the beginning of a file (if you use a package statement, it must appear as the first noncomment in the file), you’r e stating that this compilation unit is part of a library named mypackage. Or, put another way, you’re saying that the public class name within this compilation unit is under the umbrella of the name mypackage, and anyone who wants to use the name must either fully specify the name or use the import keyword in combination with mypackage (using the choices given previously). Note that the convention for Java package names is to use all lowercase letters, even for intermediate words.For example, suppose the name of the file is MyClass.java. This means there can be one and only one public class in that file, and the name of that class must be MyClass (including the capitalization):package mypackage;public class MyClass {// . . .Now, if someone wants to use MyClass or, for that matter, any of the other public classes in mypackage, they must use the import keyword to make the name or names in mypackage available. The alternative is to give the fully qualified name:mypackage.MyClass m = new mypackage.MyClass();The import keyword can make this much cleaner:import mypackage.*;// . . .MyClass m = new MyClass();It’s worth keeping in mind that what the package and import keywords allow you to do, as a library designer, is to divide up the single global name space so you won’t have clashing names, no matter how many people get on the Internet and start writing classes in Java.Creating unique package namesYou might observe that, since a package never really gets “packaged” into a single file, a package could be made up of many .class files, and things could get a bit cluttered. To prevent this, a logical thing to do is to place all the .class files for a particular package into a single directory; that is, use the hierarchical file structure of the operating system to your advantage. This is one way that Java references the problem of clutter; you’ll see the other way later when the jar utility is introduced.Collecting the package files into a single subdirectory solves two other problems: creating unique package names, and finding those classes that might be buried in a directory structure someplace. This is accomplished, as was introduced in Chapter 2, by encoding the path of the location of the .class file into the name of the package. By convention, the first part of the package name is the reversed Internet domain name of the creator of the class. Since Internet domain names are guaranteed to be unique, if you follow this convention, your package name will be unique and you’ll never have a name clash. (That is, until you lose the domain name to someone else who starts writing Java code with the same path names as you did.) Of course, if you don’t have your own domain name, then you must fabricate an unlikely combination (such as your first and last name) to create unique package names. If you’ve decided to start publishing Java code, it’s worth the relatively small effort to get a domain name.The second part of this trick is resolving the package name into a directory on your machine, so when the Java program runs and it needs to load the .class file (which it does dynamically, at the point in the program where it needs tocreate an object of that particular class, or the first time you access a static member of the class), it can locate the directory where the .class file resides.The Java interpreter proceeds as follows. First, it finds the environment variable CLASSPATH[27] (set via the operating system, and sometimes by the installation program that installs Java or a Java-based tool on your machine). CLASSPATH contains one or more directories that are used as roots in a search for .class files. Starting at that root, the interpreter will take the package name and replace each dot with a slash to generate a path name from the CLASSPATH root (so package foo.bar.baz becomes foo\bar\baz or foo/bar/baz or possibly something else, depending on your operating system). This is then concatenated to the various entries in the CLASSPATH. That’s where it looks for the .class file with the name corresponding to the class you’re trying to create. (It also searches some standard directories relative to where the Java interpreter resides).To understand this, consider my domain name, which is . By reversing this, com.bruceeckel establishes my unique global name for my classes. (The com, edu, org, etc., extensions were formerly capitalized in Java packages, but this was changed in Java 2 so the entire package name is lowercase.) I can further subdivide this by deciding that I want to create a library named simple, so I’ll end up with a package name:package com.bruceeckel.simple;Now this package name can be used as an umbrella name space for the following two files://: com:bruceeckel:simple:Vector.java// Creating a package.package com.bruceeckel.simple;public class Vector {public Vector() {System.out.println("com.bruceeckel.simple.Vector");}} ///:~When you cr eate your own packages, you’ll discover that the package statement must be the first noncomment code in the file. The second file looks much the same://: com:bruceeckel:simple:List.java// Creating a package.package com.bruceeckel.simple;public class List {public List() {System.out.println("com.bruceeckel.simple.List");}} ///:~Both of these files are placed in the subdirectory on my system:C:\DOC\JavaT\com\bruceeckel\simpleIf you walk back through this, you can see the package name com.bruceeckel.simple, but what about the first portion of the path? That’s taken care of in the CLASSPATH environment variable, which is, on my machine:CLASSPATH=.;D:\JAVA\LIB;C:\DOC\JavaTYou can see that the CLASSPATH can contain a number of alternative search paths.There’s a variation when using JAR files, however. You must put the name of the JAR file in the classpath, not just the path where it’s located. So for a JAR named grape.jar your classpath would include:CLASSPATH=.;D:\JAVA\LIB;C:\flavors\grape.jarOnce the classpath is set up properly, the following file can be placed in any directory://: c05:LibTest.java// Uses the library.import com.bruceeckel.simpletest.*;import com.bruceeckel.simple.*;public class LibTest {static Test monitor = new Test();public static void main(String[] args) {Vector v = new Vector();List l = new List();monitor.expect(new String[] {"com.bruceeckel.simple.Vector","com.bruceeckel.simple.List"});}} ///:~When the compiler encounters the import statement for the simple library, it begins searching at the directories specified by CLASSPATH, looking for subdirectory com\bruceeckel\simple, then seeking the compiled files of the appropriate names (Vector.class for Vector, and List.class for List). Note that both the classes and the desired methods in Vector and List must be public.英文翻译Java的隐藏实现在面向对象的设计中,最关键的问题就是“将会变和不会变的东西分离开来。
模具重要性(Mouldimportance)
模具重要性(Mould importance)I. Introduction1) the purpose of graduation projectThe graduation design is in the three years of higher education, machinery manufacturing, mold design, technology, a test of mechanical drawing and other major courses of study level, but also on a teaching graduates were examined based on the production practice, it requires the students to complete the comprehensive use of the three years of the course of basic courses theory and practice of design, mold design and process, its purpose is to:1. Training students to use the mold manufacturing and machinery manufacturing and related courses (engineering materials, mold design, tolerance and technical measurement and heat treatment etc.) knowledge, combined with the production practice middle school to the practice knowledge, independent analysis and solve design problems, preliminary design has a moderately complex mould process the ability to enter the society, to better adapt to the society ready.It can be required. According to the parts of the processing technology, using the basic principle and method of mould design, mould design institute to complete, mold structure design, improve the design capacity of the structure.3. Students should be familiar with and use of the manual, specification, diagrams and other technical information.4. To further develop students knowledge map drawing, operation and technical documentation and other basic skills.2) development status and market prospect of mould industryModern die and mould industry has the name of "non declining industry". The mold Market in the world is in short supply, the market demand is maintained at 60 billion to 65 billion U. S. dollars, at the same time, China's die and mould industry also ushered in a new round of development opportunities. In recent years, the total output value of China's mold industry maintained an annual growth rate of 13% (according to incomplete statistics, in 2004 the domestic mold imports reached about 60000000000, at the same time, there are nearly 20 billion of exports), to 2005 mold output is expected to be 60 billion yuan, mold and mold standard parts exports from the current $about 90000000 annual growth to around $200 million in 2005. As far as the automobile industry is concerned, a model car needs several thousands of pairs of dies and is worth hundreds of millions of dollars. When the car is replaced, about 80% of the moulds need to be replaced. In 2003, China's auto production and sales have exceeded 4 million vehicles, the annual output of 2004 is expected to exceed 5 million, the car output will reach 2 million 600 thousand. In addition, electronic and communication products are also very large demand for mold, in developed countries tend to account for more than 20% of the total mold market. At present, China's more than 17000 mold production plant point, the number of employees is about about 500000. In 1999, the total output value of China's die and mould industry reached RMB 24 billion 500 million yuan. The industrial output value accounted for about 2/3 of the totaloutput of the enterprises, which accounted for about 1/3 of the total sales. In the total output value of the die and mold industry, stamping die accounts for about 50%, plastic mold accounts for about 33%, die-casting mold accounts for 6%, other types of mold about 11%.3) stamping process introductionStamping is to press and mold the plate, strip, pipe and profile and other external force, so that it produces plastic deformation or separation, so as to obtain the required shape and size of the workpiece (stamping parts) forming method. Stamping and forging are both plastic processing (or pressure processing), collectively referred to as forging. The stamping blank is mainly hot-rolled and cold-rolled steel plate and steel strip.Among the world's steel products, 60 to 70% are plates, most of which are finished by stamping. The car body, chassis, fuel tank, radiator plate, boiler drum, container shell, motor, electrical equipment, iron core, silicon steel sheet and so on are stamping processing. Instruments, household appliances, bicycles, office machinery, household utensils and other products, there are a large number of stamping parts.Compared with castings and forgings, stamping parts have the characteristics of thin, uniform, light and strong. Stamping can produce other methods that are difficult to manufacture with stiffeners, ribs, undulating or flanging workpiece, to improve its rigidity. Due to the use of precision molds, the workpiece precision can reach micron level, and therepeatability is high, the specifications are consistent, can punch holes, protruding and so on.Cold stamping parts are no longer processed by cutting, or only a small amount of cutting.The precision and surface state of hot stamping parts are lower than those of cold stamping parts, but they are still better than castings and forgings, and the amount of cutting is less.Stamping is a highly efficient production methods, the use of compound die, especially the multi station progressive die stamping process can be completed in a multi machine, realized by belt uncoiling, leveling, punching, forming and finishing automatic production. The production efficiency is high, the working condition is good, the production cost is low, generally can produce hundreds of pieces per minute.4) types of stamping processesStamping is mainly classified according to the process, can be divided into separation process and forming process of two categories. The separation process is also called blanking, whose purpose is to make the stamping parts separate from the sheet metal along a certain contour line, while ensuring the quality requirements of the separation section. The purpose of forming process is to make the sheet metal deform without breaking the blank, and make the workpiece with the shape and size required. In practical production, a variety of processes are often applied to a workpiece. Blanking, bending, shearing, drawing, bulging, spinning and straightening are the mainstamping processes.A large sheet metal stamping with surface and internal performance of stamping product quality requirements, stamping material accurate uniform thickness; smooth surface, no spots, no scar, no scratches, no surface crack; yield strength uniform, no obvious directivity; high uniform elongation; Qu Qiang ratio is low; low work hardening. In practical production, the process tests, such as drawing test and bulging test, are often used to test the stamping performance of the material so as to ensure the quality of the finished product and the qualified rate of the product. The precision and structure of the die directly affect the forming and accuracy of the stamping parts. Die manufacturing cost and life expectancy are important factors affecting the cost and quality of stamping parts. Mold design and manufacturing require more time, which extends the production time of new stamping parts.Simple mold standardization and development of die set, guide (for small batch production), compound die, progressive die (for mass production), and the development of quick die change device, can reduce the stamping production preparation workload and shorten the preparation time, can be applied to reduce the workload and shorten the stamping production ready preparation time, advanced stamping technology can make suitable for mass production of the rational use of the multi variety and small batch production.Stamping machine in addition to thick plate water press forming, generally use mechanical press. In modern high-speed transfer of mechanical press as the center, the allocation of uncoilingflattening collection, transmission machinery and mold base and quick die change device, and use the computer program control, automatic stamping production line can be composed of high productivity. In the production of dozens of pieces per minute, hundreds of pieces of stamping, in a short period of time to complete the feeding, stamping, production, waste discharge and other processes, often occur personal, equipment and quality accidents. Therefore, the safe production in stamping is a very important problem.5) resistance, obstacles and breakthrough in stamping industryResistance 1: low degree of mechanization and automation70% multi station press press line 680 in the United States, Japan's 250 production lines and 32% for multi station press, which represents the international level of the large multi station press used in our country are few; small and medium-sized enterprises is relatively backward equipment, high energy supplies, serious environmental pollution; head forming equipment simple, manual operation is significant; the fine blanking machine is expensive, is 5~10 times the general press, the majority of enterprises to investment hindered the fine blanking technology application in China; hydroforming, especially internal high pressure forming, large equipment investment, the country is difficult to start.Breakthrough point: accelerating technological transformationIn order to improve the degree of mechanization and automation, it is necessary to change the backward situation that most ofthe materials are still manually laid down. Auto body panel stamping should be developed to single machine connection automation, robot stamping production line, especially large multi station press. Strive to increase investment, accelerate the technological transformation of stamping production line, so as to reach the current international level as soon as possible.With the development of microelectronic technology and communication technology, the automation and flexibility of sheet forming equipment have a technical basis. It is necessary to accelerate the development of digital flexible forming technology, hydraulic forming technology, high precision compound forming technology and bending bending forming technology and related equipment adapted to the new generation of lightweight body structure. At the same time, the domestic old equipment should be transformed so that the new production capacity can be brought into full play.Resistance two: low production concentrationMany automobile group of large, closed internal facilities, leading enterprises of the stamping variety, low production concentration, small size, easy to cause the low level redundant construction, it is difficult to meet the specialization of production, market competitiveness; motorcycle stamping industry is facing fierce competition in the market, in "better you bad without eliminating the state; manufacturing enterprises are small and scattered, the concentration of only 39.2%.Breakthrough point: take the road of specializationQuickly change the current "big and complete" and "scattered poor" pattern, as soon as possible from the automotive group in the stamping parts separated by stamping, the establishment of large stamping parts be arranged, several manufacturing supply center and dozens of small and special parts factory. Through the specialized road, can the stamping parts become bigger and stronger, become the international competitive stamping parts suppliers.Resistance three: stamping sheet self-sufficiency rate is insufficient, varieties and specifications are not matchingAt present, China's automobile sheet can only meet about 60%, while high-grade car steel plate, such as high strength plate, alloy galvanized sheet, ultra wide plate (1650mm above) and so on, all rely on imports.Breakthrough point: the materials used should be coordinated with the industryThe varieties of automobile steel plate should be more reasonable, develop towards high strength, high corrosion resistance and various specifications of thin steel plate, and improve the stamping performance. Aluminum and magnesium alloys have become the rational materials for automotive lightweight, and it is imperative to expand the application.Resistance four: slow transformation of scientific and technological achievements, slow promotion of advancedtechnologyIn our country, many new stamping technologies start late, some have reached the international advanced level, but it is often difficult to form productivity. The application of advanced stamping process is not enough, some of them are only in the trial stage, and the absorption, transformation and popularization speed is slow. The cost of technology development is low, which leads to the slow application of advanced technology and the lack of development and innovation ability, and the gap between SMEs is even worse. At present, most domestic enterprises still use the traditional stamping technology, lack of research and technical reserves for the next generation lightweight automotive structure and material required for forming technology.Breakthrough point: the road of combining production, learning and researchThe biggest gap between China and Europe, the United States, Japan and other countries is that there is not a production, learning and research consortium, scientific research is difficult to expand, the results can not be transformed into productive forces as soon as possible. It should focus on large-scale development and industrialization projects in universities and research institutions for technical support, enterprise application base, the formation of enterprise technology products, equipment, materials, the combined entity, can develop innovative and virtuous cycle of rapid industrialization.Resistance five: large and fine molds rely on importsAt present, the stamping die material, design, production can not meet the needs of the domestic car development, and the degree of standardization is still low, about 40%~45%, and the international generally in about 70%.Breakthrough point: improving informatization and standardization levelIt is necessary to reform the die and mould enterprises with information technology. The key point of the development is to promote the CAD/CAM/CAE integration technology, especially the computer simulation analysis and optimization technology of forming process (CAE). Speed up the standardization process of mould in our country and improve the precision and interchangeability. Strive to 2005 mold standard parts use coverage rate reached 60%, in 2010 reached more than 70%, basically meet the market demand.Resistance six: lack of professionalsThe design and analysis of high-quality talent to master advanced technology and digital technology can not meet the needs of the rapid development of stamping industry, especially with a massive outflow of knowledge and stamping technology and skills in motorcycle industry professionals and the lack of more.In addition, many joint venture companies designed by the foreign party, master the right to design and investment, ourstamping technicians are difficult to truly grasp the true meaning of stamping process.Breakthrough point: improve the quality of industry personnelThis is an urgent task, but also a long-term and systematic task. To promote the stamping industry in China, a large number of high-level scientific and technological talents are needed. A large number of entrepreneurs familiar with the domestic and foreign markets, with modern management knowledge and ability, and a large number of advanced skilled personnel who master advanced technology and technology. To be willing to spend great effort, plan, hierarchical training.。
Object-oriented Design
©Ian Sommerville 2000
Topics covered
Objects and object classes An object-oriented design process Design evolution
©Ian Sommerville 2000
Software Engineering, 6th edition. Chapter 12
Slide 9
Objects(对象)
An object is an entity which has a state and a defined set of operations which operate on that state. The state is represented as a set of object attributes. The operations associated with the object provide services to other objects (clients) which request these services when some computation is required. Objects are created according to some object class definition. An object class definition serves as a template for objects. It includes declarations of all the attributes and services which should be associated with an object of that class.
An Object-Oriented Abstract Machine as the Substrate for an Object-Oriented Operating Syste
An Object-Oriented Abstract Machine as the Substrate for an Object-Oriented Operating System Darío Álvarez Gutiérrez, Lourdes Tajes Martínez, Fernando Álvarez García, María Ángeles Díaz Fondón, Raúl Izquierdo Castanedo, Juan Manuel Cueva LovelleDepartment of Computer Science, University of OviedoCalvo Sotelo, s/n, 33007 OVIEDO - SPAIN{darioa,tajes,fag,fondon,ric,cueva}@u.uniovi.esAbstract: Using an object-oriented abstract machine brings a number of benefits for the construction of an object-oriented operating system. In this paper we describe the structure of an abstract machine designed for this task. This machine provides the basic object model and support for the rest of the system. Among other options, we propose a reflective architecture as a collaboration mechanism between the machine and the OS. Finally, we show how using this architecture based on the abstract machine improves and facilitates the construction of operating system features like orthogonal persistence, object distribution, concurrency and capability-based security, giving a flexible integral OO computing environment.1 IntroductionThe adoption of the object-oriented paradigm is not done in an integral way in all the system components. This produces a serious impedance-mismatch and interoperability problem, for the paradigm changes and/or object translations made depending on which element to work with. The result is a proliferation of additional software layers trying to alleviate these problems, but introducing in fact extra complexity in the system.An approach in order to solve this problem is to move the OO support for the rest of the system to a common place into the OS. Oviedo3 [1] is a research project that tries to build an experimental integral object-oriented system based on that foundation. All components: user interfaces, applications, languages, compilers, databases... and the operating system itself share the same object-oriented paradigm.The object-oriented operating system (OOOS) is the basis for this integral system. It provides only one abstraction: objects. Objects can only create new objects from a class or send messages to others. We believe an operating system should supply transparently the following features for the objects of this integral system: a capability-based protection mechanism, complete persistence, object distribution and concurrency. There are operating systems exploring these topics. The distributed OS Amoeba explores sparse capabilities in an object-based environment, and Mungi is a distributed single address space persistent OS with password capabilities. Another OS focusing on persistence is Grasshopper. Nevertheless, we think this particular mix of properties is very adequate for an integral OO system, and worth to research jointly in the context described below.One technique to structure an OOOS aimed to support an integral OO system which offers many advantages is to use an OO abstract machine as the substrate of the OOOS. This machine offers the basic object model and support to all objects of the rest of the system. The OS functionality is given by a set of user objects not different from any other object.2 The Object-Oriented Operating SystemThe heart of the Oviedo3 system is the operating system, named SO4 [1]. The OS offers the abstraction of a single object space where objects exist indefinitely, virtually infinite, and where objects placed in different machines cooperate transparently using messages. Besides, the OS transparently achieves a set of important features: security, persistence, distribution and concurrency. In sections below, each one is analyzed in depth.The master guidelines of the design of SO4 are:?Object as the only abstraction. Only objects, of any granularity, exist.?Intentionally “standard” object model, with the more common features found in OO programming languages: encapsulation, inheritance, and polymorphism [2].?Exclusively OO working mode. An object can only create classes inheriting from others, create objects from a class, and send messages to other objects.?Simpleness. To adhere to the above guidelines, achieving maximum simpleness.Some important characteristics we wish to impose on objects, in accordance with these guidelines:?Homogeneous objects. There are no special objects. OS objects themselves are not different from other objects.?Transparency. Objects must not be aware of the existence of OS mechanisms to achieve features as persistence, message passing, distribution, etc.?Self-contained objects. Objects encapsulate all the information about it, including computation. The behavior must not be dependent on other objects.?Complete semantics. Objects have all the semantics embedded in the object model. They are not considered just as a contiguous memory space.?Object identity. Each object has a unique identifier, which is used as a reference is the only means to access it. The concept of memory address space does not exist.3 The Object-Oriented Abstract MachineUsing an OO abstract machine as the substrate for structuring the OOOS has many advantages. This machine supporting the OS should supply the essence of the aspects mentioned above: a simple self-contained homogeneous object model, with the object identity used as the unique access reference. This will be the only system abstraction.Next, the overall organization of the Carbayonia abstract machine is shown. It has been designed specifically to support the OS as described above. This organization may be considered as a reference for the features that an abstract machine should have to support this kind of object-oriented OS. Other abstract machines could also be adapted for this purpose. Indeed, due to the popularity of the Java language, and the recent availability of public specifications we are considering the adaptation of the Java Virtual Machine [3].The machine supports an object model with the following features: Object identity and abstraction, encapsulation, inheritance, and also generic and aggregation relationships between objects and, finally, polymorphism or message passing.Figure 1 shows the architecture of the Carbayonia abstract machine ?1?, consisting of four areas: class area, references area, instance area, and system references area.The class area maintains the description of each class. A set of primitive classes is permanently defined. The references area stores the references. Every reference has a type (relates to the class area) and points to an object of this type (relates to the instance area). The instance area stores objects created. And the system references area contains references with specific functions in the machine.Fig. 1. Architecture of the Carbayonia abstract machine.Each area can be considered as an object in charge of the management of its data.The main characteristic of the machine is that every action upon an object is made using a reference to it.The machine language is a pure OO low level language. It allows class declaration, method definition and exception handling. There are a number of classes built into the class area of the machine, with “Object” as the root class.In the following, we will refer to objects in general, making no distinction between objects and classes.Some of the preliminary advantages derived from using an abstract machine in general for this OS support task are:?Impedance mismatch is removed. There is a common object model for the system, supplied by the machine for every object, including OS ones.?Portability and programming language independence. Once an object is created in the machine, it is independent from the programming language used to define it.?Implementation of OS features. In sections below OS features are described, and how they benefit from the use of the abstract machine.4 Abstract Machine and OS Relationships. ReflectivityThe abstract machine can be considered as a kernel for the OS, supplying a basic support for objects, which will be extended by the OS to incorporate additional features. The machine should supply mechanisms to accomplish this. We consider three mechanisms basic for this, which should be present in the machine. These mechanisms can be used alone or in combination:?Internal modification of the machine to adapt its inner workings to ease the implementation of a feature.?Extension of the functionality of the basic classes. To add new attributes and methods to enlarge the functionality of the basic classes.?Reflective architecture. To allow OS objects to collaborate with the machine when it cannot accomplish a task by itself by means of a reflectivearchitecture[4]. The machine should be given an architecture where the machine objects are exposed as normal objects. When a machine object can not continue for some problem, it raises an exception, which activates an OS object. This object will collaborate with the machine, intercommunicating with its objects to solve the problem, treating them just as other normal objects.5 SecurityMany operating systems use a protection mechanism based on the Lampson access matrix. Systems like Amoeba, Grasshopper, Mungi and Clouds use some kind of capability-based protection, while others like Guide, Amadeus, etc. use access control lists.We intend to have a homogeneous access for every object based in two fundamental ideas:?Capabilities [5] can be integrated as part of an object reference. They introduce a minimal overhead and the object model is not modified.?Protection mechanism in the innermost level of the system, making the message passing mechanism check the protection information contained in the capability.We propose to embody the protection management at the abstract machine level, converting references into capabilities, adding protection information to its contents.New operations must be added to the machine, as well as modifying others to take into account the new role of references as capabilities.Now, the machine must check the access rights after locating the object using its identifier in the capability. An exception is raised if no valid rights are held.Thus advantages of both segregated and sparse capabilities [6] are combined. The machine guarantees capabilities can not be tampered with or altered without permission. Only the operations provided by the machine can be used to handle capabilities. Besides, neither the object model nor the way of using objects changes and the protection mechanism is transparent for the rest of the system. On the one hand, by using capabilities, the objects are not aware of the management of its protection. On the other, using capabilities as normal references in user structures facilitates system use, because there is no special way to access the segregated area where capabilities are stored.6. PersistenceThe function of the persistence system in SO4 is to provide a unique virtual persistent memory for objects, extending transparently the instance area by means of secondary storage. It creates a single persistent virtual space for objects. The main features desired are:?Complete Orthogonal Persistence [7]. Every object is always persistent.?Stability and Resilience [8]. The system must be able to resume operation after an unexpected system failure.Some features of the abstract machine are very adequate to give support for persistence to the system:?Unique object identifier. It is part of the references used in the objects. It eliminates pointer swizzling in disk swaps, as there is only one identifier for all situations.?Self-contained Objects. A single operation stores the object on disk, including its computation, which is also encapsulated.Putting together the above aspects a number of final advantages are achieved:?Single memory abstraction. A single persistent virtual space replaces the duality of short-term and long-term memory, easier to understand and use for programmers and users.?Continuous system and environment. The complete persistence of self-contained objects makes a truly continuous environment for every object, including OS ones.?More intuitive interfaces. The system and the continuous environment permit interfaces closer to the user perception of the object functioning in the real world object. Disconnection, intended or not, does not alter their state.?Virtual persistent distributed space. Together with the distribution system and using unique identifiers, a single distributed persistent object space among the machines of the system is created.A way to support persistence is to use the exception ability of the machine to activate a “pager object” extending the instance area in a reflective way. Causes of activation may be object fault, object replacement, or arbitrary stabilization (figure 2).Fig. 2. Object Fault.7 DistributionOn a distributed architecture consisting of several machines, the distribution system [9] allows inter-object communication without regard to its location, and provides mobility mechanisms with the maximum degree of transparency.The goals of the distribution system [1] can be reduced to:?Access and location transparency [10]. To provide a location service that delivers the messages to the objects, regardless of its location.?Object mobility and load balancing.Some of the features of the abstract machine imply several immediate advantages for distribution:?Unique object identifier. Objects are always referenced and accessed in the same way regardless of their location.?Self-contained objects. Moving an object between machines is achieved just by moving its encapsulated state that includes the computation.Combining these aspects some advantages are obtained:?Single object distributed space.?Performance improvement, by balancing the load of the whole system using object mobility.?Reliability improvement, using a replication mechanism (as in Chorus or Clouds), possibly in combination with the persistence mechanism.The use of a location object server as in the Clouds system and a load-balancing object is an approach to implement distribution.Figure 3 shows a possible scenario of invoking a method in an object and the interaction between the persistence and distribution mechanisms.A load-balancing object implements the object mobility policy of the system, based mainly on the load of every machine and the interaction with remote objects.8 ConcurrencyWe try to endow the system with a simple concurrency model [1] that achieves the maximization of the parallelism degree in a secure way, allowing concurrency between objects and between methods of the same object, in the most secure way.These are the main aspects of the concurrency model proposed for the system: ?Multithreaded active objects [9, 11]. Active objects that encapsulate computation are a natural extension of the self-contained object model provided by the abstract machine. Conceptually, they have a virtual multiprocessor for multiple threads, with the needed concurrency control mechanisms. Other existing OS such as Clouds and Guide chose a passive object model and supply an abstraction like process or thread to provide computation.?Synchronous invocation [11]. For simpleness reasons, a thread of an object is blocked during the invocation of a method of another object.?Exclusive and concurrent methods. When defining a method, it must be tagged as exclusive or concurrent. An exclusive method modifies the state of the object and cannot coexist with any other thread in the object. Objects behave as monitors when dealing with this kind of methods. Concurrent methods do not modify its state, so their threads are compatible with other concurrent threads.This approach has become very popular and recently languages such as Java have a similar concurrent model [12].A set of objects provides the concurrency mechanism functionality. It seems more adequate to include some of this functionality in the machine and the rest in objectsproviding OS functionality. Method execution ability and the characterization of methods as exclusive or concurrent is offered by the machine. OS objects will implement concurrency policies.9 Reflective abstract machine + OOOS: very flexible integral OO computing environmentThe reflective architecture of the machine makes machine objects usable just like any other objects. This yields a computing environment seen as a set of homogeneous interacting objects. Thus the separation among base machine, operating system and user applications is removed: a single integral OO computing environment (figure 4).Fig. 4. Computing environment composed of a set of homogeneous objects In this computing environment, the OS, user applications, and even the base machine itself, take advantage of the OO paradigm, including areas such as flexibility, extensibility and reusability:?Removal of non-necessary objects. Customized computing environments can be built as needed.?Object replacing. It is possible to dynamically replace an object for another providing the same services in a different way.?Reusability. Every object is organized into a class hierarchy. This allows code reuse, using the inheritance of the system. It is not necessary to re-implement functionality already present in other objects (even from the OS or the machine itself).The combination of the three above elements produces a very flexible computing environment, easily adaptable and extensible, but in a secure way controlled by the machine capability protection mechanism.There are other research projects with this goal of an integral OO system. Tunes [13] and Merlin [14] are systems which share this approach of using reflective architectures to obtain such environments, organized around the SELF language in the case of Merlin, and with a new language developed for Tunes.10 ConclusionsThe combination of an OO abstract machine offering object support with an OO operating system implemented as a set of objects is a promising way of structuringOO integral systems. Advantages such as portability, language independence and impedance mismatch removal are complemented with improvement and ease of implementation of the functionality of the OOOS.A reflective architecture for the abstract machine is one of the most important mechanisms the machine must provide to qualify as a substrate for an OOOS.The most relevant aspects of the OOOS are security, persistence, distribution and concurrency. The design decisions presented for every of these aspects, coupled with the OO abstract machine will give the user a computing environment completely based on the object oriented philosophy, more flexible, coherent, intuitive and easier of use, removing most of the problems of existing systems.Oviedo3 is a research project at the University of Oviedo that intends to develop an experimental integral object system with this structure, using the Carbayonia OO abstract machine and the SO4 OO operating system.A first version of the abstract machine (developed under Windows NT) is complete. The detailed design of the operating system components has now begun, for a subsequent implementation on the abstract machine.References[1] Cueva Lovelle, J.M., and others, Sesión “Sistemas Operativos Orientados a Objetos: Seguridad, Persistencia, Concurrencia y Distribución” (Object-Oriented Operating Systems: Security, Persistence, Concurrency and Distribution), II Jornadas sobre Tecnologías Orientadasa Objetos, Oviedo, Spain, March 1996. (in spanish).[2] Booch, G. “Object-Oriented Analysis and Design with Applications”, 2nd edition, Benjamin Cummings, 1993.[3] Sun Microsystems Computer Corporation, “Java Virtual Machine Specification, Version 1.0 Beta”, URL ftp:///docs/vmspec.ps.z, November 1996.[4] Maes, P. “Concepts and Experiments in Computational Reflection”, Proc. OOPSLA, pp 147-155, 1987.[5? Dennis, J.B., and E.C. Van Horn, “Programming Semantics for Multiprogrammed Computations”, Communications of the ACM, Vol. 9, N.3, 1966.[6? Anderson M., and C. Wallace, “Some comments on the implementation of capabilities”, The Australian Computer Journal, 1988.[7] Atkinson, M.P., P. Bailey, K. J. Chisholm, W.P. Cockshott, and R. Morrison, "An Approach to Persistent Programming", The Computer Journal, vol 26, 4, pp 360-365, 1983.[8] Dearle, A., J. Rosenberg, F. Henskens, F. Vaughan, and K. Maciunas, "An Examination of Operating System Support for Persistent Object Systems", Proc. of the 25th Hawaii International Conference on System Sciences, Hawaii, U.S.A., pp 779-789, 1992.[9] Chin, R.S., and S.T. Chanson, “Distributed Object-Based Programming Systems”, ACM Computing Surveys, Vol. 23, N.1, March 1991.[10] Coulouris, G., J. Dollimore, and T. Kindberg, “Distributed Systems. Concepts and Design”, 2nd edition, Addison-Wesley, 1994.[11] Papathomas, M., “Concurrency Issues in Object-Oriented Programming Languages”, in Object-Oriented Development TR, Centre Universitaire d´Informatique, University of Geneva, ed. Tsichritzis, D., 1989.[12] Sun Microsystems Computer Corporation, “The Java Language Specification”, URL ftp:///docs/langspec-1.0.ps.Z, November 1996.[13] The Tunes project, URL http://www.eleves.ens.fr:8080/home/rideau/Tunes/, November 1996.[14] The Merlin Project, URL p.br/~jecel/merlin.html, November 1996.。
1 An Object-Oriented Approach to Curves and Surfaces
Applications in computer graphics and geometric modeling generally require the integration of a variety of curve and surface types into a single system.Object-oriented design offers the opportunity to use the inherent hierarchical structure of curves and surfaces to solve this problem.This paper presents a top down approach to the design of an object-oriented framework for curves and surfaces together with its C++implementation.We start from an abstract class of general differentiable curves and surfaces and in turn refine this design to various parametric representations of curves and surfaces.This design includes all of the standard curve and surface types and provides a powerful and uniform interface for applications. Examples from differential geometry,blending,and scattered data interpolation illustrate the approach.2Design2.1Overview2.2Parameterized CurvesFigure1:Schematic view of the class hierarchy.Ovals indicate abstract classes, rectangles actual implementations,solid arrows derivation in the class hierarchy, and dotted arrows references between related classes.2.3Vertex Curves2.4Meta Objects2.5Parameterized Surfaces2.6Vertex Surface 2.7Parameter Region 3ApplicationsFigure2:Visualizing differential geometry:A helix with a curvature circle,a Fren´et frame,and a section of the torsion cylinder3.1Application1:Visualizing Differential GeometryFigure3:A B-spline surface with imposed color-coded Gauss-curvature 3.2Application2:Constructing Blending Surfacesand maximum curvature at each point along the curve3.3Application3:Minimal Norm Network Interpolantspolant,and its curvature plot4Conclusion and Further WorkReferences。
托福阅读真题与答案:新艺术风格
托福阅读真题与答案:新艺术风格托福阅读真题的训练,可以让考生掌握托福阅读的调查內容及其考题难度系数,进而更为有策略地整体规划备考。
文中小编为诸位中国考生产生了托福阅读真题与回答:新艺术风格,期待对大伙儿的备考有一定的协助。
托福阅读真题与答案:新艺术风格The end of the nineteenth century and the early years of the twentieth century were marked by the development of an international Art Nouveau style, characterized by sinuous lines, floral and vegetable motifs, and soft evanescent coloration. The Art Nouveau style was an eclectic one, bringing together elements of Japanese art, motifs of ancient cultures, and natural forms. The glass objects of this style were elegant in outline, although often deliberately distorted, with pale or iridescent surfaces. A favored device of the style was to imitate the iridescent surface seen on ancient glass that had been buried. Much of the Art Nouveau glass produced during the years of its greatest popularity had been generically termed "art glass." Art glass was intended for decorative purposes and relied for its effect upon carefully chosen color combinations and innovative techniques.France produced a number of outstanding exponents of the Art Nouveau style; among the most celebrated was Emile Galle (1846-1904). In the United States, Louis Comfort Tiffany (1843-1933) was the most noted exponent of this style, producing a great variety of glass forms and surfaces, which were widely copied in their time and are highly prized today. Tiffany was a brilliant designer, successfully combining ancient Egyptian, Japanese, and Persian motifs.The Art Nouveau style was a major force in the decorative arts from 1895 until 1915, although its influence continued throughout the mid-1920's. It was eventually to be overtaken by a new school of thought known as Functionalism that had been present since the turn of the century. At first restricted to a small avant-garde group of architects and designers, Functionalism emerged as the dominant influence upon designers after the First World War. The basic tenet of the movement — that function should determine form — was not a new concept. Soon a distinct aesthetic code evolved: form should be simple, surfaces plain, and any ornament should be based on geometric relationships. This new design concept, coupled with the sharp postwar reactions to the styles and conventions of the preceding decades, created an entirely new public taste which caused Art Nouveau types of glass to fall out of favor. The new taste demanded dramatic effects of contrast, stark outline and complex textural surfaces.题型:1. What does paragraph 1 mainly discuss?(A) Design elements in the Art Nouveau style(B) The popularity of theArt Nouveau style(C) Production techniques for art glass(D) Color combinations typical of the Art Nouveau style2. The word "one" in line 4 refers to(A) century(B) development(C) style(D) coloration3. Paragraph 1 mentions that Art Nouveau glass was sometimes similar to which aspect of ancient buried glass?(A) The distortion of the glass(B) The appearance of the glass surface(C) The shapes of the glass objects(D) The size of the glass objects4. What is the main purpose of paragraph 2?(A) to compare different Art Nouveau styles(B) to give examples of famous Art Nouveau artists(C) to explain why Art Nouveau glass was so popular in the United States(D) to show the impact Art Nouveau had on other cultures around the world5. The word "prized" in line 16 is closest in meaning to(A) valued(B) universal(C) uncommon(D) preserved6. The word "overtaken" in line 20 is closest in meaning to(A) surpassed(B) inclined(C) expressed(D) applied7. What does the author mean by stating that "function should determine form" (lines 23-24)?(A)A useful object should not be attractive.(B) The purpose of an object should influence its form.(C) The design of an object is considered more significant than its function.(D) The form of an object should not include decorative elements.8. It can be inferred from the passage that one reasonFunctionalism became popular was that it(A) clearly distinguished between art and design(B) appealed to people who liked complex painted designs(C) reflected a common desire to break from the past(D) was easily interpreted by the general public9. Paragraph 3 supports which of the following statements about Functionalism?(A) Its design concept avoided geometric shapes.(B) It started on a small scale and then spread gradually.(C) It was a major force in the decorative arts before the First World War.(D) It was not attractive to architects and designers.10.According to the passage , an object made in the Art Nouveau style would most likely include(A) a flowered design(B) bright colors(C) modern symbols(D) a textured surface回答:ACBBA ABCBA新托福阅读背景知识:吉他简史(英文版)A Brief History of the GuitarThere is evidence that a four string, guitar-like instrument was played by the Hittites (who occupied a region now known as Asia Minor and Syria) around 1400 BC. It had characteristically soft, curved sides--one of the primary features of anything identifiable as a guitar or predecessor. The Greeks also produced a similar instrument which was later modified by the Romans, though both versions appear to have lacked the curved sides. What is interesting here is that it seems this Roman cithara appeared in Hispania (now known as Spain) centuries before theMoorish invasion.It had long been assumed that it was only after this invasion and the introduction of the Arabic due in the South that a guitar-like instrument first appeared in Spain. But with the Roman cithara arriving centuries prior, we might say that although the due influenced the development of the guitar it is not the true ancestor. According to this theory, the Spanish guitar derived from the tan bur of the Hittites, kithara with a "k" of the Greeks and then the cithara with a "c" of the Romans.However, following the arrival of the Moors, the Roman cithara and the Arabic due must have mixed and exerted mutual influences on one another for many centuries. Although there is no specific documentation, it is likely that makers of us and cithara’s would have seen each other's work, if only through presentation by traveling troubadours. By 1200 AD, the four string guitar had evolved into two types: the guitars maraca (Moorish guitar) which had a rounded back, wide fingerboard and several sound holes, and the guitars Latina (Latin guitar) which resembled the modern guitar with one sound hole and a narrower neck.In the late 1400's, the visual was born by adding doubled strings and increasing its size. It was a large plucked instrument with a long neck (vibrating string length: 72 to 79 cm) with ten or eleven frets and six courses. It was the visual which became the preferred instrument of the Spanish and Portuguese courts and remained so until the late 1600's when orchestral and keyboard instruments became more prominent.Although the guitar existed concurrently during this period, the visual and lute had overshadowed it until the end of the 17th century when the lute had acquired too many strings, was toohard to play and tune, and the visual was slowly replaced by the four and five course guitars (which had seven and nine strings respectively: one single high string, and three or four remaining courses--or pairs--of strings). It was perhaps the addition of the fifth course in the late 16th century that gave the guitar more flexibility and range and thus improved the potential of the repertoire that led to its ascent.By the end of the 18th century and the beginning of the 19th, some guitars already used six single strings and employed fan struts under the soundboard. These struts were added for structural support to allow thinning of the top for greater resonance and for better distribution of sound across the board. Other contemporaneous developments included the use of a reinforced, raised neck using ebony or rosewood for the fingerboard, and the appearance of machine tuners in place of the wooden pegs. (It is noteworthy that the raised fingerboard had a great impact on the technique of the instrument since the strings were then too far from the soundboard to rest one's finger on the face for support.) These guitars would be unmistakably recognized by us as early classical guitars.Beginning with the early 19th century, in the works of Agustin Caro, Manuel Gonzalez, Antonio de Lorca, Manuel Gutierrez from Spain and other European makers including Rene Lakota, and Johann Stauffer, we find the direct predecessors of the modern classical guitar. By 1850, the guitar was prepared for its most important breakthrough since its inception, the work of Antonio T orres Jordon. With the encouragement of Julian Arcos and his own brilliant intuitions, Torres refined the strutting of the guitar to include as many as seven struts spread out like a fan under the soundboard. He increased the body size and the widthof the neck considerably. These improvements allowed for greater volume and bass response as well as the development of a left hand technique for richer repertoire. The guitar was now prepared for the demands of the solo performer and the concert stage.Although there have been continued developments since the middle 1800's, our modern guitar retains most of what was developed nearly 150 years ago. No one can say if we have reached the end of the evolution of the guitar, but until now, many of the best guitars from the point of view of volume, projection and sheer beauty of tone were made by the great makers, Torres, Ramirez and Arias from the second half of the last century!新托福阅读背景知识:吉他的历史吉他的history根据格罗夫(Grove)音乐辞典记载,古典吉他为鲁特琴族(Lute family)中具有琴格的拨弦乐器。
Designing Object-Oriented Frameworks
1 Introduction
Most software reuse has focused on code reuse, such as reusing parts of existing applications, reusing library functions or reusing pre-built components. With the recent interest in design patterns Gamma et al., 1995] and object-oriented frameworks, the focus is shifting away from just reusing code to reusing existing designs as well. Design patterns provide a reusable piece of a design which solves a recurring design problem in software construction. An object-oriented framework, which is the focus of this chapter, is the reusable design and implementation of a system or subsystem Beck and Johnson, 1994]. It is typically implemented as a set of abstract classes which de ne the core functionality of the framework along with concrete classes for speci c applications included for completeness. Users of the framework complete or extend the framework by adding custom application speci c components or functions to produce and application. Designing a framework di ers from designing a single application in at least two respects. First, the level of abstraction is di erent. Frameworks are meant to provide a generic solution for a set of similar or related problems or an entire domain, while applications provide a concrete solution for a particular problem. Second, frameworks are by their nature incomplete. Whereas an application design has all of the components it needs to execute and perform its task, a framework design will have places within it that need to be instantiated by adding concrete solutions to a speci c application problem. A framework does not cover all of the functionality required by a particular domain, but instead abstracts the common functionality required by many applications, incorporating it into the common design, and leaving the variable functionality to be lled in by the framework user. Due to these di erences, framework design focuses on providing exible abstractions that cover the functionality required by applications within a domain and making the framework easy to use. These abstractions in turn provide ways in which application developers can customize the framework. Object1
ch07_Design and Implementation
An object-oriented design process
• Structured object-oriented design processes involve developing a number of different system models. • They require a lot of effort for development and maintenance of these models and, for small systems, this may not be cost-effective. • However, for large systems developed by different groups design models are an important communication mechanism.
• The Transmitter and Receiver objects are concerned with managing communications and the WeatherData object encapsulates the information that is collected from the instruments and transmitted to the weather information system. • This arrangement follows the producer-consumer pattern, discussed in Chapter 20.
– – – – – Define the context and modes of use of the system; Design the system architecture; Identify the principal system objects; Develop design models; Specify object interfaces.
THE DEVELOPMENT OF AN OBJECT ORIENTED SOFTWARE PROTOTYPE FOR A “ REQUISITIONS AND PURCHASE
R E S E A R C HTHE DEVELOPMENT OF AN OBJECT ORIENTED SOFTWARE PROTOTYPE FOR A “ REQUISITIONS AND PURCHASE ORDERSMANAGEMENT SYSTEM”L. Meraghni, A.D. Ross and D.M. JaggarJohn Moores University, School of the Built Environment, Clarence Street,Liverpool, L3 5UG, United Kingdom.AbstractThe availability of building materials on construction sites of the right quantity, quality and at the right place is crucial to the success of construction projects. The process of procuring materials generates large numbers of requisitions and purchase orders that witness a large number of changes solicited by clients, suppliers, contractors and market forces.Changes in requisitions and purchase orders are inevitable and have a strong effect on cost and time. Unfortunately manual administrative methods to handle them are prone to data redundancy, and inconsistency. The introduction of IT tools to the area of materials management has the potential to organise and structure the processes performed and to estimate the effect of changes in purchase orders on the project’s programme of work.This is a three year research project funded by Liverpool John Moores University. It aims to develop an integrated model for a materials management system. This paper reports on the development of a prototype system “Requisitions and Purchase Orders Management System” based on the above mentioned model.The proposed system has been developed using the Object Oriented methodology. It aims at providing a system that enables users to input and modify requisitions and purchase orders as well as keeping them informed on their progress. The system requires the integration of purchasing, materials planning and site management activities. The system has maximum benefits in aiding construction scheduling during the planning and contract stages. The objective is to ensure that materials are delivered when and where needed, highlighting any problems, and ripple effects that may arise.Keywords:Management, Requisition, Purchase Order, Object Oriented, Prototype1.IntroductionBuilding materials represent an expensive and important project resource that needs close management attention. Traditional approaches to minimising building costs such as reducing labour and substituting alternative technology have in many cases been pushed as far as they can, Pheng[14], Harris and McCaffer [5 ]. Should the construction industry aim at reducing construction costs by 30% by the end of this century Latham [ 11 ], materials management is unquestionably an area that should receive considerable attention.Materials Management is defined by Marsh [ 12 ] as :"the management techniques for planning and controlling all of the necessary efforts to ensure (in a timely fashion) that the correct quality and quantity of materials are appropriately specified, and obtained at a reasonable cost and available at the point of use when needed". Over the past decade many construction companies have invested large sums of money on information technology. Investment ranges from simple computer systems to sophisticated ones namely in accounting, estimating, design, bills of quantity preparation and costing, Harris [6 ], Lock [10 ]. These IT solutions have been designed independently as islands of automation with no information integration between them, Aouad et al [2 ]. Existent computer solutions to order management consider orders as independent entities with no link with materials requisitions, Meraghni et al [13 ]. Requisitions provide authority to issue purchase orders. They are made after a materials schedule has been determined for each material or major materials.Schedules should be very detailed and materials should not be used for any purpose other than that shown in the schedule.The buying department’s responsibility should be to check for possible duplication of requisitions, for compliance with the specifications, for correct quantity, for reality of delivery, for discounts and to select and / or confirm appropriate suppliers. Changes to construction projects are numerous and inevitable, they are generated by clients, contractors, materials suppliers and market forces. Construction projects generate a large number of requisitions and purchase orders that become difficult to manage as their number grows. Table 1 represents the amount of requisitions and purchase orders for small to medium sized projects (data source is confidential). Copies of requisitions and purchase orders are often distributed to the site manager, the materials planner, the quantity surveyor, the buyer, the accountant and materials suppliers. When changes are made to an order it becomes difficult to update and communicate the changes to the parties involved in time. This leads to confusion and misunderstanding, which has a negative effect on the programme of work. Manual management of requisitions and purchase orders is effective in small projects, however difficulties arise when dealing with larger ones. This creates problems when searching for specific information held in them Krone[9].Contract Requisitions Amendments Total Purchase Orders11585416999372981142122523200132332462Table 1 Amount of requisitions and purchase ordersA survey carried out by the Construction Industry Computer Association, CICA and KPGM [4 ], has shown that potential areas of IT applications within a contractor’s organisation is “Buying and Purchase Order Processing”. This paper goes further than Buying and Purchase Order Processing, it suggests that it would be beneficial to integrate information between the purchasing department responsible for issuing orders, the site and the materials planning department, both responsible for issuing requisitions. It proposes to integrate information from the above listed departments to improve the cost and time control of construction projects.2.View of just in time concept on materials, requisitions and purchase orders managementThe application of Just In Time (JIT) philosophy in the Japanese construction industry relies on very detailed materials schedule, delivery schedule and programme of work. This has ensured that materials arrive only when and where needed in the right quantity and quality. The success of such a system depends on the relationship between contractors and suppliers. Adopting such a concept means that materials should be ordered in small batches. This will reduce the number and need for storage personnel, cut costs of storage and inventories and reduce the risk from theft and damage on site.The disadvantages of such a philosophy is that it will incur higher costs for delivery and materials cost. This can be overcome if contractors and suppliers work closely. If the latter is given a long term forecast of annual quantities, of when they will be needed, then the supplier will have some confidence and will reduce both delivery and materials costs, Baxter et al [3 ], Akintoye [1 ].3.Development of the prototypeThe prototype is a part of a project that aims at developing an integrated information construction materials management model. The prototype is based on the above mentioned model and one of its aims is to validate the approach the authors have taken . The following is a brief descriptions of the steps undertaken for the development of the research project with particular attention on the prototype.1. Literature review has been carried out. The major finding was that systems have been developedto deal with purchase orders as an independent entity, Kakalia et al [8 ], Marsh [12 ], Watson [ 15]. The system developed at John Moores University goes further by integrating purchase orders and requisitions which implies the integration between site office and head office’s purchasing and materials planning departments.2. Interviews with companies were essential for finding out their current systems and their views andneeds. A questionnaires was sent to the 100 top UK contractors. This gave the authors a general view of the understanding of materials management by the UK construction industry as well as their thoughts on a system for the management of requisitions and purchase orders. 75% of the respondents agreed that such a system would be a useful tool to help improve existing practises in the area, Meraghni et al [13 ].3. Develop an object oriented information model for construction materials management4. Develop requirement specifications and requirements model using the “Object Oriented-Use CaseDriven Approach” Jacobson et al [ 7 ] (as further detailed below)5. Specifications for hardware and software to be used have been developed6. Database files have been developed using Excel’s database facilities7. Programme of work files have been developed using CA-Superproject8. Designed prototype has been implemented9. Designed prototype has been tested4.Prototype’s development “a use case driven approach”Materials management involves a large number of responsibilities. One of which is materials purchasing which is in itself responsible for determining materials requirements, locating and selecting suppliers, negotiating prices, expediting to ensure timely deliveries, ordering and materials payment. The prototype will only concentrate on the ordering aspect of purchasing. The prototype development started by stating its requirement specifications, as shown in figure 1. This is a description of what is expected from the developed system. It is also used to plan and control the development process.The system’s responsibility is to assist in inputting requisitions, compile purchase orders as well as expediting and tracking down the major millstones of materials orders, through continuos monitoring of materials schedule, buying schedule, delivery schedule and programme of work.The system holds information on how materials are to be delivered including information on packaging, unit load, date and time of delivery. It is also responsible for monitoring the process of purchase orders and their delivery and reflects the latest information on order expedition, highlighting any problems areas that might arise. In case of delayed or cancelled orders information is documented and distributed through memo or EMail to the parties concerned especially the site office to allow it to plan for corrective actions.Figure 1 Extract from requirement specificationsThe first transformation made is from the requirement specifications to requirements model. The latter is composed from a number of use cases and system users as interface to the system. The “Use Case Driven Approach” is useful for understanding the behaviour of the system and its interaction with the user. “A use case is a sequence of related transactions performed by an actor and the system in a dialogue” Jacobson[7 ]. It enables software developers to start designing systems with the simplest and most basic cases. Once these are successfully implemented, more complex conditions, rules and cases are added to them until the prototype reflects the requirement specifications. An example of a use case in the developed prototype system is “Input an order into the system”, as shown in figure 2. It is made from the objects, requisition, order, supplier, material item , and user. The use case holds knowledge of the relationships among the objects that constitute it, see figure 3.The system is designed to cater for different users’ perspectives as shown in table 2.Purchaser’s perspectives Site manager’s perspectives Materials planner’s perspectives Input orders Input requisitions Input requisitionsChange orders Change requisitions Change requisitionsCheck need for order Update suppliers’ performance file Update call off scheduleUpdate suppliers’ performance file Expedite orders Update programme of work Expedite orders View ordersUpdate call off scheduleTable 2 Users’ perspectives5.Prototype’s architecture and descriptionThe prototype has been developed through the integration of three Windows based software packages namely Kappa.Pc, Excel and CA-Superproject. Kappa.Pc is an object oriented development environment, its role is to present the user with a graphical user interface as well as extracting (through Dynamic Data Exchange) and analysing data from the other two packages.Kappa.Pc provides an environment in which a variety of ways of developing applications can be used. These include, object oriented programming, see figure 5, rule based reasoning, see figure 6,traditional programming or a combination to suit developers’ needs and ways of working.SetValue(Self:ExpeditionDate, GetNthElem(Self:DeliveryDateRequested, 1));Figure 5 Object oriented programming If SLB2:Value #= Concrete;Then{ResetSlotOption( Material_Items:Material_Specification_Code, ALLOWABLE_VALUES );SetSlotOption( Material_Items:Material_Specification_Code, ALLOWABLE_VALUES, q4_All_In_Aggregate_Concrete,q4_Heavy_Concrete, q4_Plain_Concrete, q4_Mass_Concrete, q4_Reinforced_Concrete, q5_Terrazzo, q5_Granolithic,q6_Lightweight_Celluar_Concrete, q7_Lightweight_Aggregate_Concrete );};Figure 6 A system’s ruleWith Kappa’s rule based reasoning, the system is able to present to the user a list based on the SfB table 3 specification codes of the requested material, as shown in figure 7.Figure 7 Kappa’s Input form and SfB materials specificationExcel is a well established spreadsheet software. Its database and macros facilities have been exploited for the development of the system. The Excel file holds information on materials suppliers,their products and correspondence details. It also holds data on purchase orders and requisitions.CA-Superproject is a project management software, which role in the developed system is to hold the programme of work with the required list of materials for each worksection as shown in figure 8.Figure 9 also suggests a future link with a Computer Aided Design (CAD) software. This link will enable Kappa.Pc to extract materials quantities and their specifications.SfB classification ofconcreteFigure 8 Extract from CA-SuperprojectK A P P A .P Ct E n v i r o n m e n t between orders and worksections. The prototype has been implemented on an IBM compatible Pentium 75 personnel computer running Windows 3.1.Figure 10 Section form the Expedition Screen6.Benefits of the “Requisitions and purchase orders management system”One of the major problems facing construction firms is the lack of co-ordination and timely communication between the site office and head office’s purchasing and materials planning departments. Crucial information is usually missed late or re-entered which leads to money and time being wasted.The implementation of a system such as a “Requisitions and purchase orders management system”can help in providing managers and users with exact information that was entered into the system at the point of highest accuracy, which will eliminate data inconsistencies, and redundancy. Information in the system is available to all departments at all management levels. File modification is permitted to only those with authorisation. The system provides an integrated environment for the management of requisitions and purchase orders with the following as its short and long term benefits:• Carry a large number of requisitions• Requisitions can be input from site and head office• Carry a large number of purchase orders• Process a large number of materials• Deal with a large number of suppliers• Swift transformation of requisitions into purchase orders• Feedback on the effect of orders on the programme of work• Free personnel to concentrate on suppliers’ investigation and price negotiation• Highlight worksections affected by orders delays and cancelling• Offer a paperless environment• Reduce materials management personnel• Promptness in dealing with purchase orders changes• Fewer project delays and betterment in labour productivity7.Limitations of the proposed prototype and furtherThe prototype has a number of limitations which are highlighted below with future modifications and developments of the prototype1. The developed prototype does not yet cater for multiple projects materials ordering. This can behelpful in securing suppliers’ confidence when it comes to ordering small batches of materials. A use case can be designed for this instance.2. The present system only deals with doors, windows, bricks, blocks, concrete, cement, wood andsand. A larger selection of materials will be introduced.3. The system relies on a small suppliers’ database developed for the sake of the prototype. Futurework will ensure that suppliers can be selected nationally and internationally if necessary through links with the Internet.4. An order delivery subsystem responsible for producing delivery schedules, reports on deliveredorders, pendent orders, non delivered orders, rejected orders, and suppliers’ performances on delivery will also be incorporated into the system. This can be enhanced through the use of bar code technology.5. An order payment subsystem responsible for issuing payments to suppliers, documenting andmonitoring invoices, committed payments, and cost of materials used against materials budgets will also be considered for future development of the presented system.6. At present there is no link between the proposed prototype and a CAD system. This link canensure that materials quantities and specifications are extracted and logged into this system automatically. This will reduce the risk of data double-handling , mistakes and inconsistencies. 7. The presented system has suggested different communications means between contractors andsuppliers. These include the use of Electronic Mail (EMail) and Electronic Data Interchange (EDI).8.Testing the prototypeTesting of the prototype has been performed to ensure that it is bug free, that it complies with system’s requirement specifications and that it is able to deal with requisitions and purchase orders management. A case study from a large UK contractor was undertaken. Due to the object orientednature of the prototype the overall system being constructed from individual parts and use cases, the prototype was tested with relative ease. Attention was focused on the behaviour of individual objects. Each method/ service in an object was individually tested and debugged until found to process correctly. Testing then moved to higher level, i.e. testing and debugging use cases, as they are formed from a number of objects. Object oriented implementation of the prototype was straightforward which has allowed the authors to concentrate on particular parts of the system without interference from the rest of the system.Also because of the nature of object oriented methodologies, maintaining the system is an easy task as independent objects or use cases can be maintained or upgraded independently, Jacobson [7].9.ConclusionA system designed for the management of requisitions and purchase orders has been developed. The effect of purchase orders on the programme of work has been outlined. The development process of the system has been discussed. Its potential as an aid to improving purchasing activities within contractors organisations as well as the benefits that the developed system can offer over traditional manual approaches have been outlined. In traditional approaches data supplied by the site or materials planning department is often rehandled by the purchasing department. If changes in requisitions and purchase orders are not communicated in time, misunderstandings and inconsistencies will arise. The proposed system suggests how these problems can be overcome, by enabling data to be handled in its electronic format, thus reducing multiple handling of data and improving the management of information through a better system of communications. The paper in describing the system outlines how the results of the research can be integrated into a comprehensive IT framework aimed at optimising scarce and costly resources. The developed system has thus the potential to lead to substantial savings on materials through effective management in head office and on site.References1. Akintoye, A. Just In Time application and implementation for building materials management.Construction Management and Economics, 1995, 13, pp. 105-113.2. Aouad, G. et al.Integration of Construction Information ICON. University of Salford, Jul. 1994.3. Baxter, L.F. and Macfarlene, A.W. Just in time for the construction industry. Construction Papers.The Chartered Institute of Building. 1992. 14. pp 1-8.4. CICA. and KPMG.Building on IT for Quality. CICA, 1993.5. Harris, F and McCaffer, R. Modern Construction Management. BSP Professional Books, 1990.6. Harris,P. Purchasing in the construction industry . In Purchasing Management Handbook, Gower,1989, pp. 492-505.7. Jacobson,I. et al.Object Oriented Software Engineering-A Use Case Driven Approach. Addison-Wesley, 1992.8. Kakalia, A. et al. MMS: A materials management system. Construction Management andEconomics,1993, 11, pp. 143-149.9. Krone,S. Managing construction change orders with computers. The American ProfessionalConstructor, May, 1993, 17 (2), pp. 16-19.10. L ock, D. Purchasing for major construction projects. In Project Management, Gower, 1992. pp.399-428.11. L atham, M.Trust and money. Interim report of the joint government/industry review ofprocurement and contractual arrangements in the united kingdom construction industry, Dec.1993.12. M arsh, J.W. 1985: Materials Management: A practical application in the construction industry,Cost Engineering, 1985, 27( 8) pp. 18-28.13. M eraghni,L., Ross, D., and Jaggar, D. A survey into the understanding of “MaterialsManagement” in the UK construction industry.Proceedings of the Eleventh Annual ARCOM Conference, York, UK, Sept. 18-20, 1995. pp. 151-160.14. P heng, L.S. The just in time concept to improving manufacturing productivity: Is it applicable tothe construction industry?. In Construction Papers, The Chartered Institute of Building, 8, 1992.pp. 1-8.15. W atson, K. Will it or won’t it. Contract Journal, 15 Feb. 1996, pp 22.。
Design and Implementation of Object-Oriented Views
1 Introduction
Views are an important tool for extending the modeling capabilities of a database system as they provide more exibility for de ning virtual structures adapted to the needs of a particular application. In addition, in the object-oriented paradigm, views can be used not only for adapting the structure of data to di erent kinds of applications, but also for rede ning the behavior of objects in di erent contexts. Despite the number of recent proposals of view mechanisms for object-oriented databases AB91, Ber91, HZ90, RB92, SLT91, SS89, TYI88, SDA94], there is very few account on actual implementations SLT91, KR93]. The implementation of views in relational databases has raised a number of interesting issues concerning querying, data integrity, updates and performance Ker86, Tem86]. With objectoriented views, old problems, such as view materialization and view updates, must be reconsidered, given the fundamental di erences between the relational and the object-oriented data models. In addition, some new problems arise, such as virtual class (the analogue of a virtual relation in the relational model) integration to the class hierarchy and method resolution for objects in such classes. In this paper, we discuss the design and implementation of an object-oriented view mechanism in the light of an experience with the implementation of O2 Views SW93], an advanced prototype of a view mechanism built on top of the object-oriented database system O2 BDK92]. The prototype is rst brie y presented (a more complete presentation is given in SW93], which is part of the publicly available O2 Views package) and several issues related to its implementation are discussed. Emphasis is given on the requirements for the implementation of the view mechanism, ranging from the conception of the view de nition language to optimization strategies for querying and
高三英语谈论工程单选题50题
高三英语谈论工程单选题50题1. The large - scale ______ of the bridge requires a lot of manpower and advanced technology.A. constructionB. destructionC. instructionD. production答案:A。
解析:本题考查工程相关词汇的辨析。
A选项construction 表示建设、建造,大型桥梁的建造需要很多人力和先进技术,符合语境。
B选项destruction意为破坏,与建造桥梁的语境相悖。
C选项instruction主要是指示、教导的意思,与工程建造无关。
D选项production侧重于生产,多指产品的生产,不用于桥梁的建造语境。
2. In this ______, we need to consider not only the quality of materials but also the environmental impact.A. projectB. subjectC. objectD. topic答案:A。
解析:在这个工程中,我们需要考虑材料质量和环境影响。
A选项project指工程、项目,符合语境。
B选项subject一般指学科、主题等。
C选项object多表示物体、目标等。
D选项topic指话题,都不符合工程语境。
3. The ______ team is responsible for designing the layout of the new factory.A. engineeringB. marketingC. sellingD. service答案:A。
解析:工程团队负责设计新工厂的布局。
A选项engineering表示工程、工程学相关的,engineering team即工程团队。
B选项marketing是市场营销。
C选项selling是销售。
50 Years of object recognition - Directions-forward_2013_Computer-Vision-and-Image-Understanding
50Years of object recognition:Directions forward qAlexander Andreopoulos a ,⇑,John K.Tsotsos b ,1a IBM Research –Almaden,650Harry Road,San Jose,CA 95120-6099,United StatesbDepartment of Computer Science and Engineering,Centre for Vision Research,York University,Toronto,ON,Canada M3J 1P3a r t i c l e i n f o Article history:Received 2January 2012Accepted 26April 2013Available online 3May 2013Keywords:Active visionObject recognition Object representations Object learning Dynamic visionCognitive vision systemsa b s t r a c tObject recognition systems constitute a deeply entrenched and omnipresent component of modern intel-ligent systems.Research on object recognition algorithms has led to advances in factory and office auto-mation through the creation of optical character recognition systems,assembly-line industrial inspection systems,as well as chip defect identification systems.It has also led to significant advances in medical imaging,defence and biometrics.In this paper we discuss the evolution of computer-based object recog-nition systems over the last fifty years,and overview the successes and failures of proposed solutions to the problem.We survey the breadth of approaches adopted over the years in attempting to solve the problem,and highlight the important role that active and attentive approaches must play in any solution that bridges the semantic gap in the proposed object representations,while simultaneously leading to efficient learning and inference algorithms.From the earliest systems which dealt with the character rec-ognition problem,to modern visually-guided agents that can purposively search entire rooms for objects,we argue that a common thread of all such systems is their fragility and their inability to generalize as well as the human visual system can.At the same time,however,we demonstrate that the performance of such systems in strictly controlled environments often vastly outperforms the capabilities of the human visual system.We conclude our survey by arguing that the next step in the evolution of object recognition algorithms will require radical and bold steps forward in terms of the object representations,as well as the learning and inference algorithms used.Ó2013Elsevier Inc.All rights reserved.1.IntroductionArtificial vision systems have fascinated humans since pre-his-toric times.The earliest mention of an artificial visually-guided agent appears in classical mythology,where a bronze giant named Talos was created by the ancient god Hephaestus and was given as a gift to King Minos of the Mediterranean island of Crete [1].According to legend the robot served as a defender of the island from invaders by circling the island three times a day,while also making sure that the laws of the land were upheld by the island’s inhabitants.The fascination and interest for vision systems continues today unabated,not only due to purely intellectual reasons related to ba-sic research,but also due to the potential of such automated vision systems to drastically increase the productive capacity of organiza-tions.Typically,the most essential component of a practical visu-ally-guided agent is its object recognition module.Modern computer vision research has its origins in the early 1960s.The earliest applications were pattern recognition systems for character recognition in office automation related tasks [2,3].Early work by Roberts in the 1960s [4]first identified the need to match two-dimensional features extracted from images with the three-dimensional representations of objects.Subsequent research established the practical difficulties in reliably and consistently accomplishing such a task,especially as the scene complexity in-creased,as the illumination variability increased,and as time,cost,and sensor noise constraints became more prevalent.Early systematic work on vision systems is also traced to the Hitachi labs in Japan where the term machine vision originated,to distinguish its more pragmatic goal of constructing practical applications [5],as compared to the more general term computer vision ,popularly used to also include less pragmatic goals.An early research thrust in 1964involved the automation of the wire-bond-ing process of transistors,with the ultimate goal of replacing hu-man workers.Even though the automated system achieved 95%accuracy in lab tests,this was deemed too low to replace human workers.By 1973however,fully automated assembly machines had been constructed [6],resulting in the world’s first image-based machine for the automatic assembly of semiconductor devices.Arguably,the most successful application of machine vision1077-3142/$-see front matter Ó2013Elsevier Inc.All rights reserved./10.1016/j.cviu.2013.04.005qThis paper has been recommended for acceptance by Sven Dickinson.⇑Corresponding author.E-mail addresses:aandreo@ (A.Andreopoulos),tsotsos@cse.yorku.ca (J.K.Tsotsos).1Fax:+14167365872.technologies is in the assembly and verification processes of the semiconductor industry,enabling the mass production and inspec-tion of complex semiconductors such as wafers[5].Due to the sheer complexity of this task,human workers could not have pos-sibly solved such problems reliably and efficiently,thus demon-strating how vision technologies have directly contributed to many countries’economic development by enabling the semicon-ductor revolution experienced over the last couple of decades.Early recognition systems also appeared in biomedical research for the chromosome recognition task[7,8].Even though this work initially had limited impact,its importance became clearer later. Recognition technologies are also successfully used in the food industry(e.g.,for the automated classification of agricultural prod-ucts[9]),the electronics and machinery industry(for automated assembly and industrial inspection purposes[10]),and the phar-maceutical industry(for the classification of tablets and capsules) [5].Many of the models used for representing objects are also effectively employed by the medical imaging community for the robust segmentation of anatomical structures such as the brain and the heart ventricles[11,12].Handwritten character recogni-tion systems are also employed in mail sorting machines as well as for the digitization and automated indexing of documents [13,14].Furthermore,traffic monitoring and license plate recogni-tion systems are also successfully used[15,16],as are monetary bill recognition systems for use with ATMs[5].Biometric vision-based systems forfingerprint recognition[17],iris pattern recognition [18],as well asfinger-vein and palm-vein patterns[19,20]have also gained acceptance by the law enforcement community and are widely used.Despite the evident success of recognition systems that are tai-lored for specific tasks,robust solutions to the more general prob-lem of recognizing complex object classes that are sensed under poorly controlled environments,remain elusive.Furthermore,it is evident from the relevant literature on object recognition algo-rithms that there is no universal agreement on the definitions of various vision subtasks.Often encountered terms in the literature such as detection,localization,recognition,understanding,classifi-cation,categorization,verification and identification,are often ill defined,leading to confusion and ambiguities.Vision is popularly defined as the process of discovering from images what is present in the world and where it is[23].Within the context of this paper, we discern four levels of tasks in the vision problem[24]:Detection:is a particular item present in the stimulus?Localization:detection plus accurate location of item.Recognition:localization of all the items present in the stimulus. Understanding:recognition plus role of stimulus in the context of the scene.The localization problem subsumes the detection problem by providing accurate location information of the a priori known item that is being queried for in the stimulus.The recognition problem denotes the more general problem of identifying all the objects present in the image and providing accurate location information of the respective objects.The understanding problem subsumes the recognition problem by adding the ability to decide the role of the stimulus within the context of the observed scene.There also exist alternative approaches for classifying the vari-ous levels of the recognition problem.For example,[25]discerns five levels of tasks of increasing difficulty in the recognition problem:Verification:Is a particular item present in an image patch?Detection and localization:Given a complex image,decide if a particular exemplar object is located somewhere in this image, and provide accurate location information on this object.Classification:Given an image patch,decide which of the multi-ple possible categories are present in that patch.Naming:Given a large complex image(instead of an image patch as in the classification problem)determine the location and labels of the objects present in that image.Description:Given a complex image,name all the objects pres-ent in the image,and describe the actions and relationships of the various objects within the context of this image.As the author indicates,this is also sometimes referred to as scene understanding.Within the context of this paper we will discern the detection, localization,recognition and understanding problems,as previ-ously defined.For relatively small object database sizes with small inter-ob-ject similarity,the problem of exemplar based object detection in unoccluded scenes,and under controlled illumination and sensing conditions,is considered solved by the majority of the computer vision community.Great strides have also been made towards solving the localization problem.Problems such as occlusion and variable lighting conditions still make the detection,localization and recognition problems a challenge.Tsotsos[21]and Dickinson [22]present the components used in a typical object recognition system:that is,feature extraction,followed by feature grouping, followed by object hypothesis generation,followed by an object verification stage(see Fig.1).The advent popularity of machine learning approaches and bags-of-features types of approaches has blurred somewhat the distinction between the above men-tioned components.It is not uncommon today to come across pop-ular recognition approaches which consist of a single feature extraction phase,followed by the application of cascades of one or more powerful classifiers.The definition of an object is somewhat ambiguous and task dependent,since it can change depending on whether we are deal-ing with the detection,localization,recognition or understanding problem.According to one definition[26],the simpler the problem is(i.e.,the further away we are from the image understanding prob-lem as defined above),the closer the definition of an object is to that of a set of templates defining the features that the object must pos-sess under all viewpoints and conditions under which it can be sensed.As we begin dealing with more abstract problems(such as the object understanding problem)the definition of an object be-comes more nebulous and dependent on contextual knowledge, since it depends less on the existence of afinite set of feature tem-plates.For example,the object class of toys is significantly abstract and depends on the context.See the work of Edelman[27]for a char-acterization of what might constitute a proper definition of an ob-ject.It is important to emphasize that there were multiple starting points that one can identify for early definitions of what constitutes an object,since this is highly dependent on the recognition system used.As previously discussed,one early starting point was work on the block-world system which led to definitions and generaliza-tions involving3D objects.However,there were also other signifi-cantly different early definitions,which emerged from early applications on character and chromosome recognition and the analysis of aerial images.These latter applications led to progress in pattern recognition,feature detection and segmentation but dealt with objects of a different type.These latter approaches are closely related to modern2D appearance based object recognition research. Arguably,one of the ultimate goals of recognition research is to iden-tify a common inference,learning and representational framework for objects,that is not application domain specific.In Section4.3 we discuss how insights from neuroscience might influence the community in the search for such a framework.Early research in computer vision was tightly coupled to the general AI problem,as is evidenced by the large overlap in the pub-828 A.Andreopoulos,J.K.Tsotsos/Computer Vision and Image Understanding117(2013)827–891lication outlets used by the two communities up until the late1980s.Subsequent approaches to vision research shifted to moremathematically oriented approaches that were significantly differ-ent from the classical AI techniques of the time.This spurred agreater differentiation between the two communities.This differ-entiation between the communities is somewhat unfortunate,especially for dealing with the understanding problem definedabove,due to the evident need for high level reasoning capabilitiesin order to deal with certain vision problem instances which areintractable if these problems are attempted to be solved byextracting a classical object representation from a scene.The needfor reasoning capabilities in artificial vision systems is further sup-ported by experiments demonstrating that the human visual sys-tem is highly biased by top-down contextual knowledge(anexecutive controller),which can have a drastic effect on how ourvisual system perceives the world[29].More recently a new re-search thrust is evident,in particular on the part of EU,Japanese,and South Korean funding agencies,towards supporting the crea-tion of more pragmatic object recognition systems that are tightlycoupled with cognitive robotics systems.This is evidenced by thefact that during the last decade,around one billion euros have beeninvested by EU-related funding agencies alone,towards supportingresearch in cognitive robotics.This last point is further evidencedby the more recent announcement in the US of the National Robot-ics Initiative for the development of robots that work alongside hu-mans in support of individuals or groups.Assuming that currenttrends continue,it is fair to predict that research-wise,the futurefor vision-based robotics systems looks bright.The passive approach to vision refers to system architectureswhich exhibit virtually no control over the data acquisition pro-cess,and thus play a minor role in improving the vision system’sperformance.The passive approach has dominated the computervision literature,partly due to the influential bottom-up approachto vision advocated by Marr[23],but also partly due to a numberof difficulties with implementing non-passive approaches to vi-sion,which are elaborated upon later in this paper.Support for apassive approach to the vision problem is evident even in one ofthe earliest known treatises on vision[30],where vision is de-scribed as a passive process that is mediated by what is referredto as the‘‘transparent’’(d i aua m e1),an invisible property of nature that allows the sense organ to take the form of the visible object.In contrast,approaches which exhibit a non-trivial degree ofintelligent decision making in the image and data acquisition pro-cess,are referred to as‘‘active’’approaches[31,32].Active ap-proaches offer a set of different techniques for solving similarsets of vision problems.Active approaches are motivated by thefact that the human visual system has two main characteristics:the eyes can move and visual sensitivity is highly heterogeneousacross visual space[33].As we will discuss later in this manuscript,active approaches are most useful in vision applications where theissue of mobility and power efficiency becomes a significant factorfor determining the viability of the constructed vision system.Wecan classify these approaches as‘‘limited active’’approaches which control a single parameter(such as the focus),and‘‘fully active’’approaches which control more than one parameter within its fullrange of possibilities.From the late1990s and for the next decade,interest in activevision research by the computer vision community underwentsomewhat of a hiatus.However,the recent funding surge in cogni-tive vision systems and vision based robotics research has reinvig-orated research on active approaches to the recognition problem.Historically,early related work is traced to Brentano[34],whointroduced a theory that became known as act psychology.This rep-resents the earliest known discussion on the possibility that a sub-ject’s actions might play an important role in perception.Barrowand Popplestone[35]presented what is widely considered thefirst(albeit limited)discussion on the relevance of object representa-tions and active perception in computer vision.Garvey[36]alsopresented an early discussion on the benefits of purposive ap-proaches in vision.Gibson[37]critiques the passive approach tovision,and argues that a visual system should also serve as a medi-ator in order to direct action and determine when to move an eyein one direction instead of another direction.Such early research,followed by a number of influential papers on object representa-tions[38–41],sparked the titillating and still relatively unexploredquestion of how task-directed actions can affect the construction ofoptimal(in terms of their encoding length)and robust object rep-resentations.The concept of active perception was popularized byBajcsy[42,31],as‘‘a problem of intelligent control strategies ap-plied to the data acquisition process’’.The use of the term active vi-sion was also popularized by Aloimonos et al.[32]where it wasshown that a number of problems that are ill-posed for a passiveobserver,are simplified when addressed by an active observer.Bal-lard[43]further popularized the idea that a serial component isnecessary in a vision system.Tsotsos[28]proposed that the activevision problem is a special case of the attention problem,which isgenerally acknowledged to play a fundamental role in the humanvisual system(see Fig.2).Tsotsos[29]also presented a relevant lit-erature survey on the role of attention in human vision.More recent efforts at formalizing the problem and motivatingthe need for active perception,are discussed in[44,45,26].In[26]for example,the recognition problem is cast within the frame-work of Probably-Approximately-Correct learning(PAC learning[46–48]).This formalization enables the authors to prove the exis-tence of approximate solutions to the recognition problem,undervarious models of uncertainty.In other words,given a‘‘good’’ob-ject detector the authors provide a set of sufficient conditions suchthat for all0< ;d<1,with confidence at least1Àd we can effi-ciently localize the positions of all the objects we are searching forwith an error of at most (see Fig.3).Another important problem addressed is that of determining a set of constraints on the learned object’sfidelity,which guarantee that if we fail to learn a represen-tation for the target object‘‘quickly enough’’it was not due to sys-tem noise,due to an insufficient number of training examples,or due to the use of an over-expressive or over-constrained set of ob-ject representations H during the object learning/trainingphase.A.Andreopoulos,J.K.Tsotsos/Computer Vision and Image Understanding117(2013)827–891829From a less formal perspective,active control of a vision sensor offers a number of benefits [28,24].It enables us to:(i)Bring into the sensor’s field of view regions that are hidden due to occlusion and self-occlusion.(ii)Foveate and compensate for spatial non-uniformity of the sensor.(iii)Increase spatial resolution through sensor zoom and observer motion that brings the region of interest in the depth of field of the camera.(iv)Disambiguate degenerate views due to finite camera resolution,lighting changes and in-duced motion [49].(v)Compensate for incomplete information and complete a task.An active vision system’s benefits must outweigh the associated execution costs [28,33,24].The associated costs of an active visioncertain search region.In such a case,the cost can help us locate the item of interest quickly,by minimizing the distance covered while searching for the object.We should point out that a significant portion of the active vi-sion research has been applied on systems where the vision algo-rithms are not applied concurrently to the execution of the actions.Dickmanns introduced a slightly different paradigm to vi-sion,where machine vision is typically applied on dynamic scenes viewed from a moving platform,or in other words,where vision algorithms are executed concurrently to the actions performed [50].He referred to this framework as dynamic vision .Even though early work on active vision [32]was based on the argument that the observer is in motion,in practice,most active object recogni-tion systems assume that the sensor is stationary when the images are acquired.We will discuss this framework in more detail in Section 3.In recent work the role of learning algorithms has become much more important to the object recognition problem.This has re-sulted in a blurring of the distinction that emerged during the 1980s,between computer vision research and classical AI.This has also resulted in an emerging debate in the community,as to the intended audience of many computer vision journals.Often the main innovation presented in such papers is more closely re-lated to machine learning,while vision is only treated as a small after-effect/application of the presented learning-based algorithm.Another after-effect of this pattern is that recent work has drifted away from Marr’s early paradigm for vision.Nevertheless,and as we will see in Section 4,the fact remains that some of the most successful recognition algorithms rely currently on advanced learning techniques,thus significantly differentiating them from early recognition research.In Section 4.3we discuss how certain emerging constraints in computing technology might affect the evolution of learning algorithms over the next few years.This introductory discussion has outlined the breadth and scope of the approaches adopted by the vision community over the last 50years,in attempting to solve the recognition problem.The rest 830 A.Andreopoulos,J.K.Tsotsos /Computer Vision and Image Understanding 117(2013)827–891challenges which,in our opinion,have inhibited the creation of ro-bust generic recognition systems.This work alsofills a void,by pre-senting a critical and systematic overview of the literature lying at the intersection of active vision and object recognition.Our work also supports the position that active and attentive approaches [31,29]to the object recognition problem constitute the next nat-ural evolutionary step in object recognition research.In Chart1we project the algorithms surveyed in this paper along a number of dimensions,and highlight the evolution of the dimensions’relative importance over the years.A number of pat-terns become evident upon inspecting Chart1.For example there is a clear increase in focus over the years with respect to the scala-bility of inference,search efficiency,and training efficiency.At the same time,in early work there was a significantly greater focus on the use of3D in recognition systems.Similarly we see that the search for powerful indexing primitives and compact object repre-sentations was always recognized as an important topic in the lit-erature,while there is less consistency in the use of function, context and texture features.These points are elaborated later in this survey.The remainder of the paper is organized as follows.In Section2 we survey classical approaches to the object recognition and understanding problems,where the data acquisition processes demonstrate limited intelligence.Section3further motivates the active and dynamic approaches to vision.In Section4we discuss some of the most characteristic approaches adopted over the years by algorithms that have won various vision challenges.The section ends with a brief discussion as to where thefield appears to be headed in the near future.Section5summarizes the paper.2.Classical approachesWe present a critical overview of classical approaches to the ob-ject recognition problem.Most of the methods described exhibit limited purposive control over the data acquisition process.There-fore,the word‘‘passive’’can also be used to differentiate the ap-proaches described from‘‘active’’approaches to the recognition problem.In subsequent sections we will build upon work in this section,in order to overview the less developedfield of active ap-proaches to the recognition problem.Though the earliest work ap-peared in the late nineteen-eighties,thefield still remains in its infancy,with a plethora of open research problems that need fur-ther investigation.It will become evident,as we review the rele-vant literature,that a solution to the recognition problem will require answers to a number of important questions that were raised in[26].That is,questions on the effects thatfinite computa-tional resources and afinite learning time have in terms of solving the problem.The problem of constructing optimal object represen-tations in particular emerges as an important topic in the literature on passive and active object recognition.Algorithms whose con-struction is driven by solutions that provide satisfactory answers to such questions,must form a necessary component of any reli-able passive or active object recognition system.The categorization of the relevant literature on classical approaches to the recognition problem follows the one proposed by Dickinson,2with modifica-tions in order to include in the survey some more recent neuromor-phic approaches that have gained in popularity.This section’s presentation on passive approaches to the recognition problem is also used to contextualize the discussion in Section3,on active ap-proaches to the problem.As we survey the literature in thefield,we use the standard rec-ognition pipeline described in Fig.1as a common framework for contextualizing the discussion.We will support the hypothesis that most research on object recognition is reducible to the prob-lem of attempting to optimize either one of the modules in the pipeline(feature-extraction?feature-grouping?object-hypoth-esis?object-verification)or is reducible to the problem of attempting to improve the operations applied to the object data-base in Fig.1,by proposing more efficient querying algorithms, or more efficient object representations(which in turn support better inference and learning algorithms and reduce the related storage requirements).Sporadically throughout the text,we will recap our discussion,by comparing some of the most influential papers discussed so far.We do this by comparing these papers along various dimensions such as their complexity,the indexing strength,their scalability,the feasibility of achieving general tasks, their use of function and context,the level of prior knowledge and the extent to which they make use of3D information.We provide discussions on the assumptions and applicability of the most(spanning1971–2012)on the papers that will be discussed with the most detail during the rest of thishorizontal axis denotes the mean score of the respective papers from Tables1–7.Inference Scalability:The focusscene complexity or the object class complexity increases.Search Efficiency:The use of intelligent strategiescorresponding algorithm is used for localization.If it is a detection algorithm,this refers to its localizationthe degree of the use of intelligent strategies to improve detection efficiency).Training Efficiency:The levelthe training is done.Encoding Scalability:The encoding length of the object representations as the number increases.Diversity of Indexing Primitives:The distinctiveness and number of indexing primitives esinfluences the es3D:The degree to which depth/range/3D information is used by the algorithm degree to which texture discriminating features are used by the algorithm.2Personal communication,CSC2523:Object Modeling and Recognition,Universityof Toronto.Also see[51].。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1 The object oriented design of the integrated Water Modelling SystemMOHIDF.Braunschweig a∗,P.C.Leitao b,L.Fernandes a,P.Pina a and R.J.J.Neves aa Instituto Superior Tecnico,Technical University of Lisbon,Av.Rovisco Pais,1049-001Lisboa,Portugalb Hidromod Lda.,Sala349,Nucleo Central,Taguspark,P-2780-920,Oeiras,PortugalWith increasing computer power,the modelling tools for water resources,nowadays, not only integrate physical-based transport models with biogeochemical process models, but also couple surface water body models,groundwater models and hydrographic basin models.This paper describes how the MOHID water modelling system achieves the mentioned integration using object oriented programming in FORTRAN95.After a short historical overview of MOHID’s evolution this paper focuses on the object oriented design of the water modelling system MOHID and the way how object oriented features are implemented in FORTRAN95.Attention is also given to the way how the numerical software code interacts with the graphical user interface.It follows an exemplification of how the object oriented design is useful for implementing complex system for two cases: the operational model of the Tagus Estuary and the coupling of the Trancao Basin model to the Tagus Estuary model.1.INTRODUCTION1.1.History of MOHIDThe development of MOHID started back in1985.Since that time a continuous de-velopment effort of new features has been maintained.Model updates and improvements were made available in a regular basis were used in the framework of many research and engineering projects.Initially,MOHID was a two-dimensional tidal model written in FORTRAN77[1].This version also gave the present name to model,which derives from the Portuguese abbreviation of”MOdelo HIDrodinamico”(Hydrodynamic Model). This model was used to study estuaries and coastal areas using a classicfinite-differences approach.In the subsequent years,two-dimensional eulerian and lagrangian transport modules were included in this model,as well as a Boussinesq model for non-hydrostatic gravity waves[2].Thefirst three-dimensional version of the model was introduced with the version MOHID3D which used a vertical double Sigma coordinate[3].The limi-tations of the double Sigma coordinate revealed the necessity to develop a new version ∗This work was carried out within the tempQsim research project funded by the European Union under contract n EVK1-CT-2002-001122which could use a generic vertical coordinate,permitting the user to choose from several coordinates,depending of the main processes in the study area.This necessity led to the introduction of the concept of thefinite volumes approach which was introduced in the version MESH3D[4].In the MESH3D model,a3D eulerian transport model,a 3D lagrangian transport model[5]and a zero-dimensional water quality model[6]were included.This version revealed that the use of an integrated model based on a generic vertical coordinate is a very powerful tool.However it was verified that the model was difficult to maintain and to extend due to the FORTRAN77language limitations and due to the increasing number of users and programmers and the interdisciplinary character of the modelled processes.Thus,it was necessary to establish a methodology which permit-ted to reuse the code more often and improve its robustness related to programming errors [7].It was decided to reorganize the model,writing it in ANSI FORTRAN95,profiting from all its new features,including the ability to produce object oriented programming with it,although it is not an object oriented language.This migration began in1998, implementing object oriented features like those described in Decyk[8]with significant changes in code organization[9].This migration resulted in an object oriented model for surface water bodies which integrates scales and processes[7].1.2.Present StateThe object oriented modular design of this model was the base to build the present MOHID Water Modelling System,which is a set of several numerical tools.Presently there are three core tools:(i)MOHID Water,(ii)MOHID Land and(iii)MOHID Soil. Thefirst tool is the improved version of the model described above;the second one is a watershed model and the third one simulates waterflow through porous media.Today the MOHID Water Modelling System is a reliable and robust framework for the upcoming challenges of water modelling.MOHID Water’s versatility can easily be demonstrated by the range of applications carried out in the last couple of years:applications in the North Atlantic to study general circulation[10,11],Oil Spills[12],eutrophication and residence times in estuaries[13]and reservoirs[14].MOHID Land is the most recent core executable of the MOHID Framework and doesn’t have yet the maturity of MOHID Water.So far it was applied to some watersheds,among them the Trancao Basin,which outlet is the Tagus Estuary.2.OBJECT ORIENTED DESIGN OF MOHID2.1.GeneralThis chapter describes how object oriented features are implemented in the MOHID water modelling system.In common object oriented languages(OOL),like JAVA or ,objects are created from classes.FORTRAN95is not an OOL,but it can be used for object oriented programming(OOP).FORTRAN modules can act as classes of common OOL[8,15].As mentioned before,presently the MOHID Water Modelling System is written in FORTRAN95.The whole structure of the system is divided into FORTRAN modules,each of them having the functionality of an object class.MOHID’s design uses several object oriented features like encapsulation,polymorphism,function overloading and inheritance.Objects have four standard methods:(i)constructor,(ii) selector,(iii)modifier and(iv)destructor.3Figure1.Example of a class definition and encapsulation using the MODULE and PRI-VATE statementSome MOHID classes from different levels are:EnterData Parses ASCII datafiles written in format similar to XML and extracts information.Low level class used by all modules which need to read datafiles.Public information:Any information extracted from the datafile. HorizontalGrid Handles information over a structured regular horizontal grid.Inter-mediate class used by all three MOHID core executables to implement the grid they work over.Public information:Grid rotation,areas of grid cells,coordinates of cell centers, coordinates of cell vertices and distances between centers of cells. Hydrodynamic Solves the non-turbulentflow properties of the water column of surface water bodies(e.g.oceans,estuaries,reservoirs).High level class just incorporated in MOHID Water.Public information:Water level,velocityfield and waterfluxes among grid cells.2.2.A standard MOHID ClassEach of the more than50classes that form the MOHID Framework is designed tofill out some standard requirements,regarding programming rules and definition concepts, in order to establish a straightforward connection of the whole code.This standardiza-tion is reflected in memory organization,public methods systematization,possible object states,client/server relationship and errors management[7].Each class is responsible for managing a specific kind of information.The design of a class,in FORTRAN95,can be accomplished by the MODULE statement.This way,information can be encapsulated using the PRIVATE statement(Figure1).Encapsulation assures that all the information associated to an object is only changed by the object itself,reducing errors due to careless information handling in other classes.A MOHID class is defined as a derived type,which has,in addition its specific infor-mation,two required variables(Figure2):InstanceID and Next.InstanceID relates to the identification number of the class instance,that is the object’s ID,which is attributed when the object is created.Each time a new object is created,it is added to a collection of objects,stored in a linked list.Next relates to the object stored after the current in the list.The linked list4Figure2.Example of a MOHID class derived type definitionFigure3.Global class variablesis designed to be one-way,that is,it can only be scanned in one direction,because there was no need to turn it more complex(two-way or four-way)and it would only require more allocated memory.Each class has only two global variables,defined as derived type pointers(Figure3). They are thefirst object in the linked list(FirstObject),which works as an anchor or starting point to scan the list of instances of the module,and a pointer to the current active object(Me).The procedure to access an object is to,starting on thefirst object, scan the list andfind the corresponding one through its ID number.Each module contains its own method to perform this scan,which is always called in the beginning of any public standard method(beside the constructors,since there the object is not created yet).After successfully locating an instance of a module in the linked list,the global variable Me points to the current instance.2.2.1.Object StatesA MOHID object can have two primary states:ON and OFF,standing for if the object has been constructed or not.In order to create a new object,the client object must use a public constructor method which set its state to ON.If a client object tries to access memory of an object that has not been constructed,therefore it does not exist,an error message is returned,which normally leads to stop execution.If an object is ON it can have two secondary states:READ-LOCK or IDLE.If an object is READ-LOCK it means that one or more client objects are accessing information,but without changing it.During this state,no public methods that lead to information alteration can be invoked.Each time a user stops reading,it invokes the READ-UNLOCK method,which removes one reader from the readers list.If no client objects are accessing information,then the object state is set to IDLE.This means although it exists,it is inactive.In order to read information5 from an object,the object must be IDLE or it must be READ-LOCK,as more than one reader is allowed.In previous versions an object could also have the WRITE-LOCK state, but this feature was removed from the code as it was somehow redundant.The WRITE-LOCK state related to the phase when a client object modifies the object’s information. This meant that other objects could not access or modify the information,once the object is in a transition phase.This state wasfirst conceived to perform parallel processing,as an object could not be read if it was still being modified,leading the program execution to wait and improving robustness in accessing memory.Although wise,this feature has proven to be unnecessary,as in all the code,never an object’s public method was invoked when an object was WRITE-LOCK,because the locking and unlocking of this state was performed at the beginning and end of every public modifier method.This way,in order to be modified,an object must be IDLE,i.e.it must be ON but inactive,waiting for instructions.Whenever one is invoking public methods and an inconsistency occurs in the client/server communication,a message is returned by the server indicating the type of ing this error message the client then decides the action to take:whether to continue without warning the user or send him a warning message and let him decide what to do,or stop execution if the error message compromises the program continuity.2.2.2.Object CollectorObjects are only created once and the ID number of any new created object(server object)is returned to the calling(client)object.In order to a second client access in-formation on the same server object,the server object’s ID must be provided by the first client object.In MOHID Framework this is called association.This association is managed by the Object Collector.The Object Collector is a derived type array,where in each array position information is stored about the corresponding class instance.This information relates to the ID number of an object(InstanceID),the number of client objects associated to it(USERS)i.e.that can have access to it,the number of client objects reading information from it(READERS)and the object state(READ-LOCK). The object collector is stored in a module which is used by all other modules of the MOHID Framework.There are several public methods which can be accessed to modify the object collector:(i)one method to register the instance of any new created object, (ii)methods increment/decrement the number of users of an object and(iii)methods to get/set the READ-LOCK state.The ON/OFF state of a module can be inquired through the number of user.2.2.3.Constructor MethodsConstructor methods are used to construct new instances of classes.There are several standard tasks which are performed by all modules of the MOHID Framework,when they pass through the constructor method.First of all the new instance is created and registered in the object collector.Afterwards it’s verified if the object state is off,so it’s guaranteed that an object is not created twice.In case the state is off,the memory of the instance is allocated and the object added to the module’s linked list of objects.After this all other constructor logic is performed(e.g.allocation and initialization of state variables)and the instance ID is returned to the client object.62.2.4.Modifier MethodsModifiers methods are used to modify the state variables of an object.When they are called,the correct instance of the module is located in the linked list through the instance ID,which is received from the client module by argument.2.2.5.Selector MethodsSelector methods are used to access encapsulated information of an object.All selector methods in MOHID start with Get.Object location within the linked list is performed in the same way as in the modifiers methods.After successfully locating the instance of a module,the selector method returns the desired information.For performance reasons, in the case of matrixes,the selector methods return pointer arrays.In this case state of the object providing the information is set to READ-LOCK,so it’s protected against modification,once its information is accessed from outside of the module.The state turns IDLE again if the client module releases the pointer array by calling an UnGet method.2.2.6.Destructor MethodsDestructor methods are used to remove an object from the modules linked objects lists. Like the Modifier and the Selector methods,the destructor methods receive the instance ID by argument from the client.After successfully locating the object,the memory used by the object is deallocated.Afterwards the object is removed from the module linked objects list.2.2.7.Objects inside modulesBesides creating objects from FORTRAN modules,MOHID also implements objects within modules.The way this kind of objects are created follow the same logic,with the difference that these are not directly accessible from outside the module,therefore they don’t have the READ-LOCK state.Also they are not registered in the ObjectCollector, so they can not be inherited which since they are private,also would not be possible. This way of object creation for this kind of object is always used for”smaller”or individ-ual objects.For example,MOHID’s class Discharges handles a conjunction of discharges (For example all rivers which discharge into an estuary).Inside class Discharges,individ-ual discharges and their properties(e.g.geographical location,flow evolution,property concentrations)are stored in a linked list of type IndividualDischarge.2.3.MOHID ObjectsMOHID’s modules are structured in a hierarchical way.All executables of the MOHID Water Modelling System are built on the top of one or more base libraries.The hierarchical structure of MOHID’s Framework is presented in Figure4.The three core executablesfiles(MOHID Water,MOHID Soil and MOHID Land)can be found at the top of the pyramid.Smaller utility programs are easily built on the top of the libraries,which are usually designed for pre or post processing results of the core executables.The advantage of the object oriented design in a complex system like MOHID,is easily shown by a class like EnterData.This class is a very low level class(it can be found in MOHID Base1)and its purpose is to read MOHID ASCII datafiles(see below).Almost every module which handles any kind of process uses a separate instance of module EnterData,since all modules have to read a specific datafile.Once a powerful7Figure4.MOHID Framework,the hierarchical designclass like the class EnterData is build,the functionalities can be accessed by all modules which inherit(by the USE statement)the public methods from this class.Protection of any data(e.g.the unit number)is guaranteed by encapsulation.Public methods take care of opening,reading and closing the datafiles.Selectors are available to read data in any specific way.Once a feature is added to this class,it becomes available to all other classes which”use”module EnterData.Other classes belong exclusively to one executable and rarely more than one instance of them is created.For example,the class Hydrodynamic,which solves the3Dflowfield over a given geometry,is just compiled with the MOHID Water executable.More than one instance of this class is only created when nested models are set up.On the top of MOHID Water exists class Model responsible to coordinate the evolution of one surface water body:1.temporal evolution andfluxes between the three compartments(atmosphere,watercolumn and sediments);2.temporal evolution inside each compartment(e.g.the evolution of the water columnand information exchange between three core classes:Hydrodynamic,Turbulence and Waterproperties);3.the information exchange between models and sub-models;4.the temporal evolution of the model;8er Interface General2.4.1.GeneralAs numerical tools like MOHID become more complex,the need for a well structured graphical user interface grows.With the development of the MOHID Framework a graph-ical user interface was built in parallel.In former times the interface was built in Visual FORTRAN,as a tool on the top of the MOHID’s base libraries,but it turned out that the design of a simple windows interface is very demanding to program,in comparison with languages which are designed for this purpose,like JAVA or Visual Basic.In the last year it was decided to develop a new graphical user interface on platform.This option revealed itself to be a positive one,as programming and development efficiency increased significantly.Today MOHID’s graphical user interface is composed by two core programs:(i)MOHID GUI which handles the directory structure and datafiles necessary to set up a set of MOHID simulations and(ii)MOHID GIS which is a tool which handles geo-referenced data and visualizes results produced by MOHID.It’s written mainly in and so it uses full object oriented rmation exchange between the numerical tools and the graphical user interface is achieved by twofile formats:(i)the format implemented by the class EnterData and(ii)the Hierarchical Data Format(HDF).rmation ExchangeMOHID’s class EnterData allows to write and read ASCII datafiles structured in a similar way as XMLfiles.The major reason why this class doesn’t read XMLfiles is that it was implemented just before XML turned popular.It would be quiet easy to modify this class to read XMLfiles,but the backward compatibility with all existing datafiles would be lost.In order to exchange information between the numerical tools written in FORTRAN95and the graphical user interface written class EnterData has been developed in both languages.Another way to change information between the graphical user interface and the numerical tools is the class HDF.Like the class EnterData this class is implemented in both languages.MOHID’s HDF class is a class on the top of the HDF library.This library is developed and maintained by the National Center for Supercomputing Applications.The main functionality of this library is to store matrix data in a structured way[16].3.IMPLEMENTATIONThis chapter describes the advantages of design a system like MOHID using object oriented programming over models which are written using sequential programming.This approach is very common in FORTRAN programming community.To describe these advantages,two examples are presented which show in which way the object oriented approach is beneficial:(i)one for implementing nested models of MOHID Water and(ii) one for joining watershed models with estuary models.3.1.Nested ModelsThe Tagus Operational Model implements several models of MOHID Water in three nested levels.The largest level covers almost the entire western Portuguese coast and its functionality is to supply boundary conditions to nested models of level2.Models of the second level cover the whole Tagus Estuary and are used for two proposes:(i)9Figure5.Three levels of nested models.Different models have different color scales. From left to right images show large part of the Portuguese coast,Tagus Estuary,Guia Outfall region(top),Caracavelos Beach(bottom).to simulateflow,transport and ecologic processes inside the estuary and(ii)to supply boundary condition for nested models of level three.Level three models are models at local scale,set up to study water quality problems close to beaches or to monitor the impact of submarine outfall.They can be coupled as needed.Figure5shows the nesting of these models.There are two possible ways to run such simulations:1.Run a single executable which simulates the three levels,one instance of class Modelfor each model instance in the different level.If for example level three would have 2models,in total,four different instances of class Model would be created.2.Run four different executable,each one simulating one model.Inter-model commu-nication is achieved by communication with the Message Passing Interface(MPI). Thefirst way is a good example of how the object oriented design,like the one used within the MOHID Framework,can be useful to set up nested models.Since there is no limitation of creating instances of individual classes,a model with infinite number of sub-models can be set up in order to study processes in a desired detail.The limitation found,during the implementation of the operational model of the Tagus Estuary,was the available computer power.Running several models on a single processor turned execution time into the limiting factor.To overcome this limitation,parallel processing for different models was implemented,like described in2.3.2.Watershed ModellingMOHID Land is the newest core executable of the MOHID Water Modelling System and still to improve.This chapter describes how the object oriented design of the MOHID10Framework enabled a quick development of this tool.Many existing classes of the MOHID Framework could be used to build MOHID Land:1.classes related to input/output like EnterData,HDF and TimeSeries;2.classes related to the underlying grid like HorizontalGrid,HorizontalMap and Grid-Data;3.classes which impose boundary conditions like Discharges and Atmosphere;4.zero dimensional processes classes(e.g.classes which simulate the dynamics ofnutrients inside the water column)To some of these classes some functionality was added.For example,in former ver-sions class GridData was just used to relate bathymetric data with class HorizontalGrid. These class was modified in a way that any spatial variable data can be related with the underlying grid(class GridData inherits class HorizontalGrid).MOHID Land uses class GridData not only to obtain information about topography,but also for land use,soil type,etc.New classes developed are related with specific processes which occur inside a watershed.Examples are:1.class Runoffwhich calculates overland runoff;2.class Infiltration which handles infiltration processes;3.class DrainageNetwork which handles water routing inside rivers;3.2.1.Tool IntegrationThe integration of different tools,namely MOHID Water and MOHID Land can be used to study the water cycle in an integrated approach.Since these two tools are based on the same framework,the coupling of them is easily achieved.One way of coupling these two models is to run MOHID Landfirst for all basins which discharge to a water body and create a time series at the outlet of the watershed.Afterwards this time series are used to impose the boundary conditions for MOHID Water.Since both models use the class TimeSerie the integration of these two models in this way was immediate.The problem of this integration is that MOHID Land can never be influenced by MOHID Water,but there are some cases where this influence might be important:1.If the downstream region of a river simulated by MOHID Land is influenced by tide, the river class DrainageNetwork needs the downstream boundary condition from a model like MOHID Water.This condition occurs also at Trancao River(Figure6).2.A network of reservoirs,linked to agriculture industries is a typical case where a model like MOHID Land would need feedback from a model like MOHID Water in”real-time”.To overcome these problems,the coupling of these two models by the Message Passing Interface is under study.In this way updated information can be exchanged in every time step.11Figure6.The integrated Trancao Basin/Tagus Estuary System4.CONCLUSIONSThe way an object oriented design for an integrated water modelling system like MO-HID can be beneficial is presented.The use of object oriented programming features allows MOHID Framework to grow to a system which nowadays has not only an increas-ing number of users,but also software development contributors.Since MOHID uses the object oriented design,errors related to bad memory management(which where frequent in older versions)disappeared completely.The common design of all MOHID classes, related to encapsulation/public methods not only turned the code more reliable and pro-tected against errors,but also led to a very well structured code,easily understood by new scientists that work with the model,even taken into account the over200k code lines which compose MOHID Framework.A major drawback of the object oriented design,not focused in the article,is the increase in execution time of the model.Former comparisons showed thefirst object oriented version of MOHID need two to three times more CPU time then the last version of this model in FORTRAN77[9].To gain reliability,MOHID Land must be applied to several watersheds.This will hopefully happen during ongoing scientific and engineering projects where the MOHID Water Modelling System will be used.To close the water cycle,a groundwater model must be coupled to MOHID.The development of a tool of this kind is in progress.12REFERENCES1.R.J.J.Neves,Etude Experimentale et Modelisation des Circulations Trasitoire etResiduelle dans l’Estuaire du Sado.Ph.D.Thesis,University de Liege(1985)2. A.J.R.Silva,Modelaao Matematica Nao Linear de Ondas de Superficie e de CorrentesLitorais.Ph.D.Thesis,Technical University of Lisbon(1991)3. A.J.Santos,Modelo Hidrodinamico Tridimensional de Circulacao Oceanica e Estu-arina.Ph.D.Thesis,Technical University of Lisbon(1995)4. F.Martins,Modelacao Matematica Tridimensional de Escoamentos Costeiros e Es-tuarinos usando uma Abordagem de Coordenada Vertical Generica.Ph.D.Thesis, Technical University of Lisbon(1999)5.P.C.Leitao,Modelo de Dispersao Lagrangeano Tridimensional.M.Sc.Thesis,Tech-nical University of Lisbon(1996)6.R.Miranda,Nitrogen Biogeochemical Cycle Modeling in the North Atlantic Ocean.M.Sc.Thesis,Technical University of Lisbon(1999)7.P.C.Leitao,Integracao de Escalas e Processos na Modelacao do Ambiente Marinho,Ph.D.Thesis,Technical University of Lisbon(2003)8.V.K.Decyk,C.D.Norton and B.K.Szymanski,Expressing Object-Oriented Con-cepts in Fortran90.ACM Fortran Forum,Vol.16(1997)9.R.Miranda,F.Braunschweig,P.C.Leitao,R.J.J.Neves,F.Martins and A.San-tos,Mohid2000,A Coastal integrated object oriented model.Hydraulic Engineering Software VIII,WIT Press(2000)10.R.J.J.Neves,H.Coelho,P.C.Leitao,H.Martins and A.Santos,A numericalinvestigation of the slope current along the western European putational Methods in Water Resources XII,2,369-376,(1998)11.H.S.Coelho,R.J.J.Neves,M.White,P.C.Leitao and A.J.Santos,A model forocean circulation on the Iberian coast.Journal of Marine Systems.Vol.32153-179.(1997)12.L.C.Leitao,P.C.Leitao,F.Braunschweig,R.Fernandes,R.J.J.Neves and P.Mon-tero,Emergency activities support by an operational forecast system-The Prestige accident.4th Seminar of the Marine Environment,Rio de Janeiro(2003)13.F.Braunschweig,F.Martins,P.C.Leitao and R.J.J.Neves A methodology toestimate renewal time scales in estuaries:the Tagus Estuary case,Ocean Dynamics, Vol.53,N3,137-145.(2003)14.F.Braunschweig,Generalizacao de um modelo de circulacao costeira para albufeiras,M.Sc.Thesis,Technical University of Lisbon(2001)15.J.E.Akin,Object Oriented Programming via FORTRAN90,Engineering Computa-tions,v.16,n.1,pp.26-48(1999)16.M.Folk,Introduction to HDF5,NCSA/University of Illinois at Urbana-Champaign/HDF5/papers(2000)。