Home / Monte Carlo / Model Building / Mark Input / Mark Input How-To
Mark Input How-To¶
This walkthrough marks the three inputs of a small stack-up model: three parts laid end to end, each made to its own tolerance, with the assembled length computed from them.
It stops at the point where the model is marked and ready. Running it is Run Model.
The worksheet is on this page rather than in a file to download. Press Copy for Excel, then paste it into a blank worksheet at cell A1.
The worksheet¶
Three part lengths in millimetres and the assembled length below them.
| Part | Length |
|---|---|
| Base | 25 |
| Spacer | 12 |
| Cap | 8 |
| Assembly | =B2+B3+B4 |
After pasting, B5 holds the formula and shows 45. Cells B2, B3 and B4 hold plain numbers, which is what an input has to be: the simulation writes a trial value into an input cell on every run, so an input cell can never hold a formula.
Mark the first input¶
- Select B2.
- Press QXL Monte Carlo New > Design > Mark Input.
- The dialog opens with Inputs range naming
$B$2, the distribution list on Normal, and the preview already drawing a curve. Normal is the one distribution that opens pre-filled, with a mean of 0 and a standard deviation of 1. - In Input name, type
Base. - Leave Normal selected. In Mean, type
25. In Standard deviation, type0.05. - Watch the preview redraw as you type. It is drawing the distribution the boxes currently describe.
- Press OK.
B2 now carries a note. Hover over the cell and it reads:
Quantum XL Input
Base
Distribution=Normal
Mean=25
Standard deviation=0.05
Can be optimized=True
Can be optimized reads True because that is what the Optimization section starts on. Choose
No there if this input is fixed and the Optimizer must leave it alone.
The value in the cell is still 25. Marking a cell never changes what is in it.
Mark the second input, with the standard deviation in a cell¶
This one takes its standard deviation from a worksheet cell instead of a typed number, so the tolerance can be changed later without marking the input again.
- Type
0.08into D3. - Select B3 and press Mark Input.
- Type
Spacerin Input name, and12in Mean. - Click into the Standard deviation box, then click cell D3 in Excel.
The box now shows the link rather than a number, and a chain icon appears to its left. Excel stays live while the dialog is open, which is what lets you click that cell without closing anything.
- Press OK.
The note on B3 shows Standard deviation=(linked value), because what the marking stores is the
link. The number is read from D3 every time the model runs.
The other way to point at a cell
Each box also has its own ▼ button. Pressing it shrinks the dialog to a one-line strip so the worksheet is not covered, and the strip stays in front while you pick. The dialog comes back to full size with the keyboard in the box you picked for. Use ▲ on the strip to come back without picking anything.
Mark the third input, and truncate it¶
The cap is bought in, and the supplier screens out anything under 7.9 mm.
- Select B4 and press Mark Input.
- Type
Capin Input name,8in Mean and0.06in Standard deviation. - Tick Truncate this distribution.
- In Exclude below, type
7.9. Leave Exclude above empty; its gray+∞means there is no upper limit. - The preview cuts the left tail off the curve, and the line under the controls reports what is left:
Kept support: [7.9, +∞)
- Press OK.
Check the three markings¶
Select B2 and press Mark Input again. The dialog opens on the marking you already made rather than on a blank form.
Press Next Input >> to step to Spacer, and again to step to Cap. Each press saves the
input on screen before moving on. Press it once more: there is nowhere further to go, so nothing
moves and the status line says why.
Press Cancel to leave without changing anything.
What to do if a cell is refused¶
Selecting B5 and pressing Mark Input refuses, because B5 holds a formula:
Inputs can only be defined for cells which are not formulas. The cell
Sheet1!$B$5contains a formula.
B5 is the assembled length, which is computed rather than varied, so it is an output rather than an input. Mark it with Mark Output.
A cell holding text is refused the same way, with Inputs must be numeric.
What you have now¶
Three marked inputs and one cell that is ready to be marked as an output. The markings are stored in the workbook, so they are still there when you close the file and open it again.
To take a marking off a cell, select it and press QXL Monte Carlo New > Design > Unmark, described on Unmark.