Modeling Discrete and Continuous Processes

Size: px
Start display at page:

Download "Modeling Discrete and Continuous Processes"

Transcription

1 Modeling Discrete and Continuous Processes by Magne Myrtveit Normally, we try to aggregate discreteness in System Dynamics (SD) models by making continuous flows. This is a good modeling practice, but in some cases discreteness may have a significant influence on system behavior (see note). Consequently, we need to model such discreteness to explore its impact on behavior. The System Dynamics (SD) technology was originally designed with support only for systems where the states change in a continuous manner over time. A SD model typically aggregates discrete events of the underlying system to a level where the events can be considered to be part of a continuous flow. As an example, the manufacture of individual products will be treated as a flow of products over time. Continuous simulations use integration with respect to time to represent the development of systems. With Studio 2001 Powersim introduces accumulation in addition to integration. In contrast, accumulation is used exclusively in spreadsheet models, as spreadsheets cannot integrate. Accumulation means that values are added to or subtracted from state variables. Below we will first deal with continuous systems, and how they can be used to represent discrete processes through a number of workarounds. Then we will describe how discrete parts of a system can be modeled using flows that accumulate as opposed to integrate. Finally, we will take a look at logical states and how they can be set, cleared and remembered using logical levels and flows. Table of Contents Continuous, discrete, and logical flows Integration expresses continuous flows Accumulation expresses discrete, numerical flows Logical states and flows Using continuous flows to represent discreteness TIMESTEP can be used to mimic discrete behavior Adding a quantity to a level Setting the value of a level Avoding a level going negative Drawbacks of using continuous flows on discrete phenomena Using discrete, numerical flows Modeling bank account using immediate discrete flow Assigning servers to clients using immediate numerical flows Using logical flows Controlling the level in a water tank using logical flows Continuous, discrete, and logical flows Powersim Studio supports three kinds of flows, namely integration, accumulation and switch logic. Integration is only supported for continuous data types, i.e., real and complex numbers. Accumulation is supported only by numerical data types, i.e., real, complex and integer. Switch logic is only supported by the logical data type. The choice of flow type is determined by the data type of the variables involved and the integration order setting for the variable. Available combinations are summarized below. Order Real Complex Integer Logical >0 Integration 0 Accumulation Switch logic In the following paragraphs we will define each of the flow types, and how they update the values of levels during simulation. Integration expresses continuous flows During simulation of a continuous system, levels are computed using numerical integration over time. A level L with a net flow F represents the following development over time:

2 The simulation is advanced one time step at the time, so the integration is divided into steps, and the result of one step is used to compute the following step. As an example, the value of the level L at time t+dt is equal to the value at time t plus the integral of the net flows from t to t+dt, where Dt is the time step of the simulation: The integration of a flow over one time step is approximated according to the integration settings of the simulation model. The simplest setting is the first-order (Euler) integration with fixed time step. More accurate accurate simulation results can be achieved by using one of the higher-order integration methods such as Runge-Kutta (although this will slow the simulation down as more calculations are required). The time step can be fixed or variable. If the time step is variable, the integration process will subdivide the integration interval further in order to keep the integration error within limits specified by the modeler. Integration is only possible on continuos data types, such as real numbers. If a variable is used to hold the index of an array element, for example, the variable should be defined as an integer. Integers can only take on values that are whole numbers, such as -2, -1, 0, 1, 2, etc. Integers do not integrate. This can be seen from the integration formula above. If first-order integration is used, the value of a level L at time t+ t is equal to the following: L t+ t + F t t where t is the time step of the simulation (TIMESTEP). The time step is a real number that does logically not belong to the model, but to the integration setting of the simulation engine. We cannot assume that the TIMESTEP (Dt) is 1 or any other integer value. On the contrary, the time step is typically a positive number that is less than one. This means that the value of the flow will typically be a real number, and not an integer. A variable of integer type cannot be incremented with a real value, as the result will not be of integer type. For example: TIME t L F F* t Comment t Both L and F are integers. t + t L is no longer an integer. The above example indicates that it is quite difficult to ensure that a level takes on integer values only. Powersim's support for zero order integration solves this problem, and also opens up many other interesting possibilities that can be used both for discrete (integer) and continuous (real and complex) data. Accumulation expresses discrete, numerical flows As described above, integration cannot be applied to integer values. But this is only one of the reasons for introducing accumulation in addition to integration to the simulation language. There are many situations where we need to model transactions that take place as events in time. Examples include deposits of money into a bank account, accrual of interest, batch processes, and transport by train, ship, or truck Accumulation can be expressed quite easily as a sum. As for the numerical integration, the accumulation process is split up into time steps, where the value of one time step is used to find the value for the next step: With accumulation, the unit of measure is the same for the flow and the level, as we do not multiply the flow with the time step. Furthermore, accumulation is defined both for discrete and continuous numbers. This means that we can now represent integer in addition to real and complex levels. Accumulation takes place only between time steps. This means that accumulation is not affected by higher order integration settings and variable time step. Studio allows values to accumulate either at the end of each time step, or at the beginning. Both forms are described below:

3 L t + t + F t L t + t + F t + t // delayed discrete numerical flow // immediate discrete numerical flow Logical states and flows Logical (or Boolean) values are used in most models. Traditionally, modeling software has used real numbers to represent logical values such as true and false. This solution puts a lot of responsibility on the modeler, as the rules for logical operations differ significantly from those for algebraic operations. Powersim Studio provides a logical data type that can be used for variables. Powersim's logical variables have a three-state logic. This means that there are three possible logical states; true, false and indefinite. The third value, indefinite, means "I do not know". The indefinite value is typically the result of a comparison operation that involves invalid numbers. Here are some examples: A B A<B Comment 1 2 TRUE FALSE INFINITY FALSE +INFINITY is the result of 1.0/0.0 (example). 39 NAN INDEFINITE The result of LN(0) is NAN (example). +INFINITY +INFINITY INDEFINITE We do not know which "INFINITY" is the bigger one. -INFINITY +INFINITY TRUE -INFINITY is clearly less than +INFINITY The three-state logic is very helpful in the quality assurance process of models, as all functions and operators that take logical inputs or produce logical results, deal separately with each of the three logical states. This means that numerical errors will typically propagate through the system, and show up as NAN values (for numbers) and INDEFINITE values (for logical variables). This makes it possible for the modeler to trace back through the dependency chain to find the source of an invalid operation. As an example, Studil's IF function has four arguments, the last one being optional. The expression IF(Condition, 1, 0) will return 1 if Condition is TRUE and 0 if Condition is FALSE. If Condition is INDEFINITE the returned value will be NAN (the default value). If you want something else to be returned in this case, you can add an extra parameter to the IF function, like this: IF(Condition, 1, 0, 0.5) Sometimes a simulation has to remember a logical value. The easiest way to remember data in a simulation is to use a level for that variable. In modeling software without explicit support for logical values, we would simply represent the logical value using a normal level. It is quite easy to introduce mistakes in a model using such an approach. Logical values do not integrate. Logical values do not even accumulate. This means that the formulas that we have provided for integration and accumulation cannot be used for logical values. L t + t + F t t // Integration is invalid for logical values L t + t + F t // Accumulation is invalid for logical values This means that the processes that we have defined for updating levels cannot be used within the logical domain. As an example, let us assume that a level B is used to represent a logical value. It is quite common to use the value zero (0) to represent false, and one (1) to represent true. In order to set B to true, we need to feed a value of one into B. In order to set B to false, we need to extract a value of one out of B. Here several things can go wrong. What if we feed something into B when it already has a value of 1 (true)? What if we take out a value of 1 (true) from B when it is already 0 (false)? Unless the modeler takes extreme care in writing the equations for managing logic through numerical operations, errors can easily get introduced. Studio 2001 introduces support logical levels and logical flows. Since plus and minus are not defined in the logical domain, we need to find other ways to define such flows. A logical level can be looked upon as a switch that remembers its current state. The switch can be set to its "on" state through an in-flow that with a value equal to TRUE. If the switch is already on, its value will remain TRUE, regardless of the value of the inflow. In order to swtich the level "off", we use an outflow with a value of TRUE. A level that is already FALSE, will remain false, regardless of the value of any outflow. From this explanation we see that logical states do not accumulate, and they do not conserve mass either. This makes sense, as logical values do not belong to the physical domain, where conservation of mass is important. Logical values carry information, and they can be created, shared, and transferred freely. As an example, you can share information with others without losing the information yourself. And if you already have a given piece of information, you do not get anything extra if somebody gives the same information to you again.

4 Below, we have defined the meaning of logical flows on a logical level: L t+ t O t I t where means NOT, means AND, and means OR. Here L is the level variable, and O the union of all outflows and I the union of all inflows. The above is the definition of delayed logical flows. Immediate logical flows are defined like this: L t+dt O t+dt I t+dt A logical flow is always a discrete flow. You can think about an inflow with a value of TRUE as a hand that pushes the level's state to the TRUE (on) position. Correspondingly you can think of an outflow with a value of TRUE as a hand that pulls the level's state to the FALSE (off) position. A FALSE flow does not change the state of associated levels. In order to take INDEFINITE values into account, we can simply use the semantics of the logical operators NOT, OR, and AND and our equation for logical levels to find the effect on a logical flow structure. The table below lists all the possible combinations of values for (the union of) inflows, the (unions of) outflows and a level. Union of inflows Old state of level Union of outflows New state of level Comment TRUE any any TRUE Switch ON INDEFINITE TRUE FALSE TRUE INDEFINITE TRUE TRUE, INDEFINITE INDEFINITE INDEFINITE FALSE, INDEFINITE any INDEFINITE FALSE TRUE, INDEFINITE INDEFINITE INDEFINITE FALSE FALSE INDEFINITE FALSE FALSE any TRUE FALSE Switch OFF FALSE L FALSE L (unchanged) Left unchanged All in all, the above table covers 3x3x3=27 different cases. The comment column describes the three most common situations, which are to switch a level on (TRUE), off (FALSE), or just leave it unchanged. Using continuous flows to represent discreteness If you are already familiar with modeling, this section will show you the kinds of things that you can do more elegantly using Studio's discrete functionality. For readers who are new to modeling, this section explains why discrete functionality is so useful in many models. In the real world each separate product is an individual object that goes through a production process and gets completed at a given point in time. Aggregation of individual objects into masses or quantities that can be stored in state variables (levels) and moved through flows is helpful in reducing the complexity of simulation models. In order to reduce the time and effort it takes to develop, analyze and maintain a simulation model, we should always seek to represent groups of objects rather than individual items, and average attributes instead of individual object properties. There are, however, situations where we need to capture individual events that take place in a model. In a system that supports only continuous flows, we need to use workarounds in order to find ways to express discreteness. One way of doing this is to make explicit use of the TIMESTEP of the simulation. Another solution is to use some of the built-in functions that make implicit use of TIMESTEP, such as PULSE. TIMESTEP can be used to mimic discrete behavior A simulation will run faster with larger time steps, but smaller time steps normally produce the most accurate results. If the time step is set too small, the simulation advances more slowly and results can also become inaccurate due to accumulation of many tiny numerical errors. With a time step that is too large, the system behavior may start to oscillate or diverge because of inaccuracies in the integration process. This can lead to wrong conclusions about system characteristics. Therefore you should always run your model with different time steps in order to find the best tradeoff between accuracy and simulation time. For this reason a model should not rely on a particular choice of time step in order to produce the correct results. Explicit use of TIMESTEP within model equations is in general not good modeling practice, and must only be done with great

5 care. The discrete data types and flows of Powersim Studio make it possible to avoid explicit use of TIMESTEP altogether, as we will explain below. But first, let us look at how TIMESTEP is used with continuous flows to represent discreteness. Adding a quantity to a level The first example covers a situation where we want a quantity Q to flow into a level L during the next time step. If we assume that L has only one flow, we can express the value of L at time t+dt like this: In other words, the value of L t+ t is equal to Lt plus the integral of R between t and t + t. If we assume first order integration and a fixed time step, we can express the integral as R*TIMESTEP. If we now define R equal to Q/TIMESTEP, the level will receive the quantity Q during the time step: L t + R*TIMESTEP // Assuming first order integration + (Q/TIMESTEP)*TIMESTEP + Q The above solution has several weaknesses. First of all, it works only with first-order integration (Euler) and a fixed time step. If the model uses reservoirs, each time step may be integrated using several intermediate steps. To fix this problem, the EULER function can be used on the rate, like this: flow L = +dt*r aux R = EULER(Q/TIMESTEP) Another weakness is the readability of the equation for R. A third weakness relates to input and output of values. If we output the value of R, we will see a result that depends on the time step. If Q has the value of 100, for example, and the time step is 0.5, R will display a value of 200. For this reason, some modelers tend to use a time step of one. This is bad practice, however, as we should always be free to change the time step of a model. If we make proper use of units for time, it is not possible to use a time step of 1 unless we also provide a measurement unit, for example day or month. Setting the value of a level Sometimes a level is used to represent a logical state or it can be an index into an array. In such situations we need to be able to set the value of the level much as in an assign statement of a programming language like Visual Basic. Let us take the example where a level S is used to keep an index for an array A. At a given point in time we want to assign the index K to the level. This can be done like this: flow S = +dt*setk -dt*clears aux SetK = EULER(K/TIMESTEP) aux ClearS = IF(SetK <> 0, EULER(S/TIMESTEP), 0) The above statements do nothing if K is zero. If K is unequal to zero, we remove the old value of S through the outflow ClearS, and we insert the new value through the inflow SetK. We can use substitution to see that the value of S changes to K after the execution of one time step: S := S + SetK*TIMESTEP - ClearS*TIMESTEP = S + K/TIMESTEP*TIMESTEP - S/TIMESTEP*TIMESTEP = S + K - S = K The above solution will work only if we use first-order integration and a fixed time step. The reason for this is that if the integration is subdivided into smaller intervals within one time step, the value of S will neither be equal to the old value S(T) or the new value K(T) for times within the interval. Below is an example where the time step is divided into two sub-steps: Time S K Netflow of S T T + ½ T T + T 11 We see that after the step is completed, S has the correct value, but in the middle of the step we have an intermediate value for S as well. If S is used to index an array, the result will be undefined in the middle of the

