1 Introduction

Modern aircraft host a huge amount of electronics such as sensors that gather information, units where the information is processed, actuators that control the aircraft, and equipment that presents information to the pilot. Electronics in an aircraft is called avionics and due to the real-time requirements of avionic systems, it is not sufficient that the logical result of a computation is correct, it is also crucial that the result is produced at the correct time. This punctuality can be ensured by having a schedule for all activities in the system. Scheduling of real-time systems can refer either to on-line scheduling where the scheduling decisions are made at runtime or, as in this work, to pre-runtime (off-line) scheduling where the schedule is created at compile time.

This work addresses the scheduling of an industrially relevant Integrated Modular Avionic (IMA) system, that was introduced in Blikstad et al. (2018). This problem can be considered as a multiprocessor scheduling problem, where the tasks have multiple time windows and precedence relations between them, combined with the scheduling of a communication network. In the avionics context, a processor is referred to as a module and we consider the case when all tasks are beforehand assigned to a module. The communication network is scheduled by assigning communication messages to time slots. To send a communication message involves the execution of certain tasks on the involved modules and for this reason, the task and communication scheduling are closely integrated. Compared to the problem formulation used in Blikstad et al. (2018), we here also include the possibility of co-allocation of messages in a time slot as introduced in Rönnberg (2018). There is no objective function and the purpose of the scheduling is to find a feasible solution or to conclude that none exists.

The future industrial need is a capability to solve very large-scale instances of avionics scheduling problems of this kind and the contributions of this paper are extensions of previous work that facilitate this. In the previous works Blikstad et al. (2018), Karlsson and Rönnberg (2018), and Rönnberg (2018), the largest instance solved has 15 modules and about 20,000 tasks (about 50% of these are fixed tasks and 6000 of the tasks are placed on the most occupied module).

A first contribution of the paper is an exact solution approach based on a constraint generation procedure which is obtained by combining and improving the models and methods presented in Blikstad et al. (2018), Karlsson and Rönnberg (2018), Rönnberg (2018), and Boberg (2017). The constraint generation procedure alternates between solving a relaxation of the problem and using its solution to restrict the solution space to define a subproblem. If this subproblem has a feasible solution, this is a solution to the original problem, and otherwise new constraints are added to the relaxed problem and the procedure is repeated. Since it is important that the solution to the relaxed problem has a good chance to yield a feasible solution to the subproblem, the relaxed problem has an objective function with the purpose to contribute to this.

The results for the exact constraint generation procedure show that such decomposition approach is efficient for the problem structure, but in order to solve even larger instances, a second contribution of this paper is to extend it into a matheuristic method (see e.g. Maniezzo et al. (2010) and Archetti and Speranza (2014)) by combining it with an Adaptive Large Neighbourhood Search (ALNS) [see Ropke and Pisinger (2006) and Pisinger and Ropke (2007)] for solving the relaxed problem. To find a feasible solution to the relaxed problem is for larger instances a true challenge and our ALNS is therefore carefully designed with respect to searching for feasibility while taking the value of the objective function into account. This is obtained by the following two key components. Firstly, since the repair method needs to handle both discrete and continuous variables, several kinds of constraints, and an objective function, we have chosen to repair the solution by using a mixed integer programming (MIP)-solver. This gives the possibility to benefit from the very efficient heuristics implemented in commercial solvers, as initially suggested in Muller et al. (2012). Secondly, the adaptive mechanism of our ALNS is used to handle the balance between the objective value and feasibility with respect to various constraints in a strategic oscillation fashion.

Our computational results are provided for two categories of industrially relevant instances. The first category, which is not publicly available, orginates from Blikstad et al. (2018) and it is included to provide a comparison to our previous work. The second category is new and derived to be industrially relevant but generic enough to be made publicly available.

This section continues with a brief presentation of the industrial background of the problem and a review of research that include avionics scheduling and MIP. Thereafter follows a description of related work on matheuristics and ALNS, the latter with a particular emphasis on strategies that use MIP-models to repair the solution. The section ends with an outline of the paper and a summary of its contributions.

1.1 Problem statement

The addressed avionic system scheduling problem was introduced in Blikstad et al. (2018), where a detailed technical background of the problem statement was given. The first description was extended in Rönnberg (2018) to include further details with respect to the communication scheduling. Here, we give the problem statement without describing its complete technical background and refer the interested reader to Blikstad et al. (2018) and Rönnberg (2018) for these.

The considered avionic system, illustrated in Fig. 1, contains a set of nodes with modules (processors) that hosts tasks. Each node contains a single communication module (CM), and one or more application modules (AMs). A CM handles the external, inter-node, and intra-node communication of the node and an AM runs the software applications. These applications are grouped and assigned to partitions that are the entities treated as tasks to be scheduled. The nodes communicate by sending messages on a communication network (CN) from a single CM to a set of receiving CMs and the communication protocol is such that messages are sent in discrete time slots. The considered system executes periodically, meaning that a schedule, called a major frame, is repeated infinitely.

Fig. 1
figure 1

An overview of a system with n nodes. The structure of the content is the same for all nodes and therefore only displayed for node 1 and n

The tasks in the system execute periodically and all tasks on the CMs have the same period as the system. On the AMs, the period of a task can be a divisor of that of a major frame, and then there are multiple instances of a task in a major frame. Each task must be performed on a particular module for the duration of its execution requirement without overlapping any other task. For each task, there is a set of sub-intervals and each task must be assigned to one of these. Between each ordered pair of tasks on an AM, there is an additional requirement that there should be a minimum idle time between them.

There are precedence relations between tasks and these are referred to as dependencies. A dependency restricts the duration between the start of an instance of a task to the start of an instance of another task to be within the interval given by a minimal and a maximal time lag.

To send and receive a message on a CN, there are four types of tasks that are performed in a particular order on the involved CMs. On the sending CM, there is first a task that prepares the message and then a task that sends the message. On each receiving CM, there is first a task that dequeues the message and then a task that reads the data. Each message sent through the CN must be assigned to a time slot, and thereby claim some of the capacity available in this slot. Each slot has a maximum capacity that cannot be exceeded by the combined requirement of the messages assigned to the slot. If two or more messages are sent in the same slot, their tasks of the same type must be performed in immediate succession and with a reduced execution requirement compared to if they were performed separately. Furthermore, the assignment of a message to a slot imposes slot-unique release times and deadlines on the tasks involved.

Further details are presented in Sect. 2, along with the mathematical model; there, and throughout the paper, the model is divided into four components:

  • AM-scheduling

  • CM-scheduling

  • Precedence relations

  • CN-scheduling

AM-scheduling and CM-scheduling refers to the scheduling of tasks on the AMs and CMs respectively, while Precedence relations refers to the dependencies between tasks and CN-scheduling refers to the communication message scheduling and the additional requirements on the tasks involved in sending and receiving messages.

The problem statement does not include an objective function since all feasible solutions to the problem are considered equally good. Instead, the challenge is to determine whether a feasible solution exists or not, and if there is a feasible solution, provide a schedule. A schedule for a major frame is defined by two types of decisions, the assignment of communication messages to time slots and the assignment of start times to tasks.

1.2 Related work on avionic scheduling

The solution approach in this paper utilises MIP techniques to solve a pre-runtime scheduling problem that occurs in the development of IMA systems. Therefore, we restrict the related work on avionic scheduling to contributions that apply MIP approaches to pre-runtime scheduling of IMA systems. We start by characterising the previous work with respect to the decisions to be made while scheduling and how they are constrained. This is followed by a description of solution approaches. For a technically oriented overview of scheduling in IMA systems, we refer to Blikstad et al. (2018).

In our problem setting, each task is limited to execute on a specific module and this gives a reduced complexity compared to when each task must be assigned to a module with respect to different side constraints, as in Hao et al. (2018) and Eisenbrand et al. (2010). In Hao et al. (2018), the assignment is done with respect to memory and security constraints, while in Eisenbrand et al. (2010) this is done with respect to memory requirements, the bandwidth of the network linking together the modules, and co-habitation constraints (a subset of tasks must execute on the same or a specific module).

In an IMA system, software applications typically must communicate with each other within certain time limits. This often occurs as precedence constraints between tasks or instances of tasks forcing them to execute within a given duration of one another. In our problem setting, we have precedence constraints between particular instances of tasks, while in the problem setting of Hao et al. (2018), Zhang et al. (2014), Craciunas and Oliver (2016), and Lhachemi et al. (2016), they have precedence constraints between tasks. When precedence constraints are defined between tasks, the constraint forces the instances of the involved tasks to execute within a given duration of another. In Craciunas and Oliver (2016) and Lhachemi et al. (2016), the number of instances of the tasks involved in a precedence constraint are assumed to be the same, while in Hao et al. (2018) and Zhang et al. (2014) any number of instances of the tasks in a precedence constraint is allowed. In Hao et al. (2018), they also handle constraints related to if tasks execute on the same module or not.

An Ethernet network is often used for communication between tasks on different modules. Depending on the modelling of this network, the level of interaction between communication and task scheduling can differ. In our model, a specific time-triggered Ethernet network, described in Blikstad et al. (2018), is used where the messages sent on the network must obey sequencing constraints. The messages sent on the network are associated with tasks on the modules and this increases the complexity of the scheduling problem. In Zhang et al. (2014) and Craciunas and Oliver (2016), who both also address time-triggered Ethernet networks, there are sequencing constraints between messages sent on the network that are linked to tasks on the modules. However, in Eisenbrand et al. (2010), an Avionics Full-Duplex Switched Ethernet network is studied, and there the network communication appears as an extra knapsack constraint on the assignment of tasks to modules, where each module has a maximum bandwidth limit.

