Omniadisce

The five words

Every model lab is built from the same five things. Learn these and you can build a lab about almost anything that changes over time.

WordWhat it isExample
PartA thing in your lab, with a name and a look (a cup, a tank, a crowd, a ball or a bar).Coffee
QuantityA number that describes a part: a start value, a unit, and the lowest and highest it can be.Temperature, 90 ยฐC
RuleHow a quantity changes on every tick of the clock.temperature goes down by cooling ร— (temperature โˆ’ room)
Reader controlA quantity the reader may set the start of.Cooling rate
CheckWhat success looks like. It is tested over the whole run.temperature at least 60 ยฐC after 15 minutes

Your first lab

Open New post โ†’ Problem โ†’ Model lab. The Guide tab ticks these off by itself, and Show me lights up where to click.

  1. Add a part. Make a new part, or start from one of the four templates and take it apart.
  2. Give it a quantity. A name, a start value and a unit. Rates are quantities too: "Cooling rate, 0.08 per minute".
  3. Make it change. Write a rule. The line under it reads it back in plain words, with the value at the start.
  4. Run it and read it. Press Play. Does it behave the way you expect? If not, look at the rule or a start value.
  5. Let the reader change something. Switch on Reader can change beside one or two quantities.
  6. Write a check. It must fail at the start, or readers have nothing to do.
  7. Show it can be passed. Set the reader controls until the check passes. That's your solution; readers only see it after they answer or reveal it.

Publishing runs everything again on the server: it won't publish a lab whose check already passes, or whose solution doesn't.

Making a part

1 ยท What is it?

A name (Coffee, Town, Planet), a look and a colour. The look follows one quantity: a cup changes from cold blue to hot orange, a tank fills, a crowd shows up to 60 dots, a ball grows, a bar rises.

2 ยท Its numbers

Each quantity has a name, a start value, a unit, and Lowest and Highest values that keep it sensible. Water can't go below 0 litres. The name in rules is made for you: "Room temperature" becomes room_temperature.

3 ยท How it changes

Rules, as sentences: "Every minute, temperature goes down by cooling ร— (temperature โˆ’ room)". A rule can use any quantity in the lab, even another part's. That's how parts affect each other.

Writing rules

You only write the amount. Type it, or build it from the name and sign chips under the box.

WriteMeans
+ โˆ’ ร— รทadd, take away, times, divide (you can also type * and /)
( )work this out first: cooling ร— (temperature โˆ’ room)
^to the power of: speed ^ 2
min( , ) max( , )the smaller or bigger of two: min(tap, 30)
sqrt abs exp log sin cos round โ€ฆsquare root, size without sign, and the other usual functions
pi3.14159โ€ฆ

Three verbs. Goes up by and goes down by change a quantity a little every tick; two such rules on the same quantity add up. Becomes sets it outright after the others, e.g. Fahrenheit becomes temperature ร— 9 รท 5 + 32.

Units are on you. A rate "per minute" in a lab whose clock ticks in hours is 60 times too slow. The clock's unit is at the top of the editor; give every rate a unit that matches it.

Five rule patterns

Most school science is one of these, or two of them together.

PatternRuleExamples
Grows in proportionx goes up by rate ร— xbacteria, compound interest, a rumour
Heads towards a targetx goes down by rate ร— (x โˆ’ target)a cooling cup, a charging battery, a drug leaving the blood
Flows in and outx goes up by inflow โˆ’ outflowa bath, a reservoir, a bank account with spending
Two parts interactingeach uses the other: โ€ฆ ร— rabbits ร— foxespredators and prey, an epidemic (healthy, ill, recovered)
Limitsadd ร— (1 โˆ’ x รท capacity), or set Highesta population running out of food, a full tank

Letting readers experiment

  • Switch on Reader can change for one or two quantities. More than that and the task turns into guesswork.
  • Readers set the start value; your rules take it from there. For a rate, that's simply the rate.
  • Lowest and Highest are the slider's ends, so set them to what's realistic.

Writing checks

A condition picks a quantity, a comparison and a number, and when to test it:

  • The whole time: the lowest (or highest) value of the run. "Foxes never fall below 5."
  • At the end: the last tick. "At least โ‚ฌ5,000 after 20 years."
  • Afterโ€ฆ: one moment. "At least 60 ยฐC after 15 minutes."

All conditions must hold. A good check fails at the start, can be passed with what the reader may change, and tests one idea. The editor tells you if the first two aren't true.

Why: a task that is already done teaches nothing, and one that can't be done teaches the reader to give up.

Worked examples

The first four are the editor's templates. The fifth is one to build yourself.

LabParts and rulesReaderCheck
Keep the coffee hot
physics, minutes ร— 30
temperature goes down by cooling ร— (temperature โˆ’ room)cooling rateafter 15 minutes, temperature โ‰ฅ 60 ยฐC
Rabbits and foxes
biology, years ร— 40
rabbits up by birth ร— rabbits โˆ’ hunting ร— rabbits ร— foxes; foxes up by gain ร— rabbits ร— foxes โˆ’ death ร— foxeshunting successthe whole time, rabbits โ‰ฅ 5 and foxes โ‰ฅ 5
Saving up
economics, years ร— 20
money up by money ร— interest รท 100 + savingyearly savingat the end, money โ‰ฅ โ‚ฌ5,000
Run a bath
maths, minutes ร— 20
water up by tap โˆ’ drain ร— watertap flowthe whole time โ‰ค 180 L, and at the end โ‰ฅ 120 L
A cold going round a school
health, days ร— 30
three crowds: healthy down by contact ร— healthy ร— ill; ill up by contact ร— healthy ร— ill โˆ’ recovery ร— ill; recovered up by recovery ร— illcontact (hand-washing lowers it)the whole time, ill โ‰ค 60

When something's wrong

MessageWhat it meansFix
I don't know a quantity called "โ€ฆ"A name in the rule doesn't match any quantity, often a typo.Use the suggestion, or click a name chip.
A bracket "(" is never closedEvery ( needs a ).Add the missing bracket.
Something is missing between โ€ฆ Maybe a ร—?Two things side by side with no sign between them.Write 2 ร— x, not 2x.
The numbers run awayA quantity grows without limit, or a rule divides by zero.Give the quantity a Highest value, or check the rule's signs.
Your check already passes at the startReaders would be done without doing anything.Make the condition stricter, or start from a weaker set-up.
Your solution doesn't pass the checkThe values under "Show it can be passed" don't pass.Move them until the check passes again.

Using your lab

  • As a problem: it's a post like any other. Readers play with it and press Check my answer; the server runs the lab again and marks it.
  • In a lesson: add a Try it step and paste the lab's link. Passing its check completes the step.
  • In a course: add it as an item; it counts as practice.

Log in to build a model lab

× Enlarged view