6 time step. As always, a workaround is possible; we can use EULER around S whenever S is used to index an array: aux E = LOOKUP(A, INTEGER(EULER(S))) The built-in function INTEGER is used to convert S into the right type for the second argument to LOOKUP, and LOOKUP(A,S) obtains the value of element number S of the array A. Avoiding a level going negative Another common use of TIMESTEP is to ensure that a level does not get emptied below zero. Again, we use the simplified assumption that a flow during a time step is equal to the rate times the time step. Below is an example where a level L is emptied using a constant outflow C until the level is empty: flow L = -dt*r aux R = EULER(MIN(C, L*TIMESTEP)) const C =... // the constant outflow of L The above flow rate definition of R has the limitation that it does not work correctly if L has other flows, which is typically the case. In order to fix this problem, the other flows of L must be taken into the definition of R, like this: aux R = EULER(MIN(C, L*TIMESTEP + INFLOWS - OUTFLOWS)) In Powersim Studio we can simply make L into a reservoir, and write the equation for R like this: aux R = IF(L > 0, C, 0) If L has other inflows and outflows, they should be included as above in the definition of R. Above we have described how to move a given quantity, Q, into a level during one time step using TIMESTEP. Here is how this can be done using the PULSEIF function. flow L = +dt*r aux R = PULSEIF(TRUE,Q) The above definition of R is equivalent to: aux R = IF(TRUE, EULER(Q/TIMESTEP, 0)) Drawbacks of using continuous flows on discrete phenomena The examples in the previous section illustrate how continuous flows can be used to add a quantity to a level and to assign a value to a level. The solutions involve the use of TIMESTEP and EULER directly or indirectly through functions like PULSE and PULSEIF. Below is a summary of the drawbacks relating to the workarounds that must be used when expressing discrete variables and flows using continuous modeling constructs. 1. Model readability-the use of TIMESTEP, EULER and similar functions reduce the readability of equations. 2. Model correctness-when a real number is used to represent an integer variable, such as an array index, the modeling software cannot ensure that the value of the variable will always be an integer. It is up to the modeler to place the necessary logic into the model, and perform the necessary tests to ensure that the model never produces non-integer values for such variables. 3. Input/output readability-when a flow that is discrete in nature gets represented as a continuous rate, the value of the rate will be displayed with a different unit and value than the discrete value it represents. As an example, a quantity of 12 will be displayed as 120 if the time step is Choice of time step-models that do not include TIMESTEP in the right places will only work with a time step of 1 (one). This makes it very difficult to verify that the model does not produce results with significant numerical integration errors. (Since testing for numerical integration error requires change of time step.) 5. Choice of integration-models that do not include EULER and TIMESTEP at the right places will only work with Euler integration (first order). Higher order integration and variable step integration implies that the time step will be subdivided into smaller steps during simulation. Studio's reservoir setting also implies that the model must use TIMESTEP and EULER correctly for all variables. The discrete features of Powersim Studio address all of the above problems. 1. Model readability is enhanced as discreteness can be expressed directly, without the use of TIMESTEP, PULSE, EULER, etc. The unit consistency checking of Studio will automatically produce an error in places where a flow does not have the correct unit compared to the associated levels. Such errors may stem from the wrong use of the TIMESTEP function.

7 2. Studio supports integers as well as real numbers. If you define a variable as an integer, Studio ensures that the variable will never take on values outside the integer domain. 3. Discrete flows in Studio display the correct value for the flow rate. I.e., the value is not divided by the time step of the integration. 4. The integration settings for variables in Studio make it straightforward to create models that will not depend on the choice of time step. 5. In Studio it is quite easy to create a model that will run using higher order integration and variable time steps. Using discrete, numerical flows A discrete, numerical flow is an accumulating flow. Accumulation means that values will be subtracted from the level at the tail end of the flow and added to the level at the head of the flow. Studio supports two kinds of discrete, numerical flows; the delayed and the immediate discrete flow. The delayed flow is accumulated at the end of each time step, while the immediate flow is accumulated when the time step is entered. Below the mathematical definitions are given: L t+ t + F t // delayed discrete numerical flow L t+ t + t + F t+ t // immediate discrete numerical flow Discrete flows are not accumulated during intermediate steps of higher order integration. The delayed discrete flow is added to the level before entering a new time step. The immediate discrete flow is computed when the simulation has entered a new step, and added to the level right away. Below are some examples of how this can be used to ease modeling. Modeling a bank account using immediate discrete flows If you try to represent flows using a spreadsheet, you will only be able to work with addition and subtraction, i.e., discrete flows. Let us look at an example where a bank account accumulates interest over a number of periods. If the initial amount is DEM 100 and the interest rate is 7% p.a. the account develops like this: The formulas used to define the "flow" of interest into the account are displayed below: A typical (but incorrect) SD model of the above system is the following: The model equations are show below:

8 level Account = 100<<DEM>> + dt*interest aux Interest = Account * 'Interest rate' const 'Interest rate' = 7<<%/yr>> The problem with this model is that it works only for a time step of one year. If we reduce the time step to 1 day, for example, the compounding of interest will take place every day instead of every year. We can see the error by making two runs of the model, one with a time step of one year, and another with time step of one day. Over a period of six years the accumulated error is 1.41%. In this example the error is relatively small. However, sometimes we need to produce 100% accurate results, in particular when it comes to financial models. It is not easy to build an exact bank account model using continuous flows. If we use discrete flows, however, the situation becomes much easier, as explained below. In the above model we accumulate interest earned into an intermediate level variable, and add the interest to the account only once every period (year). The dotted flow line indicates a discrete flow. The definitions look like this: const 'Interest rate' = 7<<%/yr>> aux Interest = Account * 'Interest rate' level 'Accrued interest' = 0<<DEM>> + dt*interest - 'Accrue interest' aux 'Accrue interest' = IF(TIMEIS(DATE(YEAR(TIME))), 'Accrued interest',0<<dem>>) level Account = 100<<DEM>> + 'Accrue interest' The integration settings for 'Accrue interest' is zero order immediate. This means that the flow accumulates at the beginning of each new time step. The above model will work for any time step that is not bigger than the accrual period of one year. The time step should preferably be a fractin of one year. Typical time step settings for financial models are day, week, month, quarter and year. If you want to take leap years into account, you should use the Gregorian calendar setting, and select one day as time step. (Month, quarter and year are not defined units when Gregiorian calendar is selected.) The interested reader should develop a correct bank account model using only continuous flows in order to see how messy the diagram will look compared to the version that makes use of a discrete flow. Assigning servers to clients using immediate discrete, numerical flows A a client server system is an example of a model that can be built easily using arrays. The need for discrete levels (integers) and flows come in if you need to keep track of which server serves a particular user. In this example we assume that a number of users need to have a piece of work done by a server. There are several equivalent servers, who can serve any of the requesting users. However, only one server can serve a given user at the time, and a user can only be served by one server at the time. The diagram below illustrates how this can be modeled.