There exist various solution approaches to tackle the scheduling problems in IMA systems using MIP techniques. In Hao et al. (2018), Lhachemi et al. (2016), and Zhang et al. (2014), the authors state MIP models and solve problems with up to 5, 10 and, 270 tasks, respectively. In Eisenbrand et al. (2010) the authors present three different MIP formulations for their problem and compare their performance to a heuristic for instances with up to 177 tasks. An exact incremental solution approach utilising the problem structure, as well as a solution approach for solving the entire problem at once, are presented in Craciunas and Oliver (2016). Their performance is evaluated on instances with up to 6912 tasks, using both a satisfiability modulo theory solver and a MIP solver.

In our problem, the model for the communication between modules is very detailed, resulting in more tasks than described in existing literature concerning scheduling of IMA systems. We will present results for instances with up to 54,731 tasks, which is to be compared to that the maximum number of tasks that we have found in the existing literature is 6912.

1.3 Related work on matheuristics and ALNS

In the proceedings of the first workshop on matheuristics in 2008, Caserta and Voß (2010) described matheuristics as exploiting mathematical programming techniques in (meta)heuristic frameworks. In the following years, matheuristics received an increased attention from the combinatorial optimisation community, and a number of contributions on matheuristics were published and summarised in three surveys. The first survey, by Doerner and Schmid (2010), presented matheuristic techniques applied to rich vehicle routing problems. The second survey, by Ball (2011), focused on the different application areas in which matheuristics had been used. In the third survey the topic was again matheuristic techniques applied to routing problems, this time by Archetti and Speranza (2014). The topic was relevant to survey once more thanks to the number of contributions in these years.

Since then, matheuristic techniques have been applied to an even wider range of applications. Two recent examples being Guido et al. (2018), who uses MIP models to explore large neighbourhoods in a metaheuristic search for an offline patient-to-bed assignment problem, and Framinan and Perez-Gonzalez (2018), who use a succession of MIP models in an approximation algorithm for an order scheduling problem. The matheuristic to be presented in this paper is based on an ALNS that uses restricted MIP models to explore large neighbourhoods efficiently.

The ALNS framework was introduced in the papers Ropke and Pisinger (2006) and Pisinger and Ropke (2007) as an extension of the large neighbourhood search (LNS) by Shaw (1998). LNS is a metaheuristic strategy that iteratively tries to improve a solution by exploring large neighbourhoods. In an LNS, the move of an iteration is defined by two operators, a destroy operator that creates a neighborhood by destroying the current solution and a repair operator that reconstruct a solution given a neighborhood. Different destroy and repair operators are typically defined, and a pair of these is selected at random in an iteration. The ALNS framework extends LNS by employing a master level metaheuristic (or local search) to guide the neighbourhood search, together with a mechanism to adapt the algorithm based on its performance. In Ropke and Pisinger (2006) and Pisinger and Ropke (2007), simulated annealing was used as the master level metaheuristic.

In Ropke and Pisinger (2006), the ALNS framework was applied to the pickup and delivery problem with time windows and in Pisinger and Ropke (2007), it was used to solve a general routing problem. Since then, the ALNS framework has been successfully applied to a number of different optimization problems; see for example time-tabling in Kiefer et al. (2017), optimisation of yard assignment in an automotive transshipment terminal in Cordeau et al. (2011), scheduling twin yard cranes in Gharehgozli et al. (2015), and multi-mode resource-constrained project scheduling in Gerhards et al. (2017).

In the original ALNS framework, the authors suggest using fast heuristics to repair the destroyed solution. However, in Muller et al. (2012), the authors instead use MIP models as repair operators. Their motivation for this is that the heuristics in commercial MIP solvers have become efficient enough to be used instead of fast problem-specific heuristics. This is particularly useful for complex problems where it is not straightforward to implement efficient heuristics. In Muller et al. (2012), the authors employ a strategy where the destroy operator releases a set of variables from their current solution while keeping the rest fixed. This creates a restricted MIP-model that defines the neighbourhood to be searched. The solver then acts as the repair operator and tries to find a new solution to the restricted MIP model that improves the objective compared to the solution that was destroyed. Since the solution of the restricted MIP model of an iteration is a feasible solution for the restricted MIP of the next iteration, Muller et al. (2012) use steepest descent as the master level heuristic to guide the neighbourhood search. As a mechanism to improve diversity, Muller et al. (2012) restart the search with the next best solution if no improvement is found in a predetermined number of iterations.

Since then, MIP models have been further used in ALNS. Two publications that utilise restricted MIP models as repair operators, similar to Muller et al. (2012), are Mancini (2016) that solve a vehicle routing problem, and Belo-Filho et al. (2015) that solve an integrated production and distribution problem. Both their algorithms use the solution of the previous iteration as a feasible starting solution in the next iteration, and then only accept a new solution if it improves the objective. Neither of them employ a restart mechanism.

In Gerhards et al. (2017), the authors implement MIP models as repair operators in an ALNS to a solve a multi-mode resource scheduling problem. After each iteration, they perform a problem specific heuristic, called Serial Schedule Generation Scheme, in an attempt to improve the solution created by the repair operator. A difference in Gerhards et al. (2017), compared to Muller et al. (2012), is that they use different objectives in the repair operators, which might result in a solution with a worse global objective than the solution of the previous iteration. Regardless of the new value of the global objective, the authors always keep their new solution, and therefore their master level metaheuristic can be interpreted as a variable neighbourhood descent method.

The work of Pereira et al. (2015) uses repair operators that hybridise the use of a constructive heuristic and a MIP model within their ALNS search developed for the probabilistic maximal covering location-allocation problem. In an iteration, the authors first destroy and repair the location decision by a pair of destroy and repair heuristics, and secondly they recreate a complete solution to the original problem using a MIP model.

1.4 Outline and contribution

The motivation for the solution method to be presented in this paper is the industrial need for a scheduling tool that can be used for large-scale avionic scheduling instances of the kind addressed in this paper. To this end, Sect. 2 first presents an exact solution approach based on a constraint generation procedure which is the outcome of combining models and methods presented in Blikstad et al. (2018), Karlsson and Rönnberg (2018), Rönnberg (2018), and Boberg (2017) with some further improvements which yield a significant increase in computational performance.

To further enhance the capability to solve very large-scale problems, Sect. 3 presents how the constraint generation procedure is extended into a matheuristic. The matheuristic uses an ALNS to solve the relaxation of the problem used in the constraint generation procedure, and the search explores the neighbourhoods by solving MIP models. To achieve feasibility in this relaxed problem is difficult, and we therefore designed the ALNS to balance the focus between the objective value and feasibility in a way inspired by strategic oscillation, see Glover (1977).

Section 4 contains computational results for two categories of industrially relevant instances. The first category, which is not publicly available, is included since it is important for our project. Some of these instances were introduced in Blikstad et al. (2018) and enable comparision to our previous work. The second category is new and derived to be industrially relevant but expressed in generic enough terms to be made publicly available.Footnote 1 As illustrated by the computational results for these instances, both the improvements of the exact approach, as introduced in Sect. 2, and the design and use of an ALNS, introduced in Sect. 3, successfully contributes to solving very large-scale instances that could not previously be solved. The paper is ended by concluding remarks in Sect. 5.

2 Exact solution approach

A mathematical model and an exact solution approach based on constraint generation were presented in Blikstad et al. (2018) and the exact procedure to be described in this section is based on the same mechanisms as the original one. Therefore, we begin this section with a short review of the original procedure, followed by a summary of the enhancements made, and then the details of the exact approach proposed in this paper are presented.

2.1 The constraint generation procedure from previous work

Already in Blikstad et al. (2018), the mathematical model was divided into the four components Precedence relations, AM-scheduling, CN-scheduling, and CM-scheduling. It was then observed that for problem instances of practical relevance

  • the computational challenge is due to the large number of tasks to be sequenced on the CMs,

  • a considerable amount of the tasks on the CMs are fixed, and

  • the technical restrictions, like release times and deadlines of tasks, precedence relations and CN-scheduling, are not particularly tight.

Together, these characteristics make it profitable to make the following model formulation, which is suitable for constraint generation. This formulation divides the CM-scheduling component into relaxed CM-scheduling and CM-sequencing. For the relaxed CM-scheduling, a so-called section is defined for each part of a major frame that is not occupied by a fixed task, and it is required that each non-fixed task is assigned to a section, while complying with all requirements related to CM-scheduling, except preventing non-fixed CM-tasks from overlapping. In a complete model for the problem, CM-sequencing refers to that, for each set of non-fixed tasks that can be assigned to the same section, require that the tasks cannot overlap. This complete model, of course, includes an extreme number of variables and constraints, but by design, this formulations lends itself to constraint generation.

