Solving the toll design problem with multiple user groups
Solving Design Problems in OO-Software Engineering with Relations and RelView

Solving Design Problems in OO-SoftwareEngineering with Relations and RelViewRudolf Berghammer1and Alexander Fronk21Institute of Computer Science and Applied MathematicsUniversity of Kiel,D-24098Kiel,Germany2Software TechnologyUniversity of Dortmund,D-44221Dortmund,GermanyAbstract.We demonstrate how relational algebra and its mechanization through the soft-ware system RelView can be used for solving practical problems in the design of object-oriented software.The examples we present range from the search of improper code piecesto the detection of code parts indicating some design pattern structure.1IntroductionRelations are very well-known in mathematics and computer science,the formal apparatus of relational algebra is well understood and mathematically well estab-lished.For its mechanization,there exist a couple of tools for the computer-aided manipulation of relations and relation-algebraic formulae,as well as for relation-algebraic theorem proving.Having a look on the abundance of literature(see e.g., the references in[21,13]or the proceedings of the past RelMiCS meetings),how-ever,it seems that in the last decades relational algebra and the respective tools have rarely been used for real practical purposes.Apart from some exceptions,their employment was of purely academic nature.For instance,in the domain of program-ming and software development people investigated semantics,data structures,and algorithm development.But,as far as we know,they did not treat design patterns, maintenance of code,and software refactoring,i.e.,topics which nowadays have an immense importance in practice.Caused by projects like the EU COST action274TARSKI“Theory and Appli-cation of Relational Structures as Knowledge Instruments”,presently the situation changes.People become more and more interested in problems arising from“real world”situations.This leads to a lot of work going on for practical applications of re-lational algebra and tools.Our article as well goes into this direction.We assemble some practical problems occurring in object-oriented software design and discuss how relations can formally and tool-based contribute to solve them.We use the tool RelView,developed at the University of Kiel since1993.With this software system at hand,relational algebra can fruitfully be integrated into object-oriented engineering-based software development.That is,both software engineering methods and tools are enriched by RelView which thereby pushes further the integration of formal methods and tools applying them.To demonstrate the wide applicability of the relation-algebraic approach,the examples we present are taken from different areas in software design and range from the search for improper code pieces to the detection of code parts which indicatesome design pattern structure.They are based on work done at the Universities of Kiel and Dortmund in cooperation with the software engineering group at the University of Cottbus and represent our most recent and prominent examples of applying relational algebra and RelView in object-oriented software design.This article is organized as follows.In Section2,we provide some relation-algebraic preliminaries.We briefly introduce the RelView system in Section3. Section4discusses different problems in object-oriented software design and shows how relational algebra and the RelView system can contribute to solve them.We terminate this article with a short summary and point out some interesting further work in Section5.2Relation-Algebraic PreliminariesWe assume the reader to be familiar with relational algebra.Nonetheless,we provide the notation and some definitions used throughout this article.We write R:X↔Y if R is a relation with domain X and range Y,i.e., a subset of X×Y.If the sets X and Y of R’s type X↔Y arefinite and of cardinality m and n,resp.,we may consider R as a Boolean matrix with m rows and n columns.Since this Boolean matrix interpretation is well suited for many purposes and Boolean matrices model relations in the RelView system,we use these notions and notations when appropriate.Particularly,we write R x,y instead of (x,y)∈R.We write R T for transposition,R for complement,R∪S for union,R∩S for intersection,R;S for composition,and R⊆S for inclusion.The empty relation is denoted by O,the universal relation by L,and the identity relation by I.A relation R is univalent if R T;R⊆I,and total if R;L=L.A univalent and total relation is called a function.A relation R is anti-symmetric if R∩R T⊆I holds,and transitive if R;R⊆R holds.The least transitive relation containing R is its transitive closure,R+,which equals the union of all powers R i where i≥1.The reflexive-transitive closure of R,denoted by R∗,is defined as I∪R+.The right residual R\S of two relations R:Z↔X and S:Z↔Y is defined as an abbreviation for the relation-algebraic term R T;S.From this definition itimmediately follows that R\S has the type X↔Y,and that(R\S)x,y holds ifand only if R z,x implies S z,y for all z∈Z.Given two relations R:X↔Y and S:X ↔Y,their relational sum is denoted by R+S.The domain of R+S is thedisjoint union X+X ,and the range is Y.If x comes from X,then(R+S)x,y isequivalent to R x,y;otherwise it is equivalent to S x,y.To model subsets of a given set with relation-algebraic means,we use vectors. These are relations v with v=v;L.For v:X↔Y,this condition means:Whatever set Z and universal relation L:Y↔Z we choose,an element x∈X with(v;L)x,z is either in relationship to no or to all elements z∈Z.Hence,the range of a vector is irrelevant,and we may consider a vector as a relation v:X↔1with a specific singleton set1={⊥}as its range.In this case,we omit the second subscript and write v x instead of v x,⊥.Such a vector can be considered as a Boolean matrix with exactly one column,i.e.,as a Boolean column vector,and represents the subset {x∈X|v x}of X.A vector is said to be a point if it is non-empty and its transposition is an univalent relation.These properties mean that it represents a singleton subset of its domain or an element from it if we identify a singleton set with the only element it contains.In the Boolean matrix model,hence,a point v:X↔1is a Boolean column vector in which exactly one component is true.3The RelView SystemRelView(see,e.g.,[4,5,8,10])is a software system for calculating with relations and relation-algebraic programming.In it all data are represented as relations,which the system visualizes in different ways.It offers several algorithms for pretty-printing a relation for which domain and range coincide as a directed graph.Alternatively, an arbitrary relation may be displayed as a Boolean matrix which is very useful for visual editing and also for discovering structural properties that are not evident from a graphical presentation.Because RelView often works on large data,it uses a very efficient implementation of relations based on ordered binary decision diagrams.For a more detailed treatment of this topic,see[20].RelView can manage as many relations simultaneously as memory allows and the user may manipulate and analyze them by pre-defined operations and tests, relational functions,and relational programs.The pre-defined operations include all operations presented so far,where the symbols for the basic operations of rela-tional algebra are^(transposition),-(negation),|(union),&(intersection),and* (composition).The pre-defined tests include e.g.,incl,eq,and empty for testing inclusion,equality,and emptiness of relations,respectively.All that can be accessed through simple mouse-clicks but the usual way is to compose it to functions and programs.A declaration of a relational function is of the form F(X1,...,X n)=t,where F is the function name,the X i,1≤i≤n, are the formal parameters(standing for relations),and t is a relation-algebraic term over the relations of the system’s workspace that can additionally contain the formal parameters X i,1≤i≤n.A relational program in RelView essentially is a while-program based on the datatype of relations.Such a program has many similarities with a function procedure in Pascal or Modula-2.It starts with a head line containing the program’s name and a list of formal parameters.Then the declaration part follows,which consists of the declarations of local relational domain constructions (direct products and sums),local relational functions,and local variables.The third part of a relational program is its body,a sequence of statements which are separated by semicolons and terminated by the return-clause.4Using Relations and RelView in Software EngineeringRelations occur in many places in Software Engineering.For example,the pipes-and-filters architecture can be seen as a system of relations[15]such that afilter with input X and output Y can be understood as a relation of type X↔Y.Pipes are connectors modelled by relational composition.UML class diagrams,as anotherexample,are based on elements and relations between them,i.e.class diagrams relate classes via association,aggregation,or inheritance.In predicate logic,it is well known that a predicate P over some sets X and Y can be understood as a relation R between exactly these sets:P(x,y)holds if and only if the pair(x,y)is in R.Speaking abstractly,whenever aspects of a software system are modelled by means of relations,and some of its properties are captured as predicate logical formulas,these properties can also be formulated in relational algebra by transforming them into relation-algebraic terms using well-defined correspondences as,for instance,found in[21].Theoretically,this may lead to terms involving relational descriptions of direct products;the following list of examples,however,taken from Software Engineering,can be presented without such advanced constructs.4.1Detecting Improper Code PiecesNowadays,software systems are too large to be comprehended and maintained ap-propriately only by reading and reorganizing their source code.Moreover,graphical representations of the underlying code and its properties need to be provided,and, indeed,both methods and tools for the automatization of many tasks in visualizing and analyzing code are developed.These tasks encompass,for example,detecting problematic code pieces,dead code,or code clones.Such analyses are vital to un-derstand source code,and a suitable visualization of such properties is helpful in understanding how the underlying code may be reorganized.Structural properties of source code can be extracted from it using parsing tech-niques and are frequently represented by a couple of relations.Then the goal is to visualize,to manipulate,and to transform the relations in order to analyze the underlying code and thereby obtain the information one is interested in.In this section,we briefly sketch how relational algebra and the RelView system can be used to analyze code.There also exist other specific relation-based tools for analyzing software,e.g.CrocoPat[12](see Figure1;this picture is taken from rmatik.tu-cottbus.de/CrocoCosmos/gdsw.html,in which Java classes are drawn as nodes and relations as arcs between them),or Grok[16].Compared to these tools,the main benefits of RelView are,first,its very effi-cient implementation of relations via ordered binary decision diagrams and,second, its sophisticated programming language.Ordered binary decision diagrams allow to deal with huge relations,and due to RelView’s programming language we can express many queries and manipulations in a very compact yet understandable way.To discuss the detection of improper code pieces,we assume an object-oriented software system,for instance,written in the Java programming language.To keep things easy,in the following we only consider method calls and deal with analysis based on a corresponding relation calls on the set C of classes of the system:calls:C↔C method callsFor classes x and x ,the relationship calls x,x holds if and only if in x there is a call of a method declared in x .Fig.1.Some relations between Java classesInitial Strongly Connected Components.When analyzing an object-oriented software system,essential information can be obtained by computing the strongly connected components with respect to the relation calls.Strong connectivity means that code cannot be invoked by classes outside this component.Experience has shown that strongly connected components which additionally are initial are very often candidates for dead code.The strongly connected components of calls are the equivalence classes of the equivalence relation comp,defined as intersection calls∗∩(calls T)∗.Using Boolean matrix terminology,the equivalence classes are described by the columns of comp such that each column assembles the(Java-)classes forming a strongly connected component.Furthermore,if the vector c:C↔1describes a single strongly con-nected component S,then the following calculation shows that S is terminal if and only if comp;c is contained in c:∀x,x :comp x,x ∧x ∈S→x∈S⇐⇒∀x,x :comp x,x ∧c x →c x⇐⇒∀x:(∃x :comp x,x ∧c x )→c x→c x⇐⇒∀x:(comp;c)x⇐⇒comp;c⊆cBased on this fact,it is rather trivial to compute all initial strongly connected com-ponents:One has to check each column c of comp and collect exactly those columns which satisfy comp;c⊆c,thereby avoiding duplicates.A RelView implementation of this procedure is presented in Section4.4.Detection of Cycles.It should be possible to understand the structure of a class xwithout knowing which other classes use a method of x.But it is absolutely necessaryto know about the methods called by methods of x–either directly or indirectly via a chain of calls of intermediate methods.This situation becomes more difficult to analyze if a chain of calls starting in x again leads back to x,i.e.,if the chain forms a cycle with respect to the relation calls.Therefore,a second task frequently occurring in the analysis of software systems is to test the relation calls being cycle-free and, if this test fails,to determine the classes lying on cycles.Since a class x lies on a cycle with respect to calls if and only if calls+x,x holds, a relation-algebraic description of cycle-freeness is rather simple:calls is cycle-free⇐⇒calls+⊆I.(1) The same is true for the vector describing the set of all classes lying on a cycle. Based on(1),a little reflection yields the relation-algebraic specification(calls+∩I);L:C↔1.(2) It occurs that the set described by this vector gets rather large.Experience has shown that in such a case it is advantageous to consider short cycles of a certain length,e.g.,all cycles of length less than10.Since x lies on a cycle of length n if and only if calls n x,x holds,these classes can be computed by replacing the transitive closure in the specification(2)by the n th power of calls.If one wants to draw the cycles of length n as graphs,especially using RelView,then this can be obtained by drawing the relation(calls n−1)T∩ing this term,for example,all such cycles contained in the code of the JWAM tool(which consists of1133classes and leads to a calls-relation with3499pairs)have been computed.Details can be found in[20].Direct Neighborhood.Let us consider a third situation exploiting relational al-gebra.To understand and visualize dependencies between the classes of a software system in general,it is reasonable to consider the direct neighborhood relation which for the calls-relation is element-wise described as follows:calls x,x ∧¬∃y:calls x,y∧calls+y,x .(3) This relation is called Hasse diagram in the case of strict order relations.If the relation under consideration contains cycles,it has turned out to be advantageous to consider strongly connect components as hyper vertices.In our context this means that two classes x and x are related if and only if they are in the same strongly connected component,or if they are in the direct neighborhood relation.Relation-algebraically this is described by(calls∗∩(calls T)∗)∪(calls∩calls;calls+):C↔C,(4) where the second part of the union of(4)is an immediate consequence of the element-wise description(3)of the direct neighborhood relation.4.2Checking Manipulations of DesignProgramming in the large is generally supported by tools allowing to design software in a graphical manner.Two-dimensional representations of object-oriented classes and their relations,such as e.g.UML diagrams,serve for automatically generating code frames and hence allow to manipulate code by manipulating these diagrams.In [1,3]and[2],however,we focus on3D representations of various relations between classes implemented in Java.Editing3D-diagrams requires not only to retain correct Java code as two-dimensional ones do.Moreover,three-dimensional arrangements are given meaning, and thus graphical constraints need to be considered both to define the syntax and semantics of our graphical language underlying3D representations.We declaratively define our visual language by means of predicates such that a3D-diagram is a term of the language–we say:is valid–if all predicates are satisfied.Editing is seen as term replacement,i.e.,editing may transfer valid diagrams into other valid diagrams. In constructive approaches to language definition using,for example,structural in-duction or production rules,a word or term is contained in a language if it can be constructed in a specific way.Our approach simulates this process by providing operations for editing obeying certain constraints.This means that the validity of 3D diagrams is proved by checking the constraints imposed on the visual language. We model these constraints with relational algebra,and use the RelView system to efficiently check them during the editing process.In[6],we discuss this approach in more detail.Java Class Relations.Java software is statically structured by packages,inter-faces and classes.Packages assemble classes,interfaces and(sub-)packages within a strict hierarchy.To keep things simple,we here only focus on packages and package containment as a relation on packages and classes.Information cubes display package containment and pipes relations between packages(see Figure2);the latter are of no concern rmation cubes glue together related information and may contain arbitrary arrangements of boxes rep-resenting Java classes.Cubes are semi-transparent and allow visual access to the information within.Let C and P be the sets of all classes and packages,resp.,of the Java code under consideration,and let CUBE and BOX be the pairwise disjoint sets of information cubes and boxes,resp.We denote the set of all graphical entities,i.e.the union of CUBE and BOX,as ENTITY.To relate graphical entities to Java code,we consider the following relations:C:BOX↔C class as boxP:CUBE↔P package as cubecM:CUBE↔C∪P cube membershipThe two relations C and P are univalent and ing the usual notation for functions,C(b)and P(c)is the Java code graphically represented by a box b or aFig.2.Some related packages containing related classescube c,respectively.The relation cM relates an information cube c to a class or a package x if the box or information cube representing x is displayed inside the information cube.We assume a3D coordinate system underlying our diagrams which allows us to unambiguously determine the position of each graphical entity by means of the following relation,where POINT is the set of all3D coordinates(points for short): point:POINT↔ENTITY point of an entity. Furthermore,we assume that different graphical entities always have different point sets and can therewith unambiguously be identified.With the help of the relation point we can easily define further relations to relate graphical entities displayed within a diagram.Here is a little example,saying that e is inside of e :inside e,e :⇐⇒∀p:point p,e→point p,e .(5) The element-wise definition(5)implies that,in relation-algebraic notation,inside equals the right residual point\ing inside,also the above mentioned de-mand that different graphical entities always have different point sets can easily be described by relation-algebraic means:It is equivalent to inside being anti-symmetric. Testing Constraints.3D-diagrams need to satisfy certain constraints the proper set of which describes the syntax of our3D-diagrams and is established by trans-lating Java code issues into graphical properties.Their maintenance needs to be checked during editing to determine valid3D diagrams from which Java code can be generated.We formulate two sample constraints as predicates and transform them into relation-algebraic terms as follows.Thefirst constraint claims that whenever a class represented by a box b is amember of a package p represented by a cube c,the box must be inside the cube or,recursively,of a cube representing a sub-package of ing the relations introduced so far and function notation for C and P,this representation property reads as∀b,c:cM c,C(b)↔inside b,c∨∃c :cM c,P(c )∧inside b,c .(6)Applying pure relational notation,cM c,C(b)is equivalent to∃x:C b,x∧cM c,x,and cM c,P(c )is equivalent to∃p:P c ,p∧cM c,p due to the totality of C and P.With this at hand,we transform(6)as follows:∀b,c:cM c,C(b)↔inside b,c∨∃c :cM c,P(c )∧inside b,c⇐⇒∀b,c:(∃x:C b,x∧cM c,x)↔inside b,c∨(∃c :∃p:P c ,p∧cM c,p∧inside b,c )⇐⇒∀b,c:(∃x:C b,x∧cM T x,c)↔inside b,c∨(∃c :∃p:P c ,p∧cM T p,c∧inside b,c )⇐⇒∀b,c:(C;cM T)b,c ↔(inside b,c∨(inside;P;cM T)b,c)⇐⇒∀b,c:(C;cM T)b,c ↔(inside∪(inside;P;cM T))b,c⇐⇒C;cM T=inside∪inside;P;cM TThat is,the representation property(6)holds if and only if the above equation holds which can simply and efficiently be tested by the RelView system(see Section4.4).The second constraints demands that each box b is contained in at most one cube c,i.e.,each Java class is a member of at most one package.An obvious formalization of this containment property using the cardinality operator on sets is∀b:|{c:cM c,C(b)}|≤1.(7) To transform property(7)into a relation-algebraic version,we again replace the relationship cM c,C(b)by∃x:C b,x∧cM c,x and proceed then as follows:∀b:|{c:cM c,C(b)}|≤1⇐⇒∀b:|{c:∃x:C b,x∧cM c,x}|≤1⇐⇒∀b:|{c:∃x:C b,x∧cM T x,c}|≤1⇐⇒∀b:|{c:(C;cM T)b,c}|≤1⇐⇒(C;cM T)T;(C;cM T)⊆IThat is,the containment property(7)holds if and only if C;cM T is an univalent relation.4.3Searching for Design PatternsThe construction of reusable software requires to provide a sophisticated and main-tainable design.For this purpose,Gamma et al.propose design patterns[18].A pattern factors out structural aspects of the software under construction and ar-ranges the classes involved in the pattern in a specific way.Patterns are based on experience and hence describe reoccurring problems.It is also clear that designing software is a non-trivial matter,and design needs to be reconsidered during software development more than once.Reengineering,i.e.changing design into a more maintainable one[22],or refactoring,i.e.enhancing design without altering the external behavior of the code[17],are such tasks a software engineer may face during the development process.The reorganization of software may thus embrace the replacement of parts of a design by an arrangement of classes following a design pattern.Since the classes under replacement may be scattered,both a suitable layout of a design document and experience in code inspection are vital to locate these classes.Again,methods and tools to automatically support this search may help in this situation.The automation requires a formal descriptions of both the design pat-terns and the software design documents given by,let’s say,a couple of UML class diagrams.It is then possible to analyze the latter and search for classes indicating possible occurrences of the former.Considering structural properties as done in the previous applications,a design pattern can be formalized by a couple of relations in analogy to software systems, since their structure is usually depicted by a UML class diagram as well.Hence,“matching patterns”can also be carried out by relation algebraic means. Formalizing Design Patterns.We model a design pattern by means of relations and express its structural properties in relation-algebraic terms.Such properties are necessary but not sufficient to identify classes forming a pattern,or to detect classes indicating they could be reorganized as a pattern.Moreover,code needs to be inspected since the methods of participating classes need to be considered as well to decide if a situation matches a pattern.Nonetheless,analyzing relations between classes in this way helps to detect suspicious parts of the design worth to be examined in more detail.Our approach thus works in three steps,thefirst two of which are treated by relational algebra.Thefirst step requires to formalize the structure of a pattern by means of relations.We call this step pattern formalization.The second stepfilters out(sub-)relations representing the formalization of a software design which have exactly the properties a design pattern requires.This step is called pattern indication. The third step,called pattern ascertainment,is not automated in this way since it requires to pairwise compare the methods defined in these classes to ascertain the composite pattern was indeed found.We study the Composite pattern as an example to explain thefirst two steps of our approach.The Composite Pattern.Figure3shows the Composite pattern.This pattern consists in essence of a class component and its two subclasses,composite and leaf.A composite aggregates components as its children which,recursively,may be com-posites or leafs.Graph-theoretically,the objects involved in a composition form a tree with respect to inheritance.The structurally interesting part of this pattern is given by the inheritance rela-tion and aggregation between the classes component and composite.Hence,we needFig.3.The Composite Patternto consider the following two relations:inherits:C↔C class inheritanceaggregates:C↔C class aggregationFor classes x and x the relationship inherits x,x holds if and only if x inherits from x ,and the relationship aggregates x,x holds if and only if x aggregates x .The structure of the Composite pattern leads to the task for two classes a and b to test whether a aggregates b,a is a subclass of b,and whether there exists a further subclass c of b at the same time.If this is true,then a is a candidate for the composite,b for the corresponding component,and c for the leaf.An element-wise formalization of the properties a and b have to fulfill isaggregates a,b∧inherits a,b∧∃c:a=c∧inherits c,b.(8) Using the definition of relational composition and the identity relation,formula(8) evolves to the following relation:aggregates∩inherits∩I;inherits:C↔C.(9) This relation enumerates as its members exactly all pairs a and b which are candi-dates for the Composite pattern.Notice,however,that this relation represents“direct matches”of the pattern. But the situation is not always that simple.The second step,pattern indication,is used to weaken the above test and to search for pairs of classes that do not directly match condition(8).For example,there might exist a class x that inherits from a class a inheriting from a class b which in turn is aggregated by x.In this case,b and x form a composition via the class a.Variations of this theme can be found using the inheritance relation,and,of course,any arbitrary mixture of these two situations.The pattern indication step hence formulates these possibilities relation-algebraically by simply using the transitive closures aggregates+and inherits+instead of aggregates and inherits in(9).Finding candidates possibly matching a pattern is done in these two steps,and the members of relation(9)and its variations can be further analyzed in the third step,the code inspection.。
我们如何解决交通问题英语作文初一

