Calculate weighted shortest paths and distinguish route failure from radio failure.
The focus of this experiment is to represent Zigbee or Thread mesh as weighted links. Students then calculate minimum-cost routes and compare failed-link alternatives, and verify route decisions without assuming all deployments use identical routing. The Concepts view explains the operation before the practical work; the Simulation view is used to examine reference and changed inputs, not to substitute for actual measurements.
Learning objectives
Represent Zigbee or Thread mesh as weighted links.
Calculate minimum-cost routes and compare failed-link alternatives.
Verify route decisions without assuming all deployments use identical routing.
Identify the configured inputs (Failed links; Latency per cost unit (ms)) and record the corresponding observed outputs with units where applicable.
Compare the reference calculation or decision with an independent implementation or authorized observation; state any discrepancy and the applicable model boundary.
Expected learning outcomes
On completion, students can represent Zigbee or Thread mesh as weighted links, calculate minimum-cost routes and compare failed-link alternatives, and verify route decisions without assuming all deployments use identical routing.
Required deliverables
Submit the derivation or state trace for the named operation, the exact reference and changed configurations, the associated simulator or practical evidence, and a short validation statement addressing verify route decisions without assuming all deployments use identical routing. Separate predicted values from observations.
Prerequisite knowledge and related learning
Review the following catalogue prerequisites before starting. After completion, continue to LoRa PHY airtime & duty estimate.
The browser instrument and the specified local software or network environment. Use the experiment’s documented topology and distinguish modeled values from actual packet observations.
Begin with a manual prediction, record the baseline, change one independent condition at a time, and compare the resulting trace or measurements with the original prediction. Record observations and uncertainty separately from reference values. Follow the experiment’s specific procedure, safety limits, and acceptance checks.
A mesh route minimizes cumulative link costs in the teaching graph. Link failure removes an edge; path cost is not guaranteed radio latency.
Before operating the equipment or executing the program, derive the expected outcome using the required theoretical work in Experiment. Use the diagram to identify the variables and system boundaries.
Scientific theory · Mesh paths and routing costs
A mesh topology is modeled as a graph of devices and links. A path cost is the sum of its edge weights in a nonnegative additive model. Alternative routes improve reachability when links fail, but convergence and interference affect real performance. Zigbee and Thread use different protocol mechanisms; the graph is a conceptual model.
Worked example and engineering interpretation
If A→B→D costs 2+3=5 and A→C→D costs 4+4=8, the former is the lower-cost path. Removing B→D can force the latter. Recalculate after a link change and distinguish path cost from measured latency.
Engineering principles · additional worked teaching example
A mesh path cost is the sum of its edge weights, not necessarily hop count. A two-hop path costs 4+3=7; a three-hop path 1+2+1=4, so choose the latter under minimum-cost routing. Link failure removes candidate paths.
From theory to experiment
Predict the reference result before operating the workbench; check the actual intermediate state, units and constraints. The existing simulation, implementation and procedure below are distinct sources of evidence.
How to investigate Zigbee & Thread mesh routing concepts
Calculate weighted shortest paths and distinguish route failure from radio failure.
Analytical investigation means collecting an observation, identifying the mechanism, using a calculation or state trace to explain it, and checking your conclusion against evidence. Controlled comparison means changing one independent variable, holding the remaining relevant conditions constant, and measuring a dependent variable against a baseline. Experimental validation means comparing a predicted result to a reproducible observation or assertion; agreement inside a model does not certify hardware. Evidence-based reasoning connects a specific observation to a theoretical rule and states uncertainty, not merely an opinion. Performance characterization records a named metric and its units across conditions; sensitivity analysis changes one parameter across several values. A threat assessment links an asset, threat, consequence and evidence to a mitigation.
Experiment-specific guided practice
Objective: Calculate weighted shortest paths and distinguish route failure from radio failure.
Set Failed links = none; Latency per cost unit (ms) = 5. Observe the calculated results and trace.
Change Failed links = primary. Baseline Sensor → A → Gateway, cost 4, 20 ms. Primary link failure gives a path through B, cost 6, 30 ms. Both gateway links failed: unreachable. Restore.
Restore the reference values. Weighted graph abstraction only. Zigbee and Thread differ in network and application layers; neither stack is executed.
Reference check:
Model boundary:
Independent task and submission evidence
2. Change Failed links = primary. Baseline Sensor → A → Gateway, cost 4, 20 ms. Primary link failure gives a path through B, cost 6, 30 ms. Both gateway links failed: unreachable. Restore. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat.
Before execution write the independent variable and its levels, dependent observation with units where applicable, baseline, controlled variables, measurement method and expected result. For a state machine use state/event/output rather than inventing a numeric metric. Record failures and repeat the baseline. A weak conclusion is “it works”; a supported conclusion names the changed setting, observed value/state, corresponding rule and one limitation.
Trial
Changed setting
Fixed settings
Predicted result
Actual observation / units
Evidence / uncertainty
A: baseline
Reference
Record
Predict
Record
Record
B: one change
Record
Same as A
Predict
Record
Record
A: repeat
Restore
Same as A
Predict
Record
Record
Completion: submit the filled table, relevant simulator screenshot or terminal/notebook output, reasoning with units/assumptions, and one limitation. Preserve the independent assessment questions; this guide does not fill their answers.
Calculate weighted shortest paths and distinguish route failure from radio failure.
Weighted graph abstraction only. Zigbee and Thread differ in network and application layers; neither stack is executed.
Worked engineering reasoning and boundary conditions
Engineering reference configuration: Failed links = none; Latency per cost unit (ms) = 5. In the classroom model, Path = Sensor → A → Gateway; Cost = 4; Hops = 2; Modeled latency = 20 ms. Graph routing abstraction: no Zigbee or Thread stack, radio or join procedure. Weighted graph abstraction only. Zigbee and Thread differ in network and application layers; neither stack is executed.
Use the diagram to follow the calculation or state progression. Keep the teaching configuration separate from the independent exercise values; compare observations with the actual model and implementation.
Concept animation · topology and link dependencies
Explore the teaching example independently of the simulator. Each step reveals an operation, data relationship or calculated state. The Simulation view has separate editable inputs.
Step 1 of 5 · Connection 1
Connection 1
Link 1
Sensor → A · 2
Connection 2
Link 1
Sensor → A · 2
Link 2
A → Gateway · 2
Connection 3
Link 1
Sensor → A · 2
Link 2
A → Gateway · 2
Link 3
Sensor → B · 3
Connection 4
Link 1
Sensor → A · 2
Link 2
A → Gateway · 2
Link 3
Sensor → B · 3
Link 4
B → Gateway · 3
Connection 5
Link 1
Sensor → A · 2
Link 2
A → Gateway · 2
Link 3
Sensor → B · 3
Link 4
B → Gateway · 3
Link 5
A → B · 1
Teaching example only; inspect live calculations or real practical evidence separately.
Recall the concept before revealing its explanation.
0 / 3 revealed
N09 · 01 / 08How do route, weighted cost and delay change when the primary mesh link fails?Reveal explanation
Engineering explanation
Baseline Sensor → A → Gateway, cost 4, 20 ms. Primary link failure gives a path through B, cost 6, 30 ms. Both gateway links failed: unreachable. Restore.
N09 · 02 / 08Which protocol details are absent from the weighted Zigbee/Thread graph abstraction?Reveal explanation
Engineering explanation
Weighted graph abstraction only. Zigbee and Thread differ in network and application layers; neither stack is executed.
N09 · 03 / 08How do you verify recovery when both mesh links have failed?Reveal explanation
Engineering explanation
Restore the original links; the reference path Sensor → A → Gateway should return with cost 4 and modeled delay 20 ms.
N09 · 04 / 08How does route cost differ from hop count?Reveal explanation
Engineering reasoning
A cost sums configured link weights; fewer hops need not produce the least-cost route.
N09 · 05 / 08Why test failure of both gateway links?Reveal explanation
Engineering reasoning
It verifies that the model reports unreachable rather than producing a path through disabled links.
N09 · 06 / 08A weighted mesh path is calculated. Select every technically valid statement.
A. A lower total path cost can differ from the fewest hops.
B. A disabled link cannot be used by the route calculation.
C. Any reachable route proves radio delivery is lossless.
D. A failed link always disconnects the entire mesh.Reveal explanation
Applied scenario
Correct: A. A lower total path cost can differ from the fewest hops.; B. A disabled link cannot be used by the route calculation.
N09 · 07 / 08In Zigbee & Thread mesh routing concepts, which reference and changed settings are prescribed for Failed links?Reveal explanation
Controlled configuration
Failed links: none → primary; hold the remaining settings fixed.
N09 · 08 / 08What expected result distinguishes the reference and changed trials in Zigbee & Thread mesh routing concepts?Reveal explanation
Expected observation
Baseline Sensor → A → Gateway, cost 4, 20 ms. Primary link failure gives a path through B, cost 6, 30 ms. Both gateway links failed: unreachable. Restore.
Interactive networking and security instrument
Loading experiment-specific apparatus…Previous model / additional reference tools
Simulation task
Calculate weighted shortest paths and distinguish route failure from radio failure.
Explore the model using its own controls. Record a prediction before changing a condition. Compare the reference with a changed condition, then use the Experiment tab for the procedure, acceptance criteria and notebook. Model outputs and physical observations must remain separate.
Interactive engineering workbenchN09 · Existing model
Interactive computational experiment
Configure and observe
Model-linked protocol trace
Animated Zigbee & Thread mesh routing concepts
Change the controls above; the trace and numerical summary update from the computed model results. Animation timing is for learning, not measured protocol latency.
Recent trace eventsInspect numerical or encoded protocol details
Readout from the original computational model; not physical measurements.
Loading instrument…
Awaiting model display.
Experimental instrumentation · A/B
Compare two model conditions
Capture a baseline, change one experimental condition, run the model if required and capture the comparison. Snapshots contain visible controls and display text, not physical sensor readings. Review before exporting.
Ask Dr. Mohammad locally, or prepare an experiment-aware prompt for ChatGPT, Gemini or Claude. The external providers open in their own tabs; nothing is automatically submitted.
Public course objective, displayed commands, source excerpts and procedure. Private assessment content is not collected.
Prepare a contextual AI prompt
0 characters
Common secret and email patterns are redacted on preparation; this is not a comprehensive privacy filter. Review the entire editable prompt, including student work and unpublished research, before sharing. The providers apply their own accounts, privacy settings and limits.
Prepare → review → copy & open your selected provider → paste and submit there.
Independent theoretical exercises
Before the simulation or practical, solve both experiment-specific tasks. List the given inputs, show the intermediate calculation or state trace, identify the expected observation, and state a limitation. Show formulas and intermediate calculations where relevant, or draw the requested state/sequence diagram. These are independent classroom fixtures; where they differ from the reference configuration below, do not treat them as measured values. Compare your predictions with the corresponding experiment afterwards.
01 · Predict and derive using the given inputs
Using the lab graph, enumerate at least two paths from source to destination, sum edge weights and select least cost.
Engineering method — A mesh path cost is the sum of its edge weights, not necessarily hop count. A two-hop path costs 4+3=7; a three-hop path 1+2+1=4, so choose the latter under minimum-cost routing. Link failure removes candidate paths. Apply this method to the assigned values independently; compare your reasoning with the relevant simulator or practical implementation.
02 · Compare or justify using evidence
Remove one selected-path edge and recompute; multiply cost by 5 ms per cost unit and compare. Explain disconnected behavior.
Engineering method — A mesh path cost is the sum of its edge weights, not necessarily hop count. A two-hop path costs 4+3=7; a three-hop path 1+2+1=4, so choose the latter under minimum-cost routing. Link failure removes candidate paths. Apply this method to the assigned values independently; compare your reasoning with the relevant simulator or practical implementation.
03 · Design analysis
Design analysis · Independent work
Given paths A-B-D with weights2,5 and A-C-E-D with 1,2,2, select least cost; then C-E fails. What changes?
Design analysis — A mesh path cost is the sum of its edge weights, not necessarily hop count. A two-hop path costs 4+3=7; a three-hop path 1+2+1=4, so choose the latter under minimum-cost routing. Link failure removes candidate paths. Apply this method to the assigned values independently; compare your reasoning with the relevant simulator or practical implementation.
Work is saved locally when browser storage is available. Export it for submission; no remote upload or automatic grade is assigned.
Expanded independent theoretical exercise bank
Progress from calculation and interpretation to diagnosis and controlled engineering design. Complete the questions without opening the simulation first; show intermediate steps.
Intermediate · Explain a changed-input result
Independent theoretical exercise · N09-01
Use the reference configuration (Failed links = none; Latency per cost unit (ms) = 5), but change Failed links = both. The model reports Path = Unreachable. Explain the governing rule and assumptions that make this output plausible; identify an independent verification method.
Intermediate · Interpret a state transition
Independent theoretical exercise · N09-02
The reference model reports Path: Sensor → A → Gateway. Under Failed links = both it reports Unreachable. Explain which configured condition changed and what the two outputs establish, and what they do not establish.
Intermediate · Interpret a technical trace
Independent theoretical exercise · N09-03
For Latency per cost unit (ms) = 2, the model supplies this excerpt from Calculated trace:
Item · Value · Explanation
Sensor ↔ A · 2 ·
A ↔ Gateway · 2 ·
Sensor ↔ B · 3 ·
B ↔ Gateway · 3 ·
A ↔ B · 1 ·
Compute the range (maximum minus minimum) of the Value column in these rows. Identify the maximum observation. Do not extrapolate beyond these rows.
Advanced · Reverse reasoning
Independent theoretical exercise · N09-04
An observation is Modeled latency = 8 ms. Candidate A uses Failed links = none; Latency per cost unit (ms) = 5. Candidate B changes the listed settings (Latency per cost unit (ms) = 2) and keeps the remaining settings fixed. Which is consistent with the observation? If both can explain it, say what additional evidence is required.
Advanced · Diagnose a reported mismatch
Independent theoretical exercise · N09-05
A student configures Failed links = primary while preserving all other reference settings, but copies the reference report of Path = Sensor → A → Gateway. Evaluate whether the report is justified. Identify the first configuration/output check to perform.
Challenging · Design a controlled verification
Independent theoretical exercise · N09-06
Design a controlled comparison for Zigbee & Thread mesh routing concepts using reference Failed links = none; Latency per cost unit (ms) = 5 and test Failed links = both. Specify the changed setting(s), measured metric Path, controls, repetitions, an acceptance check and what evidence can distinguish an actual implementation from the model.
Challenging numerical variant 1
Calculation · Independent work
Route A–R1–B has costs 2 and 9; A–R2–B costs 9 and 11. No other links. What is the least total path cost?
Challenging numerical variant 2
Calculation · Independent work
Route A–R1–B has costs 8 and 9; A–R2–B costs 2 and 11. No other links. What is the least total path cost?
Challenging numerical variant 3
Calculation · Independent work
Route A–R1–B has costs 5 and 2; A–R2–B costs 3 and 4. No other links. What is the least total path cost?
Step-by-step experimental procedure
Calculate weighted shortest paths and distinguish route failure from radio failure.
1 · Reference workbench configuration
Use the named reference workbench and its reference inputs. Additional live instruments may have different controls; use the matching instrument. Record virtual and practical results separately.
Failed linksnone
Latency per cost unit (ms)5
2 · Perform the investigation in order
Set Failed links = none; Latency per cost unit (ms) = 5. Observe the calculated results and trace.
Change Failed links = primary. Baseline Sensor → A → Gateway, cost 4, 20 ms. Primary link failure gives a path through B, cost 6, 30 ms. Both gateway links failed: unreachable. Restore.
Restore the reference values. Weighted graph abstraction only. Zigbee and Thread differ in network and application layers; neither stack is executed.
3 · Compare controlled trials
Trial
Independent change
Expected check
Observation
Reference
Use reference inputs above
Baseline Sensor → A → Gateway, cost 4, 20 ms. Primary link failure gives a path through B, cost 6, 30 ms. Both gateway links failed: unreachable. Restore.
Record actual result
Controlled change
Failed links = primary
Baseline Sensor → A → Gateway, cost 4, 20 ms. Primary link failure gives a path through B, cost 6, 30 ms. Both gateway links failed: unreachable. Restore.
Record actual result
4 · Analyze and report
Weighted graph abstraction only. Zigbee and Thread differ in network and application layers; neither stack is executed.
Required evidence: Record the zigbee & thread mesh routing concepts comparison and justify the changed outcome from the calculated trace.
Model boundary: Weighted graph abstraction only. Zigbee and Thread differ in network and application layers; neither stack is executed.
Controlled investigation · reproducible evidence
Method. Use the existing reference workbench configuration and the named controlled changes below. A controlled variable stays fixed while the independent variable is intentionally changed; the dependent variable is the resulting observed output. First predict each trial from the Concepts page. Run the baseline, then change only the specified setting and record the outcome. For deterministic traces one execution per case and a repeated verification are sufficient; for timing or stochastic measurements repeat at least five times, recording each run, median and range. Reset to the reference state between independent comparisons.
Trial
Independent change
Dependent observation
Reference
Use reference inputs above
Record actual outcome and units
Controlled change
Failed links = primary
Record actual outcome and units
Evidence: attach the completed comparison table, one trace or screenshot per condition, and actual practical terminal/hardware evidence where applicable. Explain any prediction mismatch and distinguish modeled behavior from measured results.
Restore reference and enter your prediction. Select Save baseline.
Apply controlled change. Inspect metrics and protocol details. Compare the results with the following verification conditions.
✓ Expected: Baseline Sensor → A → Gateway, cost 4, 20 ms. Primary link failure gives a path through B, cost 6, 30 ms. Both gateway links failed: unreachable. Restore.
Restore reference. Confirm the same baseline results, then vary one field at a time. Record the changed configuration and explain any difference.
Export both baseline and changed evidence before leaving. Do not infer physical execution from model output.
Model-only experiment
No shell command or external service is required. Use the computational experiment above. Do not interpret its values as live network measurements.
Experimental notebook
Record your own results. Values are not prefilled or independently verified.
Record, discuss & verify
Notebook imports use the related core lab P38 and retain N09 in the method and attachment. The supplemental labs do not change the core prerequisite graph or graded completion counters.
Download this notebook and open Google Colab. Select File → Upload notebook and choose the downloaded .ipynb.
Read the Markdown instructions before each executable cell. Use a Python runtime, run cells from top to bottom, and resolve imports if necessary.
Perform the baseline and controlled changes. Save the notebook with actual outputs and your written interpretation.
Execution scope: Default computational cells passed isolated local Python execution; physical equipment and live services require separate verification.
01Instructions · Markdown
# N09 · Zigbee & Thread mesh routing concepts
**PSUT IoT Engineering Studio — Dr. Mohammad Alja’afreh**
## 1. Scientific objective
Calculate weighted shortest paths and distinguish route failure from radio failure.
Complete the analytical worksheet in the portal first. Record your predictions before running this notebook. This notebook is a bounded local computational investigation; use the portal’s separate WSL, hardware or Remix procedure for real interfaces.
02Instructions · Markdown
## Experiment-specific preparation
Calculate weighted shortest paths and distinguish route failure from radio failure.
**Reference procedure (use the matching simulator/WSL tool where named, not an unrelated service):**
1. Set Failed links = none; Latency per cost unit (ms) = 5. Observe the calculated results and trace.
2. Change Failed links = primary. Baseline Sensor → A → Gateway, cost 4, 20 ms. Primary link failure gives a path through B, cost 6, 30 ms. Both gateway links failed: unreachable. Restore.
3. Restore the reference values. Weighted graph abstraction only. Zigbee and Thread differ in network and application layers; neither stack is executed.
**Evidence:**
**Boundary:**
03Instructions · Markdown
## 2. Reference configuration and investigation
1. Set Failed links = none; Latency per cost unit (ms) = 5. Observe the calculated results and trace.
2. Change Failed links = primary. Baseline Sensor → A → Gateway, cost 4, 20 ms. Primary link failure gives a path through B, cost 6, 30 ms. Both gateway links failed: unreachable. Restore.
3. Restore the reference values. Weighted graph abstraction only. Zigbee and Thread differ in network and application layers; neither stack is executed.
Run cells in order; do not substitute model results for physical measurements.
04Instructions · Markdown
## 3. Compare two modeled weighted routes.
05Python · executable cell
PYTHON · Code cell
# =====================================================================
# N09 | Code cell 01 | Zigbee & Thread mesh routing concepts
# Purpose: 3. Compare two modeled weighted routes.
# Inputs: the explicit fixture/settings below and any preceding cell state.
# Output: inspect printed values, returned records or assertions; record evidence.
# =====================================================================
# Set routes for the next computation or reference condition.
routes={"A":4,"B":6}
# Define the reusable operation choose; keep its logic separate from the trial.
def choose(failed=(),costs=routes):
choices=[(cost,k) for k,cost in costs.items() if k not in failed]
return min(choices) if choices else None
# Check the expected invariant so a mismatch fails visibly instead of appearing successful.
assert choose()==(4,"A")
# Check the expected invariant so a mismatch fails visibly instead of appearing successful.
assert choose(("A",))==(6,"B")
# Check the expected invariant so a mismatch fails visibly instead of appearing successful.
assert choose(("A","B")) is None
## 4. Change controller policy and convert cost to latency.
07Python · executable cell
PYTHON · Code cell
# =====================================================================
# N09 | Code cell 02 | Zigbee & Thread mesh routing concepts
# Purpose: 4. Change controller policy and convert cost to latency.
# Inputs: the explicit fixture/settings below and any preceding cell state.
# Output: inspect printed values, returned records or assertions; record evidence.
# =====================================================================
# Set lowcost for the next computation or reference condition.
lowcost={"A":4,"B":4}
# Repeat the same operation for each configured input so observations are comparable.
for failed in ((),("A",),("A","B")):
result=choose(failed,lowcost);print(failed,None if result is None else (result[1],result[0]*5))
## Experimental analysis and submission
1. Record the reference input, predicted output and actual result.
2. Modify one independent variable and run the relevant cells again.
3. Explain the result using the theory and identify model limitations.
4. Save the notebook with outputs and retain the separate theoretical worksheet.
**Your derivation and conclusion:**
(Complete independently.)
09Instructions · Markdown
## Guided reasoning and evidence
A controlled comparison changes one independent input while keeping the other relevant inputs fixed; the dependent variable is the recorded output. Use this lab’s reference condition above.
**Independent task:** 2. Change Failed links = primary. Baseline Sensor → A → Gateway, cost 4, 20 ms. Primary link failure gives a path through B, cost 6, 30 ms. Both gateway links failed: unreachable. Restore. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat.
| Trial | Input/configuration | Prediction | Observation | Evidence / limitation |
|---|---|---|---|---|
| A | Reference | | | |
| B | Changed input | | | |
| A repeat | Reference | | | |
A conclusion is supported only when it cites the recorded values or observed states and explains them with the experiment theory.
Shared research workbenches · network designer & advanced studiesConcurrent-device simulation & Monte Carlo research