The evolution of a binary system is considered as a sequence of stages the duration of which are defined by the shortest evolutionary time-scale of one of the binary components (see the list of the evolutionary states of stars in Sections 3 and 4). The states of stars and binary parameters at the beginning of a stage fully determine the fate of the binary to the end of the stage, under the assumption that the parameters of the surrounding plasma each star provides for its companion remain unchanged during the course of the stage.
Then the code finds a new stage the binary should transit to, with this stage being determined by the evolutionary states of both components, and calculates it. During the transitions to a new stage, some basic parameters (such as semi-major axis, orbital eccentricity, magnetic fields, rotational periods, masses of stars and their cores, etc.) are changing continuously, unless the end of the stage is caused by an ``instantaneous'' event like the supernova explosion. Additional quantities defined by basic parameters (such as luminosity, accretion rate, magnetospheric radius, etc.) can have discontinuities. The track is calculated until the age of the binary equals the galactic age taken to be 15 yr.
Note that if a binary is disrupted prior to the end of the track or one of the components is fully destroyed (e.g. by merging with another companion), the evolution of the components becomes mutually independent. However, one can use the algorithm described above to model their evolution. A cartoon description of the Scenario Machine work is shown in Figure 14. Examples of evolutionary tracks with normal and compact companions will be given in the subsequent sections.