我们如何解决交通问题英语作文初一How We Solve the Traffic ProblemTraffic congestion is a common problem in most cities around the world. It not only leads to wasted time and increased stress for commuters, but it also has negative impacts on the environment and public health. Therefore, finding solutions to alleviate traffic congestion is crucial for creating a more sustainable and livable urban environment. In this essay, we will discuss some effective ways to solve the traffic problem.Firstly, promoting public transportation is an important strategy to reduce traffic congestion. Investing in public transportation infrastructure, such as buses, subways, and trains, can provide people with reliable and convenient alternatives to driving. Encouraging people to use public transportation through subsidies, discounts, and improved services can help reduce the number of cars on the road and alleviate traffic congestion.Furthermore, implementing carpooling and ridesharing programs can also help reduce traffic congestion. By sharing rides with others, people can reduce the number of vehicles on the road, which can lead to less traffic congestion and reducedgreenhouse gas emissions. Governments and companies can incentivize carpooling and ridesharing by offering benefits such as preferential parking, toll discounts, and carpool lanes.In addition, promoting cycling and walking can also help reduce traffic congestion. Building dedicated bike lanes, pedestrian-friendly streets, and bike-sharing programs can encourage people to choose cycling and walking as alternative modes of transportation. Not only can cycling and walking help reduce traffic congestion, but they can also improve public health and reduce air pollution.Moreover, implementing smart transportation systems and technologies can help improve traffic flow and reduce congestion. Intelligent transportation systems, such as traffic signal optimization, real-time traffic information, and smart parking solutions, can help manage traffic more efficiently and reduce congestion on the roads. By using data and technology, cities can better understand traffic patterns and make informed decisions to improve traffic flow.In conclusion, solving the traffic problem requires a combination of strategies and solutions. By promoting public transportation, carpooling, cycling, walking, and smart transportation systems, we can reduce traffic congestion,improve air quality, and create a more livable urban environment. It is important for governments, businesses, and individuals to work together to implement these solutions and create a more sustainable and efficient transportation system. With collective effort and commitment, we can solve the traffic problem and build a better future for our cities.。
书房英语作文

