Skip to content

Plots and small Julia examples in lectures and tutorials where they teach something - #45

Merged
beyondsimulations merged 1 commit into
mainfrom
more-plots
Nov 11, 2026
Merged

beyondsimulations merged 1 commit into
mainfrom
more-plots

Conversation

@beyondsimulations

Copy link
Copy Markdown
Owner

Follow-up to #44. New plots go only where they get something across that the text cannot. Lecture code stays short and uses toy data, so it never writes the constraints a graded tutorial asks for.

Shared style

  • The course style now lives once in include/plot_style.jl. Tutorials still show it through include/plot_style.qmd; lectures load it in a hidden cell.

Lectures

  • 05, "Where the Minutes Go": stacked bottling minutes per week against the 1,800-minute capacity. Weeks 1 and 2 have no room for week 3's Lager.
  • 07, "The Gap Over Time": best tour and lower bound over a 10-minute HiGHS run of our CVRP model on 45 random customers. The tour improves in jumps, the bound hardly moves, and HiGHS ends at a 44 % gap.
  • 08, "Why 'Median'?" and "The Best Spot": three lines of Julia for one department on a road of seven areas, and a plot showing that the best spot is the weighted median.
  • 09, "A Quick Check" and "Same Pilgrims, Smoother Flow": the fluctuation bound for t > 1 in one line, and a spiky against a smooth plan with the same pilgrims. The lecture now activates the course environment.
  • 12, "The Same Set in Julia": the set I_p as one line.

Tutorials

  • 04-04: the whole-number plans around the best one. The best plan uses all 240 minutes; the greedy plan sits just below the line.
  • 08: the district map in the course colors. Neighboring districts never share a color, and departments are drawn in dark ink. visualize_departments now takes euclidianDistances and no longer takes the unused p; all four calls are updated.
  • 09: a hint to use course_style and draw the capacity as a dashed line.

Skipped on purpose: lecture 01 profit per route, the 04-05 cost histogram, both tutorial 06 plots (the heatmap would answer the students' own question), lecture 11 points per seat, and lectures 06, 10, 13 and 14.

Checks: every changed page renders, the slide overflow gate passes for lectures 05, 07, 08, 09 and 12, and each new slide and plot was looked at as an image. A code review (high) ran; its fixes are in.

Not included: the internal session solutions (05, 07, 08, 11) still have the old plot code.

The course style moves into include/plot_style.jl, so lectures can load
it in a hidden cell while tutorials still show it through
include/plot_style.qmd.

Lectures: bottling minutes against capacity (05), the optimality gap
over a 10-minute solve (07), a one-dimensional p-median with its plot
(08), the fluctuation bound as a quick check and plot (09), and the set
I_p as one line of Julia (12). Tutorials: the whole-number plans around
the best one (04-04), the district map in the course colors with
neighboring districts kept apart (08), and a hint to use the course
style for the utilization plot (09).
@beyondsimulations
beyondsimulations merged commit 9486680 into main Nov 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant