In this section, we address a problem that minimizes the used switches subject to a given approximation error \(\bar{\theta }\) that shall not be exceeded by the accumulated control deviation. Afterward, we aim for a lower bound on its objective that will be useful in the next section and introduce useful auxiliary variables and definitions for this.
Definition 8
((CIA\(-\bar{\theta }\)), (CIA\(-\bar{\theta }-\)init)) For given \({\varvec{a}}\in \mathcal {A}_N\), \(\bar{\theta }>0\) and initial active control \(i_0\in [{n_\omega }]\) the problem (CIA\(-\bar{\theta }-\)init) is defined to be
$$\begin{aligned}&\sigma ^{*} := \underset{{\varvec{w}}\in \Omega_{N}}{\mathrm {min}}~~\frac{1}{2}\sum \limits _{l=1}^{N-1}\sum \limits_{i=1}^{n_{\omega}} |w_{i,l+1}-w_{i,l}| \end{aligned}$$
(4.1)
$$\begin{aligned}&{\mathrm {s.\,t.}}\qquad \bar{\theta } \ge \pm \sum \limits _{l=1}^{j}(a_{i,l} - w_{i,l})\Delta _j ~ \qquad i\in [{n_\omega }], \ j\in [N], \end{aligned}$$
(4.2)
$$\begin{aligned}&\qquad \qquad w_{i_0, 1} = 1. \end{aligned}$$
(4.3)
We define the problem (CIA\(-\bar{\theta }\)) to be (CIA\(-\bar{\theta }-\)init) without the constraint (4.3).
Taking the fixed initial active control in (4.3) aside, the problems (CIA\(-\bar{\theta }\)) and (CIA) from Definition 7 are closely connected with each other because the TV constraints (3.1) and (3.2) are reinterpreted as objective function subject to a fixed approximation error \(\bar{\theta }\). This justifies the naming. We will introduce the MDR algorithm in Sect.5 to (heuristically) solve (CIA\(-\bar{\theta }-\)init). By applying this algorithm to all \(i\in [{n_\omega }]\) as initial active controls, we exploit this relationship to solve (CIA\(-\bar{\theta }\)) as well, which will be used then as part of a bisection algorithm to solve (CIA).
We stress that fixing the initial active control \(i_0\) may seem odd, though this fixing reduces the problem complexity, which later yields in Theorem 1, Section 5, an optimality result of the solution constructed by the MDR algorithm concerning (CIA\(-\bar{\theta }-\)init).
We notice that (CIA\(-\bar{\theta }-\)init) is very similar to (SCARP) from [3, 4]. The latter problem aims at minimizing the switching costs, representing a generalized objective function of (CIA\(-\bar{\theta }-\)init), whereas in (CIA\(-\bar{\theta }-\)init) the initial active control is fixed.
Remark 2
(Link to scheduling theory) On an equidistant grid, (CIA\(-\bar{\theta }\)) can be reformulated into the following, equivalent, scheduling problem: On a single machine, minimize the total setup costs (TSC) until the Nth processed job, \(N\le n\), so that n jobs (f, k) are processed within \(f\in [{n_\omega }]\) job families subject to release times \(r_{f,k}\), deadlines \(d_{f,k}\), equal processing times \(\bar{\Delta }\) and sequence-independent setup costs, which can be summarized in scheduling notation [13] as
$$\begin{aligned} \left( 1 | r_{f,k}, d_{f,k}, {\text {SC}}_{\text {si},b}=1, p_{f,k}=\bar{\Delta } |\left. {\text {TSC}}\right| _1^N\right) . \end{aligned}$$
In the following we will revert to scheduling-like concepts, but explicitly dispense with its notation to not distract the reader from the usual MIOCP notation.
Next, we need some definitions to derive a lower bound for (CIA\(-\bar{\theta }-\)init) at the end of this section. We stress that we establish our results on an equidistant grid but will sometimes drop this assumption in definitions used in later sections.
Definition 9
(Activations, release \(r_{i,k}\) and deadline intervals \(d_{i,k}\)) For each control \(i\in [{n_\omega }]\) on an equidistant grid \(\mathcal {G}_N\), we introduce the number of possible activations \(n_i\) as
Each activation \(k\in [n_i]\) is associated with a release and deadline interval, which are defined by:
Finally, we call the kth activation of control i necessary, if \(d_{i,k}< \infty\).
Definition 10
(Switch, activation block) Consider \({\varvec{w}}\in \Omega _N\). If we have on interval \(j\ge 2\) and for any \(i\in [{n_\omega }]\)
$$\begin{aligned} w_{i,j-1} =0, \quad w_{i,j} =1, \end{aligned}$$
then we say \({\varvec{w}}\) switches on j. We introduce the set of switches
$$\begin{aligned} \mathcal {S}:=\{ j\in \{2,\ldots ,N\} \mid {\varvec{w}} {\text { switches on }} j\}, \end{aligned}$$
and set \(n_s:= |\mathcal {S}|\). We denote by \(\tau _j \in [N]\) the corresponding interval of the jth switch of \({\varvec{w}}\), where we set \(\tau _0 := 0,\, \tau _{n_s+1} := N\). On an equidistant grid and if \(i\in [{n_\omega }]\) is active between two consecutive switches or one switch and the first/last interval, we define the set of activations of i between these switches as an activation block \(B \subset [n_i]\). On a general grid, we further define the length of the jth activation block between the \((j-1)\)st switch on, i.e. \(\tau _{j-1}\), and before the jth switch, i.e. \(\tau _{j}-1\), via the auxiliary variable \(\delta _j=\sum _{l=\tau _{j-1}}^{\tau _j-1} \Delta _l\) for \(j\in [n_s+1]\).
We notice that the switches actually occur on the grid points; however, we have indexed the variables \(w_{i,j}\) according to the intervals, and therefore, for simplicity, we refer to switches on intervals. In the following, we will sometimes abbreviate activation block with block. In order to keep the number of used switches small and when deciding to set up a new block, it is highly relevant to know how many activations could be at most included in this block beginning with activation k. An activation \(j>k\) cannot be included in the block if its release interval begins later than the deadline interval of activation k plus the number of activations between k and j. We give a definition that formalizes these deadlines for initial activation-dependent deadlines of blocks. Based on these block deadlines, it is straightforward to introduce the notion of a block deadline feasible partition of activations into blocks. The constraint (4.3) imposes that the control \(i_0\)’s first activation has to be executed on the first interval, for which we introduce the definition of fixed initial active control feasibility.
Definition 11
(\(db_{i,k}\), block deadline and fiac feasible partition) Consider an equidistant grid. The deadline of a block for \(i\in [{n_\omega }]\) that begins with the kth activation, \(k\in [n_i],\) is defined by
$$\begin{aligned} db_{i,k} := d_{i,l}, \quad {\text {where}} \quad l:= \max \{ j\ge k \mid r_{i,j} \le d_{i,k} + j-k\}. \end{aligned}$$
(4.7)
Let \(P_i\) denote a partition of all activations \([n_i]\) for \(i\in [{n_\omega }]\). We call \(P_i\) block deadline feasible if for all subsets \(B\in P_i\), i.e., all blocks, hold:
$$\begin{aligned} r_{i,\max \{k\in B\}} \le d_{i, \min \{k\in B\}} + |B| -1. \end{aligned}$$
Furthermore, we refer to \(P_i\) as a fixed initial active control (fiac) feasible partition if for all \(k\in B_1\) hold
$$\begin{aligned} r_{i,k} = k, \end{aligned}$$
where \(B_1\in P_i\) denotes the first activation block of \(P_i\).
In the last definition, we provided the concept of a control specific partition of all activations.
The kth activation of control \(i\in [{n_\omega }]\) does generally not coincide with the kth interval. The following example illustrates the introduced concepts and, in particular, that there may be in total more possible but less necessary activations than intervals N.
Example 1
Let the following matrices \({\varvec{a}}\in \mathcal {A}_N\) and \({\varvec{w}}\in \Omega _N\) for equidistant discretization given:
$$\begin{aligned} {\varvec{a}}:= \left( \begin{array}{ccccccccc} 1 &{} 1 &{} 0.8 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0.5 \\ 0 &{} 0 &{} 0.2 &{} 0 &{} 0.1 &{} 0.8 &{} 1 &{} 1 &{} 0.5 \\ 0 &{} 0 &{} 0 &{} 1 &{} 0.9 &{} 0.2 &{} 0 &{} 0 &{} 0 \end{array}\right) , \quad {\varvec{w}}:= \left( \begin{array}{ccccccccc} 1 &{} 1 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 1 &{} 1 &{} 0 \\ 0 &{} 0 &{} 0 &{} 1 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0 \end{array}\right) , \end{aligned}$$
where \({n_\omega }=3, N=9\). Consider \(i=1\) to be the fixed initial active control and a rounding threshold of \(\bar{\theta }=1\bar{\Delta }\). Then, we deal with in total eleven possible activations with their release and deadline intervals:
$$\begin{aligned}&i=1: \quad [r_{1,k},d_{1,k}]=[1,1], \ [2,3], \ [3,9], \ [9,\infty ],\\&i=2: \quad [r_{2,k},d_{2,k}]=[1,6], \ [6,7], \ [7,8], \ [8,\infty ],\\&i=3: \quad [r_{3,k},d_{3,k}]=[1,5], \ [4,6], \ [6,\infty ]. \end{aligned}$$
There are 4, 3, and 2 activations in \({\varvec{w}}\) for the controls \(i=1,2,\) and 3, respectively. These activations are grouped into in total 4 activation blocks so that \({\varvec{w}}\) uses 3 switches. For instance, the first block of control \(i=1\) has a length of \(\delta _1= 3\bar{\Delta }\) and its deadline is \(db_{1,1}=d_{1,3}=9\). The partition \(P_1=\{ \{1,2,3\}, \{4\} \}\) is fiac feasible for \(i=1\). For control \(i=3\), the partitions \(P_3=\{ \{1,2,3\} \}, \{ \{1,2\}, \{3\} \}\) are amongst others block deadline feasible.
As illustrated in Example 1, a feasible solution \({\varvec{w}}\) of (CIA\(-\bar{\theta }-\)init) may not use all possible activations. To this end, we define an extension of the set of blocks of \({\varvec{w}}\) to become a partition of \([n_i]\) for all \(i\in [{n_\omega }]\) in the following lemma. The extension may seem arbitrary, but is necessary to compare any \({\varvec{w}}\in \Omega _N\) with partitions of \([n_i]\). Thereby, we establish a connection between the above feasibility concepts and a feasible solution \({\varvec{w}}\) of (CIA\(-\bar{\theta }-\)init).
Lemma 1
For an equidistant grid, let \({\varvec{w}}\in \Omega _N\) be feasible for (CIA\(-\bar{\theta }-\)init) and let \(P_i'\) denote the set of blocks of \({\varvec{w}}\) for control \(i\in [{n_\omega }]\). We define \(\overline{P_i'}:=\{k \in [n_i] \ | \ \not \exists \ B \in P_i': k\in B \}\) and \(P_i := P_i' \bigcup \limits _{k \in \overline{P_i'} } \{ k \}\). Then, \(P_i\) is a block deadline feasible partition and if \(i=i_0\), \(P_i\) is also fiac feasible.
Proof
We first argue that \(P_i\) is by definition a partition of \([n_i]\). We need to prove that these partitions are block deadline feasible, respectively fiac feasible. If for \(i\in [{n_\omega }]\) and an activation block \(B\in P_i\) holds
$$\begin{aligned} r_{i,\max \{k\in B\}} > d_{i, \min \{k\in B\}} + |B|-1, \end{aligned}$$
this would imply that the \((\max \{k\in B\})\)th activation of i has been processed before its release interval because B can not be interrupted by activations from other controls. Therefore, the above inequality does not hold and block deadline feasibility is established. We apply the same argument for confirming fiac feasibility. By constraint (4.3), the first activation of \(i_0\) is scheduled on the first interval. Hence, all activations \(k\in B_1\) of the first block \(B_1\) must be processed on the kth interval and require therefore a release interval that is no later than k. \(\square\)
Remark 3
(Necessary condition for feasibility of (CIA\(-\bar{\theta }-\)init) The formation of activations into block deadline and for \(i_0\) fiac feasible partitions is a necessary feasibility criterion of \({\varvec{w}}\in \Omega _N\) for (CIA\(-\bar{\theta }-\)init) by virtue of Lemma 1. Nevertheless, it is not a sufficient criterion since the order of the processing of blocks is not clarified. In particular, one might order the blocks to contain an activation whose release interval is later than its executed interval.
Next, we formalize specific partitions of the control i’s possible activations \(n_i\) whose blocks are constructed to include as many activations as possible without violating their block deadlines. These quantities serve as tools to derive a lower bound of necessary blocks per control independent of the other control’s blocks. This will result in a lower bound for (CIA\(-\bar{\theta }-\)init) in Proposition 2. We distinguish between the case that i is the fixed initial active control, i.e., \(i=i_0\), or not.
Definition 12
Consider an equidistant grid and the controls \(i_0,i\in [{n_\omega }]\). Let
$$\begin{aligned}&k_1:= \max \{j\le n_i \mid d_{i,j} \le db_{i,1} \}, \qquad B_{i,1} := \{1,\ldots ,k_1 \}, \end{aligned}$$
(4.8)
$$\begin{aligned}&k_1^{\,{\text {init}}} := \max \{j\le n_i \mid r_{i_0,j} = j \}, \qquad B_{i_0,1}^{\,{\text {init}}} := \left\{ 1,\ldots ,k_1^{\,{\text {init}}} \right\} . \end{aligned}$$
(4.9)
We write \((\cdot )^{\,{\text {(init)}}}_i\) to indicate that equations or inequalities each apply to the parameters \((\cdot )_i\) and \((\cdot )^{\,{\text {init}}}_{i_0}\). We define the blocks \(B_{i,l}^{\,{\text {(init)}}}\) recursively for \(l\ge 2\) and while \(k_l^{\,{\text {(init)}}}<n_i\) by
$$\begin{aligned} k_l^{\,{\text {(init)}}}:= \max \left\{ j\le n_i \mid d_{i,j} \le db_{i,k_{l-1}^{\,\text {(init)}}+1} \right\} , \quad B_{i,l}^{\,\text {(init)}} := \left\{ k_{l-1}^{\,\text {(init)}}+1,\ldots ,k_l^{\,{\text {(init)}}} \right\} . \end{aligned}$$
(4.10)
Let \(nb_{i,\min }^{\,{\text {(init)}}}\) denote the number of blocks \(B_{i,l}^{\,{\text {(init)}}}\) and \(P_{i,\min }^{\,{\text {(init)}}}\) the partitions of \([n_i]\) constructed by the latter:
$$\begin{aligned} P_{i,\min }^{\,{\text {(init)}}} := \left\{ B_{i,l}^{\,{\text {(init)}}} \mid l \in [nb_{i,\min }^{\,{\text {(init)}}}] \right\} . \end{aligned}$$
The MDR scheme from the next section creates switches that resemble the above \(k_l^{\,{\text {(init)}}}\) terms. The latter, though, only expresses the grouping of activations, while the switches explicitly specify the corresponding intervals as well. It turns out that the partitions \(P_{i,\min }\) and \(P_{i_0,\min }^{\,{\text {init}}}\) are minimal in the number of blocks as indicated in the following proposition.
Proposition 1
For \(i_0,i\in [{n_\omega }]\), let the partitions \(P_{i,\min }, \, P_{i_0,\min }^{\,{\text {init}}}\) be given as in Definition 12. For any partition \(P_i\) of \([n_i]\), with \(i=i_0\) included, we define its restriction to the first \(\tilde{n}_i \le n_i\) activations as
$$\begin{aligned} \left. P_{i}\right| _{\tilde{n}_i}:= \left\{ B \cap [\tilde{n}_i] \ \mid \ B \in P_{i} \right\} . \end{aligned}$$
Then, the partition \(P_{i,\min }\), respectively \(P_{i_0,\min }^{\,{\text {init}}}\), consists for any \(\tilde{n}_i\le n_i\) of a minimal number of blocks on the first \(\tilde{n}_i\) activations compared with all other block deadline feasible, respectively both block deadline and fiac feasible, partitions \(P_i\):
$$\begin{aligned} \left| \left. P_{i,\min }^{\,{\text {(init)}}}\right| _{\tilde{n}_i} \right| \le \left| \left. P_{i}\right| _{\tilde{n}_i} \right| . \end{aligned}$$
(4.11)
Proof
We consider first \(\left. P_{i,\min }\right| _{\tilde{n}_i}\). It is block deadline feasible because the deadline of the last activation for each block is defined in (4.8) and (4.10) to be less or equal than the corresponding block deadline. Assume there is a block deadline feasible partition \(P_i\) for the control \(i\in [{n_\omega }]\) with \(\left| \left. P_{i}\right| _{\tilde{n}_i} \right| < \left| \left. P_{i,\min }\right| _{\tilde{n}_i} \right|\). In other words, there exists a subset of the first j blocks of \(\left. P_{i}\right| _{\tilde{n}_i}\) that includes more activations than the ones included into the first j blocks of \(\left. P_{i,\min }\right| _{\tilde{n}_i}\). We consider the minimal number of blocks j with this property:
$$\begin{aligned} j:= \min \left\{ l\in [nb_{i,\min }] \ \mid \ B_{i,l}\in \left. P_{i,\min }\right| _{\tilde{n}_i},\, B'_{i,l}\in \left. P_{i}\right| _{\tilde{n}_i}: \ \max \{k\in B_{i,l} \} < \max \{k\in B'_{i,l} \} \right\} . \end{aligned}$$
(4.12)
The block index j is unique since the association of activations to blocks is monotonically increasing, meaning that there are no \(k_1\)th, \(k_2\)th activations, \(k_1<k_2\), with \(k_1\in B_{i,l_1}, k_2\in B_{i,l_2}\) and \(l_1 > l_2\). We conclude
$$\begin{aligned} \min \{k\in B'_{i,j} \} \le \min \{k\in B_{i,j} \}, \quad B'_{i,j}\in \left. P_{i}\right| _{\tilde{n}_i}, \ B_{i,j}\in \left. P_{i,\min } \right| _{\tilde{n}_i}, \end{aligned}$$
(4.13)
so that block \(B'_{i,j}\)’s first activation \(k'\) is smaller or equal than k which marks the earliest activation of \(B_{i,j}\). The definition of release intervals (4.54.6) implies \(r_{i,k'} \le r_{i,k}\) for \(k'\le k\). Similarly, the definition of block deadlines (4.7) implies \(db_{i,k'} \le db_{i,k}\) for \(r_{i,k'} \le r_{i,k}\) and we find with (4.13) in particular
$$\begin{aligned} db_{i,\min \{k\in B'_{i,j} \}} \le db_{i,\min \{k\in B_{i,j} \}}. \end{aligned}$$
(4.14)
On the other hand, the definition of \(P_{i,\min }\) in (4.10) implies
$$\begin{aligned} db_{i,k_{j-1}+1} = \max \{k\in B_{i,j} \}. \end{aligned}$$
(4.15)
Then, the definition of j yields
$$\begin{aligned} db_{i,\min \{k\in B_{i,j} \}} {\mathop {=}\limits ^{(4.10)}} db_{i,k_{j-1}+1} {\mathop {=}\limits ^{(4.15)}} \max \{k\in B_{i,j} \} < \max \{k\in B'_{i,j} \} \le db_{i,\min \{k\in B'_{i,j} \}}, \end{aligned}$$
(4.16)
where the last inequality must hold due to the assumption of \(P_i\) being block deadline feasible. Inequality (4.14) contradicts inequality (4.16), or equivalently there is no such partition \(P_i\) and \(P_{i,\min }\) uses indeed a minimal number of blocks on any \([\tilde{n}_i]\subset [n_i]\).
The same argumentation for \(j\ge 2\) in equation (4.12) can be applied in order to prove the result for \(P_{i_0,\min }^{\,{\text {init}}}\) as \(P_{i_0}\) is also assumed to be block deadline feasible in this case and the same holds for \(P_{i_0,\min }^{\,{\text {init}}}\) from the second block on. We just need to take care of the case when \(j=1\), i.e., if \(B_{i_0,j}\), respectively \(B'_{i_0,j}\), is the first block of the control \(i_0\). Here, \(\max \{k\in B_{i_0,1} \} < \max \{k\in B'_{i_0,1}\}\) cannot appear, since \(P_{i_0}\) is assumed to be fiac feasible and the construction of the first block of \(P_{i_0,\min }^{\,{\text {init}}}\) implies that no further activation can be added to \(B_{i_0,1}\) without violating fiac feasibility. Thus, \(j=1\) is impossible in (4.12) and \(P_{i_0,\min }^{\,{\text {init}}}\) is also minimal in the number of blocks. \(\square\)
Corollary 1
Consider the setting of Proposition 1and the controls \(i_0,i\in [{n_\omega }]\). We define
$$\begin{aligned} \tilde{n}_{i,N} := \max \{k \mid d_{i,k}\le N \}, \quad nb_{i,\min }^N := \left| \left. P_{i,\min }\right| _{\tilde{n}_{i,N}} \right| , \quad nb_{i_0,\min }^{N,{\text {init}}} := \left| \left. P_{i_0,\min }^{\,{\text {init}}} \right| _{\tilde{n}_{i_0,N}} \right| . \end{aligned}$$
There is no block deadline feasible partition, respectively block deadline and fiac feasible partition, that uses less than \(nb_{i,\min }^N\) blocks on \([\tilde{n}_{i,N}]\), respectively \(nb_{i_0,\min }^{N,{\text {init}}}\) blocks on \([\tilde{n}_{i_0,N}]\) .
Proof
The result follows directly from Proposition 1 with \(\tilde{n}_{i} = \tilde{n}_{i,N}\) and \(\tilde{n}_{i_0} = \tilde{n}_{i_0,N}\). \(\square\)
As a final result for this section, we establish a lower bound for (CIA\(-\bar{\theta }-\)init) that will be useful in Theorem 1.
Proposition 2
(Lower bound for (CIA\(-\bar{\theta }-\)init)) Let \(\sigma ^*\) be the objective of (CIA\(-\bar{\theta }-\)init) with equidistant discretization and \(i_0\) the fixed initial active control as defined in Definition 8. Let \(nb_{i,\min }^N\) for all \(i\ne i_0\) and \(nb_{i_0,\min }^{N,{\text {init}}}\) be given as in Corollary 1. It results
$$\begin{aligned} \sum \limits _{i\in [{n_\omega }], i\ne i_0} nb_{i,\min }^N + nb_{i_0,\min }^{N,{\text {init}}} -1 \le \sigma ^*. \end{aligned}$$
(4.17)
Proof
By virtue of Lemma 1, a feasible solution of (CIA\(-\bar{\theta }-\)init) satisfies the necessary condition of generating only block deadline feasible partitions \(P_i\) and if \(i=i_0\), the activation partition \(P_i\) is also fiac feasible. Moreover, all activations are executed no later than their deadline interval. That holds particularly for those that are due no later than N. Hence, we can apply Corollary 1 and conclude the minimum number of blocks of a feasible solution until the in total Nth activation is \(nb_{i,\min }^N\), respectively \(nb_{i_0,\min }^{N,{\text {init}}}\). Finally, we obtain the claim (4.17) by summing up over all controls and using that the setup of the first block does not count as switch. \(\square\)