书房英语作文In the hustle and bustle of everyday life, there is a sanctuary within my home that offers me solace and a space to explore the depths of knowledge. This haven is my study room, a place where I can immerse myself in learning and creativity.The study room is a small, cozy space adorned withbookshelves that stretch from floor to ceiling, each shelf a treasure trove of stories, facts, and wisdom. The walls are painted in a calming blue, a color that I find conducive to concentration and thought. A large window on one side of the room allows for an abundance of natural light to fill the room, creating a warm and inviting atmosphere.At the center of the room stands a sturdy wooden desk,cluttered with an assortment of stationery and the occasional stack of papers. It is here that I spend countless hourswriting essays, solving mathematical problems, and delvinginto the realms of history and science. A comfortable office chair, with its ergonomic design, ensures that even longhours of study do not take a toll on my body.What makes this room truly special, however, is not its physical attributes but the intellectual journey itfacilitates. It is here that I have learned to appreciate the beauty of the English language, from the sonnets of Shakespeare to the prose of Jane Austen. The study room has been a silent witness to my academic growth and personaldevelopment.In addition to books, the room is also home to various academic paraphernalia—a globe that lets me travel the world without leaving my chair, a microscope that reveals the intricate details of the natural world, and a computer that connects me to a wealth of online resources and learning platforms.The study room is not just a place for academic pursuits; it is also a space for personal reflection and creative expression. With a journal and a cup of tea, I often find myself scribbling down thoughts, ideas, and the occasional poem. The quiet and peaceful environment is the perfect incubator for creativity.In conclusion, my study room is an essential part of my life, a place where I can learn, grow, and dream. It is more than just four walls filled with books; it is the foundation upon which my intellectual curiosity is built. As I continue on my educational journey, this room will always remain my favorite place to explore, discover, and create.。
如何解决大型结构的挑战英语作文

