Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

If-Then-Else

IF(e) THEN—Block if, where e is a logical expression, followed by a sequence of statements and completed by an ENDIF statement. The block may include sub-blocks introduced by one or more ELSEIF statements and/or one ELSE statement and all sub-blocks may contain nested IF-THEN-ELSE blocks within them. For example,... [Pg.120]

Program 1.5 Example of Simple Conditional Logic IF-THEN/ELSE... [Pg.15]

For a conditional IF-THEN or IF-THEN-ELSE construction we can state the Rules of Conditional Statements ... [Pg.180]

As mentioned earlier, nonlinear objective functions are sometimes nonsmooth due to the presence of functions like abs, min, max, or if-then-else statements, which can cause derivatives, or the function itself, to be discontinuous at some points. Unconstrained optimization methods that do not use derivatives are often able to solve nonsmooth NLP problems, whereas methods that use derivatives can fail. Methods employing derivatives can get stuck at a point of discontinuity, but the function-value-only methods are less affected. For smooth functions, however, methods that use derivatives are both more accurate and faster, and their advantage grows as the number of decision variables increases. Hence, we now turn our attention to unconstrained optimization methods that use only first partial derivatives of the objective function. [Pg.189]

Turn off the flow by setting the value of TAU initially very high, and start the reactor as a batch system. Change over to continuous operation using the an IF-THEN-ELSE statement to define a value of TAU. [Pg.272]

The dimensionless model equations are programmed into the MADONNA simulation program HOMPOLY, where the variables, M, I, X and TEMP are zero. The values of the dimensionless constant terms in the program are realistic values chosen for this type of polymerisation reaction. The program starts off at steady state, but can then be subjected to fractional changes in the reactor inlet conditions, Mo, Io, T0 and F, of between 2 and 5 per cent, using the IF-THEN-ELSE statement and parametric run facility. The value of TIME in the program, of course, refers to dimensionless time. [Pg.313]

Study the MADONNA program so that the conditional logic based on the IF THEN ELSE statements is fully understood. [Pg.361]

The program is written in array form, with Nclll )., the parameter representing the desired number of compartments in the column. The simulation starts with a uniform holdup distribution throughout the column and with the column operating at steady-state. At time, Tswitch, the organic solvent flow is suddenly increased, as effected by the use of a MADONNA IF-THEN-ELSE command. [Pg.460]

The program employs an IF THEN ELSE statement to switch the feed rates. An alternative with the Windows version of MADONNA would be to use the CONTINUE feature. For this, the values of Nf would be changed after the STOPTIME was reached and the run continued with a new value of Nf and STOPTIME. [Pg.477]

The column start up is from an initial arbitrarily chosen composition profile. The steady state composition profile obtained from the first run can then be used as the starting profile for subsequent runs. With the MADONNA version for Windows, changes in operating parameters, such as feed rate, can be made with the CONTINUE feature. This can be programmed easily with IF-THEN-ELSE statements. In this way realistic dynamics can be obtained for the column conditions moving from one steady state to another. [Pg.502]

This can be done in two ways Either use the pre-programmed PULSE function (see the program CSTRPULSE for an example) or use an IF-THEN-ELSE statement to turn a stream on and off (see example CHROM). [Pg.599]

In general the IF-THEN-ELSE conditional statement form is used, combined with the inequality and/or possibilities as found in the HELP. This can involve a switching from one equation to another within this statement. Another way is to use flags or constants that take values of 0 or 1 and are multiplied by terms in the equations to achieve the desired results. The programs RUN and RELUY contain such programming. As shown in RUN, nesting of multiple IF statements is possible ... [Pg.599]

CONCISE has a very small (62 words) and well-defined vocabulary which can be mastered by non-computer-oriented scientists. It consists of if-then-else logic and begin-done blocking. Once the vocabulary and structure of CONCISE are known, the scientist is free to create or change interpretation rules at will. [Pg.313]

As the reader can see, a rule bears a close resemblance to an if-then-else statement, but unlike an if-then-else statement, it stands alone and does not fire in any predetermined order relative to other if-then-else statements. [Pg.173]

Calculation of final site WER Complicated scheme with six if...then...else clauses and 12 possible paths Geometric mean of the two measurements... [Pg.218]

These operations may of course be used in compound statements. It is reported that such capabilities have been added as a shell to TURBO-Prolog programming language, but the usual if then else capabilities of other high level programming languages can also be used to this end. [Pg.299]

If...Then...Else Delineates a block of conditional statements. [Pg.262]

VBA supports If...Then and If...Then...Else or Elself structures, very similar to the Excel worksheet function IF. In addition, VBA provides the Select Case decision structure, similar to the ON value GOTO statement in BASIC. [Pg.265]

See also Exit, Function, If, Then, Else, Select Case, Sub, With Exit Command... [Pg.426]

Note the change in the value of the proportional gain KP is changed at 90 h by use of an IF-THEN-ELSE statement ... [Pg.477]

Use switch construct instead of multiple, nested if-then-else statements, especially when all the conditionals are treated at the same level. The resulting code is usually easier to read and follow. However, when different types of conditionals are tested, multiple, nested if-then-else constructs are preferable. An example for using switch versus if statements is shown in Code Block 5 (Figure 2.5). [Pg.43]

The ideas expressed above can be extended up to four subpopulations with Mix, and it may be tempting to extend the if - then - else structure to a IF - THEN - ELSEiF - ELSE - ENDiF Structure as follows ... [Pg.730]

Although this is acceptable Fortran coding, it is not acceptable abbreviated code with NONMEM V. Instead, a separate if - then - else - endif block needs to be used for each subpopulation, to avoid error messages about nested random effects. [Pg.731]

The If... Then, Else statement has unrestricted length, and uses the syntax... [Pg.480]

When more than two choices must be considered in an If...Then, Else statement, these can be handled using If...Then, Elself, Else. In the above example one might instead write... [Pg.481]


See other pages where If-Then-Else is mentioned: [Pg.228]    [Pg.142]    [Pg.115]    [Pg.347]    [Pg.562]    [Pg.314]    [Pg.140]    [Pg.267]    [Pg.436]    [Pg.35]    [Pg.40]    [Pg.43]    [Pg.57]   


SEARCH



If-Then-Else Statements

If-then-else construct

If...Then

© 2024 chempedia.info