Modeling & Simulation Practice Quiz 100 ITEMS FINALS

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/99

encourage image

There's no tags or description

Looks like no tags are added yet.

100 Terms

1
New cards

Which four precepts form the foundation of modeling and simulation?

Modeling, simulation, visualization, and analysis.

2
New cards

How does a model differ from a simulation?

A model represents a system; a simulation imitates its operation over time.

3
New cards

How do discrete and continuous systems differ in the way their states change?

Discrete states change at separate event times; continuous states change continuously with time.

4
New cards

A tank level changes continuously but is recorded every five minutes. What system classification describes the available information?

Sampled-data system.

5
New cards

In a factory model, a machine has a speed of 30 units/hour. What is the machine, and what is its speed?

The machine is an entity; its speed is an attribute.

6
New cards

What distinguishes endogenous activities from exogenous activities?

Endogenous activities occur inside the system; exogenous activities occur outside it.

7
New cards

A commander enters decisions that simulated personnel execute in simulated equipment. What type of simulation is this?

Constructive simulation.

8
New cards

How does fidelity differ from resolution in a simulation?

Fidelity is closeness to reality; resolution is the level of detail or granularity.

9
New cards

What is v after this MATLAB statement? v = 2:3:11;

[2 5 8 11]

10
New cards

For real-valued data, what is the value and shape of v? v = [2 4 6]';

[2; 4; 6], a 3-by-1 column vector.

11
New cards

What is x? A = [1 2 3; 4 5 6]; x = A(2,3);

6

12
New cards

What is B? A = [1 2 3; 4 5 6]; B = A(:,2:3);

[2 3; 5 6]

13
New cards

What are r, c, and n? A = [1 2 3; 4 5 6]; [r,c] = size(A); n = numel(A);

r = 2, c = 3, n = 6.

14
New cards

What is s? A = [1 2; 3 4]; s = sum(A);

[4 6]

15
New cards

What is s? A = [1 2; 3 4]; s = sum(A,2);

[3; 7]

16
New cards

What is c? a = [2 3 4]; b = [5 6 7]; c = a.*b;

[10 18 28]

17
New cards

Correct the exponent operator so the script squares each element. x = 1:4; y = x^2;

Use y = x.^2; the result is [1 4 9 16].

18
New cards

What is C? A = [1 2; 3 4]; B = [2; 1]; C = A*B;

[4; 10]

19
New cards

A is 3-by-4 and B is 4-by-2. What is the size of A*B?

3-by-2

20
New cards

What is v after the deletion? v = [10 20 30 40]; v(2) = [];

[10 30 40]

21
New cards

Which MATLAB command lists workspace variables together with details such as size and class?

whos

22
New cards

Which command removes every variable from the current MATLAB workspace?

clear

23
New cards

What defines discrete-event simulation (DES)?

System state changes instantaneously at separate event times.

24
New cards

How does next-event time advance update the simulation clock?

It jumps to the earliest scheduled future event time.

25
New cards

In a linear congruential random-number generator, what does Z_0 represent?

The seed, or starting value of the recurrence.

26
New cards

Which distribution commonly models independent interarrival times with a constant arrival rate?

Exponential distribution.

27
New cards

Only minimum, most likely, and maximum repair times are known. Which distribution uses those three parameters?

Triangular distribution.

28
New cards

A customer joins a queue but leaves before service. What is this behavior called?

Reneging.

29
New cards

Under FCFS, customers A, B, and C arrive at times 0, 2, and 3. Their service times are 8, 1, and 2. What is their service order?

A, B, C

30
New cards

In a single-server FCFS queue, how is customer i's service-start time calculated?

B_i = max(A_i, D(i-1)), where A_i is arrival time and D(i-1) is the previous departure.

31
New cards

A customer arrives at time 5 and begins service at time 7. What is the waiting time in the queue?

2 time units: waiting = service start - arrival = 7 - 5.

32
New cards

A customer begins service at time 9 and needs 4 minutes. When does service end?

At time 13 minutes: departure = start + service time.

33
New cards

A customer arrives at time 11 and departs at time 15. How long is the customer in the system?

4 minutes: time in system = departure - arrival.

34
New cards

The previous customer departs at time 8. The next customer arrives and starts service at time 9. How much idle time occurs between them?

1 minute: idle time = max(0, next arrival - previous departure).

35
New cards

The first customer arrives at time 0. Subsequent interarrival times are 4, 1, and 4. What are the four arrival times?

0, 4, 5, 9

36
New cards