如何解决大型结构的挑战英语作文How to Solve Challenges in Large-scale StructuresIntroductionLarge-scale structures, such as skyscrapers, bridges, and dams, play a crucial role in modern society. However, these structures pose unique challenges in terms of design, construction, and maintenance. In this essay, we will explore some of the key challenges faced in large-scale structures and discuss various solutions to address them.Challenges in Large-scale Structures1. Structural IntegrityOne of the biggest challenges in large-scale structures is ensuring their structural integrity. Due to their massive size, these structures are subjected to significant loads and forces, which can lead to fatigue, corrosion, and other forms of deterioration over time. Maintaining the structural integrity of large-scale structures requires careful planning, regular inspections, and timely repairs.2. SafetyAnother key challenge in large-scale structures is ensuring the safety of occupants and the public. Any structural failure in a large-scale building or bridge can have catastrophic consequences, leading to loss of life and property. To address this challenge, engineers must follow strict safety guidelines, use high-quality materials, and implement advanced monitoring systems to detect potential failures before they occur.3. Environmental ImpactLarge-scale structures can have a significant impact on the environment, including land use, water consumption, and energy consumption. Building and operating these structures can contribute to pollution, deforestation, and other forms of environmental degradation. To mitigate these impacts, engineers must adopt sustainable design practices, useeco-friendly materials, and implement energy-efficient technologies.4. CostBuilding large-scale structures can be extremely costly, with expenses running into billions of dollars. Managing costs effectively is a major challenge for project managers, who must balance budget constraints with the need for quality and safety. To address this challenge, engineers must optimize constructionprocesses, minimize waste, and explore alternative funding sources.Solutions to Challenges in Large-scale Structures1. Advanced MaterialsOne solution to the challenges in large-scale structures is the use of advanced materials, such as high-performance concrete, steel alloys, and carbon fiber composites. These materials offer superior strength, durability, and corrosion resistance, making them ideal for large-scale applications. By incorporating advanced materials into the design and construction oflarge-scale structures, engineers can improve their performance and longevity.2. Innovative Design TechniquesInnovative design techniques, such as parametric modeling, finite element analysis, and virtual reality, can help engineers overcome the challenges in large-scale structures. These tools allow engineers to simulate different structural configurations, analyze complex load scenarios, and optimize designs for maximum efficiency. By leveraging innovative design techniques, engineers can create safer, more sustainable, and morecost-effective large-scale structures.3. Robust Maintenance StrategiesTo ensure the long-term performance of large-scale structures, engineers must implement robust maintenance strategies, including regular inspections, preventative maintenance, and timely repairs. By proactively addressing structural issues and addressing maintenance needs, engineers can extend the lifespan of large-scale structures and reduce the risk of catastrophic failures.4. Collaboration and CommunicationCollaboration and communication are critical for overcoming the challenges in large-scale structures. Engineers, architects, contractors, and other stakeholders must work together closely to share knowledge, exchange ideas, and coordinate efforts. By fostering collaboration and communication among team members, project managers can streamline the design and construction process, improve decision-making, and enhance project outcomes.ConclusionLarge-scale structures present unique challenges in terms of design, construction, and maintenance. By addressing key issues such as structural integrity, safety, environmental impact, andcost, engineers can overcome these challenges and create structures that are safe, sustainable, and cost-effective. By leveraging advanced materials, innovative design techniques, robust maintenance strategies, and effective collaboration, engineers can build the large-scale structures of the future that meet the needs of society while minimizing their impact on the environment.。
大学期间遇到的问题英语作文

大学期间遇到的问题英语作文A College Student's Journey: Navigating the ChallengesCollege life is a remarkable and transformative experience for many individuals. It is a time of personal growth, academic exploration, and newfound independence. However, this journey is not without its fair share of challenges. As a college student, I have encountered a variety of obstacles that have tested my resilience and problem-solving abilities. In this essay, I will delve into some of the most significant issues I have faced during my time in university and discuss how I have navigated these challenges.One of the primary concerns for many college students is managing their academic workload. The transition from high school to university often brings with it an increased level of complexity and rigor in coursework. Professors expect more independent work, deeper analysis, and more sophisticated writing skills. Balancing multiple courses, each with their own assignments, deadlines, and expectations, can be overwhelming. I have found that effective time management and organizational strategies are crucial in this regard. Developing a detailed schedule, setting realistic goals, and prioritizing tasks have been instrumental in helping me stay on topof my academic responsibilities.Another challenge that college students frequently face is the financial burden associated with higher education. Tuition fees, textbook costs, and living expenses can quickly add up, putting a strain on one's financial resources. As a student, I have had to carefully budget my resources and explore various avenues for funding, such as scholarships, grants, and part-time employment. Navigating the complex financial aid system and understanding the implications of taking out student loans have been crucial in ensuring that I can afford my education without compromising my financial well-being.In addition to academic and financial concerns, college students often grapple with issues related to their mental health and overall well-being. The pressures of academic performance, social adjustments, and personal growth can take a toll on an individual's emotional and psychological state. I have personally experienced periods of stress, anxiety, and even depression during my time in college. Recognizing the importance of self-care, I have made a conscious effort to prioritize my mental health by engaging in regular exercise, practicing stress management techniques, and seeking support from campus counseling services when needed. Maintaining a healthy work-life balance has been instrumental in helping me navigate these challenges.Furthermore, the college experience often involves navigating complex social dynamics and building meaningful relationships. Adjusting to a new environment, making friends, and finding a sense of belonging can be daunting for some students. I have had to step out of my comfort zone, engage in campus activities, and actively seek opportunities to connect with my peers. This process has not been without its challenges, but I have found that embracing diversity, practicing empathy, and developing effective communication skills have been crucial in building a supportive social network.Finally, the college experience also presents opportunities for personal growth and self-discovery. As students, we are often exposed to new ideas, cultures, and perspectives that challenge our preconceptions and encourage us to expand our horizons. I have found that embracing this process of intellectual and personal development has been both rewarding and humbling. By stepping out of my comfort zone, engaging in critical thinking, and seeking out new experiences, I have gained a deeper understanding of myself, my values, and my place in the world.In conclusion, the college experience is a multifaceted journey that presents a wide range of challenges for students. From academic demands to financial concerns, mental health issues, and socialadjustments, the path to a successful college experience is not without its obstacles. However, by developing effective coping strategies, prioritizing self-care, and embracing the opportunities for personal growth, college students can navigate these challenges and emerge as resilient and well-rounded individuals. As I continue my journey through higher education, I remain committed to addressing these issues head-on and using them as opportunities for personal development and growth.。
设计面临问题英文作文初中