9 Variable Dimension Data type Explanation Available Servers servers LOGICAL Is the server free? Idx Available Servers INTEGER Index of the first free server. Requesting User users LOGICAL Does user 'u' need a server? Idx Requesting User INTEGER Index of first requesting user. Begin Served users INTEGER Index of server beginning to work for user 'u'. Served By users INTEGER Index of server working for user 'u'. End Served users INTEGER Index of server stopping to work for user 'u'. Remaining Work users REAL Amount of work (time) left to do for user 'u'. Do work users REAL Rate of work done. Value is 1. Initial Work REAL Amount of work (time) to do for each user. The interesting part of the model is the flow of server index numbers into and out of the level Served by. The definitions of this level and its flows are the following: level 'Served by' = 0 + 'Begin served' - 'End served' aux 'Begin served' = FOR(u=users IF(NUMERICAL(u) = 'Idx requesting user', 'Idx available server', 0 ) // End IF ) // End FOR aux 'End served' = FOR(u=users IF('Remaining work'[u] <= 0<<da>>, 'Served by'[u], 0 ) // End IF ) // End FOR The two auxiliaries above both have zero order integration settings. Finding the index of the (first) requesting user and the (first) available server is done like this: aux 'Idx available server' = SCANEQ('Available servers',true) aux 'Idx requesting user' = SCANEQ('Requesting users',true) The implementation makes use of the fact that SCANEQ returns zero (0) if it cannot find an element with the requested value (second parameter) in the given array (first parameter). The remaining variables are defined like this. aux 'Available servers' = FOR(s=servers SCANEQ('Served by',numerical(s)) = 0) aux 'Requesting users' = FOR(u=users 'Remaining work'[u]>0<<da>> AND 'Served by'[u]=0) const 'Initial work' = 14.2<<da>> level 'Remaining work' = 'Initial work' - dt*'do work'

10 aux 'Do work' = IF('Served by'>0 AND 'Remaining work'>0<<da>>, 1<<da/da>>, 0) The level 'Remaining work' has a reservoir setting, so it does not go below zero. This way we can use the very simple definition of 'Do work'; as long as we have a server and there is remaining work to do, perform one unit of work per time unit. (1<<da/da>> is equivalent to writing just 1.) Using logical flows A logical flow is always discrete, as it works on a discrete data type Logical. As explained above, logical values cannot be integrated, and they cannot be accumulated either. Integration is impossible since multiplication of a logical and a real value is not defined. What does TRUE*0.5 mean, for example? Accumulation is impossible since plus and minus are undefined for logical values. What is TRUE+TRUE, for example? Is it very true? We have also explained that logical flows do not conserve mass. This characteristic of logical flows comes as a natural consequence of the fact that truth-values cannot be added. This leads to the special meaning of logical states (levels) and flows, as they are based on operations of the logical value domain, as opposed to the numerical domain. The numerical domain defines operations such as multiplication, addition, division and subtraction of numbers. In the logical domain we have operators such as AND, OR, and NOT working on the logical values TRUE, FALSE and INDEFINITE. The comparison operators such as less than (<) and equal to (=) take inputs from the numerical domain, and produces outputs in the logical domain. As an example, the expression 12 < 14 produces the logical result value TRUE. Studio supports two kinds of logical flows; a delayed and an immediate variant, defined like this: L t+ t O t I t // Delayed logical flow L t+dt O t+dt I t+dt // Immediate logical flow Logical flows are not computed during intermediate steps of higher order integration. The delayed flow is computed and used to update associated levels before entering a new time step. The immediate flow is computed when the simulation has entered a new step, and used to update the associated levels right away. The following section contains an example of how logical flows can be used in a simulation model. Controlling the level in a water tank using logical flows Note! Before you create the model described below, be sure to add the unit 'l' (liter) under Global Units. (Right-click inside the view, and select l - liter on the Add Standard Unit submenu.) This example is a model of a water tank system, with a regulator installed that keeps the level of water between a high and a low limit. These are set to 30l and 20l respectively. Water is drained from the tank at a constant rate. When the level of water in the tank drops below the low limit, the regulator will open a water tap, and water starts to flow into the tank. As long as the water tap is open, the level of water increases until the desired high limit is reached, in which case the regulator closes the tap. The diagram below shows the structure of such a system. The top part of the model represents the flow of water in and out of the water tank. The inflow adds water to the tank when the tap is open. The outflow transports water out of the tank at a constant rate. level 'Water Tank' = 100<<l>> + dt*'water Tap Rate' - dt*'water Drain Rate' const 'Water Drain Rate' = 15<<l/hr>> Red color is used for logical variables. The two switches have zero order immediate integration setting, which is indicated by the dotted flow lines. The water tap is switched open when the level of water in the tank is below or equal to the lowest acceptable level. Correspondingly, the water tap is closed when the level of water in the tank is over or equal to the highest acceptable level. The equations are given below. Note how easy it is to

11 express the logic of the system, and to verify that it is correct. level 'Water Tap Is Open' = FALSE + 'Open Tap' - 'Close Tap' const 'Tank Lowest Level' = 80<<l>> const 'Tank Highest Level' = 120<<l>> aux 'Open Tap' = ('Water Tank' <= 'Tank Lowest Level') aux 'Close Tap' = ('Tank Highest Level' <= 'Water Tank') Finally, the auxiliary Water Tap Rate represents the water being filled into the tank. The variable is dependent on the state of the water tap, and its definition is given below: aux 'Water Tap Rate' = IF('Water Tap Is Open', 40<<l/hr>>, 0<<l/hr>>) The time graph below displays how the water level in the tank develops over time. Note Observe how the water level oscillates between the low and high settings. In Industrial Dynamics (1961) Forrester argues: "At times it [discreteness] will become significant. For example, it may create a disturbance that will cause system fluctuations that can be mistakenly interpreted as externally generated cycles (such as where annual design changes, or summer employee vacation, or yearly budgeting procedures create effects that resemble a seasonal demand in consumer sales). When a model has progressed to the point where such refinements are justified, and there is reason to believe that discreteness has a significant influence on behavior, discontinuous variables should be explored to determine their effect on the model." (Back to top...)

Divisibility Rules and Their Explanations

Divisibility Rules and Their Explanations Divisibility Rules and Their Explanations Increase Your Number Sense These divisibility rules apply to determining the divisibility of a positive integer (1, 2, 3, ) by another positive integer or 0 (although

More information

6.001 Notes: Section 6.1

6.001 Notes: Section 6.1 6.001 Notes: Section 6.1 Slide 6.1.1 When we first starting talking about Scheme expressions, you may recall we said that (almost) every Scheme expression had three components, a syntax (legal ways of

More information

EC121 Mathematical Techniques A Revision Notes

EC121 Mathematical Techniques A Revision Notes EC Mathematical Techniques A Revision Notes EC Mathematical Techniques A Revision Notes Mathematical Techniques A begins with two weeks of intensive revision of basic arithmetic and algebra, to the level

More information

Hardware versus software

Hardware versus software Logic 1 Hardware versus software 2 In hardware such as chip design or architecture, designs are usually proven to be correct using proof tools In software, a program is very rarely proved correct Why?

More information

Math 340 Fall 2014, Victor Matveev. Binary system, round-off errors, loss of significance, and double precision accuracy.

Math 340 Fall 2014, Victor Matveev. Binary system, round-off errors, loss of significance, and double precision accuracy. Math 340 Fall 2014, Victor Matveev Binary system, round-off errors, loss of significance, and double precision accuracy. 1. Bits and the binary number system A bit is one digit in a binary representation

More information

MATH2071: LAB 2: Explicit ODE methods

MATH2071: LAB 2: Explicit ODE methods MATH2071: LAB 2: Explicit ODE methods 1 Introduction Introduction Exercise 1 Euler s method review Exercise 2 The Euler Halfstep (RK2) Method Exercise 3 Runge-Kutta Methods Exercise 4 The Midpoint Method

More information

Algebra 2 Common Core Summer Skills Packet

Algebra 2 Common Core Summer Skills Packet Algebra 2 Common Core Summer Skills Packet Our Purpose: Completion of this packet over the summer before beginning Algebra 2 will be of great value to helping students successfully meet the academic challenges

More information

6.001 Notes: Section 15.1

6.001 Notes: Section 15.1 6.001 Notes: Section 15.1 Slide 15.1.1 Our goal over the next few lectures is to build an interpreter, which in a very basic sense is the ultimate in programming, since doing so will allow us to define

More information

Physics Tutorial 2: Numerical Integration Methods

Physics Tutorial 2: Numerical Integration Methods Physics Tutorial 2: Numerical Integration Methods Summary The concept of numerically solving differential equations is explained, and applied to real time gaming simulation. Some objects are moved in a

More information

Topic 3: Fractions. Topic 1 Integers. Topic 2 Decimals. Topic 3 Fractions. Topic 4 Ratios. Topic 5 Percentages. Topic 6 Algebra

Topic 3: Fractions. Topic 1 Integers. Topic 2 Decimals. Topic 3 Fractions. Topic 4 Ratios. Topic 5 Percentages. Topic 6 Algebra Topic : Fractions Topic Integers Topic Decimals Topic Fractions Topic Ratios Topic Percentages Duration / weeks Content Outline PART (/ week) Introduction Converting Fractions to Decimals Converting Decimals

More information

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #06 Loops: Operators

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #06 Loops: Operators Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #06 Loops: Operators We have seen comparison operators, like less then, equal to, less than or equal. to and

More information

6.001 Notes: Section 4.1

6.001 Notes: Section 4.1 6.001 Notes: Section 4.1 Slide 4.1.1 In this lecture, we are going to take a careful look at the kinds of procedures we can build. We will first go back to look very carefully at the substitution model,

More information

Bar Graphs and Dot Plots

Bar Graphs and Dot Plots CONDENSED LESSON 1.1 Bar Graphs and Dot Plots In this lesson you will interpret and create a variety of graphs find some summary values for a data set draw conclusions about a data set based on graphs

More information

2. In Video #6, we used Power Query to append multiple Text Files into a single Proper Data Set:

2. In Video #6, we used Power Query to append multiple Text Files into a single Proper Data Set: Data Analysis & Business Intelligence Made Easy with Excel Power Tools Excel Data Analysis Basics = E-DAB Notes for Video: E-DAB 07: Excel Data Analysis & BI Basics: Data Modeling: Excel Formulas, Power

More information

Functional Programming in Haskell Prof. Madhavan Mukund and S. P. Suresh Chennai Mathematical Institute

Functional Programming in Haskell Prof. Madhavan Mukund and S. P. Suresh Chennai Mathematical Institute Functional Programming in Haskell Prof. Madhavan Mukund and S. P. Suresh Chennai Mathematical Institute Module # 02 Lecture - 03 Characters and Strings So, let us turn our attention to a data type we have

More information

Multiply Decimals Multiply # s, Ignore Decimals, Count # of Decimals, Place in Product from right counting in to left

Multiply Decimals Multiply # s, Ignore Decimals, Count # of Decimals, Place in Product from right counting in to left Multiply Decimals Multiply # s, Ignore Decimals, Count # of Decimals, Place in Product from right counting in to left Dividing Decimals Quotient (answer to prob), Dividend (the # being subdivided) & Divisor

More information

Programming with Python

Programming with Python Programming with Python Dr Ben Dudson Department of Physics, University of York 21st January 2011 http://www-users.york.ac.uk/ bd512/teaching.shtml Dr Ben Dudson Introduction to Programming - Lecture 2

More information

9-1: Slope NAME: 1. What do you think is meant by the terms rise and run?

9-1: Slope NAME: 1. What do you think is meant by the terms rise and run? 9-1: Slope NAME: CUES: PER: DATE: 1. What do you think is meant by the terms rise and run? 2. What is the vertical change between: a. points A and B? b. points A and C? c. points C and D? 3. What is the

More information

(Refer Slide Time: 00:02:02)

(Refer Slide Time: 00:02:02) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 20 Clipping: Lines and Polygons Hello and welcome everybody to the lecture

More information

MAT 003 Brian Killough s Instructor Notes Saint Leo University

MAT 003 Brian Killough s Instructor Notes Saint Leo University MAT 003 Brian Killough s Instructor Notes Saint Leo University Success in online courses requires self-motivation and discipline. It is anticipated that students will read the textbook and complete sample

More information

Fundamentals. Fundamentals. Fundamentals. We build up instructions from three types of materials

Fundamentals. Fundamentals. Fundamentals. We build up instructions from three types of materials Fundamentals We build up instructions from three types of materials Constants Expressions Fundamentals Constants are just that, they are values that don t change as our macros are executing Fundamentals

More information

!"!!!"!!"!! = 10!!!!!(!!) = 10! = 1,000,000

!!!!!!!! = 10!!!!!(!!) = 10! = 1,000,000 Math Review for AP Chemistry The following is a brief review of some of the math you should remember from your past. This is meant to jog your memory and not to teach you something new. If you find you

More information

Basics of Computational Geometry

Basics of Computational Geometry Basics of Computational Geometry Nadeem Mohsin October 12, 2013 1 Contents This handout covers the basic concepts of computational geometry. Rather than exhaustively covering all the algorithms, it deals

More information

Excel Forecasting Tools Review

Excel Forecasting Tools Review Excel Forecasting Tools Review Duke MBA Computer Preparation Excel Forecasting Tools Review Focus The focus of this assignment is on four Excel 2003 forecasting tools: The Data Table, the Scenario Manager,

More information

EDIT202 Spreadsheet Lab Prep Sheet

EDIT202 Spreadsheet Lab Prep Sheet EDIT202 Spreadsheet Lab Prep Sheet While it is clear to see how a spreadsheet may be used in a classroom to aid a teacher in marking (as your lab will clearly indicate), it should be noted that spreadsheets

More information

Chapter 3: Operators, Expressions and Type Conversion

Chapter 3: Operators, Expressions and Type Conversion 101 Chapter 3 Operators, Expressions and Type Conversion Chapter 3: Operators, Expressions and Type Conversion Objectives To use basic arithmetic operators. To use increment and decrement operators. To

More information

Mathematically Rigorous Software Design Review of mathematical prerequisites

Mathematically Rigorous Software Design Review of mathematical prerequisites Mathematically Rigorous Software Design 2002 September 27 Part 1: Boolean algebra 1. Define the Boolean functions and, or, not, implication ( ), equivalence ( ) and equals (=) by truth tables. 2. In an

More information

Section 1.1 Patterns in Division

Section 1.1 Patterns in Division Section 1.1 Patterns in Division Divisibility refers to whether or not a number is divisible by another number. If a number divides evenly into another number (no remainder), then it is divisible by that

More information

Table : IEEE Single Format ± a a 2 a 3 :::a 8 b b 2 b 3 :::b 23 If exponent bitstring a :::a 8 is Then numerical value represented is ( ) 2 = (

Table : IEEE Single Format ± a a 2 a 3 :::a 8 b b 2 b 3 :::b 23 If exponent bitstring a :::a 8 is Then numerical value represented is ( ) 2 = ( Floating Point Numbers in Java by Michael L. Overton Virtually all modern computers follow the IEEE 2 floating point standard in their representation of floating point numbers. The Java programming language

More information

Lesson 2b Functions and Function Operations

Lesson 2b Functions and Function Operations As we continue to work with more complex functions it is important that we are comfortable with Function Notation, opertions on Functions and opertions involving more than one function. In this lesson,

More information

Chapter 1 Operations With Numbers

Chapter 1 Operations With Numbers Chapter 1 Operations With Numbers Part I Negative Numbers You may already know what negative numbers are, but even if you don t, then you have probably seen them several times over the past few days. If

More information

Handout 9: Imperative Programs and State

Handout 9: Imperative Programs and State 06-02552 Princ. of Progr. Languages (and Extended ) The University of Birmingham Spring Semester 2016-17 School of Computer Science c Uday Reddy2016-17 Handout 9: Imperative Programs and State Imperative

More information

Section 1.1 Definitions and Properties

Section 1.1 Definitions and Properties Section 1.1 Definitions and Properties Objectives In this section, you will learn to: To successfully complete this section, you need to understand: Abbreviate repeated addition using Exponents and Square

More information

Difference Between Dates Case Study 2002 M. J. Clancy and M. C. Linn

Difference Between Dates Case Study 2002 M. J. Clancy and M. C. Linn Difference Between Dates Case Study 2002 M. J. Clancy and M. C. Linn Problem Write and test a Scheme program to compute how many days are spanned by two given days. The program will include a procedure

More information

General Ledger 3000 Reference Manual Prophet 21 FASPAC 4.2

General Ledger 3000 Reference Manual Prophet 21 FASPAC 4.2 General Ledger 3000 Reference Manual Prophet 21 FASPAC 4.2 Table of Contents INTRODUCTION 7 Getting Started 7 Account Numbers 8 AR and AR Transactions 8 Profit Centers and Financial Entities 9 Financial

More information

Information Science 1

Information Science 1 Information Science 1 Simple Calcula,ons Week 09 College of Information Science and Engineering Ritsumeikan University Topics covered l Terms and concepts from Week 8 l Simple calculations Documenting

More information

Chapter 0: Algebra II Review

Chapter 0: Algebra II Review Chapter 0: Algebra II Review Topic 1: Simplifying Polynomials & Exponential Expressions p. 2 - Homework: Worksheet Topic 2: Radical Expressions p. 32 - Homework: p. 45 #33-74 Even Topic 3: Factoring All

More information

Key concepts through Excel Basic videos 01 to 25

Key concepts through Excel Basic videos 01 to 25 Key concepts through Excel Basic videos 01 to 25 1) Row and Colum make up Cell 2) All Cells = Worksheet = Sheet 3) Name of Sheet is in Sheet Tab 4) All Worksheets = Workbook File 5) Default Alignment In