For an initially idle single FCFS server, arrivals are [0 4 5 9 11 15] and service times are [2 3 1 4 2 3]. What are the departure times?

[2 7 8 13 15 18]

37
New cards

Six customers have queue waits [0 0 2 0 2 0]. What is the average queue waiting time across all six?

4/6 = 2/3 minute, approximately 0.667 minute.

38
New cards

Six customers have queue waits [0 0 2 0 2 0]. What fraction of customers waited?

2/6 = 1/3, approximately 33.3%.

39
New cards

Three tellers can each serve one customer at a time. What is their combined resource capacity?

3 customers at a time.

40
New cards

What distinguishes direct sample-data reuse from an empirical distribution?

Direct reuse feeds stored observations into the model; an empirical distribution constructs a sampling distribution from the observations.

41
New cards

Why must the state variables of a continuous model be complete?

They must contain enough information to reproduce all relevant system behavior to the required accuracy.

42
New cards

In the module's predator-prey model, what do x and y represent?

x is prey population; y is predator population.

43
New cards

In the Lotka-Volterra prey growth rate f = b - p*y, what happens to f as predator population y increases, assuming p > 0?

f decreases.

44
New cards

Why are numerical methods such as Euler and Runge-Kutta used for continuous-system models?

Many governing differential equations cannot be solved conveniently in closed form, so numerical approximation is needed.

45
New cards

How do a MATLAB script and a function differ in their data access?

A script operates in the current workspace; a function can accept inputs, return outputs, and use local variables.

46
New cards

What is C? A = [1 0; 2 4]; B = [5 9; 2 1]; C = A + B;

[6 9; 4 5]

47
New cards

What is s? s1 = ["Red" "Blue" "Green"]; s2 = ["Truck" "Sky" "Tree"]; s = s1 + s2;

["RedTruck" "BlueSky" "GreenTree"]

48
New cards

Write a MATLAB statement that reads a name as text rather than evaluating the typed input as an expression.

name = input('Enter name: ', 's');

49
New cards

What does disp(A) show compared with entering A by itself?

disp(A) shows the value without the leading variable name.

50
New cards

What text is printed? name = 'Alice'; age = 12; fprintf('%s will be %d this year.\n',name,age);

Alice will be 12 this year. Then a newline.

51
New cards

What text is printed? fprintf('Average = %.2f\n', 7/2);

Average = 3.50 followed by a newline.

52
New cards

Which word is printed? x = -3; if x < 0; disp('Negative'); else; disp('Nonnegative'); end

Negative

53
New cards

Given age = 20, which category is printed by this code? if age > 13 && age < 20; disp('teen'); elseif age > 20 && age < 60; disp('adult'); elseif age

senior

54
New cards

In MATLAB, why is y = x % 2; unsuitable for testing parity, and what expression should replace its right-hand side?

Because % begins a comment. Use mod(x,2), as in y = mod(x,2);.

55
New cards

What is ok? age = 19; ok = age > 13 && age < 20;

logical true (1)

56
New cards

What text is printed? grade = 'B'; switch grade; case 'A'; disp('Excellent'); case 'B'; disp('Well done'); otherwise; disp('Invalid'); end

Well done

57
New cards

What is pick if the user clicks Mushroom? pick = menu('Pick a Pizza','Cheese','Sausage','Mushroom');

3

58
New cards

What is the final value of total? total = 0; for k = 1:4; total = total + k; end

10

59
New cards

What sequence is displayed? for v = [1 5 8 17]; disp(v); end

1, 5, 8, 17, in that order.

60
New cards

What is the final value of a? a = 10; while a < 13; a = a + 1; end

13

61
New cards

What is the final value of a? a = 10; while a < 20; a = a + 1; if a > 15; break; end; end

16

62
New cards

A function file triple.m contains the following. What does triple(4) return? function y = triple(x); y = 3*x; end

12

63
New cards

What are the four steps of a Monte Carlo simulation?

Define input distributions; sample inputs; compute deterministically for each sample; aggregate the results.

64
New cards

Of 10,000 uniformly sampled points in a unit square, 7,850 lie inside its unit quarter circle. Estimate pi.

pi is approximately 4*(7850/10000) = 3.14.

65
New cards

What does sensitivity analysis investigate?

How uncertainty or variation in model inputs contributes to uncertainty or variation in its outputs.

66
New cards

Why should derivative-based sensitivity be checked at several operating points for a nonlinear model?

A derivative describes local sensitivity, which can change across a nonlinear model's operating range.