设计面临问题英文作文初中英文:As a designer, I often face various problems in my work. These problems can come from different aspects, such as clients, colleagues, or even the design itself.One of the most common problems I face is the conflict with clients. Sometimes clients have their own ideas and preferences, which may not match with my design concept. In this case, I need to communicate with them patiently and explain why my design is the best solution for their needs. It requires good communication skills and the ability to persuade others.Another problem I often face is the limitation of resources. For example, a project may have a tight budgetor a short timeline, which makes it difficult to achievethe desired result. In this case, I need to be creative and find ways to make the most of the available resources. Itrequires a strong sense of problem-solving and the ability to think outside the box.Finally, I also face the challenge of keeping up with the latest trends and technologies. The design industry is constantly evolving, and it is important to stay updated with the latest developments. This requires continuous learning and self-improvement.中文:作为一名设计师,我在工作中经常面临各种各样的问题。
用英语完成设计计划问题解决作品的方法

用英语完成设计计划问题解决作品的方法Design Plan: Problem Solving Methods for Design Projects。
Introduction:Design projects often encounter various challenges and problems that need to be addressed in order to achieve successful outcomes. In this document, we will explore effective problem-solving methods that can be applied to design projects. These methods will help designers identify, analyze, and resolve issues that may arise during the design process.1. Define the Problem:The first step in problem-solving is to clearly define the problem. This involves identifying the specific issue or challenge that needs to be addressed. It is important to have a clear understanding of the problem in order to develop appropriate solutions.2. Gather Information:Once the problem is defined, the next step is to gather relevant information. This can be done through research, interviews, surveys, and other data collection methods. Gathering information helps designers gain a deeper understanding of the problem and its underlying causes.3. Analyze the Problem:After gathering information, it is important to analyze the problem in order to identify its root causes. This can be done by breaking down the problem into smaller components and examining each component separately. By analyzing the problem, designers can gain insights into the factors that contribute to the issue.4. Generate Solutions:Once the problem is analyzed, the next step is to generate potential solutions. This can be done through brainstorming sessions, idea generation techniques, andcollaboration with team members. It is important to consider a wide range of solutions and evaluate their feasibility and effectiveness.5. Evaluate Solutions:After generating potential solutions, it is necessary to evaluate each solution based on certain criteria. This involves considering factors such as cost, time, resources, and impact on stakeholders. By evaluating solutions, designers can determine which options are most suitable for addressing the problem.6. Select the Best Solution:Based on the evaluation, designers can select the best solution to implement. This involves considering the advantages and disadvantages of each solution and making an informed decision. The selected solution should align with the project goals and objectives.7. Implement the Solution:Once the best solution is selected, it is time to implement it. This may involve creating prototypes, conducting tests, and making adjustments as needed. It is important to have a well-defined plan for implementing the solution and to communicate it effectively to all stakeholders involved.8. Monitor and Evaluate:After implementing the solution, it is crucial to monitor its effectiveness and evaluate the outcomes. This involves collecting data, analyzing results, and making any necessary adjustments. Monitoring and evaluating the solution helps ensure that it is achieving the desired results and making improvements if needed.Conclusion:Effective problem-solving is a critical skill for designers to possess. By following the methods outlined in this document, designers can systematically approach and resolve problems that may arise during design projects. Remember to define the problem, gatherinformation, analyze the problem, generate solutions, evaluate them, select the best solution, implement it, and monitor and evaluate the outcomes. By applying these problem-solving methods, designers can enhance their ability to overcome challenges and achieve successful design outcomes.。
留守儿童教育问题现状及建议英语作文

