Monday, January 27, 2020

Complexity Measures in Design and Development

Complexity Measures in Design and Development Albert Einstein once said â€Å"Everything should be made as simple as possible, but no simpler†. These simple words coming out of a genius’s mind carry a lot of meaning and depth in them. The last two decades saw an exponential rise in different branches of engineering and sciences; and with these developments came in a crowd of very advanced yet very complicated technologies. Are these complexities intended? The answer is very simple NO; the very word advanced is almost always inherited by complexity. No one would want to design and manufacture something very complex, but the more advanced a technology is, the more complex it gets. Even the works done by the man who said those words are far too complex for a common man; and actually that is exactly what he meant. Everyone tries to make things as simple as possible, but no simpler than that, they just can’t and the simplest product design possible can become very complex in some regards. With increasing complexity, there is always a danger of system being destabilized, reduction in overall performance, higher cost, higher maintenance, etc. The way to keep control over complexity is to have measure of it, so that management and manufactures know what exactly to-do and how to change their operational strategy. In this dissertation I am presenting a detailed overview of complexity, it’s different meanings and interpretations in various industries and a host of measures that were developed to measure and evaluate complexity. There are also a few methods of minimizing complexity presented along with case studies illustrating the means in which these measures were applied to real-time manufacturing and designing processes. Complexity: â€Å"What is complexity?† could be one of the most complex questions tube answered. The very definition of complexity from dictionary would suggest the following: Æ’ËÅ" Consisting of interconnected or interwoven parts Æ’ËÅ" Composed of two or more units Æ’ËÅ" Offers great difficulty in understanding, solving, or explaining Æ’ËÅ" The interlacing of parts so as to make it nearly impossible to follow or grasp them separately Æ’ËÅ" Extreme complication and often disorder; complication and entanglement that make solution or understanding improbable The first two meanings are not too related to our present context so I will ignore them, but the rest suggest the exact meaning of what complexity is. As we can see, if I do not understand something properly or am not capable enough to understand it, ‘that’ thing is complex tome. Does this mean it is really complex? The answer again is very simple, NO and that is the very reason why complexity is so hard to define. Complexity of anything is dependent on many factors and one very important factor is human understanding. A subject complex to me could be a piece of cake for someone else and this very behaviour of complexity makes it very hard to measure and evaluate it. An important and interesting question that may arise in reader’s minds, â€Å"Does the very same meaning of complexity stand in industry standards too?† The answer could be both a YES and a NO. It does stand the same thing in some cases, but in rest, the definition of complexity is completely modified. A best example would be industries involved in computer sciences and engineering. There complexity of a code does not really mean it is hard to understand, it rather means that it takes a lot of time for computer to calculate and give the results. In most of the mechanical and electronic designs, complexity would mean systems with multiple interacting parts, the behaviour of which cannot be related with respect to individual parts. That is their collectivebehavior is completely different and /or unpredictable from their individual behaviour. Again this unpredictability can be related to just the static structure of these components or dynamic nature, thus the differentiation between static complexity and dynamic complexity. Now Avery good question to answer is â€Å"What exactly are these static and dynamic complexities?† Static Complexity: Given a particular system (could be any system like manufacturing plant with different manual and automated equipment or just a small network with multiple servers/ clients ), there is always some complexity involved with the static structure of these components, could be just their physical shapes/ sizes or their alignment with other objects or with environment. This complexity which is made up as a function of various parameters like physical shapes, structures, connectivity, variety and strengths of components is called static complexity. Dynamic complexity: Dynamic complexity is more related towards the behaviour of these components as a unit. As mentioned earlier, the pattern of behaviour for a group of components is almost always different than the pattern for individual components; this behaviour measured over a period of time is a major parameter in dynamic complexity. A very important form of complexity that is normally taken as constant or zero while evaluating static or dynamic complexities is complexity arising because of control; that is, given a particular system, there could be many ways in which it can controlled and each one of these methods can result in a different static / dynamic complexity measure, thus to really evaluate a system, we should also consider this parameter and measure a control complexity too. But for most practical purposes, it is assumed that there is only one way to control, thus ignoring control complexity. Measuring and evaluating dynamic complexity is highly dependent on the industry and its specific design, thus forming generic measures for dynamic complexity is not only complicated but also inapplicable invest majority of other designs. Thus research is more focused towards static complexity and its measures. Though there are papers which concentrate only on dynamic complexity, they are very much oriented towards a specific industry and its related fields. Does this mean that static complexity is similar for all industries and designs? No, but a particular measure calculated for static complexity could be easily expanded to other designs too, which is not the same for dynamic complexity. In this paper, I will give measurements of both static and dynamic complexities with respect to manufacturing environment. Before we go any further into measurement of complexity, it is a good idea to understand why and how complexity arises in systems? There is general belief that complexity arises due to many random factors. It could be true in some sense, but that only indicates a very bad design. For systems which are well designed, manufactured and maintained, randomness is not a major factor; it is rather the fact that the system cannot be easily described which causes more complexity. According to Axelrod and Cohen describe systems as comprising of agents and artifacts. The artefacts are just physical (or virtual) objects that comprise the system where as the agents who have attributes like location, memory, ability to interact with other agents, ability to manipulate and change functions, control these objects. The agents may not have to be people alone; they can be computer programs, groups, political entities etc. that may affect the system directly or indirectly. Another important and very interesting concept of complexity comes from Wolfram, in which he states that complexity in a system comes from randomness produced because of three sources. Æ’ËÅ" The first source is the environment and its intervention, either directly or indirectly, on the system. Æ’ËÅ" The second source is the initial conditions that the system was in, before being used. These initial conditions could be random thus adding more weight to the complexity. Æ’ËÅ" The third and most important one is the internal or intrinsic complexity of the system. That is the complexity of the system when there is no external influence or affect. With all these different views of complexity, we are now ready to go ahead and describe what complexity in design is? But before that, let us see what exactly design means. Design and Why is it done? In this section, let us see what exactly design means and as in every case, let us start with the exact dictionary definition of design. Æ’ËÅ" To conceive or fashion in the mind; invent Æ’ËÅ" To formulate a plan for; devise Æ’ËÅ" To plan out in systematic, usually graphic form Æ’ËÅ" To create or contrive for a particular purpose or effect Æ’ËÅ" To have as a goal or purpose; intend Æ’ËÅ" To create or execute in an artistic or highly skilled manner These, may be with little twists here and there, are the exact definitions of ‘Design’ that you see in dictionaries and they almost suggest what precisely designing means in industry standards. Basically designing involves â€Å"making things better and more useful to customers (or people)†. Almost every single thing that we use is (/was)designed at some point of time; things that we take for granted were once designed and engineered. Design is an integral part of us and our society and is united in almost everything and anything we do and we use. Designing anything starts with an idea, any idea good or bad. The main job of designers is to reform this idea so that it is understandable for the people who need to work on it and manufacture it, sort of able print. Whether it is a multibillion dollar dam or a small fashion hair pin, the process of creating them is all the same and involves almost the same basic general steps. Before we discuss these steps, it’s important for us to understand why designing is done on the first place? Designing is a very important and basic step in any product. To deliver product, there are many steps involved. There are scientists who invent new technologies, engineers who use these technologies to develop various components, manufactures that use these components in manufacturing different products and finally marketers who take the prime role behind delivering the product. But who is going to coordinate their efforts to produce a desirable and successful product, no one else but the designers. They are the people who understand what the customer want and deliver a mechanism to make it happen. Designing is not just what we read in magazines which depict it as mostly involved with fashion industry. No that is not at all the case it involves a lot of insight into the way customer thinks and wants his product. As I mentioned earlier, everything that we use was designed at some point of time. There are some very important things that every design is supposed to follow, a brief list of which is as follows: Æ’ËÅ" User requirements: The very first and most important aspect designer has to consider is user. In this world where the number of competitors for a product is more than the product itself, there are very few designs which are being accepted into user community. The main reason behind their success being complete satisfaction of customers. The very first step of any design process is to know â€Å"what exactly customers want?† Æ’ËÅ" Creativity: Next comes creativity. When the designer knows what the customer wants, he has to create something new; he just can’t give the same old stuff which just satisfies the needs. If I am buying a camera, being a picky customer I wouldn’t buy any camera that can take a snap of me, NO, I want so many other things which may be I will not even dream of using, but still I want them in my camera. That is how customers think and that is what exactly designers provide. Innovation has to be there in a product without which t here is no value to it.Designers explore all the different combinations in which a product can be designed and seek new methods in doing so. The stranger it is the better. Now that there are so many simulation tools and other devices that provide so much insight into the product even before it is made, this work is simplified a lot. Æ’ËÅ" Business process: the other very important consideration a designer has to go through is the business process both from company perspective and user perspective. The overall price of the product may depend on the design and considering this is a very important thing. The best examples are the products from Microsoft, take for example PowerPoint, though costing only 50-100 dollars, it’s overall revenue may be grater than some very big software companies whose products cost millions of dollars. Why? The design was so done that there are millions of satisfied customers to PowerPoint or excel who can afford it easily than to products that co st millions of dollars. Æ’ËÅ" Manufacturing overview: it is also very important for a designer tube thoroughly aware of what exactly his company is capable of and at what capacity. I can design a magnificent product in a technology that my company is not even aware of, there is no use to it. A designer should be completely knowledgeable in the manufacturing processes and principles of his company so that whatever he does is not counter tithe existing mechanism, but only increase its productivity by using it in a better way. Now that we considered the basic aspects of design, let us now look at the design process. Being a designer is not such a simple job, you will have to consider so many discrete and varied things, a small list of which was provided above. There is a lot of trial and error involved. Till you get the right one, there could be thousand rejected designs. Though most of the design process is done by designers, there is a lot of contribution from most of the other departments involved in getting that product out like manufacturing people, engineers, business analysts, managers etc. The following are the basic but general steps I mentioned earlier that any designer follows: Æ’ËÅ" Understanding and evaluating Requirements: The very first step involved in design process is to understand and evaluate the user requirements. This involves defining the objectives, setting deadlines, targets and parameters. The design team is involved right from the beginning to the end as they have to understand the business process both from the company’s point of view and the customer’s point of view. The idea being creating an ideal project which will satisfy both the business processes and optimize them. A very important question to answer at this level is why are we creating / modifying this product? Once this question is properly answered, the rest of the process becomes simpler and logical. Æ’ËÅ" Research: Research is one of the most important aspects of the whole process. This is an ever going process, especially in the case of longer project. Research typically includes a variety of areas like Technology, Economy, User Satisfaction, Competitor products, trends, risks etc. Every one among them will affect the product and its design. A simple example would be the conversion from analogy to digital. May bee decade or two ago, there were some systems which were still concentrating on analogy devices. Now they are hardly seen. When such drastic change is happening (a decade would not be drastic for us, but for large scale manufacturing plants to change their whole technology from analogy to digital would cost millions of dollars even though it is spread over multiple years), it would be highly beneficial to a company to be well informed beforehand rather than changing at the spur of moment. Research is more concentrated on the customer / user than anything else. Whatever user wants has to be done and it would be much more preferable to know the user choices beforehand doing our own research, rather than getting a dissatisfied comment from him. Æ’ËÅ" Planning: planning is another significant part of the whole process. As I mentioned earlier, it is always good for the designers to know the internal business processes of the company beforehand rather than knowing them later on and trying to modify the design. Planning takes care of this step. With participation from wide variety of areas all across the board, it becomes simpler for the designer to know and understand different views and angles about a manufacturing process so that the overall design is acceptable and enjoyable by everyone. Æ’ËÅ" Communication: In a business process, there are always instances when the customer thinks of something, the designer understand something else and the manufacturing guys create something completely different. Why does this happen? Lack of communication. Whose mistake is this? Nobody’s. It is very important for a designer and his team to keep inconstant touch with both the customers and the manufacturing guys at the same time. Designers are the only bridge between customers and manufacturers and they should be completely aware of the business process from both the sides. It is client’s responsibility that he conveys the proper requirements to the designers so that they care-convey them to their manufacturing guys, a small leak here and there can result in disaster. But does the client do this always? NO. So it becomes an additional burden on the designer to keep in constant touch with the customer and keep him posted of what is going on with the product, so that if there is some discrepancy, then the message is obtained instantly, same is the case with manufacturing people. Æ’ËÅ" Implementation: the last step is implementation, mostly done by the manufacturing people but involves a little contribution from design team too. First of all, they may have to monitor the whole process and may be even test it thoroughly. Being the only people with complete knowledge of client’s business requirements, they are also responsible for quality. This is how a generic design process goes, let me stress the word generic again. Depending on industry, this process may change here and there, but the changes would be nominal. Now let us consider the different contexts of complexity in different industries and their detailed analysis, the major difference between the following topic and the one presented earlier being that the following one is description of complexity from design perspective. Different Contexts of complexity in different industries: I already mentioned while explaining the definition of complexity that its basic meaning may change from industry to industry. In this section let me highlight some key industries and illustrate the meaning of complexity with respect to that particular industry. In the very same process let us also try to combine the design process into the contexts that we can start concentrating more on complexity in design more than complexity in general. Let us start with the software industry where the definition of complexity is very fundamental but very useful. Complexity in Design for Software industries: What exactly does complexity in software design mean? IEEE standard 729gives the following definition for complexity in software, â€Å"The degree of complication of a system or system component, determined by such factors as the number and intricacy of interfaces, the number and intricacy of conditional branches, the degree of nesting, the types of data structures, and other system characteristics. Though very extensive, this definition still doesn’t cover all the aspects ofcompelxity in software. There are many things to be considered while stating complexity in software a few of which are the operating system, programming language , database, interface being used etc. and etc. Now popular question could be, â€Å"Does all this matter, a complexity has tube related to the way you design an algorithm more than the way you program it?†. Actually it does. There is a popular notion of measuring complexity in software industry where in they compare a particular language (for example) with another one and decide what is more complex. Though theoretically perfect, practically this is totally wrong. How can one compare an algorithm written in Java to the same algorithm written in C, their applications and usages are completely different. Similarly you cannot compare a program using Oracle as its database to a program using Microsoft Access. Now can we measure complexity taking all these into consideration? Not really. For measurement purposes again everything falls back to algorithm level. Whatever be the programming basis you are using, underneath it there is only a single algorithm being used. Thus in this context measurmentof complexity has to be done with a lot of risk. Later in the dissertation Aim going to suggest some popular methods of complexity measurements used in software industry. In general, complexity in software comprises mainly of the following components (apart from the algorithm): Æ’ËÅ" Component Reuse (so called Object Oriented Programming): This is Avery important component of complexity measurement these days. Given a particular algorithm, if you can reuse a piece of code again and again, thus avoiding redundancy, the complexity would decrease by a lot. Hence this factor is a very important component of software complexity. Æ’ËÅ" Control Flow: This takes into consideration the whole control structure of the program. Æ’ËÅ" Data Structures: The number of data structures being used and their size (in bits and bytes) Æ’ËÅ" Size: the overall length of the code (also including the commented lines and documentation as even they are considered in compilation process) From the above description, we can conclude that software complexity depends a lot on the algorithm being used, but many other factors contribute a lot too. Thus a good designer would first of all consider the algorithm and once the algorithm is decided, he / she would spend more time looking into various other considerations, trying to decrease the length of code, number of hits to the database, number of requests from the server etc. Complexity in Manufacturing: Let me clarify what I mean by Manufacturing before I go any further, it includes almost every single sector of consumer product industry starting from auto industry to small electronic components. Why am I including them of all into a single concept? Because the way they function is almost similar with the difference in size. Thus in this section, I will try to distinguish them whenever necessary, but otherwise they are all the same. Majority of these industries involve many moving parts and each one of these parts are again designed and manufactured, either in the same company of in a different one. Thus there is complexity involved in designing each one of them, and then comes the complexity of assembling them into one single system, normally carried out by various automated and / or manual methods. Consider for example an auto industry. With thousands of components going into the assembly line, the whole process becomes highly complex; similar is a case with electronic devices wherein minute parts has to placed and soldered on a PCB with utmost precision. Normally complexity of a manufacturing process is dependent on many parameters, a brief list of which is as follows: Æ’ËÅ" Similarity in processing requirements: the complexity of manufacturing process is highly dependent on the processing requirements and their similarity. Any process would be much simpler when it has similar methods being used across various modules. Thus with variance in processing requirements, the complexity increases. Complexity also increases due to changing consumer demand, which directly affects the whole setup. Æ’ËÅ" Yield: Manufacturing yield is another important factor that determines the complexity. There is always a constant effort to increase the yield but without proper planning and automation, this could result in huge complexities. Æ’ËÅ" Miniaturization: With the latest trend of miniaturization, all the components are being made as small as possible thus increasing their overall complexity. We can easily say that a laptop or as a matter of fact a palm top is much more complex than a desktop. A similar trend is being observed in many of the electronic sectors and thus enhancing the complexity of design. Æ’ËÅ" Energy Efficiency: More applicable in automobile than anywhere else, this parameter is affecting the complexity a lot. With modern vehicles(hybrid electrical and gasoline based engines), the energy efficiency is being increased a lot, but along with it, the complexity is also increasing at a similar rate. Why do we need Complexity Measures? Till now I discussed the basic definitions and detailed meanings of complexity and design. Now let me consider on measurement of complexity. The very first question to be answered in this regard is, Why do we need complexity Measures for? The answer for this question cannot be given in all technical fashion; we need some philosophy for this. As can be seen from the trends in the past two decades, the population is rising at a huge rate and along with it the technology is improving at an exponential rate. We are living in the period where Moore’s law is still being maintained and the devices that we use daily are being made more and more sophisticated and user friendly. But what if someone wants to understand the concepts behind any of these devices, though the modern communication is fast and very knowledgeable, it is vast too. Most of the information provided is random, not relevant, redundant and sometime inaccurate. This provides more confusion than clarity. As Simon says in his paper Creativity, Innovation, and Quality, â€Å"Today, complexity is a word that is much in fashion. We have learned very well that many of the systems that we are trying to deal with in our contemporary science and engineering are very complex indeed. They are so complex that it is not obvious that the powerful tricks and procedures that served us for four centuries or more in the development of modern science and engineering will enable us to understand and deal with them. We are learning that we need a science of complex systems, and we are beginning to construct it†, it is becoming more and more painful for common men to understand or evaluate systems becaus e of their complexity. This complexity is increasing day by day rather than taking a downward step. Not only in manufacturing processes but also in other industries like software, electronics, even social, political, religious, medical, biological hectare also vastly affected. The only way out of this confusion is to do proper designing so as to minimize the complexity involved, (note the work minimize. It is impossible to eliminate complexity). Are these the only reasons of measuring complexity? No way. None of the industrialists would ever invest in research for complexity measures for the above mentioned reasons. There is a huge economic advantage by doing proper complexity measurement and then taking proper steps to minimize it. I will mention a small list of these benefits here, and then explain them in detail as we go on to subsequent sections. List of advantages for measuring, evaluating and finally minimizing complexity from financial point of view: Æ’ËÅ" The operational strategy could be improved a lot. Æ’ËÅ" Processing speed and thus information transfer is much faster and smoother. Æ’ËÅ" System performance is better. Æ’ËÅ" Increased autonomy. Æ’ËÅ" More customer satisfaction and thus higher profit. Æ’ËÅ" Easier to maintain, modify or redesign. Statistics involved in Complexity measurement: Before we can go ahead and derive some formulae for complexity measures, it is a good idea to brush up some basic concepts of information theory and other related statistical engineering subjects. So this section is dedicated for a brief overview of some of these important concepts. Ensemble: An ensemble X is a random variable x with a set of possible outcomes, Vex = {v1,v2,..vi, †¦ VI), having probabilities {p1,p2,†¦pi,..pie} with P(x=vi)=pi, pi >0 and Conditional Probability: Product rule: Sum rule: Bayes’ Theorem: Stationary Process: A random process where the various statistical qualities or properties do not vary with time is called a stationary random process. That is for a stationary process, the parameters like Mean, Variance, Standard Deviation etc. are constant across time.(Example White Noise) Erotic Process: Random process in which the time series produced are the same in statistical properties. That is a set of random processes are considered as time shifts of an original stationary process. Entropy: A very popular term in Information Theory, entropy means the lowest amount of bit rate needed for representing a particular symbol. The exact value of Entropy is . It is also called as uncertainty of x. With this definition of Entropy and following the probability rules defined earlier, joint and conditional entropies can be defined as follows: Joint Entropy: Conditional Entropy: This information should be sufficient for us to go ahead and derive our formulae; if anything is needed I will provide it at that instant. Different methods of Complexity Measures, their Evaluation and Analysis: As indicated above, different industries use the term ‘Complexity’ indifferent aspects, thus there are varied meanings and definitions of it. With so many differences involved in just defining complexity, we can imagine how difficult it would be to measure and find methods to reduce complexity for all these manufacturing units. Taking into consideration this vastness, normally research is done only in those fields where there is some sort of existing mathematical background, using which new complexity measures and evaluations can be done. Ones these are formed, then the same measures could be used for relating complexity of any related industry. A popular area where there is a lot of mathematical background existing is algorithmic complexity, mostly for software related industries but applied in general to a vast area of other industries too. For beginners, let me start with describing few methods in software industry and we shall proceed to manufacturing plants later on. Fan-In Fan-out complexity: One of the most basic complexity formulae to be derived is Fan-Infant-Out complexity formed by Sallie Henry and Dennis kauri. Let us define the following parameters, L = length of the code in lines Fanon = the number of functions that call a particular function Fan-out= how many functions are called by a given function is calledfanout. Then the complexity of the code by this method is given as Complexity = L* (Fanon*Fan-out)2 In overall essence what exactly this formula does is, it counts the number of data counts from a particular unit of code and number of data counts into that unit or into a data structure to measure the complexity. Not so useful in real time applications with millions of lines of code and very complex algorithms. Software Science: This method was started by Maurice H. Halstead. Again this is a very simple and quite useless sort of algorithm to calculate complexity of program code. The formula for complexity that Halstead proposed was as follows: N=n1logn1 + n2logn2 Where N is the implementation length of the code, n1 is the number of unique distinct operators appearing in the implementation, n2 is the number of unique distinct operands appearing in the implementation. Now he defines the program volume as V =N log(n1 + n2) Where log is logarithm to the base of 2. Then he suggests that more the volume of the program code, more complexity is. As I said the above two measures were quite useless for modern programs involving very complicated algorithms. McCabe’s Cyclamate Complexity: To measure the amount of decision logic that is loops like for loop, while loop etc. or breaks like if, case etc., for a simple software module, we can use McCabe’s Cyclamate Complexity. An example formula that

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.