More information

Arithmetic and Bitwise Operations on Binary Data

Arithmetic and Bitwise Operations on Binary Data Arithmetic and Bitwise Operations on Binary Data CSCI 2400: Computer Architecture ECE 3217: Computer Architecture and Organization Instructor: David Ferry Slides adapted from Bryant & O Hallaron s slides

More information

STATISTICAL TECHNIQUES. Interpreting Basic Statistical Values

STATISTICAL TECHNIQUES. Interpreting Basic Statistical Values STATISTICAL TECHNIQUES Interpreting Basic Statistical Values INTERPRETING BASIC STATISTICAL VALUES Sample representative How would one represent the average or typical piece of information from a given

More information

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning Lecture 1 Contracts 15-122: Principles of Imperative Computation (Fall 2018) Frank Pfenning In these notes we review contracts, which we use to collectively denote function contracts, loop invariants,

More information

Excel Formulas and Functions

Excel Formulas and Functions Excel Formulas and Functions Formulas Relative cell references Absolute cell references Mixed cell references Naming a cell or range Naming constants Dates and times Natural-language formulas Functions

More information

Unit 7 Number System and Bases. 7.1 Number System. 7.2 Binary Numbers. 7.3 Adding and Subtracting Binary Numbers. 7.4 Multiplying Binary Numbers