留守儿童教育问题现状及建议英语作文The Struggles and Dreams of Left-Behind Children: An EssayHi, my name is Xiao Ming, and I'm a 10-year-old boy from a small village in rural China. Like many other kids in my village, I'm what they call a "left-behind child." Both of my parents had to leave our hometown to work in big cities, so they could earn enough money for our family. I miss them a lot, but I understand that they're doing this for my future.Living without my parents around has been really tough. My grandparents are getting old, and it's hard for them to take care of me and my little sister. We try our best to help them with chores and errands, but sometimes I wish my mom was here to cook my favorite dishes or my dad was around to play basketball with me.The hardest part, though, is going to school. It's not that I don't like learning – in fact, I dream of becoming a teacher one day! But without my parents' guidance and support, it's easy to fall behind. My grandparents love me, but they didn't get much education themselves, so they can't always help me with my homework or projects.I see some of my classmates struggling too, especially those who live with relatives or even by themselves. It's not uncommon for left-behind kids to skip school or get into trouble because they lack proper supervision and care. I try my best to stay focused, but sometimes the loneliness and stress just become too much.Despite all these challenges, I know that education is my only way out of poverty. I want to study hard, go to a good university, and one day be able to support my parents and give them the comfortable life they deserve. But it's not easy when you feel like you're carrying the weight of the world on your little shoulders.That's why I think it's so important for our government and society to pay more attention to the issue of left-behind children's education. Here are some suggestions that I hope could make a difference:Provide more support and resources for schools in rural areas.Many of our schools lack basic facilities, like libraries, computer labs, and even proper classrooms. We need more funding to improve the learning environment and attract better teachers to our villages.Offer free or subsidized after-school programs and tutoring.A lot of us left-behind kids struggle with our studies because we don't have anyone to help us at home. Having access to free tutoring and extracurricular activities could really boost our academic performance and keep us engaged.Establish more boarding schools or dormitories.For some of us, it might be better to live and study in a more structured environment, with teachers and staff who can provide the care and supervision we need. Boarding schools could offer a safe haven for children whose home situations are particularly difficult.Provide counseling and emotional support services.The emotional toll of being separated from our parents is often overlooked. We need access to counselors or social workers who can help us cope with feelings of loneliness, anxiety, and abandonment.Encourage more community involvement and mentorship programs.It takes a village to raise a child, as the saying goes. Local businesses, organizations, and individuals could get involved bysponsoring or mentoring left-behind children, providing us with positive role models and a sense of belonging.Implement policies to support migrant workers' families.Ultimately, the best solution would be for our parents to be able to stay with us or at least visit more often. The government could consider policies that make it easier for migrant workers to bring their families with them or take longer breaks to reunite with their children.These are just some ideas from a kid's perspective. I know that solving the problem of left-behind children's education won't be easy or cheap, but I believe it's an investment worth making. We are the future of China, and with the right support and opportunities, we can grow up to be productive, successful citizens who contribute to our country's development.I dream of a day when no child has to grow up without their parents by their side. Until then, I'll keep working hard and holding onto the hope that things will get better for me and millions of other left-behind kids like me. We may be small, but our dreams are big, and with a little help, we can make them come true.。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Solving the toll design problem with multiple user groupsMei Chena,*,David H.Bernstein b,1aDepartment of Civil Engineering,University of Kentucky,Lexington,KY 40506-0281,USA b Department of Computer Science,James Madison University,Harrisonburg,VA 22807,USAReceived 19March 2002;received in revised form 31October 2002;accepted 8November 2002AbstractCongestion pricing has been regarded as an efficient method to reduce network-wide travel cost.In this study,a methodology for toll design is developed to provide policy-makers with suggestions on both where to charge tolls and how much the tolls should be.As opposed to the traditional approach of marginal social cost pricing,this methodology is capable of dealing with the more realistic case,in which only a small number of links can be tolled.Furthermore,this methodology can accommodate multiple user groups.Specifically,we make several simplifying assumptions which enable us to convert a traditional bilevel formulation of the toll design problem into a single level,standard nonlinear optimization problem.Ó2003Elsevier Ltd.All rights reserved.Keywords:Toll design problem;Route choice;Congestion1.IntroductionCongestion pricing has been widely considered as an effective method to alleviate urban traffic congestion,through changing road users Õroute choice (see Beckmann et al.,1956;Dafermos and Sparrow,1971;Smith,1979;Ferrari,1995;Gabriel and Bernstein,1997;Bergendorffet al.,1997;Hearn and Yildirim,2001;Labb e et al.,1998;Yang and Lam,1996;Bellei et al.,2002;Verhoef,2002)and departure time (see Vickrey,1967;Arnott et al.,1990;Bernstein,1993;Chen and Bernstein,1995;Yang and Meng,1998).In addition,the issue of finding the appropriate toll on the network has been discussed in many studies recently,such as Ferrari (1995),Bergendorffet al.(1997),Dial (1999a,b),Wie and Tobin (1998),Yang and Lam (1996),Labb e et al.(1998),Yang and Meng (1998),Yang (1999),and Verhoef (2002).However,many of these are theoretically*Corresponding author.Tel.:+1-859-257-9262;fax:+1-859-257-4404.E-mail addresses:mchen@ (M.Chen),bernstdh@ (D.H.Bernstein).1Tel.:+1-540-568-1671;fax:+1-540-568-2745.Transportation Research Part B 38(2004)61–79/locate/trb0191-2615/$-see front matter Ó2003Elsevier Ltd.All rights reserved.doi:10.1016/S0191-2615(03)00002-X62M.Chen,D.H.Bernstein/Transportation Research Part B38(2004)61–79optimal tolls in that they commonly assume that it is possible to place tolls on any link of the network.In order to describe the reality where policymakers are generally restricted to place tolls on only a very limited roadway links such as bridges and tunnels,Chen et al.(1999)presented a simplified formulation of the toll design problem with a predetermined set of links that can be bb e et al.(1998)looked at a similar situation while assuming that congestion is not an influential factor when making route choice decisions.Yang and Lam(1996)obtained the de-rivatives of equilibriumflows with respect to tolls and used them in the heuristic in solving the road pricing problem when placing tolls on certain links of the network.Verhoef(2002)suggested a heuristic algorithm forfinding the second-best optimal tolls based on linear cost functions. Most previous studies assume that all road users have identical characteristics.We relax that assumption.We begin by formulating the toll design problem as a bilevel program.We then make certain simplifying assumption and convert it into a single level problem.This simplified problem is a standard nonlinear programming problem,which can be solved relatively easily,compared to its original version.In addition,the single level toll design problem can be further simplified by using a linear cost function instead of the conventional nonlinear cost function.In many transportation engineering and planning practices particularly road pricing,it is necessary to consider characteristics of various user groups.For example,trucks are usually charged a higher toll than cars because their impact on travel time of other vehicles in the traffic is more significant.In terms of route choice,it is common belief that travelers respond differently to congestion tolls.Specifically,low-income travelers tend to switch to toll-free alternatives or change their travel schedule(if possible)to avoid the tolls,while high-income travelers may be more willing to pay for a less congested trip.The effect of congestion tolls on route choice be-havior can be evaluated through grouping road users according to their income levels.The methodology is crucial to the evaluation of the impact of congestion tolls on various income groups,and to the design of a convincing revenue distribution package that could ease the ar-guments on the social equity consequences of the congestion pricing plan.The toll design problem with multiple user groups is defined as:given the characteristics of a network,the set of links that can be tolled,the travel demand for each user group between each O–D pair,and the link performance functions,find the optimal link toll pattern of the network that would induce the lowest total travel cost(exclusive of tolls).Similar to that with single user group discussed by Chen et al.(1999),the toll design problem with multiple user groups has equilibrium constraints.In this case,a user chooses his/her route based on the route choices of other users in the same group as well as users of different groups.The equilibrium with multiple user groups can be defined as follows:at equilibrium,no user from any group will be able to further decrease his/her travel cost(inclusive of tolls)by unilaterally changing routes.It is generally assumed in the toll design problem that travelers have multiple route choices available to them and they have perfect information on travel times and costs on all alternative routes.Particularly,road users always choose the routes that minimize their individual cost of traveling(inclusive of tolls).2.Bilevel toll design problem with multiple user groupsThe toll design problem with multiple user groups can be formulated as a bilevel programming problem,similar to the toll design model for single user group presented by Chen et al.(1999).Specifically,the toll design problem is formulated as a mathematical program with another op-timization problem embedded in it as a constraint.Consider a transportation network comprised of a finite set of links,A (with cardinality j A j )and nodes,N (with cardinality j N j ).Let W (with cardinality j W j )denote the set of O–D pairs,P w denote the set of routes that connecting O–D pair w 2W .Then P ¼S w 2W P w denotes the complete set of routes in the network.Let U denote the set of user groups on the network.Then D uw denote the travel demand of type u users between O–D pair w 2W .The relationship between routes and links is described by an indicator function,d ap .That is,d ap ¼1if link a is in route p and d ap ¼0otherwise.Further,let f denote a vector of link flows,thus f ¼ðf ua :u 2U ;a 2A Þ,in which f ua denotes the flow of type u user on link A .Let F denote a vector of route flows,thus F ¼ðF up :u 2U ;p 2P Þ,in which F up represents the flow of type u user on route p ,and let F u ¼ðF up :p 2P Þdenote the vector of route flows of users from group u 2U .Hence the set of feasible route flow patterns,X ,can be given byX ¼F 2R þ:X p 2P wF up (¼D uw ;u 2U ;w 2W )ð1Þand the set of feasible link flow patterns,x ,can be given byx ¼f f 2R þ:f ¼D T F ;F 2X g ð2ÞAssociated with each link and route is a travel time function and a travel cost function for each user group.The vector of link travel times is denoted by t ¼ðt ua :u 2U ;a 2A Þ,the vector of link travel costs (exclusive of tolls )is denoted by c ¼ðc ua :u 2U ;a 2A Þ,and the vector of link tolls is denoted by s ¼ðs ua :u 2U ;a 2A Þ.Similarly,the vector of route travel times is denoted by T ¼ðT up :u 2U ;p 2P Þ,the vector of route travel costs (exclusive of tolls )is denoted by C ¼ðC up :u 2U ;p 2P Þ,the vector of route travel cost (exclusive of tolls )of users from group u 2U is denoted by C u ¼ðC up :p 2P Þ,the vector of route tolls is denoted by W ¼ðW up :u 2U ;p 2P Þ,and the vector of route tolls on users from group u 2U is denoted byW u ¼ðW up :p 2P Þ.It is assumed that all route travel times and costs are additive,i.e.,T up ¼P a 2p t ua ,C up ¼P a 2p c ua ,and W up ¼P a 2p s ua for all u 2U .Then the set of equilibrium route flows is given byE s ¼ÈF Ã2X :½C u ðF ÃÞþW u T ðF u ÀF Ãu ÞP 0;F 2XÉð3Þwhich is simply the set of solutions to the variational inequality formulation of the equilibrium problem.So,the set of the equilibrium link flows can be given bye s ¼f f Ã2x :f üD T F ;F 2E s gð4ÞHence,a route-based bilevel toll design problem can be formulated as follows:min s ;F X u 2U X w 2W ;p 2P w C up ðF ÞT ÁF up !ð5a ÞM.Chen,D.H.Bernstein /Transportation Research Part B 38(2004)61–7963subject toF2E sð5bÞs ua P0u2U;a2Ið5cÞs ua¼0u2U;a2Ið5dÞwhere I A denotes the set of links that can be tolled.In this problem,there are basically two classes of decision-makers;the transportation planner chooses the toll that minimizes the total travel cost(exclusive of tolls),while each individual driver chooses the route that minimizes his or her travel cost(inclusive of tolls),given the behavior of other drivers.The upper level of this bilevel toll design problem can be viewed as the‘‘trans-portation plannerÕs problem’’,in which the transportation planner tries tofind a toll pattern that minimizes the total travel cost.It has a nonlinear objective function,which is the total travel cost. The lower level of the toll design problem can be viewed as the‘‘road usersÕproblem’’,in which each road user tries to minimize his or her travel cost under the influence of congestion tolls. Solving this toll design problem with multiple user groups is very difficult because of the nondifferentiability and nonconvexity of the equilibrium constraint.Moreover,the solution procedure of the lower level problem is further complicated by the asymmetric interactions among multiple user groups.In the following section,this bilevel problem will be converted into a single level problem,which is much easier to solve.3.Single level toll design problem with multiple user groupsAssume that,based on the pre-toll equilibrium,a set of‘‘reasonable’’routes that will be used after the tolls are put in place can be found.Then,the equilibrium constraint in the toll design problem can be dramatically simplified,as discussed by Chen et al.(1999).Let R w denote the set of reasonable routes connecting O–D pair w2W.Then similarly,for the case of multiple user groups,a routeflow pattern,F,is now an equilibrium if and only ifC upðFÞþW up¼C uqðFÞþW uq u2U;w2W;p;q2R wð6ÞThat is,F is an equilibrium if and only if the costs on all routes connecting a particular O–D pair are equal.Hence,the toll design problem can be written as follows:min s;F Xu2UXw2W;p2R wC upðFÞTÁF up!ð7aÞsubject toC upðFÞþW up¼C uqðFÞþW uq u2U;w2W;p;q2R wð7bÞX p2R w F up¼D uw u2U;w2Wð7cÞ64M.Chen,D.H.Bernstein/Transportation Research Part B38(2004)61–79F P0ð7dÞs ua P0u2U;a2Ið7eÞs ua¼0u2U;a2Ið7fÞNote that this is a single level problem.In fact,when C is linear,this is a convex quadratic minimization problem with linear equality and nonnegativity constraints.When the BPR function is used to represent the link travel cost,this problem is a nonlinear optimization problem with nonlinear and linear equality constraints,as well as nonnegativity constraints.Particularly,both the objective function and the constraints are differentiable.In such cases,this problem can be solved using a variety of algorithms for solving standard nonlinear programming problems. However,constraint(7b)is likely nonconvex because it is the difference between the two convex functions,C upðFÞþW up and C uqðFÞþW uq(e.g.,when the BPR function is used to represent the link travel cost).Therefore,the single level toll design problem is usually nonconvex,which cannot guarantee a global optimal solution.Nevertheless,if we modify the formulation(7b)somewhat,as shown in(8),the solution of this problem can be facilitated.Specifically,let H uw denotes the vector of total route cost(inclusive of tolls),i.e.,H uw¼C upðFÞþW up u2U;w2W;p2R wð8Þthen the toll design problem(7)can be written asmin s;F;H Xu2UXw2W;p2R wðH uwÀW upÞTÁF up!ð9aÞsubject toC upðFÞþW up¼H uw u2U;w2W;p2R wð9bÞXp2R wF up¼D uw u2U;w2Wð9cÞF P0ð9dÞs ua P0u2U;a2Ið9eÞs ua¼0u2U;a2Ið9fÞH P0ð9gÞNote that H uw with cardinality j UÂW j is added into the problem as a decision variable,which is independent of all other variables.Since R w is defined as the set of used routes between O–D pair w2W,H uw turns out to be the equilibrium route cost for each O–D pair,which is the minimum possible route cost under the equilibriumflow.The objective function(9a)remains convex since H and W are independent of each other. Constraint(9b)is still a nonlinear equality.However,if we relax this constraint toC upðFÞþW up6H uw u2U;w2W;p2R wð10ÞM.Chen,D.H.Bernstein/Transportation Research Part B38(2004)61–7965then the toll design problem will look like the following:min s;F;H Xu2UXw2W;p2R wðH uwÀW upÞTÁF up!ð11aÞsubject toC upðFÞþW up6H uw u2U;w2W;p2R wð11bÞXp2R wF up¼D uw u2U;w2Wð11cÞF up P0u2U;w2W;p2R wð11dÞs ua P0u2U;a2Ið11eÞs ua¼0u2U;a2Ið11fÞH P0ð11gÞEven though they are both standard nonlinear programming problems,(11)may be easier to solve than(9),since most algorithms for nonlinear programming problems require a feasible solution to start with,and it is rather easy tofind a feasible point that satisfies inequality con-straint(11b)instead of equality constraint(9b).Furthermore,many algorithms require that this starting point lies strictly inside rather than on the boundary of the feasible region.Here,we prove that problem(11)and problem(9)have the same solution set.Note that besides the aforemen-tioned two constraints,all other constraints are the same for the two problems.Therefore,it is just necessary to compare constraints(11b)and(9b).Theorem.Problem(11)and problem(9)have the same solution set.Proof.Any solutionðFÃ;sÃ;HÃÞof problem(9)that satisfies constraint(9b)also satisfies con-straint(11b)since(9b)is a special case of(11b).Thus,any solution to problem(9)must be a solution of(11).On the other hand,if there exists an optimal solutionðFÃ;sÃ;HÃÞto the problem(11),which only satisfiesC upðFÃÞþWÃup <HÃuwu2U;w2W;p2R wð12Þand at the same time satisfies all other constraints of(11),thenHÃuw ÀWÃup>C upðFÃÞu2U;w2W;p2R wð13Þand thenX u2UXw2W;p2R wðHÃuwÀWÃupÞÁFÃup!>Xu2UXw2W;p2R wC upðFÃÞÁFÃup!ð14ÞThe right-hand side of(14)is equivalent to the original objective of the toll design problem(7). Hence,(14)shows that the solutionðFÃ;sÃ;HÃÞresults in a larger objective value than the original minimization formulation(7).Thus the objective function can be further minimized,which 66M.Chen,D.H.Bernstein/Transportation Research Part B38(2004)61–79contradicts the assumption that ðF Ã;s Ã;H ÃÞis an optimal solution to the problem (11).Therefore,such a solution does not exist.In other words,all optimal solutions of problem (11)have to satisfy (9b),which means that they are also solutions to the problem (9).Hence we can conclude that problems (11)and (9)have the same solution set,and we can solve(11)instead of (9).ÃSince (9)is equivalent to (7)and (11),it follows that (11)and (7)are also equivalent.However,the numbers of decision variables in these two problems are different.For (7)the total number of decision variables is j U ÂS w 2W R w j þj U ÂA j ,while for (11)this number is j U ÂS w 2W R w j þj U ÂA j þj U ÂW j because of the addition of decision variable H .4.Equivalence of the two toll design problemsFirst,look at the objective functions in problems (5)and (7).Since R w is the set of used routes,then,F up ¼0;u 2U ;w 2W ;p 2P w ÀR w .Therefore,Eq.(5a)is equivalent to (7a),and it is suf-ficient to compare the feasible region of problems (5)and (7)only.The feasible region of (5)consists of the solutions to the variational inequality problem (3),which can be alternatively formulated as a complementarity problem as follows:F up ½C up ðF ÞþW up ÀH uw ¼0u 2U ;w 2W ;p 2P wð15a ÞC up ðF ÞþW up ÀH uw P 0u 2U ;w 2W ;p 2P w ð15b ÞX p 2P w F up ¼D uw u 2U ;w 2Wð15c ÞIn addition,all nonnegativity constraints should be satisfied.Next,we will use this to prove the equivalency between the two toll design problems.Lemma 1.For any route flow vector F ¼ðF up :u 2U ;w 2W ;p 2P w Þthat belongs to the feasible region of (5),it belongs to the feasible region of (7).Proof.Let R w denote the set of used routes connecting O–D pair w 2W .Then for any F ¼ðF up :u 2U ;w 2W ;p 2P w Þin the feasible region of (5),the complementarity condition (15)should be satisfied.According to the definition of the deterministic equilibrium,the complementarity con-dition (15)can be expanded as system (16)as follows:C up ðF ÞþW up ÀH uw ¼0u 2U ;w 2W ;p 2R w ð16a ÞC up ðF ÞþW up ÀH uw >0u 2U ;w 2W ;p 2P w ÀR w ð16b ÞF up >0u 2U ;w 2W ;p 2R w ð16c ÞF up ¼0u 2U ;w 2W ;p 2P w ÀR w ð16d ÞX p 2P wF up ¼D uw u 2U ;w 2Wð16e ÞEq.(16a)is equivalent to (7b)if variable H is disregarded,and Eqs.(16d)and (16e)imply (7c).Eq.(16c)is contained in (7d).Since (7b)–(7d)constitute the feasible region for flows of problem M.Chen,D.H.Bernstein /Transportation Research Part B 38(2004)61–796768M.Chen,D.H.Bernstein/Transportation Research Part B38(2004)61–79(7),we can conclude that for any F that belongs to the feasible region of(5),it also belongs to the feasible region of(7).ÃLemma2.For any route flow vector F¼ðF up:u2U;w2W;p2P wÞthat belongs to the feasible region of(7),it belongs to the feasible region of(5).Proof.For any F¼ðF up:u2U;w2W;p2P wÞin the feasible region of(7),the following equations hold:F up P0u2U;w2W;p2R wð17ÞF up¼0u2U;w2W;p2P wÀR wð18ÞC upðFÞþW up¼C uqðFÞþW uq u2U;w2W;p;q2R wð19ÞXF up¼D uw u2U;w2Wð20Þp2R wLetC upðFÞþW up¼H uw u2U;w2W;p2R wð21ÞThen Eq.(16a)as well as the following hold:F up½C upðFÞþW upÀH uw ¼0u2U;w2W;p2R wð22ÞEq.(18)also guaranteesF up½C upðFÞþW upÀH uw ¼0u2U;w2W;p2P wÀR wð23ÞNow we compare the C upðFÞþW up and H uw when w2W;p2P wÀR w.IfC upðFÞþW up<H uw u2U;w2W;p2P wÀR wð24Þthen route p would have a lower cost than those used routes.Based on the equilibrium principles, the following holds:F p>0u2U;w2W;p2P wÀR wð25Þwhich is contradictory to Eq.(18).Thus,(24)is false and Eq.(26)holds:C upðFÞþW up P H uw u2U;w2W;p2P wÀR wð26ÞEqs.(16a)and(26)can be combined into(15b),Eqs.(22)and(23)can be combined into(15a), and Eqs.(18)and(20)imply(15c).At the same time,all nonnegativity constraints are satisfied. Since equation system(15)is the complementary formulation of the equilibrium constraint of(5), any F which is from the feasible region of(7)should be also in the feasible region of(5).ÃBased on Lemmas1and2,we can conclude that the single level toll design problem(7)is equivalent to the bilevel toll design problem(5).5.AlgorithmsMany algorithms have been developed for solving constrained nonlinear optimization prob-lems.In general,these algorithms can be categorized into types such as feasible direction methods and interior point algorithms.There have been various software packages developed using these algorithms,which are capable of solving the constrained nonlinear programming problems.Such products include MINOS,a projected Lagrangian method combined with a reduced-space ap-proach,LANCELOT,a trust region method performed on an augmented Lagrangian,SNOPT,a sequential quadratic programming method,and LOQO,an interior point method for nonconvex nonlinear programs.Among these packages,MINOS,LANCELOT,and SNOPT use algorithms in the category of feasible direction method,and LOQO uses an interior point method.In this study,we found that LOQO has the best performance in providing solutions.Observing that the nonconvexity of the toll design problem arises from its nonlinear con-straints,we will make an attempt to linearize these nonlinear functions using the iterative linea-rization method introduced by Rosen (1966).By solving a series of linearly constrained optimization problems,such effort could greatly reduce the complexity of the solution procedure.We begin by introducing the procedures necessary to solve the toll design problem.5.1.Procedures for solving toll design problemsAs discussed previously,the single level deterministic toll design problem (11)is much easier to solve than the bilevel problem (5),however,in order to convert the bilevel problem into the single level one,the set of routes that will be used after tolls are in place has to be identified.It is common knowledge that at equilibrium,there may exist multiple route flow patterns that would generate the same link flow pattern on the network.For example,consider the network shown in Fig.1,in which there are four links and four routes.Route 1consists of links 1and 3,route 2consists of links 1and 4,route 3consists of links 2and 3,and route 4consists of links 2and 4.Let F i ,i ¼1;2;3;4,denote the flow on route i ,and f j ,j ¼1;2;3;4,denote the flow on link j .Thenf 1¼F 1þF 2f 2¼F 3þF 4f 3¼F 1þF 3f 4¼F 2þF4M.Chen,D.H.Bernstein /Transportation Research Part B 38(2004)61–7969If the equilibrium linkflow pattern is f1¼f2¼f3¼f4¼2,then one possible routeflow pat-tern is F1¼F2¼F3¼F4¼2,another possible routeflow pattern is F1¼2,F2¼F3¼0,and F4¼2.So,the set of used routes is not unique.In order to identify this set,we use the method introduced by Larsson et al.(1998),which can uniquelyfind the most likely routeflows given the equilibrium linkflows.In this method,the equilibrium linkflow solution is defined as a macrostate,which arises as the result of the route choices of the individual travelers.The travelersÕroute choices between minimum and equal cost routes of a particular O–D pair define a set of microstates.All microstates consistent with the macrostate are argued to be equally probable,since the travelers are indifferent to which route they use,as long as it is the minimum cost route(Smith,1978,1983).Based on well-known principles from information theory,it is argued that the most likely routeflow solution is the one which corresponds to the largest number of microstates among those which are consistent with the observed macrostate.Even though this method is designed for the single user group case,it also applies to the sit-uation with multiple user groups.Let RÃw denote the set of equilibrium routes between O–D pairw2W,that is,RÃw¼f p2P w:C up¼H uw;u2U gð27ÞThen,after applying StirlingÕs approximation,the most likely routeflows can be found by solving the maximum entropy problem(28):maxF ÀXu2UXw2W;p2RÃwF up ln F up!ð28aÞsubject toX p2RÃw F up¼D uw u2U;w2Wð28bÞXw2W;p2RÃwd ap F up¼f ua u2U;a2Að28cÞF up P0u2U;w2W;p2RÃwð28dÞThis is a standard nonlinear programming problem with linear constraints.A variety of al-gorithms could be applied to this problem.However,it should be mentioned that because of theentropy formulation in the objective function,F up>0holds for all u2U,w2W,and p2RÃw .Infact,it is rather difficult to get the exact solution to this entropy problem,since the objective function becomes extremelyflat when approaching the optimum.However,for the purpose of identifying the most likely routes that carryflow,a near-optimum solution is good enough.In this near-optimum solution,although none of the routeflows would be zero exactly,some of them could be very close to zero.Theoretically,these routes are used,while from an engineering point of view,these routes certainly should not be included in the set of used routes.A tolerance e>0 will be specified to exclude these routes,i.e.,the set of‘‘reasonable’’routes between O–D pair w2W can be defined asR w¼f p2RÃw :F up P e;u2U gð29aÞ70M.Chen,D.H.Bernstein/Transportation Research Part B38(2004)61–79and then[R¼R wð29bÞw2WIt is possible that some routes that were not in the‘‘no-toll’’route set will be attractive after the tolls are in place(i.e.,if the tolls are placed on links that are not in that route).Such routes should, of course,be included.While it is difficult to identify such routes a priori,one can discover them ex post.Hence,one could apply an iterative procedure in which the initial route set is based on the ‘‘no-toll’’equilibrium and,after the‘‘with-toll’’equilibrium is found for this route set,new routes could be generated by solving a sequence of shortest route problems.Then the toll design problem could be re-solved.As it turns out,this issue did not arise in the examples in this study.The procedure for solving the toll design problem is shown in Fig.2.5.2.Interior point algorithmThe basic idea of an interior point algorithm is to approximate constrained optimization problems by unconstrained problems.By using this type of method,the constraints are placed into the objective function via either a penalty or barrier parameter,to either penalize the vio-lation of constraints by imposing a high cost for it,or prevent the intermediate solutions from leaving the feasible region.Vanderbei and Shanno(1998)proposed an interior point algorithm for solving nonconvex nonlinear programming problems.This is an extension of the interior point algorithm for qua-dratic programming problems(Vanderbei,1994).The basic idea of this algorithm is to use NewtonÕs method tofind the feasible search direction.In the case of toll design problems,the nonlinear constraints are all equalities,and the only inequalities are the nonnegativity constraints. (If one adds the constraint that the toll on trucks should be higher than the toll on cars,it can be converted into an equality constraint by adding slack variables.)The inequalities can be elimi-nated if they are added to the objective function as barrier terms.A Lagrangian is then formulated to incorporate those equality constraints.Let g denote the system of all constraints in the toll design problem except those with simple bounds on variables.That is,g represents equation system of(11b),(11c),(11f).Note that these constraints should already be converted to equality constraints by adding slack variables.Let h represent the system of simple bounds as well as bounds on those added slack variables.Let l denote the barrier parameter,k denote the vector of Lagrangian multiplier,and Y denote the vector with all components being1.Then the Lagrangian L can be written as L¼Xu2UC uðFÞT F uÀlðlog½hðF;sÞ ÞT YÀk T gðF;sÞð30ÞBy solving the Newton system of thefirst-order KKT condition of the Lagrangian,one canfind the descent direction from the current solution,provided that a feasible starting point is used. In order tofind the step size,merit function(31)is used,in which q denotes the penalty pa-rameter.Specifically,this function can prevent the selection of a step length that will lead to the infeasibility of the subsequent solution point.u q;l¼Xu2U C uðFÞT F uÀl½log hðF;sÞ T Yþq2gðF;sÞk k22ð31ÞTests on those examples presented in this study show that this algorithm gives at least the same solution,if not better,to toll design problems,compared with LANCELOT and SNOPT.5.3.Iterative linearization methodThe iterative linearization method,proposed by Rosen(1966),essentially consists of NewtonÕs method with a convex or linear programming subproblem solved at each iteration.In this method, the nonlinear constraints are linearized using afirst-order approximation.For the deterministic based toll design problem,the only nonlinear constraint is(11b).Let C upðFÞdenote thefirst-order approximation of the cost function.For the toll design problem(11),the following subproblem is solved:。