The constraint generation procedure begins with solving a relaxed problem where the mathematical model includes the components Precedence relations, AM-scheduling, CN-scheduling, and relaxed CM-scheduling. In a solution to the relaxed problem, each task is assigned to a section. By restricting the solution space of the complete model to comply with a solution to the relaxed problem, only a very small subset of CM-sequencing constraints are relevant to include in the model. Hence, a subproblem is defined by solving the complete model under the restriction imposed by the solution to the relaxed problem. In the subproblem, there is no guarantee that CM-sequencing is possible, therefore, the CM-sequencing constraints are treated as soft constraints and the objective of the subproblem is to minimize the number of overlapping CM-tasks.

If the subproblem finds a solution where there are no overlaps, a solution to the complete model has been found. Otherwise, it can be detected which of the CM-sequencing constraints are violated, and these can be added to the relaxed problem, which is then re-solved. This process can be repeated until an overlap-free solution to the subproblem is found. Convergence of the method follows from that there is a finite number of constraints to be added to the relaxed problem, and that in each iteration, at least one new constraint is added. In practice, the success of the method relies on that only very few of the constraints need to be generated.

2.2 The constraint generation procedure proposed in this work

The constraint generation procedure used in this work differs from previous work as follows. Firstly, in Blikstad et al. (2018), a restriction of the industrial problem was studied, since the possibility of co-allocating CN-messages was omitted. To allow co-allocation of messages is important from a practical point of view, but it makes the problem computationally more challenging because of the additional decisions to be made. In this paper, co-allocation is included as outlined in Rönnberg (2018), but with some improvements of the mathematical modelling.

Secondly, the relaxed CM-scheduling component has been improved by, instead of assigning the CM-tasks to a section (that is, part of a major frame that is not occupied by a fixed task) assign each CM-task to a smaller interval where the task must be placed, as outlined in Karlsson and Rönnberg (2018). This more fine-grained decision is made possible because after pre-processing, the interval between the release time and deadline of a task is divided into several sub-intervals, and it is known that in a feasible solution, a task must be placed within one of these sub-intervals. Thirdly, in the Bachelor thesis Boberg (2017), a computational study was performed to investigate which mathematical formulation of the CM-sequencing component performs best. The results of this study led to a modification of the CM-sequencing constraints compared to Blikstad et al. (2018).

By combining these enhancements, together with some further improvements of details, the resulting mathematical model is as to be presented. The model is divided into a Relaxed problem and a Subproblem, as illustrated in Fig. 2. The presentation of the model is structured such that it begins with introducing parts of the formulation that are common for AM- and CM-scheduling and it continues to present each of the model components according to the section references in Fig. 2. A consequence of the model changes is that the constraint called chains in Blikstad et al. (2018) has become redundant and it is therefore removed in this work. An overview of the solution procedure is presented after the model components.

Fig. 2
figure 2

Information flow and model components in the constraint generation procedure

2.3 Common for AM- and CM-scheduling

Let the set \({\mathcal {I}}\) index all tasks in the system and let P denote the length of the major frame. Task i has an execution requirement \(e_{i}\) and must execute without preemption within the interval between its release time \(t^{\text {r}}_{i}\) and deadline \(t^{\text {d}}_{i}\), \(i \in {\mathcal {I}}\). If \(t^{\text {r}}_{i} = t^{\text {d}}_{i} - e_{i}\) holds, task i is referred to as fixed. The period of task i is denoted by \(p_{i}\), \(i \in {\mathcal {I}}\), with \(p_{i}\) being a divisor of P so that there are \(P/p_{i}\) instances of task i in a major frame. For \(i \in {\mathcal {I}}\), introduce the continuous variable

$$\begin{aligned} x_{i} = \text {start time of task } i. \end{aligned}$$

Let \({\mathcal {H}}^{\text {CM}}\) and \({\mathcal {H}}^{\text {AM}}\) denote the set of CMs and the set of AMs, respectively. Let the set \({\mathcal {I}}_{h}\) include the indices of the tasks assigned to module \(h \in {\mathcal {H}}^{\text {CM}} \cup {\mathcal {H}}^{\text {AM}}\). For the industrial problem under consideration, all tasks on the CMs have a period of length P and all tasks on the AMs have a period of length P/64.

The interval between the release time and deadline of a task is, due to technical limitations and as a consequence of pre-processing, divided into sub-intervals. In a feasible solution, a task is assigned to one of these intervals. Let the set \({\mathcal {Q}}_{i}\) include the indices of the sub-intervals of task i, and let the release time and deadline of sub-interval q for task i be denoted by \(t^{\text {r}}_{iq}\) and \(t^{\text {d}}_{iq}\), respectively, \(q \in {\mathcal {Q}}_{i}\), \(i \in {\mathcal {I}}\). Note that \(t^{\text {r}}_{i}=\min _{q \in {\mathcal {Q}}_{i}} t^{\text {r}}_{iq}\) and that \(t^{\text {d}}_{i} = \max _{q \in {\mathcal {Q}}_{i}} t^{\text {d}}_{iq}\).

For \(i \in {\mathcal {I}}_{}\), \(q \in {\mathcal {Q}}_{i}\), introduce the binary variable

$$\begin{aligned} \alpha _{iq} = {\left\{ \begin{array}{ll} 1, &{} \text {if task }i\text { is assigned to sub-interval }q, \\ 0, &{} \text {otherwise.} \end{array}\right. } \end{aligned}$$

Each task is assigned to one of its sub-intervals by the constraint

$$\begin{aligned} \sum _{q \in {\mathcal {Q}}_{i}} \alpha _{iq} = 1, \quad i \in {\mathcal {I}}, \end{aligned}$$
(1)

while the constraint

$$\begin{aligned} \sum _{q \in {\mathcal {Q}}_{i}} t^{\text {r}}_{iq}\alpha _{iq} \le x_{i} \le \sum _{q \in {\mathcal {Q}}_{i}} t^{\text {d}}_{iq}\alpha _{iq} - e_{i}, \quad i \in {\mathcal {I}}, \end{aligned}$$
(2)

restricts the release time and deadline of the task to be that of the sub-interval it is assigned to.

2.4 Precedence relations

In this problem setting, we consider one type of precedence relation constraints called dependencies. The dependencies are indexed by quadruples where (ijkl) refers to restricting the duration from the start of instance k of task i to the next start of instance l of task j to be between \(l^{\text {min}}_{ijkl}\) and \(l^{\text {max}}_{ijkl}\). Let the set \({\mathcal {D}}\) be the set of all dependency indices. For dependency \((i, j, k, l) \in {\mathcal {D}}\) introduce the continuous variable

$$\begin{aligned} u_{ijkl} = \text {the length of a dependency,} \end{aligned}$$

and the binary variable

$$\begin{aligned} y^{\text {D}}_{ijkl} = {\left\{ \begin{array}{ll} 1, &{} \text {if instance }k\text { of task }i\text { starts before instance }l\text { of task }j \\ &{} \text {in a major frame,} \\ 0, &{} \text {if instance }l\text { of task }j\text { starts before instance }k\text { of task }i \\ &{} \text {in a major frame.} \end{array}\right. } \end{aligned}$$

The minimum and maximum length of a dependency \((i,j,k,l)\in {\mathcal {D}}\) is enforced by the constraints

$$\begin{aligned} u_{ijkl}= & {} x_{j} + lp_{j} - (x_{i} + kp_{i}) + Py^{\text {D}}_{ijkl}, \end{aligned}$$
(3)
$$\begin{aligned} l^{\text {min}}_{ijkl}\le & {} u_{ijkl} \le l^{\text {max}}_{ijkl}. \end{aligned}$$
(4)

Note that the length of a dependency is measured differently depending on the order of the instances within a major frame. This is illustrated in Fig. 3.

Fig. 3
figure 3

Examples of the two ways in which the duration between the start of instance \(k=0\) of task i to next start of instance \(l=0\) of task j can be measured for dependency \((i,j,k,l)\in {\mathcal {D}}\)

2.5 AM-scheduling

Scheduling of the AMs involves sequencing the tasks while respecting idle times between them. Let the set \({\mathcal {I}}{\mathcal {I}}^{\text {O}}_{h} \subseteq \{ (i,i') \in {\mathcal {I}}_{h} \times {\mathcal {I}}_{h}: i < i'\}\) include all pairs of task indices on AM h that with respect to their respective release times and deadlines can be placed such that they overlap or violate the idle times between them, \(h \in {\mathcal {H}}^{\text {AM}}\).

For \(h \in {\mathcal {H}}^{\text {AM}}\), \((i,i') \in {\mathcal {I}}{\mathcal {I}}^{\text {O}}_{h}\), introduce the binary variable

$$\begin{aligned} y_{ii'} = {\left\{ \begin{array}{ll} 1, &{} \text {if task }i\text { starts before task }i', \\ 0, &{} \text {if task }i'\text { starts before task }i. \end{array}\right. } \end{aligned}$$

The minimum idle time between tasks is order specific and for the pair of tasks \((i, i') \in {\mathcal {I}}{\mathcal {I}}^{\text {O}}_{h}\), \(h \in {\mathcal {H}}^{\text {AM}}\), it is denoted by \(l^{\text {idle}}_{ii'}\). The AM-sequencing constraints

$$\begin{aligned}&x_{i} + e_{i} + l^{\text {idle}}_{ii'} - (t^{\text {d}}_{i} + l^{\text {idle}}_{ii'} - t^{\text {r}}_{i'})(1 - y_{ii'}) \le x_{i'}, \quad (i,i') \in {\mathcal {I}}{\mathcal {I}}^{\text {O}}_{h}, ~ h \in {\mathcal {H}}^{\text {AM}}, \end{aligned}$$
(5)
$$\begin{aligned}&x_{i'} + e_{i'} + l^{\text {idle}}_{i'i} - (t^{\text {d}}_{i'} + l^{\text {idle}}_{i'i} - t^{\text {r}}_{i})y_{ii'} \le x_{i}, \quad (i,i') \in {\mathcal {I}}{\mathcal {I}}^{\text {O}}_{h}, ~ h \in {\mathcal {H}}^{\text {AM}}, \end{aligned}$$
(6)

make the start times of the tasks comply with the order in which they are sequenced.

2.6 CN-scheduling

For the communication message scheduling, let \({\mathcal {M}}\) be an ordered set of CN-message indices and, further, let \({\mathcal {N}}\) be an ordered set of CN-slot indices, where the order is with respect to the location in a major frame. For \(n \in {\mathcal {N}}\), \(m \in {\mathcal {M}}\), introduce the binary variable

$$\begin{aligned} z_{nm} = {\left\{ \begin{array}{ll} 1, &{} \text {if message }m\text { is assigned to CN-slot }n, \\ 0, &{} \text {otherwise.} \end{array}\right. } \end{aligned}$$

Each CN-message is assigned to a CN-slot by the constraint

$$\begin{aligned} \sum _{n \in {\mathcal {N}}} z_{nm} = 1, \quad m \in {\mathcal {M}}, \end{aligned}$$
(7)

while the constraint

$$\begin{aligned} \sum _{m\in {\mathcal {M}}} l^{\text {msg}}_{m}z_{nm} \le l^{\text {slot}}_{n}, \quad n \in {\mathcal {N}}, \end{aligned}$$
(8)

ensures that the capacity of each slot is respected, where \(l^{\text {slot}}_{n}\) denotes the capacity of CN-slot \(n \in {\mathcal {N}}\) and \(l^{\text {msg}}_{m}\), denotes the amount of capacity that CN-message \(m \in {\mathcal {M}}\) claims in a slot.

2.6.1 CN-message order

To facilitate some of the modelling to follow, an order between the CN-messages needs to be established and co-allocation of CN-messages needs to be managed. Co-allocation of CN-messages refers to that two or more messages are assigned to the same CN-slot, something which implies that certain tasks are merged on the CMs. To avoid symmetries in the model with respect to co-allocation of messages, and without loss of generality, co-allocated CN-messages are forced to be placed in a slot in ascending order with respect to their CN-message indices.

Introduce, for \(m',~m \in {\mathcal {M}}: m < m'\), the binary variables

$$\begin{aligned} y^{\text {S}}_{mm'} = {\left\{ \begin{array}{ll} 1, &{} \text {if message }m\text { is placed before message }m', \\ 0, &{} \text {if message }m'\text { is placed before message }m, \end{array}\right. } \end{aligned}$$

and

$$\begin{aligned} w_{mm'} = {\left\{ \begin{array}{ll} 1, &{} \text {if message }m\text { is placed before message }m'\text { in a slot,} \\ 0, &{} \text {otherwise.} \end{array}\right. } \end{aligned}$$

Further, let \(n^{\text {min}}_{m}\) and \(n^{\text {max}}_{m}\) denote the least and the greatest CN-slot index, respectively, that is eligible for message \(m\in {\mathcal {M}}\). For \(m' \in {\mathcal {M}}\), \(m \in {\mathcal {M}}: m < m'\) introduce the constraints

$$\begin{aligned}&\sum _{n \in {\mathcal {N}}}nz_{nm} + 1 - w_{mm'} - (n^{\text {max}}_{m} - n^{\text {min}}_{m'} + 1)(1 - y^{\text {S}}_{mm'}) \le \sum _{n \in {\mathcal {N}}}nz_{m'n} \nonumber \\&\quad \le \sum _{n \in {\mathcal {N}}}nz_{nm} + (n^{\text {max}}_{m'} - n^{\text {min}}_{m})(1 - w_{mm'}), \end{aligned}$$
(9)
$$\begin{aligned}&\sum _{n \in {\mathcal {N}}}nz_{m'n} + 1 - (n^{\text {max}}_{m'} + 1 - n^{\text {min}}_{m}) y^{\text {S}}_{mm'} \le \sum _{n \in {\mathcal {N}}}nz_{nm}, \end{aligned}$$
(10)
$$\begin{aligned} w_{mm'} \le y^{\text {S}}_{mm'}, \end{aligned}$$
(11)

to relate both to the order of the messages and co-allocation of messages to the assignment of CN-messages to CN-slots, so that the values of the involved variables comply with their definitions.

2.6.2 Time restrictions for CN-tasks

There are four types of tasks involved in communicating a CN-message, two on the sending CM and two on each of the receiving CMs. These tasks are henceforth referred to as CN-tasks and the elements of the index set \({\mathcal {K}}=\{1,2,3,4\}\) are used to refer to which type of CN-task is considered. Let the set \({\mathcal {I}}^{\text {K}}_{k}\) include all tasks of type \(k \in {\mathcal {K}}\), and introduce the set \({\mathcal {I}}^{\text {M}}_{m}\) to include the CN-tasks that are involved in communicating CN-message \(m \in {\mathcal {M}}\).

For each CN-slot and type of CN-task, there are release times and deadlines that the corresponding CN-tasks must comply with if a CN-message is assigned to this slot. Denote the release time and deadline that task \(i \in {\mathcal {I}}^{\text {M}}_m \cap {\mathcal {I}}^{\text {K}}_k\) must comply with if CN-message m is assigned to slot n by \(t^{\text {r-msg}}_{nk}\) and \(t^{\text {d-msg}}_{nk}\), respectively, \(n \in {\mathcal {N}}\), \(k \in {\mathcal {K}}\), \(m \in {\mathcal {M}}\). The constraint

$$\begin{aligned} \sum _{n \in {\mathcal {N}}} t^{\text {r-msg}}_{nk} z_{nm} \le x_{i} \le \sum _{n \in {\mathcal {N}}} t^{\text {d-msg}}_{nk} z_{nm} - e_{i}, \quad i \in {\mathcal {I}}^{\text {M}}_{m} \cap ({\mathcal {I}}^{\text {K}}_{2} \cup {\mathcal {I}}^{\text {K}}_{3}), ~ m \in {\mathcal {M}}, \end{aligned}$$
(12)

ensures that these times are respected.

For CN-tasks of type 2, it holds that each interval \([t^{\text {r}}_{iq}, t^{\text {d}}_{iq}]\), coincides with an interval \([t_{n2}^{\text {r-msg}}, t_{n2}^{\text {d-msg}}]\) for some \(n \in {\mathcal {N}}\), and vice versa, and that \(e_{i} = t^{\text {d}}_{iq}-t^{\text {r}}_{iq}\) holds, \(q \in {\mathcal {Q}}_{i}\), \(i \in {\mathcal {I}}^{\text {K}}_{2}\). For this reason, choosing a sub-interval for a CN-task of type 2 and assigning a CN-message to a CN-slot is in fact the same decision, expressed by the constraint

$$\begin{aligned} \alpha _{iq} = z_{nm}, \quad q \in {\mathcal {Q}}_{i}:~t^{\text {r}}_{iq}=t_{n2}^{\text {r-msg}}, \ i\in {\mathcal {I}}^{\text {K}}_{2}\cap {\mathcal {I}}^{\text {M}}_{m}, ~ m \in {\mathcal {M}}, ~ n \in {\mathcal {N}}. \end{aligned}$$
(13)

In the model, these variables are, for clarity reasons, introduced separately.

2.6.3 Merging of CN-tasks

When CN-messages are co-allocated in a slot, their corresponding CN-tasks that are of the same type and on the same CM will be merged. This is possible since the execution requirement of CN-tasks constitutes of two terms, the first being initialisation and the second being a message specific part, and for tasks that are merged, this initialisation is omitted for all but the first of the merged task. For CN-task \(i \in {\mathcal {I}}^{\text {M}}_{m}\), \(m \in {\mathcal {M}}\), denote initialisation by \(e^{\text {init}}_{i}\) and the CN-message specific part by \(e_{i} - e^{\text {init}}_{i}\). For CN-tasks of type 1, 3, and 4 it hold that \(e^{\text {init}}_{i} \approx e_{i}/2\) and for CN-tasks of type 2 it hold that \(e^{\text {init}}_{i} = e_{i}\).

More specifically, when merging a set of CN-tasks, these tasks are placed in the order according to their CN-message index and such that, for all but the first task, the initialisation part of the execution requirement overlaps the preceding task. To handle merging in the Relaxed problem, an order between each pair of tasks that potentially can be merged is introduced, even if the majority of the tasks are sequenced by the CM-sequencing component.

For \(m' \in {\mathcal {M}}\), \(m \in {\mathcal {M}}: m < m'\), \(h \in {\mathcal {H}}^{\text {CM}}\), \(k \in {\mathcal {K}}\), introduce the set \({\mathcal {I}}{\mathcal {I}}^{\text {M}}_{khmm'} = \{(i,i'): i \in {\mathcal {I}}^{\text {K}}_{k} \cap {\mathcal {I}}_{h} \cap {\mathcal {I}}^{\text {M}}_{m}, ~ i' \in {\mathcal {I}}^{\text {K}}_{k} \cap {\mathcal {I}}_{h} \cap {\mathcal {I}}^{\text {M}}_{m'}\}\) that contains a pair of tasks that potentially can be merged and let the set \({\mathcal {I}}{\mathcal {I}}^{\text {M}} = \cup _{m' \in {\mathcal {M}}} \cup _{m \in {\mathcal {M}}: m < m'} \cup _{h \in {\mathcal {H}}^{\text {CM}}} \cup _{k \in {\mathcal {K}}} {\mathcal {I}}{\mathcal {I}}^{\text {M}}_{khmm'}\) include all such pairs of tasks. For \(m' \in {\mathcal {M}}\), \(m \in {\mathcal {M}}: m < m'\), \(h \in {\mathcal {H}}^{\text {CM}}\), \(k \in {\mathcal {K}}\), \((i,i') \in {\mathcal {I}}{\mathcal {I}}^{\text {M}}_{khmm'}\), introduce the binary variable

$$\begin{aligned} y^{\text {M}}_{ii'} = {\left\{ \begin{array}{ll} 1, &{} \text {if task }i\text { starts before task }i', \\ 0, &{} \text {if task }i'\text { starts before task }i, \end{array}\right. } \end{aligned}$$

and note that the case \(y^{\text {M}}_{ii'} = 1\) includes the possibility that i and \(i'\) are merged, even if they not necessarily are. For \(m' \in {\mathcal {M}}\), \(m \in {\mathcal {M}}: m < m'\) introduce the constraints

$$\begin{aligned}&x_{i} + e_{i} - e^{\text {init}}_{i'}w_{mm'} - (t^{\text {d}}_{i} - t^{\text {r}}_{i'})(1 - y^{\text {M}}_{ii'}) \le x_{i'} \le x_{i} + e_{i} - e^{\text {init}}_{i'} \nonumber \\&\quad + \sum _{i'' \in {\mathcal {I}}^{\text {M}}_{m''}\cap {\mathcal {I}}_{h}\cap {\mathcal {I}}^{\text {K}}_{k}, ~ m'' \in {\mathcal {M}}: m< m'' < m'}(e_{i''} - e^{\text {init}}_{i''})w_{mm''} \nonumber \\&\quad + (t^{\text {d}}_{i'} - e_{i'} - t^{\text {r}}_{i} - e_{i} + e^{\text {init}}_{i'})(1 - w_{mm'}), \nonumber \\&(i,i') \in {\mathcal {I}}{\mathcal {I}}^{\text {M}}_{khmm'}, ~ k \in {\mathcal {K}}, ~ h \in {\mathcal {H}}^{\text {CM}}, \end{aligned}$$
(14)
$$\begin{aligned}&x_{i'} + e_{i'} - (t^{\text {d}}_{i'} - t^{\text {r}}_{i}) y^{\text {M}}_{ii'} \le x_{i}, \quad (i,i') \in {\mathcal {I}}{\mathcal {I}}^{\text {M}}_{khmm'}, ~ k \in {\mathcal {K}}, ~ h \in {\mathcal {H}}^{\text {CM}}, \end{aligned}$$
(15)
$$\begin{aligned}&w_{mm'} \le y^{\text {M}}_{ii'}, \quad (i,i') \in {\mathcal {I}}{\mathcal {I}}^{\text {M}}_{khmm'}, ~ k \in {\mathcal {K}}, ~ h \in {\mathcal {H}}^{\text {CM}}, \end{aligned}$$
(16)

of which the first two relate the start times of the tasks to the order between the tasks, with the first one taking into account the merging. Note that constraint (14) and constraint (15) together make sure that the tasks do not overlap, except in the sense of merging. Constraint (16) forces CN-tasks of co-allocated CN-messages to be in the same order as the messages.

2.6.4 CN-task order

For a pair of CN-messages m and \(m'\), where \(m, m' \in {\mathcal {M}}\), that are received by the same CM, the relative order between the CN-tasks of type 3 must be the same as that between message m and \(m'\). This order is enforced by the constraint

$$\begin{aligned} y^{\text {S}}_{mm'} = y^{\text {M}}_{ii'}, \quad (i,i') \in {\mathcal {I}}{\mathcal {I}}^{\text {M}}_{3hmm'}, ~ h \in {\mathcal {H}}^{\text {CM}}, ~ m' \in {\mathcal {M}}, ~ m \in {\mathcal {M}}: m < m'. \end{aligned}$$
(17)

2.7 CM-scheduling

This section describes the different aspects of CM-scheduling used in the constraint generation procedure.

2.7.1 Relaxed CM-scheduling

That the CM-scheduling is relaxed refers to that this model component does not contain anything that prevents tasks from overlapping, except in the case of tasks that potentially can be merged. What restricts how the tasks on the CMs can be placed are constraints from other model components and the assignment of sub-intervals to tasks, as introduced in Sect. 2.3. This section presents how the formulation with respect to the assignment of sub-intervals to tasks can be strengthened to cut off solutions that cannot be feasible when the tasks are required not to overlap.

For a feasible schedule, it holds that for any interval of time, the length of this interval is at least that of the sum of the execution requirements of the tasks (or the part of the tasks) that execute within it. This property can be used to strengthen the formulation of the Relaxed problem by introducing capacity restrictions for some relevant choices of intervals. We here consider intervals that are formed by combining a sub-interval release time of a task and a sub-interval deadline of a task. Introduce for \(h \in {\mathcal {H}}^{\text {CM}}\), capacity constraints indexed by the set \({\mathcal {R}}_{h}\) and let \({\mathcal {I}}^{\text {cap}}_{r}\), \(r \in {\mathcal {R}}_{h}\), be the indices of a set of tasks such that for its sub-intervals, indexed by the set \({\mathcal {Q}}_{ir}\), it holds that \(\max _{i \in {\mathcal {I}}^{\text {cap}}_{r}} \max _{q \in {\mathcal {Q}}_{ir}} t^{\text {d}}_{iq} - \min _{i \in {\mathcal {I}}^{\text {cap}}_{r}} \min _{q \in {\mathcal {Q}}_{ir}} t^{\text {r}}_{iq} < \sum _{i \in {\mathcal {I}}^{\text {cap}}_{r}} e_{i}\). The constraint

$$\begin{aligned}&\sum _{i \in {\mathcal {I}}^{\text {cap}}_{r}} \sum _{q \in {\mathcal {Q}}_{ir}} e_{i}\alpha _{iq} - \sum _{(i, i')\in {\mathcal {I}}{\mathcal {I}}^{\text {M}}_{khmm'}\cap {\mathcal {I}}^{\text {cap}}_{r}, ~ k\in {\mathcal {K}}, ~m'\in {\mathcal {M}}, ~ m\in {\mathcal {M}} : m < m'} e^{\text {init}}_{i'}w_{mm'} \nonumber \\&\quad \le \max _{i \in {\mathcal {I}}^{\text {cap}}_{r}} \max _{q \in {\mathcal {Q}}_{ir}} t^{\text {d}}_{iq} - \min _{i \in {\mathcal {I}}^{\text {cap}}_{r}} \min _{q \in {\mathcal {Q}}_{ir}} t^{\text {r}}_{iq}, \quad r \in {\mathcal {R}}_{h}, ~ h \in {\mathcal {H}}^{\text {CM}}, \end{aligned}$$
(18)

yields the restriction that the total execution requirement of the tasks placed within such an interval does not exceed its length,

For Constraint (18) to be valid also in the case when CN-tasks are merged, it is assumed that they reduce the capacity required by the tasks placed in the section by the initialisation length if they are merged, even if they are not placed in the section. This adjustment somewhat weakens the constraint.

2.7.2 Sub-interval restriction

In a solution to the Relaxed problem, let the notation \({\bar{q}}_i\), \({\bar{q}}_{i} \in {\mathcal {Q}}_{i}\), refer to the sub-interval that task i is assigned, and restrict the release time and deadline of task i to \(t^{\text {r}}_{i{\bar{q}}_{i}}\) and \(t^{\text {d}}_{i{\bar{q}}_{i}}\), respectively, \(i \in {\mathcal {I}}_{h}\), \(h \in {\mathcal {H}}^{\text {CM}}\). These restrictions allow the set of tasks that are at risk to overlap to be substantially reduced and this is exploited in the Subproblem.

2.7.3 CM-sequencing

Every set of tasks that have been placed such that they are at risk to overlap on CM \(h\in {\mathcal {H}}\) is referred to as a sequence. Let \({\mathcal {S}}_{h}\) denote the set of sequences on CM h, and note that tasks that are in different sequences cannot overlap with respect to their release times and deadlines. Let the set \({\mathcal {I}}{\mathcal {I}}^{\text {O}}_{s}\) index all pairs of tasks in sequence \(s\in {\mathcal {S}}_{h}\).

For \(s \in {\mathcal {S}}_{h}\), \(h \in {\mathcal {H}}^{\text {CM}}\), introduce the binary variable

$$\begin{aligned} \beta _{s} = {\left\{ \begin{array}{ll} 1, &{} \text {if there is no overlap between tasks in sequence }s, \\ 0, &{} \text {otherwise,} \end{array}\right. } \end{aligned}$$

and for \((i,i') \in {\mathcal {I}}{\mathcal {I}}^{\text {O}}_{s}\), the binary variable

$$\begin{aligned} y_{ii'} = {\left\{ \begin{array}{ll} 1, &{} \text {if task }i\text { finishes before task }i'\text { starts,} \\ 0, &{} \text {no requirements on the relation between task }i\text { and task } i'. \end{array}\right. } \end{aligned}$$

For sequence \(s \in {\mathcal {S}}_{h}\), \(h \in {\mathcal {H}}^{\text {CM}}\) introduce the CM-sequencing constraints

$$\begin{aligned} \text {[CM-seq]}_{s} \quad \quad&\beta _{s} \le y_{ii'} + y_{i'i} \le 1, \quad (i, i')\in {\mathcal {I}}{\mathcal {I}}^{\text {O}}_{s}, \end{aligned}$$
(19)
$$\begin{aligned}&x_{i} + e_{i} - (t^{\text {d}}_{i}-t^{\text {r}}_{i'})(1- y_{ii'}) \le x_{i'}, \quad (i, i')\in {\mathcal {I}}{\mathcal {I}}^{\text {O}}_{s}, \end{aligned}$$
(20)
$$\begin{aligned}&x_{i'} + e_{i'} - (t^{\text {d}}_{i'}-t^{\text {r}}_{i})(1- y_{i'i}) \le x_{i}, \quad (i, i')\in {\mathcal {I}}{\mathcal {I}}^{\text {O}}_{s}. \end{aligned}$$
(21)

If \(\beta _{s}=1\) for sequence s, the tasks in this sequence are forced not to overlap by requiring that one task starts before the other by constraint (19), and that the start times of the tasks comply with this order by constraints (20) and (21). Otherwise if \(\beta _{s}=0\) for a sequence s, the tasks in this sequence are allowed to overlap.

In order to prefer to schedule tasks such that they do not overlap, we introduce the objective function of the Subproblem as

$$\begin{aligned} \max \sum _{h \in {\mathcal {H}}^{\text {CM}}} \sum _{s \in {\mathcal {S}}_{h}}\beta _{s}. \end{aligned}$$
(22)

If a Subproblem solution is found where none of the sequences have tasks that overlap, a valid schedule is found. Otherwise the values of the \(\beta _{s}\) variables indicate which sequences contain overlapping tasks.

2.7.4 Generated sequences

A sequence that is not free from overlaps between tasks in a solution to the Subproblem can be used for feedback to improve future solutions. If a sequence is chosen to be used as feedback, it is referred to as a generated sequence. Let the set \({\mathcal {S}}^{\text {gen}}\) index such sequences. For each generated sequence \(s\in {\mathcal {S}}^{\text {gen}}\), the CM-sequencing constraint [CM-seq]\(_{s}\) is combined with the requirement that \(\beta _{s}=1\), thereby forcing the tasks in generated sequence s not to overlap. The generated sequences constraints are added both to the Relaxed problem and to the Subproblem.

2.8 Objective functions for the relaxed problem

In the original problem formulation, any feasible solution is considered equally good. In the constraint generation procedure, however, objective functions are used to guide the search. This section introduces the two objective functions that are used in the Relaxed problem. The first objective, called the sub-interval space objective, is used in the first Relaxed problem to obtain a solution where tasks preferably are put in sub-intervals where they have a lot of space. The second objective, called the stabilise objective, is used in subsequent Relaxed problems, and it aims at assigning as many tasks as possible to the sub-interval of the previous Relaxed problem solution. To use different types of objective function in the first and subsequent Relaxed problems has turned out to be important to obtain computational efficiency.

2.8.1 Sub-interval space objective

The sub-interval space objective tries to assign tasks to sub-intervals where they have a lot of space. Each sub-interval \(q\in {\mathcal {Q}}_{i}\) is given a reward \(m_{iq}\) if task \(i\in {\mathcal {I}}_{h}\), \(h\in {\mathcal {H}}^{\text {CM}}\), is assigned to it. For each sub-interval \(q\in {\mathcal {Q}}_{i}\) of task \(i\in {\mathcal {I}}_{h}\), \(h\in {\mathcal {H}}^{\text {CM}}\), the reward is calculates as

$$\begin{aligned} m_{iq}=\min \left( \frac{t^{\text {d}}_{iq} - t^{\text {r}}_{iq} - p_{i}}{m^{\text {obj}}\max _{q'\in {\mathcal {Q}}_{i}}(t^{\text {d}}_{iq'} - t^{\text {r}}_{iq'} - p_{i})}, 1\right) , \end{aligned}$$
(23)

where \(m^{\text {obj}}\), \(0\le m^{\text {obj}}\le 1\), is a parameter used to set a threshold for when a sub-interval is considered to have a lot of space or not. The objective function is then be stated as

$$\begin{aligned} \max \sum _{h \in {\mathcal {H}}^{\text {CM}}}\sum _{i \in {\mathcal {I}}_{h}} \sum _{q \in {\mathcal {Q}}_{i}} m_{iq}\alpha _{iq}. \end{aligned}$$
(24)

2.8.2 Stabilise objective

The stabilise objective maximises the number of tasks that are placed in the same sub-interval as in the solution to the previous Relaxed problem. Let \({\bar{q}}_{i}\) denote the sub-interval that task i was assigned to during the previous iteration of the Relaxed problem, \(i\in {\mathcal {I}}\). The stabilise objective can then be stated as

$$\begin{aligned} \max \sum _{i \in {\mathcal {I}}} \alpha _{i{\bar{q}}_{i}}. \end{aligned}$$
(25)

2.9 Implementation of the constraint generation procedure

The pseudo-code for the exact procedure can be found in Algorithm 1. Before the constraint generation procedure, we apply pre-processing components as described in Blikstad et al. (2018).

figure a

3 Matheuristic solution approach

The exact approach presented in the previous section is the backbone also for the matheurstic to be introduced in this section. The matheuristic components comprise of an ALNS search for solving the Relaxed problem and a constructive heuristic for creating an initial solution to be used by the ALNS. Pseudo-code for this matheuristic approach is found in Algorithm 2.

figure b

3.1 Outline of the ALNS

In the model used in the ALNS, many constraints are treated as soft and a violation of a constraint is penalised in the objective. By associating different weights with the penalty and the objective function of the Relaxed problem, it is possible to choose between focus on feasibility or objective value.

During the ALNS, a solution is defined by that each task is assigned to one of its sub-intervals and that all other variables of the relaxed problem have values obtained from solving the penalised model by a MIP-solver. A destroy operation releases some of the tasks from their sub-intervals and makes them eligible for re-assignment. This re-assignment is done in the repair operation by applying a MIP-solver to a repair model, which is the penalised model with weighted objective, where only the released tasks can be re-assigned new sub-intervals.

The master level heuristic guiding our search is based on local search with the alteration that different repair operators use different objective functions.

The destroy operators are designed to identify tasks that cause costs in the current solution, or to select tasks at random. For the destroy operators that identify tasks that cause costs, a subset of the most costly tasks is selected to be released and these are referred to as key tasks. Since the re-assignment of key tasks might be restricted by constraints involving tasks related to them, further tasks, referred to as related tasks, are also released.

Which repair operator the ALNS uses depends on whether the current solution is feasible or not with respect to the Relaxed problem. This is inspired by the concept of strategic oscillation, see Glover (1977) and Glover and Hao (2011). The selection of repair operator is done at each iteration and is part of the adaptiveness of the algorithm.

The search is divided into time epochs and each of these consists of a number of iterations. At the end of a time epoch, it is decided if the ALNS should exit or not. If the search is continued, it is further decided if a diversify repair operator shall be applied, or if the search should continue as before. This also contribute to an adaptive search behaviour.

3.2 Repair model

This section describes the MIP model, referred to as the Repair model, that is used in each iteration of the ALNS. It is a major difficulty to find a feasible solution to the Relaxed problem, and therefore the Repair model is a reformulation of the Relaxed problem where a majority of the constraints are treated as soft and violations of them are penalised in the objective function. For this purpose, we introduce the penalty variables

  • \(\gamma ^{\text {CN-slot}}\): violation of CN-slot capacity,

  • \(\gamma ^{\text {CN-time}}\): violation of time restriction for CN-tasks,

  • \(\gamma ^{\text {CN-merge}}\): violation of merging of CN-tasks,

  • \(\gamma ^{\text {cap}}\): violation of relaxed CM-scheduling,

  • \(\gamma ^{\text {gen}}\): violation of generated sequences,

that measure the violation of feasibility of each constraint type. The total violation of feasibility of each constraint type along with the maximum violation of each constraint type are given a weight. Let \(\gamma ^{\text {infeas}}\) denote the weighted sum of the total and maximum violation of each constraint type. Three types of constraints are always obeyed during the ALNS: the assignment of each task to a sub-interval constraints [constraints (27)–(29)], the AM-scheduling constraints (Sect. 2.5), and the Precedence relations constraints (Sect. 2.4).

In order to balance the need for feasibility of a solution with the Relaxed problem objective, the weights \(w^{\text {infeas}}\) and \(w^{\text {obj}}\) are introduced for the Relaxed problem objective and the total weighted constraint violation, respectively. The weights are decided by the repair operator and are used in objective function of the Repair model

$$\begin{aligned} \min w^{\text {infeas}}\gamma ^{\text {infeas}} + w^{\text {obj}}\delta ^{\text {obj}}, \end{aligned}$$
(26)

where \(\delta ^{obj}\) denotes the Relaxed problem objective.

In each iteration of the ALNS, a set of tasks \({\mathcal {I}}^{\text {rel}}\) is released from their current sub-intervals and allowed to be re-assigned new sub-intervals. Each remaining task \(i\in {\mathcal {I}}\setminus {\mathcal {I}}^{\text {rel}}\) is fixed to its sub-interval \({\bar{q}}_{i}\) of the previous solution. The set of tasks to be released is determined by the destroy operator and defines, together with the repair operator, the neighbourhood to be searched. In the Repair model, the common AM- and CM-scheduling constraints in Sect. 2.3 are replaced with

$$\begin{aligned}&\sum _{q \in {\mathcal {Q}}_{i}} \alpha _{iq} = 1, \quad i \in {\mathcal {I}}, \end{aligned}$$
(27)
$$\begin{aligned}&{\bar{\alpha }}_{iq} = 1, \quad i \in {\mathcal {I}} \setminus {\mathcal {I}}^{\text {rel}}, \end{aligned}$$
(28)
$$\begin{aligned}&\sum _{q \in {\mathcal {Q}}_{i}} t^{\text {r}}_{iq}\alpha _{iq} \le x_{i} \le \sum _{q \in {\mathcal {Q}}_{i}} t^{\text {d}}_{iq}\alpha _{iq} - e_{i}, \quad i \in {\mathcal {I}}. \end{aligned}$$
(29)

Note that the Repair model is free to decide the start times for the tasks within their assigned sub-intervals, see constraint (29).

3.3 Destroy operators

Given a solution to the Repair model, a destroy operator constructs the set of tasks \({\mathcal {I}}^{\text {rel}}\) that can be assigned to a new sub-interval in the next ALNS iteration. The ALNS utilises multiple destroy operators. In each iteration, one of the destroy operators is selected at random, with equal probabilities for all operators. The destroy operators are categorised into two types: precedence relations operator and random operator. The details of each type are described in the following sections.

3.3.1 Precedence relations operator

The precedence relations operator is based on the idea of related removal, introduced in Shaw (1998). Given a solution to the Repair model, tasks that cause a cost in the current solution are chosen. Such tasks are referred to as key tasks. From the set of key tasks, the precedence relations operator orders related tasks in increasing distance from the key tasks. The distance between two tasks is defined as the length of the shortest sequence of dependencies through which the tasks are connected, or as infinity if no such sequence exists. The set of key tasks together with the related tasks with the shortest distance to the key tasks are then released from their current sub-interval.

3.3.2 Random operator

The random operator simply selects tasks at random to be released from their current sub-interval. In Ropke and Pisinger (2006), this operator is recommended to be included in the ALNS to improve diversification.

3.4 Repair operators

The repair operator controls the balance between the of focus on feasibility and the Relaxed problem objective by assigning values to the weights in the Repair model objective.

3.4.1 Feasibility repair

The feasibility repair focuses on achieving feasibility by setting \(w^{\text {obj}}=0\) and \(w^{\text {infeas}}=1\). The objective function of the Repair model then becomes

$$\begin{aligned} \min \gamma ^{\text {infeas}}. \end{aligned}$$
(30)

3.4.2 Diversify repair

The diversify repair tries to improve the solution with respect to the Relaxed problem objective. This is done by choosing a small value for the weight of the constraint violations \(w^{\text {infeas}}\) and setting \(w^{\text {obj}}=1\). The objective of the Repair model then becomes

$$\begin{aligned} \min w^{\text {infeas}}\gamma ^{\text {infeas}} + \delta ^{\text {obj}}. \end{aligned}$$
(31)

3.4.3 Objective repair

The objective repair is used when the current solution is a feasible solution to the Relaxed problem. The repair operator tries to improve the Relaxed problem objective while maintaining feasibility with respect to the Relaxed problem. The objective function of the Repair model is

$$\begin{aligned} \min \gamma ^{\text {obj}}, \end{aligned}$$
(32)

with the additional constraint

$$\begin{aligned} \gamma ^{\text {infeas}}=0. \end{aligned}$$
(33)

3.5 Adaptation

The adaptation part of the ALNS is done at two levels: in each iteration and at the end of each time epoch (which corresponds to a given number of iterations). The primary decisions of the adaptation are to determine if the focus should be on feasibility or the relaxed problem objective and to evaluate if the ALNS is stuck in a local optima, and if so, determine what the corresponding action should be.

With respect to local optimality, we evaluate, at the end of each time epoch, if any of the last 5 iterations were successful. If not, we act as follows:

  • If the current solution is feasible: we exit the ALNS and enter the Subproblem;

  • If the current solution is infeasible: we apply the diversify repair operator.

If one or more of the last 5 iterations were successful, we continue the search as usual. The decision to focus on feasibility or on the relaxed problem objective is made at each iteration by selecting different repair operators. This is done according to the following scheme:

  • If the current solution is feasible: we apply the objective repair operator;

  • If the current solution is infeasible: we apply the feasibility repair operator.

In the case we are at the end of a time epoch and has applied the diversify repair operator, this adaptation is omitted.

3.6 Creating an initial solution to the ALNS

An initial solution to the ALNS is created by applying a constructive heuristic that takes into account only some of the constraints. This is done by iteratively solving a MIP-model until the constraints that are kept hard during the ALNS are respected.

The MIP-model that we use in the constructive heuristic is called the Partition model, see Appendix B. The Partition model enforces a valid AM-schedule that respects all precedence relations. The objective function is to maximise a reward that is based on the duration between tasks on different AMs that communicate with each other. However, in a solution to this model, tasks are not necessarily placed within sub-intervals. As a remedy to this, constraints that assign tasks to sub-intervals, see Sect. 2.3, are added for the tasks that are not within feasible sub-intervals. This process is repeated and the MIP-model is re-solved until a solution to the Partition model is found in which all tasks are within allowed sub-intervals. This assignment of tasks to sub-intervals is used as the initial solution in the ALNS.

4 Results

In this section, we present the computational performance of both the exact approach and the matheuristic and compare these results to previous work.

4.1 Instances

The instances used for the computational evaluation were derived together with the industrial partner Saab. They are designed such that they are relevant for future avionic systems. One of the sets, called Saab instances, contains six instances with specific properties that are important for Saab, and these instances are therefore not made publicly available. The other set contains 120 public instancesFootnote 2 and these have a wider range of industrially relevant properties.

4.1.1 Saab instances

The original motivation of this work was to solve the instances provided by Saab and the three smallest in this set, Instances I–III, were introduced in Blikstad et al. (2018). For these instances, the number of dependencies differ compared to what was presented in Blikstad et al. (2018) because of the modelling changes presented in this paper. Instances IV, V and VI are new and represent instances that are beyond the scope of what could be solved in previous work. The number of tasks, dependencies, messages, fixed tasks, AMs and CMs can be found in Table 1. Note that even if the total number of tasks is of the same magnitude for Instances III–V, there is a difference in how many modules the tasks are distributed on. Since Instances IV–V have fewer modules, they are more challenging to solve. Instance VI is clearly the most challenging due to its large number of tasks and messages.

Table 1 The number of tasks, dependencies, messages, fixed tasks, AMs, and CMs of the Saab instances

4.1.2 Public instances

The public instances are divided into the four categories A–D, with 30 instances in each category. Table 2 provides, for each instance category, the mean values of the number of tasks, dependencies, messages, fixed tasks, AMs, and CMs, respectively. The relationships between the number of tasks, messages, fixed tasks, dependencies, and modules are illustrated in Fig. 4.

Category A contains instances of about the same size and difficulty as the smallest of the Saab instances, while both Category B and C contains instances designed to be of medium difficulty. Instances in Category D are constructed to be very challenging due to the large numbers of tasks and messages. Worth noting is that the public instances have been constructed in such a way that we do not know if a feasible schedule exists or not. Especially for Category D, we consider each occurrence of solving an instance to be an accomplishment and together with the instance data,Footnote 3 we provide the information if an instance has ever been solved. The largest instance in this set contains 54,731 tasks and 2530 messages and this has been solved.

Instances in Category B–D have the important characteristic that they are unbalanced with respect to that certain CMs are assigned more tasks and handle more messages compared to other CMs in the system. The instances in Category A are not given this property, to keep them simpler.

Table 2 Mean values of key attributes of the different categories of public instances
Fig. 4
figure 4

Relations between the number of tasks, dependencies, messages, fixed tasks, and modules in the public instances

4.2 Test settings

We evaluate the performance of the exact approach and the matheuristic by running the scheduling tool on a number of instances, using as similar settings as possible for the exact approach and the matheuristic. Because of the importance of the Saab instances, we ran both the exact approach and the matheuristic five times, initialised with different seeds. For the public instances, the exact approach and the matheuristic were given one attempt each. The remaining parts of this section describe the computational environment and the settings of the exact approach and the matheuristic.

4.2.1 Software and hardware specifications

The scheduling tool has been implemented using Python 3.7 and the MIP models are solved using Gurobi 8.1.1. All the tests are carried out on a computer with two Intel Xeon Gold 6130 Processors (16 cores, 2.1 GHz) and 384 GB RAM. The scheduling tool is single threaded except from the calls to Gurobi, which is allowed to use all cores.

4.2.2 Common settings for the exact approach and the matheuristic

This section describes the settings that are the same for the exact approach and the matheuristic. In both solution approaches, we use the sub-interval space objective function with the parameter \(m^{\text {obj}}=0.2\) in the first Relaxed problem. For the Subproblem, there is a maximum running time of 4 h. In order to use the time of the scheduling tool efficiently, we also used a progressive set of time-outs to, in some cases, exit the Subproblem faster. These time-outs depend on the value of the current solution and the relative MIP-gap. Sometimes an early exit in the Subproblem will yield many generated sequences, and to limit the effect from this, we do not add all sequences. When not all sequences are added, we choose the ones with the least amount of tasks first, and quit when \(\sum _{s\in {\mathcal {S}}^{\text {gen}}}|{\mathcal {I}}{\mathcal {I}}^{\text {O}}_{s}|>90{,}000\). The time-limits for the entire scheduling tool are given in Table 3.

Table 3 The time-out for the scheduling tool on the different instances

4.2.3 Settings for the exact approach

In the exact approach, the Relaxed problem will exit when a relative MIP-gap of 10% is reached in the first iteration, and when 0% is reached in the successive iterations. Since it can be difficult to fulfil these requirements, we have an additional way to exit. If a feasible solution has been found, Gurobi gets a time-limit of 30 min to find an improved solution, otherwise we exit the search. However, if an improved solution is found within this time-limit, it is reset to 30 min and the search is continued.

4.2.4 Matheuristic specific settings

The ALNS is divided into time epochs of 8 iterations. The time-limit for Gurobi is 18 min in each iteration, with a more aggressive time-out if improved solutions within certain relative MIP-gaps have been found. We consider an ALNS iteration to be successful if there is a 0.1% decrease of the weighted penalty in a repair with respect to feasibility, or if there is any improvement in the objective value in the other repair operators.

In the ALNS, we use 4 different destroy operators derived from the two types of operators described in Sect. 3.3. Each of the destroy operators unlocks 4000 tasks. We use one random-based operator and three variants of the precedence relations-based destroy operator as given in Table 4. Two of precedence relations-based destroy operators identify related tasks reachable by following two dependencies. One of them selects the key tasks as those associated with the highest cost, while the other selects the key tasks at random among tasks with costs. The last precedence related destroy operator identifies related tasks reachable by following four dependencies and selects key tasks associated with the highest cost.

Table 4 An overview of the destroy operators used in the ALNS along with their settings

4.3 Performance evaluation of the exact approach and the matheuristic

The main computational results are presented through plots illustrating the number of instances solved within a certain time. The results for the Saab instances are given in Fig. 5. For Instances I–III, both the exact approach and the matheuristic find a schedule for all five seeds. For Instances IV–VI, the matheuristic finds a schedule for all seeds while the exact approach fails in all cases. By studying the results in detail, we noted that the exact approach failed for Instance V–VI because it failed to find a feasible solution to the first Relaxed problem. For Instances I–III, the computational times are shorter for the exact approach than for the matheuristic.

To compare to previous work, we study the computational times for Instance III in Blikstad et al. (2018), where a restriction of our current problem statement was addressed, and in Rönnberg (2018), which address the same problem statement as here. In Blikstad et al. (2018), the computational times range between 0.6 and 14.5 h, and in Rönnberg (2018) it is 5.2 h. These times shall be compared to that the worst of times here is \(<0.1\) h. All improvements can, however, not be contributed to the model enhancements, since we use different hardware and Gurobi versions, but we still consider the outcome of the model improvements to be significant.

Fig. 5
figure 5

The number of runs for Saab instances I–III and IV–V, respectively, that are solved within a given time by the exact approach (blue dotted line), matheuristic (red dashed line), or either of them (black solid line). Note that to the left the dotted and solid line coincides, while to the right the dashed and the solid line coincides

The results for public instances of Categories A and B are illustrated in Fig. 6. Instances in Category A pose no challenge for neither the exact approach nor the matheuristic and a solution is found for all runs within the time-limit of the scheduling tool. For Category B, the exact approach and the matheuristic solves about the same number of instances within the time-limit, but with slightly faster running times by the matheuristic.

Fig. 6
figure 6

The number of instances of Category A and B, respectively, that are solved within a given time by the exact approach (blue dotted line), matheuristic (red dashed line), or either of them (black solid line)

The results for instances of Categories C and D are illustrated in Fig. 7. For Category C, the matheuristic has solved 28 instances compared to the 15 by the exact approach at the final time-limit of 48 h. Among the 15 instances that were solved by the exact approach, 14 were also solved by the matheuristic.

Category D contains the most challenging instances and here we can, as for Saab instances IV–VI, see a clear benefit from the matheuristic. After about 34 h, when the exact approach solved its first instance, the matheuristic had already solved 26 instances. To further analyse the outcome for these instances, we let the scheduling tool complete its 72 h. During the remainder of the 72 h, the exact approach solved 6 additional instances and the matheuristic solved another 2. Worth noting is that all instances solved by the exact approach were also solved by the matheuristic, but with shorter computational times.

As seen in Fig. 4, there is a wide range in the number of tasks for instances in Category D. The largest instance contains 54,731 tasks and was only solved by the matheuristic. The largest instance solved by the exact approach has 36,996 tasks.

Fig. 7
figure 7

The number of instances of Category C and D, respectively, that are solved within a given time by the exact approach (blue dotted line), matheuristic (red dashed line), or either of them (black solid line)

During our computational evaluations we noted that the matheuristic typically needs to generate more sequences than the exact approach in order to find a feasible schedule. Statistics for this is found in Table 5. We believe that the difference is due to that the exact approach produces better solutions to start the constraint generation from and that this is possible because the Relaxed problem has many solutions with the same objective value, even if the solutions are rather different in other respects. Even though the solutions obtained by Gurobi and the ALNS have similar objective values, it somehow seems that the structure of the solutions produced by Gurobi are better than those from the ALNS with respect to the constraint generation procedure. We have, however, not been able to understand the reasons for this.

Table 5 The average number of constraint generation iterations and the number of generated sequences of the exact approach and the matheuristic on the Saab instances and the public instances

4.4 Evaluation of the ALNS design

A characteristic of our ALNS is that it makes few iterations over large neighbourhoods rather than many iterations over small ones. Table 6 presents the average number of ALNS iterations made in different phases of the matheuristic. Early practical evaluations showed that we benefit from this choice and we believe that this is because of the complex constraint structure of the problem.

Table 6 The average number of ALNS iterations on the Saab instances and the public instances

To study the impact of having the different destroy operators, we conducted additional tests on Category D and Saab instances IV–VI. In each test, we used only a single destroy operator and compared the result to our standard matheuristic. In all tests, all other settings were as described in Sect. 4.2. Table 7 presents the number of instances or seeds that were solved when only a single destroy operator was used, together with the results from the standard matheuristic. The operator Precedence 3 performed well on Category D by solving 23 out of 30 instances. However, it failed all attempts to solve Instances IV–VI and these instances were solved for every seed by both the Random operator and the standard matheuristic. In all, we see a gain by having multiple destroy operators compared to having a single one since it enables us to catch different aspects of the problem structure and the instances that we consider.

Table 7 The number of solved instances of Category D and the number of solved seeds for Instances IV–VI that was solved by the standard ALNS compared to the cases where only one of the four destroy operators was used

5 Conclusions

This paper contributes by proposing approaches for solving large-scale instances of avionic scheduling problems. This is achieved by improving the model formulations used in a previously suggested constraint generation procedure and by including an ALNS to extend it into a matheuristic approach. We can now solve three practically relevant instances that were out of reach for the previous procedure. To facilitate further testing of our implemented methods, the paper also introduces a large set of publicly available avionics scheduling instances. The most challenging category contains instances with up to 54,731 tasks and 2530 messages and the largest instance among these could be solved using the matheuristic approach.

The bottleneck in the exact procedure is the difficulty to obtain feasible solutions to the Relaxed problem, and the ALNS is designed to overcome this. To balance the search for feasibility and profitable objective value of the Relaxed problem, a penalty model is used to handle when constraints are violated. The search is made over the assignment of sub-intervals to tasks, but each such assignment corresponds to several possible solutions to this penalty model; in order to evaluate an assignment, a complete solution to the penalty model is needed. For this reason, the repair operation is to apply a MIP solver to a Repair model, which is obtained from the penalty model when only the tasks released by the destroy operation are available for re-assignment to new sub-intervals.

Each iteration of our ALNS is expensive since each neighbour, with respect to an assignment of sub-intervals to tasks, depends on that the MIP-solver also assigns values to all other variables of the Repair model. Further, we believe that because of the complex constraint structure, it is profitable to have large neighbourhoods also with respect to the number of released tasks and to compensate for these by having rather few iterations and a master level heuristic of a local search type. Also, an important aspect of the ALNS design is the alternating behaviour obtained by changing the repair operations in a systematic way.

For future work it can be of relevance to try to find smaller neighbourhoods that can be searched more efficiently and to evaluate if it is profitable to make more iterations over such neighbourhoods instead of, as in the current method, search large neighbourhoods with few iterations. A further possibility along these lines is to use heuristics for the repair operations. Another line of future research is to improve the computational efficiency with respect to the subproblem and to try to dynamically add information to strengthen the Relaxed problem without having to solve the subproblem.