1. A method, comprising: receiving a model, the model including model elements scheduled to execute in time slots on a hardware device, the model being received via a technical computing environment (TCE), the receiving the model being performed by a device; identifying a set of one or more model elements, of the model elements, that, when moved to one or more time slots of the time slots, preserve a behavior of the model, the identifying the set of one or more model elements being performed by the device; determining whether a combined execution time of the model elements is less than or equal to a duration of a first time slot of the time slots, the determining whether the combined execution time of the model elements is less than or equal to the duration of the first time slot being performed by the device; scheduling the model elements for execution in the first time slot when the combined execution time of the model elements is less than or equal to the duration of the first time slot, the scheduling the model elements being performed by the device; and scheduling one or more model elements, of the set of one or more model elements, for execution in a second time slot of the time slots, when the combined execution time of the model elements is greater than the duration of the first time slot, the scheduling the one or more model elements being performed by the device.