Unit 7 Number System and Bases. 7.1 Number System. 7.2 Binary Numbers. 7.3 Adding and Subtracting Binary Numbers. 7.4 Multiplying Binary Numbers Contents STRAND B: Number Theory Unit 7 Number System and Bases Student Text Contents Section 7. Number System 7.2 Binary Numbers 7.3 Adding and Subtracting Binary Numbers 7.4 Multiplying Binary Numbers

More information

NON-CALCULATOR ARITHMETIC

NON-CALCULATOR ARITHMETIC Mathematics Revision Guides Non-Calculator Arithmetic Page 1 of 30 M.K. HOME TUITION Mathematics Revision Guides: Level: GCSE Foundation Tier NON-CALCULATOR ARITHMETIC Version: 3.2 Date: 21-10-2016 Mathematics

More information

Chapter 9 Data Analysis

Chapter 9 Data Analysis Calc Guide Chapter 9 Data Analysis Using Scenarios, Goal Seek, Solver, others Copyright This document is Copyright 2010-2012 by its contributors as listed below. You may distribute it and/or modify it

More information

Problem One: A Quick Algebra Review

Problem One: A Quick Algebra Review CS103A Winter 2019 Solutions for Week One Handout 01S Problem One: A Quick Algebra Review In the first week of CS103, we'll be doing a few proofs that will require some algebraic manipulations and reasoning

More information

Advanced Multidimensional Reporting

Advanced Multidimensional Reporting Guideline Advanced Multidimensional Reporting Product(s): IBM Cognos 8 Report Studio Area of Interest: Report Design Advanced Multidimensional Reporting 2 Copyright Copyright 2008 Cognos ULC (formerly

More information

Design and Analysis of Algorithms Prof. Madhavan Mukund Chennai Mathematical Institute. Week 02 Module 06 Lecture - 14 Merge Sort: Analysis

Design and Analysis of Algorithms Prof. Madhavan Mukund Chennai Mathematical Institute. Week 02 Module 06 Lecture - 14 Merge Sort: Analysis Design and Analysis of Algorithms Prof. Madhavan Mukund Chennai Mathematical Institute Week 02 Module 06 Lecture - 14 Merge Sort: Analysis So, we have seen how to use a divide and conquer strategy, we

More information

(Refer Slide Time 3:31)

(Refer Slide Time 3:31) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology Madras Lecture - 5 Logic Simplification In the last lecture we talked about logic functions

More information

Control Structures. Lecture 4 COP 3014 Fall September 18, 2017

Control Structures. Lecture 4 COP 3014 Fall September 18, 2017 Control Structures Lecture 4 COP 3014 Fall 2017 September 18, 2017 Control Flow Control flow refers to the specification of the order in which the individual statements, instructions or function calls

More information

RPL Data Types and Palette

RPL Data Types and Palette Technical Documentation Version 7.1 RPL Data Types and Palette CADSWES S Center for Advanced Decision Support for Water and Environmental Systems These documents are copyrighted by the Regents of the University

More information

DOWNLOAD PDF MICROSOFT EXCEL ALL FORMULAS LIST WITH EXAMPLES

DOWNLOAD PDF MICROSOFT EXCEL ALL FORMULAS LIST WITH EXAMPLES Chapter 1 : Examples of commonly used formulas - Office Support A collection of useful Excel formulas for sums and counts, dates and times, text manipularion, conditional formatting, percentages, Excel

More information

QUIZ. What is wrong with this code that uses default arguments?

QUIZ. What is wrong with this code that uses default arguments? QUIZ What is wrong with this code that uses default arguments? Solution The value of the default argument should be placed in either declaration or definition, not both! QUIZ What is wrong with this code

More information

Fourier Transforms and Signal Analysis

Fourier Transforms and Signal Analysis Fourier Transforms and Signal Analysis The Fourier transform analysis is one of the most useful ever developed in Physical and Analytical chemistry. Everyone knows that FTIR is based on it, but did one

More information

Section 0.3 The Order of Operations

Section 0.3 The Order of Operations Section 0.3 The Contents: Evaluating an Expression Grouping Symbols OPERATIONS The Distributive Property Answers Focus Exercises Let s be reminded of those operations seen thus far in the course: Operation

More information

Numerical Integration

Numerical Integration 1 Numerical Integration Jim Van Verth Insomniac Games jim@essentialmath.com Essential mathematics for games and interactive applications Talk Summary Going to talk about: Euler s method subject to errors

More information

Table of Contents. Oceanwide Bridge. User Guide - Calculated Fields. Version Version Bridge User Guide User Guide - Calculated Fields

Table of Contents. Oceanwide Bridge. User Guide - Calculated Fields. Version Version Bridge User Guide User Guide - Calculated Fields Table of Contents 1 Oceanwide Bridge User Guide - Calculated Fields Version 2.3.0 Table of Contents i Table of Contents TABLE OF CONTENTS... I INTRODUCTION... 1 Guide... 1 BUILDING FORMULAS... 2 Operators...

More information

Text Input and Conditionals

Text Input and Conditionals Text Input and Conditionals Text Input Many programs allow the user to enter information, like a username and password. Python makes taking input from the user seamless with a single line of code: input()

More information

Propositional Logic. Application of Propositional logic

Propositional Logic. Application of Propositional logic DISCRETE STRUCTURE Propositional Logic Application of Propositional logic Propositional logic is the study of propositions (true or false statements) and ways of combining them (logical operators) to

More information

6.001 Notes: Section 8.1

6.001 Notes: Section 8.1 6.001 Notes: Section 8.1 Slide 8.1.1 In this lecture we are going to introduce a new data type, specifically to deal with symbols. This may sound a bit odd, but if you step back, you may realize that everything

More information

Year 7 Unit 1 - number properties 1

Year 7 Unit 1 - number properties 1 Year 7 Unit 1 - number properties 1 Order whole numbers using a number line. Place integers and decimals in order of size. Multiply and divide integers and decimals by 10,100, 1000 and explain the effect.

More information

Mathematics. Name: Class: Transforming Life chances

Mathematics. Name: Class: Transforming Life chances Mathematics Name: Class: Transforming Life chances Children first- Aspire- Challenge- Achieve Aspire: To be the best I can be in everything that I try to do. To use the adults and resources available both

More information

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 GETTING STARTED PAGE 02 Prerequisites What You Will Learn MORE TASKS IN MICROSOFT EXCEL PAGE 03 Cutting, Copying, and Pasting Data Basic Formulas Filling Data

More information

1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM

1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM 1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM 1.1 Introduction Given that digital logic and memory devices are based on two electrical states (on and off), it is natural to use a number

More information

Week - 04 Lecture - 01 Merge Sort. (Refer Slide Time: 00:02)

Week - 04 Lecture - 01 Merge Sort. (Refer Slide Time: 00:02) Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 04 Lecture - 01 Merge Sort (Refer

More information

9. MATHEMATICIANS ARE FOND OF COLLECTIONS

9. MATHEMATICIANS ARE FOND OF COLLECTIONS get the complete book: http://wwwonemathematicalcatorg/getfulltextfullbookhtm 9 MATHEMATICIANS ARE FOND OF COLLECTIONS collections Collections are extremely important in life: when we group together objects

More information

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals

More information

Excel Tips. Contents. By Dick Evans

Excel Tips. Contents. By Dick Evans Excel Tips By Dick Evans Contents Pasting Data into an Excel Worksheet... 2 Divide by Zero Errors... 2 Creating a Dropdown List... 2 Using the Built In Dropdown List... 3 Entering Data with Forms... 4

More information

AXIOMS OF AN IMPERATIVE LANGUAGE PARTIAL CORRECTNESS WEAK AND STRONG CONDITIONS. THE AXIOM FOR nop

AXIOMS OF AN IMPERATIVE LANGUAGE PARTIAL CORRECTNESS WEAK AND STRONG CONDITIONS. THE AXIOM FOR nop AXIOMS OF AN IMPERATIVE LANGUAGE We will use the same language, with the same abstract syntax that we used for operational semantics. However, we will only be concerned with the commands, since the language

More information

Rational Number Operations on the Number Line

Rational Number Operations on the Number Line The Mathematics Enthusiast Volume 14 Number 1 Numbers 1, 2, & 3 Article 18 1-2017 Rational Number Operations on the Number Line Christopher Yakes Let us know how access to this document benefits you. Follow

More information

Program Planning, Data Comparisons, Strings

Program Planning, Data Comparisons, Strings Program Planning, Data Comparisons, Strings Program Planning Data Comparisons Strings Reading for this class: Dawson, Chapter 3 (p. 80 to end) and 4 Program Planning When you write your first programs,

More information

CS 115 Data Types and Arithmetic; Testing. Taken from notes by Dr. Neil Moore

CS 115 Data Types and Arithmetic; Testing. Taken from notes by Dr. Neil Moore CS 115 Data Types and Arithmetic; Testing Taken from notes by Dr. Neil Moore Statements A statement is the smallest unit of code that can be executed on its own. So far we ve seen simple statements: Assignment:

More information

2. You are required to enter a password of up to 100 characters. The characters must be lower ASCII, printing characters.

2. You are required to enter a password of up to 100 characters. The characters must be lower ASCII, printing characters. BLACK BOX SOFTWARE TESTING SPRING 2005 DOMAIN TESTING LAB PROJECT -- GRADING NOTES For all of the cases below, do the traditional equivalence class and boundary analysis. Draw one table and use a new line

More information

An interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s.

An interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s. Using Monte Carlo to Estimate π using Buffon s Needle Problem An interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s. Here s the problem (in a simplified form). Suppose

More information

(Refer Slide Time 6:48)

(Refer Slide Time 6:48) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology Madras Lecture - 8 Karnaugh Map Minimization using Maxterms We have been taking about

More information

Dr. Relja Vulanovic Professor of Mathematics Kent State University at Stark c 2008

Dr. Relja Vulanovic Professor of Mathematics Kent State University at Stark c 2008 MATH-LITERACY MANUAL Dr. Relja Vulanovic Professor of Mathematics Kent State University at Stark c 2008 1 Real Numbers 1.1 Sets 1 1.2 Constants and Variables; Real Numbers 7 1.3 Operations with Numbers

More information

Intermediate Algebra. Gregg Waterman Oregon Institute of Technology

Intermediate Algebra. Gregg Waterman Oregon Institute of Technology Intermediate Algebra Gregg Waterman Oregon Institute of Technology c 2017 Gregg Waterman This work is licensed under the Creative Commons Attribution 4.0 International license. The essence of the license

More information

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a coordinate system and then the measuring of the point with

More information

Chapter 3 Analyzing Normal Quantitative Data

Chapter 3 Analyzing Normal Quantitative Data Chapter 3 Analyzing Normal Quantitative Data Introduction: In chapters 1 and 2, we focused on analyzing categorical data and exploring relationships between categorical data sets. We will now be doing

More information

Week - 01 Lecture - 03 Euclid's Algorithm for gcd. Let us continue with our running example of gcd to explore more issues involved with program.

Week - 01 Lecture - 03 Euclid's Algorithm for gcd. Let us continue with our running example of gcd to explore more issues involved with program. Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 01 Lecture - 03 Euclid's Algorithm

More information

C++ Reference NYU Digital Electronics Lab Fall 2016

C++ Reference NYU Digital Electronics Lab Fall 2016 C++ Reference NYU Digital Electronics Lab Fall 2016 Updated on August 24, 2016 This document outlines important information about the C++ programming language as it relates to NYU s Digital Electronics

More information

1.1 The Real Number System

1.1 The Real Number System 1.1 The Real Number System Contents: Number Lines Absolute Value Definition of a Number Real Numbers Natural Numbers Whole Numbers Integers Rational Numbers Decimals as Fractions Repeating Decimals Rewriting

More information

Gateway Regional School District VERTICAL ALIGNMENT OF MATHEMATICS STANDARDS Grades 3-6

Gateway Regional School District VERTICAL ALIGNMENT OF MATHEMATICS STANDARDS Grades 3-6 NUMBER SENSE & OPERATIONS 3.N.1 Exhibit an understanding of the values of the digits in the base ten number system by reading, modeling, writing, comparing, and ordering whole numbers through 9,999. Our

More information

LOOPS. Repetition using the while statement

LOOPS. Repetition using the while statement 1 LOOPS Loops are an extremely useful feature in any programming language. They allow you to direct the computer to execute certain statements more than once. In Python, there are two kinds of loops: while

More information

(Refer Slide Time: 00:51)

(Refer Slide Time: 00:51) Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute Technology, Madras Module 10 E Lecture 24 Content Example: factorial

More information

Chapter 3. Set Theory. 3.1 What is a Set?

Chapter 3. Set Theory. 3.1 What is a Set? Chapter 3 Set Theory 3.1 What is a Set? A set is a well-defined collection of objects called elements or members of the set. Here, well-defined means accurately and unambiguously stated or described. Any

More information

Technical Documentation Version 7.3 RPL Data Types and Palette

Technical Documentation Version 7.3 RPL Data Types and Palette Technical Documentation Version 7.3 RPL Data Types and Palette These documents are copyrighted by the Regents of the University of Colorado. No part of this document may be reproduced, stored in a retrieval

More information

Excel Basics: Working with Spreadsheets

Excel Basics: Working with Spreadsheets Excel Basics: Working with Spreadsheets E 890 / 1 Unravel the Mysteries of Cells, Rows, Ranges, Formulas and More Spreadsheets are all about numbers: they help us keep track of figures and make calculations.

More information

Watkins Mill High School. Algebra 2. Math Challenge

Watkins Mill High School. Algebra 2. Math Challenge Watkins Mill High School Algebra 2 Math Challenge "This packet will help you prepare for Algebra 2 next fall. It will be collected the first week of school. It will count as a grade in the first marking

More information

Read, write compare and order numbers beyond 1000 in numerals and words Read Roman numerals to 100 and understand how they have changed through time

Read, write compare and order numbers beyond 1000 in numerals and words Read Roman numerals to 100 and understand how they have changed through time Number Year 4 Year 5 Year 6 Year 6 Exceeded Developing Count reliably to and from 20 putting numbers in order Year 2 Year 3 Read, write and compare and order numbers 0-1000 in numerals and words Read,

More information

A theme park charges $12 entry to visitors. Find the money taken if 1296 people visit the park.

A theme park charges $12 entry to visitors. Find the money taken if 1296 people visit the park. Write an Equation An equation is a term used to describe a collection of numbers and variables related through mathematical operators. An algebraic equation will contain letters that relate to real quantities

More information

Grade 6 Curriculum and Instructional Gap Analysis Implementation Year

Grade 6 Curriculum and Instructional Gap Analysis Implementation Year Grade 6 Curriculum and Implementation Year 2014-2015 Revised Number and operations Proportionality What new content moves into the grade 6 curriculum in Use a visual representation to describe the relationship

More information

Python for Informatics

Python for Informatics Python for Informatics Exploring Information Version 0.0.6 Charles Severance Chapter 3 Conditional execution 3.1 Boolean expressions A boolean expression is an expression that is either true or false.

More information

DATABASE TRANSACTIONS. CS121: Relational Databases Fall 2017 Lecture 25

DATABASE TRANSACTIONS. CS121: Relational Databases Fall 2017 Lecture 25 DATABASE TRANSACTIONS CS121: Relational Databases Fall 2017 Lecture 25 Database Transactions 2 Many situations where a sequence of database operations must be treated as a single unit A combination of

More information

CS Introduction to Data Structures How to Parse Arithmetic Expressions

CS Introduction to Data Structures How to Parse Arithmetic Expressions CS3901 - Introduction to Data Structures How to Parse Arithmetic Expressions Lt Col Joel Young One of the common task required in implementing programming languages, calculators, simulation systems, and

More information

9. Elementary Algebraic and Transcendental Scalar Functions

9. Elementary Algebraic and Transcendental Scalar Functions Scalar Functions Summary. Introduction 2. Constants 2a. Numeric Constants 2b. Character Constants 2c. Symbol Constants 2d. Nested Constants 3. Scalar Functions 4. Arithmetic Scalar Functions 5. Operators

More information

Lesson 6: Manipulating Equations

Lesson 6: Manipulating Equations Lesson 6: Manipulating Equations Manipulating equations is probably one of the most important skills to master in a high school physics course. Although it is based on familiar (and fairly simple) math

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

Lesson 6: Modeling Basics

Lesson 6: Modeling Basics Lesson 6: Modeling Basics MyEducator Issues? So you did everything and received a zero Make sure you don t change the file name If you have done work in Filename(2) or Filename-2 Happens when you download

More information

Learning Log Title: CHAPTER 7: PROPORTIONS AND PERCENTS. Date: Lesson: Chapter 7: Proportions and Percents

Learning Log Title: CHAPTER 7: PROPORTIONS AND PERCENTS. Date: Lesson: Chapter 7: Proportions and Percents Chapter 7: Proportions and Percents CHAPTER 7: PROPORTIONS AND PERCENTS Date: Lesson: Learning Log Title: Date: Lesson: Learning Log Title: Chapter 7: Proportions and Percents Date: Lesson: Learning Log

More information