Trainerflow Docs trainerflow.com
The app › The simulator

The app

The simulator

Run a program as the athlete would, step by step, and project it weeks ahead with the plan.

Writing a program is only half the job. The other half is making sure it does what you meant, and the quickest way to find out is to run it. The SPDK gives you two ways to do that: the simulator, which runs the program one halt at a time on a phone, and the plan, which projects it weeks ahead in one go.

The simulator

Unless the plan is open, a phone sits on the right of the editor. It shows exactly what the athlete will see on theirs, because it is the same screen the mobile app draws.

Press Run the program to start. The SPDK compiles your program (Compiling) and the phone shows the first halt.

The simulator
The first halt of Starting Strength: a set of five back squats at 60 kg.

What a halt looks like

A halt shows up in one of two ways, depending on how the program stopped.

When an exec is called, the phone shows a workout screen:

  • each exercise as a heading, with its description and a link to an exercise video when the action has one,
  • the targets the program specified, e.g. 5 reps at 80 kg, each as a big number. What the athlete did starts out as the target; when they were off target, they swipe the row to the left (Swipe if off target) and type in what they did instead. A target given as a range shows Target and Actual side by side, and the actual has to be typed in,
  • under Log, anything else the program measures that has no target, such as a note.

When the program asks for a single value, the phone shows just that question, with one field in the middle of the screen.

Answering

Fill in the fields the way the athlete would. Number fields take numbers only; yes/no inputs are a pair of buttons and notes have an Add a note field. Everything the program measures has to have a value, unless the program marks it optional, in which case it can be left blank.

Moving through the program

  • The big green arrow continues: it sends what you entered to the program and moves on to the next halt.
  • Back steps back to the previous halt, as if the last one never happened.
  • The round × stops the simulation.

When the program rests, the phone shows a countdown. It chimes at the end and continues on its own, so you don’t have to wait out a two-day rest: just press the arrow.

Changing the program as you go

You don’t need to restart the simulator after editing your program. As soon as the SPDK saves, it replays the simulation against the new code, feeding it the values you have already entered, and you land where you were. Edit, glance at the phone, edit again.

The plan

The simulator is great for looking closely at one halt, but it is slow going if you want to know what week six looks like. That is what the plan is for. Press Plan in the header and the plan takes the simulator’s place, with the program projected forward as if the athlete did exactly what they were told. Press Plan again to get the simulator back.

The plan is laid out by Week, and each week by day. For a run the days are dates, starting with Today and Tomorrow. A program that is not running yet starts on this week’s Monday, and its days are numbered, Day 1, Day 2 and so on. A line marks today. The plan projects four weeks at a time; scroll to the end to load the next four, up to a year.

The plan
Starting Strength in the plan. Every lift goes up 2.5 kg the session after all its reps are made.

What if

Each set in the plan has an Actual field. Type in a value, say fewer reps than prescribed, and the plan recomputes everything after it, so you can see how the program would react to a missed set three weeks from now. Clear all edits takes you back to the program as prescribed.

Where the plan stops

At the end of the projection the plan tells you why it stopped:

Message What it means
The program finishes here. The program has nothing left to specify.
The program goes on past N weeks. The program is still going. Load more weeks to see further.
The projection stopped after N halts. The program produced a great many halts without time moving on. Usually a missing rest.
The projection stopped after 10 seconds. The program kept computing without ever halting, most likely a loop that never ends.
The program has errors. Fix them to see its plan. Exactly that.