67
New cards

Write the command that exports numeric array results to results.dat as ASCII data.

save('results.dat','results','-ascii');

68
New cards

Write a command that reads a compatible rectangular numeric text file results.dat into variable R.

R = load('results.dat');

69
New cards

Why does basic numeric load fail for a text file whose rows contain different numbers of values?

The data cannot form the rectangular numeric matrix expected by this workflow.

70
New cards

When save exports a character array using -ascii, does the file contain the original text or numeric character codes?

Numeric character codes.

71
New cards

Write the three essential MATLAB statements to plot y = x squared for x from 0 to 2 in steps of 0.5.

x = 0:0.5:2; y = x.^2; plot(x,y);

72
New cards

What appearance does plot(x,y,'r--o') request?

A red dashed line with circle markers.

73
New cards

What does hold on allow when another plot command follows?

It retains the existing plot so the next data series is added to the same axes.

74
New cards

Which command names two plotted curves 'Sin(x)' and 'Cos(x)'?

legend('Sin(x)','Cos(x)');

75
New cards

How does axis equal differ from axis square?

axis equal uses equal data-unit scales on the axes; axis square makes the plot box square.

76
New cards

Which function plots coordinate vectors x, y, and z in 3D, and which function labels its z axis?

plot3(x,y,z) and zlabel(...)

77
New cards

A hydraulic network model emphasizes physical balancing relationships more than connection direction. Which Fishwick model type fits?

Constraint model.

78
New cards

In a concept map, what do nodes, directed arrows, and arrow labels represent?

Nodes are concepts or elements; arrows are interactions; labels specify the nature of the interactions.

79
New cards

Which standardized, semiformal, object-oriented graphical notation models software and system structure and behavior?

UML (Unified Modeling Language).

80
New cards

What are the three stated steps of an operations research study?

Formulate the problem; develop a mathematical model; solve the model to search for an optimal solution.

81
New cards

Which Simulink block supplies a fixed numeric value such as the box labeled 10 in the module?

Constant block.

82
New cards

A Simulink block has plus signs at its two input ports. With inputs 1 and 100, what block is it and what value does it output?

Add (Sum) block; output = 101.

83
New cards

Which Simulink block is marked with a multiplication symbol and produces 10 from inputs 10 and 1?

Product block.

84
New cards

Which Simulink block shows the numeric result in a rectangular readout, such as 1660 in the module?

Display block.

85
New cards

A Simulink relational block labeled > receives 1660 at its top input and 5000 at its bottom input. What does it output?

0 (false)

86
New cards

In Simulink, String Constant blocks contain "Hello " and "FEU Tech". What does String Concat output?

"Hello FEU Tech"

87
New cards

In the shown Simulink examples, what do the blocks marked square-root(u) and u^2 output for inputs 16 and 3, respectively?

4 and 9, respectively.

88
New cards

The module connects sqrt(16), square(3), and sign(-5) to an Add block, then compares their sum with 12 using ==. What logical output results?

1 (true), because 4 + 9 - 1 = 12.

89
New cards

How do a point and a vector differ in computer graphics?

A point is a location; a vector has direction and magnitude without a fixed location.

90
New cards

Match the geometric transformations to their effects: translation, rotation, scaling.

Translation changes location; rotation changes orientation; scaling changes size.

91
New cards

How does perspective projection differ from parallel projection?

Perspective uses a finite center of projection; parallel uses parallel projectors and a direction of projection.

92
New cards

Which graphics light model best represents sunlight arriving from a very distant source?

Directional light, also called distant light.

93
New cards

Why is texture mapping useful when geometric complexity must stay low?

It enriches surface appearance without significantly increasing geometric complexity.

94
New cards

What is the simuland?

The real-world object, process, or phenomenon being simulated.

95
New cards

What is the referent in a simulation project?

The developers' body of knowledge about the simuland, including quantitative and qualitative knowledge.

96
New cards

Which VV&A process checks whether an implementation correctly follows its specification?

Verification.

97
New cards

Which VV&A process checks how accurately model behavior represents the simuland?

Validation.

98
New cards

What is accreditation?

Official certification by a responsible authority that a model is acceptable for a specific use, informed by V&V results.

99
New cards

In the module's VV&A terminology, distinguish Type I, Type II, and Type III errors.

Type I: a valid model is not used. Type II: an invalid model is used. Type III: an irrelevant model is used.

100
New cards

Knowledgeable experts assess whether simulation output looks plausible compared with simuland behavior. What method is this?

Face validation.