Alexandre Rocca

Vincent Acary

Bernard Brogliato

On discontinuous DAE: concept of solutions, numerical simulations, and a case study well-posedness

Keywords: Hybrid Systems, Switching DAE, Nonsmooth Dynamical Systems, Linear Complementarity System, Time-stepping scheme, Euler method

In this work, we study differential algebraic equations with constraints defined in a piecewise manner using a conditional statement. Such models classically appear in systems where constraints can evolve in a very small time frame compared to the observed time scale. The use of conditional statements or hybrid automata are a powerful way to describe such systems and are, in general, well suited to simulation with event driven numerical schemes. However, such methods may fail to efficiently simulate sliding motions and events accumulation. In contrast, the representation of such systems using differential inclusions and the methods from nonsmooth dynamics are often closer to the physical theory, but their solutions may be less intuitive or harder to interpret. Associated event-capturing numerical methods have been extensively used in mechanical modelling with success and then extended to other fields such as electronics and system biology. In a similar manner to the previous application of nonsmooth methods to the simulation of piecewise linear ODEs, we want to apply event-capturing numerical schemes to piecewise linear DAEs. In this paper, we explore three concepts of solutions for switching index-2 DAEs. To this aim, we first study in-depth the well-posedness of an example of index-2 planar dynamical system with a switching constraint, using a set-valued operators relaxation of the constraint. Then, for the same example, we give an analysis of the timecapturing implicit Euler scheme solutions and conjecture an improved numerical scheme to tackle the observed problems. In a second part, we propose three relaxations of switching constraints to obtain three concepts of solutions to switching DAEs, inspired by concepts of solutions for switching ODEs. We illustrate their properties and the possible effects on the well-posedness of switching DAEs through simple examples.

Introduction

The aim of this work is to study discontinuous differential algebraic equations (DAE), also known as hybrid DAE or switching DAE in the literature. They can be defined, for instance, as continuous-time dynamical systems with some algebraic constraints switching with respect to the state variables. A very general framework of discontinuous DAE may be given by F (t, y, ẏ) = 0 [START_REF] Acary | Nonsmooth Modeling and Simulation for Switched Circuits[END_REF] where F : R × R n × R n → R n is a discontinuous, possibly set-valued function, with respect to its second and third arguments. Since it is very difficult to deal with this too general setting, a first specialisation is

ẋ = f (t, x, z) 0 = g(t, x, z) (2)
where g : R × R n × R n → R m is a discontinuous, possibly set-valued function, with respect to its second and third arguments. Such discontinuous (hybrid or switching) DAE systems are used in numerous fields from electronics [START_REF] Acary | Nonsmooth Modeling and Simulation for Switched Circuits[END_REF], mechanics [START_REF] Brogliato | Nonsmooth Mechanics[END_REF] to chemical process engineering [START_REF] Stechlinski | Nonsmooth differentialalgebraic equations in chemical engineering[END_REF]. They are especially used in model-based design through the use of languages like Modelica as in [START_REF] Henningsson | DAE solvers for large-scale hybrid models[END_REF]. In such languages, one can build a model defined by a finite number of dynamical systems whose switching is dictated by conditional statements over the time or the state variables. In general, after the compilation, models expressed in such languages results in the definition of so-called flat, multi-mode or hybrid, DAEs such as the ones studied in [START_REF] Hamann | Numerical solution of hybrid systems of differential-algebraic equations[END_REF] and [START_REF] Benveniste | Structural analysis of multi-mode DAE systems[END_REF] that are particular cases of discontinuous DAEs [START_REF] Acary | Numerical Methods for Nonsmooth Dynamical Systems: Applications in Mechanics and Electronics[END_REF]. These discontinuous DAEs are then simulated using event-based methods. However, few works focus on the study and analysis of concept of solutions for such discontinuous DAEs, resulting in unclear simulating behaviours at mode change, outside of some restricted context.

1.1 Piecewise linear DAEs with a unique vector field.

The framework in [START_REF] Acary | Numerical Methods for Nonsmooth Dynamical Systems: Applications in Mechanics and Electronics[END_REF] is still relatively too general to be able to provide us with useful insights on the concept of solutions. This is the reason why we focus our attention in this article on piecewise linear DAEs, with a constant vector field, that we wish to study from the point of view of nonsmooth dynamics [START_REF] Brogliato | Nonsmooth Mechanics[END_REF], and event-capturing time integration methods [START_REF] Acary | Numerical Methods for Nonsmooth Dynamical Systems: Applications in Mechanics and Electronics[END_REF].

Let us define a piecewise linear DAE with a unique vector field.

Definition 1 (Piecewise linear DAE with a unique vector field). Let n, n 1 , n 2 be three integers such that n 1 + n 2 = n. Let x : R → R n1 be a function of time t called the differential variable. Let z : R → R n2 be a function of time t called the algebraic variable. Let A ∈ R n1×n1 , B ∈ R n1×n2 be two constant matrices, and

B i ∈ R n1×n2 C i ∈ R n2×n1
, a family of matrices indexed by i. A piecewise linear DAE with a unique vector field is defined by

     ẋ(t) = Ax(t) + Bz(t) + b 0 = g i (x(t), z(t)) = C i x(t) + D i z(t) + q i ∀(x(t), z(t)) ∈ X i , (3)
where the sets X i = {(x, z) ∈ R n | h i (x, z) = H i x(t) + F i z(t) + p i > 0} ⊂ R n define a partition of R n such that:

- i X i = R n ,
int(X i ) = ∅ , ∀i, for i = j, X i ∩ X j = ∅.

Using step-functions 1 , we can build in a similar fashion to [START_REF] Acary | Numerical simulation of piecewiselinear models of gene regulatory networks using complementarity systems[END_REF] a generalised constraint:

g(x, z) = i   j =i (1 -s + (hj(x, z)))   s + (hi(x, z))gi(x, z) = 0 , (4)
where s + (y) = 0 if y < 0 and s + (y) = 1 if y > 0. The behaviour at y = 0 is not stipulated yet, as it will depend on later relaxations: either using a multivalued step function relaxation or using a convex relaxation of the switching constraint, as it is explained in Section 4. In particular, in the context of piecewise ODE, the work of [START_REF] Acary | Numerical simulation of piecewiselinear models of gene regulatory networks using complementarity systems[END_REF] shows that methods for nonsmooth dynamics can be efficiently applied using such a transformation. Then, depending on the concept of solutions applied on the switching surfaces (using convexification as in [START_REF] Filippov | Differential Equations with Discontinuous Right-hand Side[END_REF], or using multivalued functions as in [START_REF] Aizerman | Fundamentals of the theory of discontinuous systems[END_REF]), the resulting solutions may differ. Here, we study the extension of such concepts of solutions when applied to switching constraints instead of switching ODE.

Related work

Various authors already studied the field of hybrid DAE. For example, DAE including complementarity constraints are a subset of differential variational inequalities (DVI). DVIs are defined and studied in [START_REF] Pang | Differential variational inequalities[END_REF]. In particular, they analyse the well-posedness of index-one and mixed index between 1 and 2 DVIs. In a similar manner, the authors of [START_REF] Acary | Nonsmooth Modeling and Simulation for Switched Circuits[END_REF] study switching DAEs in the context of switching electrical systems. They show that such systems can be expressed as Mixed Complementarity Systems2 (MCS), [START_REF] Acary | Nonsmooth Modeling and Simulation for Switched Circuits[END_REF]Chapter 4], and efficiently simulated with associated event-capturing numerical schemes. However, none of these works study solutions to discontinuous switching DAEs given in the formalism of Definition 1. Apart from variational inequalities, or complementarity systems formalisms, Matrosov [START_REF] Matrosov | Existence of solutions of the algebro-differential equations[END_REF] proposes a concept of solutions, which is inspired from the Filippov concept of solution for discontinuous ODEs [START_REF] Filippov | Differential Equations with Discontinuous Right-hand Side[END_REF], for discontinuous DAEs [START_REF] Acary | Numerical Methods for Nonsmooth Dynamical Systems: Applications in Mechanics and Electronics[END_REF]. Let us consider the discontinuous constraints and a differential part

g(•), f (•) ∈ C(R × R n1 \ S × R n2
), with S the set of discontinuities assumed as a finite union of smooth hyper-surfaces in R n1 of co-dimension larger or equal to 1. Let us assume some function z(t) is given, and define F 0 the set of vector fields that are solution in (t, x, z) as:

F 0 (t, x, z) =      y ∈ R n1 such that ∃y k → y, ∃t k → t, ∃x k → x, ∃z k → z y k = f (t k , x k , z k ) 0 = g(t k , x k , z k )      , (5)
where x k / ∈ S for all k. Then, one defines a concept of solution for discontinuous DAEs as an extension of Filippov concept of solution for discontinuous ODEs: (x(t), z(t)) is a solution of (2) if x(t) is absolutely continuous in t, z(t) is continuous in t everywhere, and if (x(t), z(t)) is a solution of the differential inclusion: ẋ(t) ∈ co(F 0 (t, x(t), z(t))) .

Matrosov gives sufficient conditions for existence of such solutions in [START_REF] Matrosov | Existence of solutions of the algebro-differential equations[END_REF], and sufficient conditions for uniqueness in [START_REF] Matrosov | On right-hand uniqueness of solutions to nondegenerated algebro-differential equations with discontinuances[END_REF]. Merhmann et al. [START_REF] Hamann | Numerical solution of hybrid systems of differential-algebraic equations[END_REF][START_REF] Mehrmann | Hybrid systems of differential-algebraic equations-analysis and numerical solution[END_REF] provide a study of well-posedness of hybrid DAE structured as hybrid automata. In addition, a numerical implementation of sliding modes for DAE systems is provided to avoid chattering when switching occurs. To this aim, they propose a concept of sliding solutions defined by the convex hull of the vector fields obtained by index reductions at the right and left limit of the discontinuity. Furthermore, the work in [START_REF] Mehrmann | Hybrid systems of differential-algebraic equations-analysis and numerical solution[END_REF] needs explicit transition functions from one mode (DAE) to another, in addition to consistent reset conditions. Trenn [26] defines solutions of hybrid DAE with exogenous switching. In particular, he introduces a notion of distributional solutions which can also be used to efficiently solve inconsistent initial conditions of classical DAE as an exogenous switching at t = 0. Camlibel et al. [START_REF] Camlibel | Differential-algebraic inclusions with maximal monotone operators[END_REF] extend results of well-posedness of differential inclusions with maximal monotone right-hand sides to differential algebraic inclusions P ẋ ∈ -F(x) with a maximal monotone operator F(•) and a singular matrix P. This work considers nonsmooth DAEs in the form of:

  
  E ẏ(t) = Ay(t) + Bλ(t) + b w(t) = Cy(t) + Dλ(t) + q w(t) ∈ M(-λ(t)), [START_REF] Benveniste | Structural analysis of multi-mode DAE systems[END_REF] with M(•) a maximal monotone operator and singular matrix E. Then, assuming some passivity conditions on the Weierstrass-Kronecker form of [START_REF] Benveniste | Structural analysis of multi-mode DAE systems[END_REF], sufficient conditions for the well-posedness of [START_REF] Benveniste | Structural analysis of multi-mode DAE systems[END_REF] are given.

It is important to note that this formalism is the closest one to the example studied in Sections 2 and 3, with the notable difference that in our case the operator M(•) is not maximal monotone, but hypo-monotone. Stechlinski et al. [START_REF] Stechlinski | Nonsmooth differentialalgebraic equations in chemical engineering[END_REF][START_REF] Barton | Computationally relevant generalized derivatives: theory, evaluation and applications[END_REF] and Khan [START_REF] Khan | Branch-locking AD techniques for nonsmooth composite functions and nonsmooth implicit functions[END_REF] define from the Clarke Jacobian a notion of generalised differential index and an associated index reduction procedure in the context of nonsmooth DAE, with Lipschitz continuous constraints. Current implementation and theory are limited to semi-explicit index-1 nonsmooth DAE. Finally, let us cite another work for index reduction of hybrid DAE by Benveniste et al. [START_REF] Benveniste | Structural analysis of multi-mode DAE systems[END_REF]. This work uses non-standard analysis to construct well-defined transitions from one mode to another in the context of hybrid DAE, even in the presence of varying index. In particular, this work pairs well with [START_REF] Mehrmann | Hybrid systems of differential-algebraic equations-analysis and numerical solution[END_REF], which needs the knowledge of transition and re-initialisation maps when switching from one mode to another.

Outline

As we mentioned in the previous section, the case of index-1 discontinuous DAEs has been well studied in the literature. This is the reason why we focus our attention on index-2 problems where the switching surface depends, only, on the state variables. Let us give a definition of the object of interest in this article.

Definition 2 (Single-Switching Index-2 Piecewise linear DAE with a unique vector field). Let us consider a piecewise linear DAE with a unique vector field as in Definition 1. When considering a single switching surface and index-2 DAEs in each mode, (3) can be reduced to:

     ẋ(t) = Ax(t) + Bz(t) + b 0 = g 1 (x(t)) = C 1 x(t) + q 1 if x(t) ∈ X 1 0 = g 2 (x(t)) = C 2 x(t) + q 2 if x(t) ∈ X 2 , (8) with X 1 = {x ∈ R n1 | h 1 (x) = -h(x) = -Hx(t) -p > 0} ⊂ R n1 and X 2 = {x ∈ R n1 | h 2 (x) = h(x) = Hx(t) + p > 0} ⊂ R n1 .
In addition, (8) is of differential index 2 in each mode and it follows that the matrices C i B are non-singular for all i ∈ {1, 2}.

Throughout the paper, a working example of (8) will be detailed to give some insights on possible concepts of solutions and to large varieties of solutions we can obtain. Along this paper, we may call "left-hand constraint", the constraint C 1 x(t) + q 1 = 0 that is active if x ∈ X 1 (or equivalently h(x) < 0). Similarly, we may call "right-hand constraint", the constraint C 2 x(t) + q 2 = 0 that is active if x ∈ X 2 (or equivalently h(x) > 0). To study the solutions of systems in the form of (8), we construct a relaxation of these two constraints along the switching surface h(x, z) = 0 by "filling-in the gap" (see [START_REF] Monteiro | Differential Inclusions in Nonsmooth Mechanical Problems: Shocks and Dry Friction[END_REF]). One way to construct such relaxed constraint in h(x, z) = 0 is by considering the convex hull of the left and right limit of g(x, z) when h(•) < 0 and h(•) > 0 respectively. We could also consider multi-valued step functions in (4) in a similar fashion to [START_REF] Aizerman | Fundamentals of the theory of discontinuous systems[END_REF] for discontinuous ODEs. For the working example of Section 2, we consider the convexification of the constraints along the switching surface.

As we have seen, most works consider either a high index hybrid DAE framework with event-driven numerical methods and explicit transition functions, or index-1 DAE with nonsmooth constraints aiming to rewrite the system as a differential inclusion3 into a Lipschitz function, or a maximal monotone operator. In this paper, we are looking to make a bridge between the state-dependent switching DAE formalism, and the nonsmooth DAE formalism studied by DVI [START_REF] Pang | Differential variational inequalities[END_REF] and MCS [START_REF] Acary | Nonsmooth Modeling and Simulation for Switched Circuits[END_REF]. With this in mind, in Section 2 we first study in details the well-posedness of nonsmooth DAEs obtained by a relaxation of the constraints on a simple working example. In Section 3, we analyse how the classical nonsmooth numerical methods perform in this context. We also propose some modification to the numerical scheme to overcome issues observed in this context. Part of the results presented in the Sections 2 and 3, were already briefly presented without proofs in [START_REF] Rocca | Index-2 hybrid DAE: a case study with well-posedness and numerical analysis[END_REF]. In Section 4, we study various relaxation methods to fill the graph of the constraint by either a continuous extension of the left and right constraints, a relaxation by multi-valued step functions, or finally a relaxation by convexification. We also discuss their effect on the existence of solutions for index-2 hybrid DAEs through another illustrative example. Conclusions end the article in Section 5. Proofs and definitions are given in Appendix.

Analysis of a discontinuous DAE Example

Let us consider the following switching DAE:

                     ẋ1 (t) = 1 + B 1 z(t) ẋ2 (t) = B 2 z(t) if x 1 < 0 then : 0 = -1 -x 1 (t) -x 2 (t) , if x 1 > 0 then : 0 = 1 + x 1 (t) -x 2 (t) (9a) (9b) (9c)
which is a particular case of [START_REF] Brogliato | Nonsmooth Mechanics[END_REF]

with x = (x 1 , x 2 ) T , A = 0, B = (B 1 , B 2 ) T , C 1 = (-1, -1), C 2 = (1, -1), H = (1, 0), b = (1, 0) T , (q 1 , q 2 , p) = (-1, 1, 0).
In x 1 = 0, the system does not have continuous solutions whatever the active constraint is, so we keep strict inequalities in [START_REF] Camlibel | Differential-algebraic inclusions with maximal monotone operators[END_REF].

The main objective of this article is to show that despite each DAE, considered separately, possesses simple dynamics, the switching DAE in (9) has, on the contrary, surprisingly complex dynamics. As exposed in the introduction, we search to obtain absolutely continuous (AC) solutions on the switching surface x 1 = 0 by considering a set-valued relaxation of the constraint. It follows that the switching constraints can be embedded into a set-valued constraint obtained by convexification, or by filling-in the gap. Indeed, in a similar manner to the regularisation of solution for switching ODE [START_REF] Acary | Numerical simulation of piecewiselinear models of gene regulatory networks using complementarity systems[END_REF], we construct the nonsmooth DAE system

           ẋ1 (t) = 1 + B 1 z(t) ẋ2 (t) = B 2 z(t) 0 = λ(t)(1 + x 1 (t)) -x 2 (t) λ(t) ∈ sign(x 1 (t)) , (10a) (10b)
where the relaxed constraint is 0 ∈ λ(x 1 + 1) -x 2 with λ = sign(x 1 ) and sign(•) is the set-valued operator:

sign(x) =      {-1} if x < 0 [-1, 1] if x = 0 {1} if x > 0 . ( 11
)
The set-valued algebraic constraint in (10b) equals the ones of (9) when x 1 < 0 (respectively x 1 > 0), and is a convex relaxation of both in x 1 = 0: that is

(x 1 , x 2 ) ∈ co( 0 -1 , 0 1 ) = {0} [-1, 1]
(see Figure 1). Let us remark that (10b) is a particular case of (4) and will be further studied in Section 4.2 and 4.3.

If x 1 (t) ≤ 0 and (9b) is satisfied then we say that the nonsmooth DAE ( 10) is in mode 1. In addition, if x 1 (t) < 0 and (9b) is satisfied then we say that [START_REF] Facchinei | Finite-dimensional Variational Inequalities and Complementarity Problems[END_REF] is strictly in mode 1. Similarly, If x 1 (t) ≥ 0 and the constraint (9c) is satisfied then we say that the nonsmooth DAE ( 10) is in mode 2, and strictly in mode 2 if x 1 (t) > 0. Finally, if x 1 (t) = 0 and x 2 (t) ∈ [-1, 1] then we say that the nonsmooth DAE ( 10) is in mode 3, and strictly in mode 3 if x 2 (t) ∈ (-1, 1).

In Section 2.1, we first study existence of AC solutions x(t) to [START_REF] Facchinei | Finite-dimensional Variational Inequalities and Complementarity Problems[END_REF]. Then, in Section 2.2 we compare the solutions of [START_REF] Facchinei | Finite-dimensional Variational Inequalities and Complementarity Problems[END_REF] to the existing concept of solutions applied to [START_REF] Camlibel | Differential-algebraic inclusions with maximal monotone operators[END_REF]. In particular, we discuss the solutions proposed by [START_REF] Mehrmann | Hybrid systems of differential-algebraic equations-analysis and numerical solution[END_REF] and the conditions for the existence of a sliding motion on the switching surface x 1 = 0. Finally, in Section 2.3 we study the extension to solutions of bounded variations, and the definition of a jump law when an AC solution cannot be continued.

Fig. 1: Phase-space representation of the constraint of ( 9) and (10)

Analysis of Absolutely Continuous(AC) solutions

Let us study the conditions on the differential part (9a) of the DAE, and in particular B 1 , B 2 for the existence of a sliding mode along the switching surface x 1 = 0; in other words, the existence of an AC solution x 1 (t), x 2 (t) for some arbitrary time interval and initial conditions to the following problem: Problem 1. Let I ⊂ R a compact interval such that t 0 = inf I. The problem is to find an absolutely continuous(AC) function x(•) = (x 1 (•), x 2 (•)) on I, and Lebesgue integrable (L 1 (I)) functions z(•), λ(•) such that for the nonsmooth DAE [START_REF] Facchinei | Finite-dimensional Variational Inequalities and Complementarity Problems[END_REF] the differential part (10a) is satisfied almost everywhere, and the constraint (10b) is satisfied everywhere, given the initial condition x(t 0 ) = x 0 .

If it exists ε > 0 such that the solution exists on an interval I = [t 0 , t 0 + ε), the solution is called a local solution. If a local solution cannot be extended, it is called a maximal solution. If the solution exists on I = [0, T ] for any T > t 0 , then the solution is called a global solution.

Let us define the concept of feasible initial condition for Problem 1.

Definition 3 (Feasible initial condition). The initial condition x(t 0 ) = x 0 in Problem 1 is said to be feasible if it exists λ(t 0 ) ∈ R such that

λ(t 0 ) ∈ sign(x 1 (t 0 )) -x 2 (t 0 ) + λ(t 0 )x 1 (t 0 ) + λ(t 0 ) = 0. (12)
Clearly, a feasible initial condition is a necessary condition to obtain a solution to Problem 1. The constraint (10b) in Problem 1 can be rewritten equivalently as the following set-valued equation:

0 ∈ -x 2 (t) + |x 1 (t)| + sign(x 1 (t)) ⇔ x 1 (t) ∈ N [-1,1] (-x 2 (t) + |x 1 (t)|) , ( 12')
where the equivalence is obtained by using the inversion of subdifferentials of convex lower-semicontinuous functions [START_REF] Rockafellar | Variational Analysis[END_REF]. Thus, the original switching DAE in [START_REF] Camlibel | Differential-algebraic inclusions with maximal monotone operators[END_REF], which is embedded in (3), is recast in a new formalism:

ẋ(t) = Ax(t) + Bz(t) + b 0 ∈ F(x) , (13)
with F : R n ⇒ R.

Proposition 1 (Local solutions to Problem 1). Let us state necessary and sufficient conditions on B = (B 1 , B 2 ) T such that Problem 1 has, at least, one solution on [t 0 , t 0 + ), for some 0 < , and x(t 0 ) = x 0 is a feasible initial condition.

-If (10) is strictly in mode 1 at t 0 , then there exists a local solution to Problem 1 if and only if

B 1 + B 2 = 0 (14)
-If (10) is strictly in mode 2 at t 0 , then there exists a local solution to Problem 1 if and only if

B 1 -B 2 = 0 (15)
-If (10) is strictly in mode 3 at t 0 , then there exists a local solution to Problem 1 if and only if

B 1 = 0 (16)
-If x(t 0 ) = (0, -1) T = A -, then there exists a local solution to Problem 1 if and only if

B 2 B 1 ≤ 0 ( 17
)
-If x(t 0 ) = (0, 1) T = A + , then there exists a local solution to Problem 1 for all B ∈ R 2 .

Proof. Let us first consider the conditions of existence of solutions when strictly in each mode: mode 1 (x 1 < 0), mode 2 (x 1 > 0), mode 3 (x 1 = 0, x 2 ∈ (-1, 1) ). Then, we consider the conditions at the switching points A -= (0, -1) T and A + = (0, 1) T .

1. Assume x 1 (t 0 ) < 0 for some t 0 ≥ 0. Let us consider a local solution staying in mode 1: [START_REF] Facchinei | Finite-dimensional Variational Inequalities and Complementarity Problems[END_REF] in mode 1 must satisfy almost everywhere:

x 1 (t) ≤ 0, λ(t) = -1 for all t ∈ [t 0 , t 0 + ε] I ε , with ε > 0. For t ∈ I ε , an AC solution of
-ẋ2 (t) -ẋ1 (t) = 0 ⇔ (B 2 + B 1 )z(t) + 1 = 0 ⇔ z(t) = -1 B 2 + B 1 . (18)
Therefore, z(•) is Lebesgue integrable if and only if (B 2 + B 1 ) = 0, and then Problem 1 has a solution. On the contrary, we say that mode 1 is not feasible if (B 2 + B 1 ) = 0. Let us notice (see [START_REF] Camlibel | Differential-algebraic inclusions with maximal monotone operators[END_REF] and [START_REF] Facchinei | Finite-dimensional Variational Inequalities and Complementarity Problems[END_REF]) that (B 2 + B 1 ) = 0 corresponds to non-singular C 1 B with C 1 = (-1, -1). We deduce that there exists an local AC solution in mode 1 if and only if (B 2 + B 1 ) = 0, and we have ẋ1

(t) = B 2 B 2 + B 1 . (19)
Let us now examine the upper bound t 1 such that a solution in mode 1 continues to exist. From [START_REF] Pang | Differential variational inequalities[END_REF], we obtain:

-If (B 1 + B 2 )B 2 ≤ 0 then ẋ1 (t) ≤ 0, for all t ∈ [t 0 , +∞) I ∞ : there is a global solution in mode 1. -If (B 1 + B 2 )B 2 > 0 then ẋ1 (t) > 0, for t > t 0 . Then, for t 1 = -x 1 (t 0 ) B1+B2 B2
+ t 0 we have x(t 1 ) = (0, -1) and the trajectory must leave mode 1 in a right-neighbourhood of t by continuation in another mode, if this is possible. To conclude this case, a sufficient and necessary condition for existence of a local solution of Problem 1 in mode 1 on [t 0 , T ] for T = t 1 is:

B 1 + B 2 = 0 . ( 20
)
2. Similarly, assume x 1 (t 0 ) > 0. Let us consider a solution staying in mode 2:

x 1 (t) ≥ 0, λ(t) = 1 for all t ∈ I ε . Hence, for t ∈ I ε , a solution of (10) in mode 2 must satisfy almost everywhere:

-ẋ2 (t) + ẋ1 (t) = 0 ⇔ -B 2 z(t) + B 1 z(t) + 1 = 0 ⇔ z(t) = -1 B 1 -B 2 , (21)
and this mode is feasible if and only if (B 1 -B 2 ) = 0. Similarly to the previous case, this corresponds to non-singular C 2 B with C 2 = (1, -1). We deduce that there exists a local AC solution in mode 2 if and only if (B 1 -B 2 ) = 0, and we have

ẋ1 (t) = -B 2 B 1 -B 2 . ( 22
)
Let us now examine the upper bound t 1 such that a solution in mode 2 continues to exist. It follows that :

-

If (B 1 -B 2 )B 2 ≤ 0 then ẋ1 (t) ≥ 0, for all t ∈ I ∞ : there is a global solution in mode 2. -If (B 1 -B 2 )B 2 > 0 then ẋ1 (t) < 0, for t > t 0 . Furthermore, for t 1 = x 1 (t 0 ) B1-B2 B2
+ t 0 we have x(t 1 ) = (0, 1) and the solution cannot be continued further in mode 2 and must leave mode 2 in a rightneighbourhood of t by continuation in another mode, if this is possible. To conclude this case, a sufficient and necessary condition for existence of a local solution of Problem 1 in mode 2 on [t 0 , T ] for T = t 1 is:

B 1 -B 2 = 0 . ( 23
)
3. Assume there exists t 0 ≥ 0 such that x 1 (t 0 ) = 0 and x 2 (t 0 ) ∈ (-1, 1). Let us consider a solution staying in mode 3, x 1 (t) = 0 and x 2 (t) ∈ [-1, 1], for all t ∈ I ε . For t ∈ I ε , a solution in mode 3 must satisfies almost everywhere:

   ẋ1 (t) = 0 ⇔ B 1 z(t) = -1 ẋ2 (t) = -B 2 B 1 . (24)
In addition, the constraint in [START_REF] Hamann | Numerical solution of hybrid systems of differential-algebraic equations[END_REF] becomes

λ(t) = x 2 (t) ∈ [-1, 1]
. In a similar way to modes 1 and 2, there exists a local solution in mode 3 if and only if:

B 1 = 0 ( 25
)
This corresponds to non-singular C 3 B with C 3 = (1, 0). In addition, a solution exists in mode 3 only if -1 ≤ x 2 (t) ≤ 1: if it reaches x 2 (t) = 1 or -1 then it leaves mode 3 in a right-neighbourhood of t by continuation in another mode, if this is possible. From [START_REF] Souza | Strategies for numerical integration of discontinuous DAE models[END_REF], the solutions staying in mode 3 are either:

-Constant if B 2 = 0, and there is a global solution in mode 3.

-Going 'downward' if B 2 /B 1 > 0 such that ẋ2 < 0. Then, there exists t 1 ≥ t 0 given by t 1 = B1 B2 (1+x 2 (t 0 ))+t 0 such that x 2 (t 1 ) = -1 and the solution cannot stay in mode 3 in a right-neighbourhood of t 1 : continuation, if any, must occur in mode 1.

-Going 'upward' if B 2 /B 1 < 0 such that ẋ2 > 0. Then, there exists t 1 ≥ t 0 given by t 1 = B1 B2 (x 2 (t 0 ) -1) + t 0 such that x 2 (t 1 ) = 1 and the solution cannot stay in mode 3 in a right-neighbourhood of t 1 : continuation, if any, must occur in mode 2. 4. Assume there exists t 0 ≥ 0 such that x(t 0 ) = A -. The point A -is both at the border of mode 1, and at the border of mode 3 so there may exist a local solution with continuation in either of these modes.

Let us first consider the case of a continuation with a local solution in mode 1, which is equivalent to x 1 (t) ≤ 0 and λ(t) = -1, for all t ∈ I ε . As x 1 (t 0 ) = 0, we note from case 1 that there exists a local solution in mode 1 if and only if ẋ1 (t) ≤ 0 almost every where, and this is equivalent to

(B 1 + B 2 )B 2 ≤ 0 , (B 1 + B 2 ) = 0 . ( 26
)
Let us now consider the case of a continuation with a local solution in mode 3, which is equivalent to x 1 (t) = 0 and x 2 (t) = [-1, 1], for all t ∈ I ε . As x 2 (t 0 ) = -1, we note from the 'upward' case 3 that there exists a local solution in mode 3 if and only if ẋ2 (t) ≥ 0 almost everywhere, and this is equivalent to

B 2 B 1 ≤ 0 , B 1 = 0. ( 27
)
We can conclude that there is existence of local solution in x(t 0 ) = A -if and only if (26) or (27) are satisfied. Then, let us notice that any B ∈ R 2 satisfying (26) also satisfies (27), and the union of these two conditions yields (27). 5. Assume there exists t 0 ≥ 0 such that x(t 0 ) = A + . The point A + is both at the border of mode 2, and at the border of mode 3 so there may exist a local solution with continuation in either of these modes. Let us first consider the case of a local solution in mode 2, which is equivalent to x 1 (t) ≥ 0 and λ(t) = 1, for all t ∈ I ε . As x 1 (t 0 ) = 0, we note from case 2 that there exists a local solution in mode 2 if and only if ẋ2 (t) ≥ 0 almost every where, and this is equivalent to

(B 1 -B 2 )B 2 ≤ 0 , (B 1 -B 2 ) = 0 . ( 28
)
Let us now consider the case of a local solution in mode 3, which is equivalent to x 1 (t) = 0 and x 2 (t) = [-1, 1], for all t ∈ I ε . As x 2 (t 0 ) = 1, we note from the 'downward' case 3 that there exists a local solution in mode 3 if and only if ẋ2 (t) ≤ 0 almost every where, and this is equivalent to

B 2 B 1 ≥ 0 B 1 = 0. ( 29
)
We can conclude that there is existence of a local solution in x(t 0 ) = A + if and only if (28) or (29) are satisfied. The union of these two conditions is satisfied for all B = (B 1 , B 2 ) T ∈ R 2 . The proof is complete.

Let us remark that the conditions ( 14) and ( 15) in Proposition 1 are always satisfied under the assumption that (9) respects Definition 2 and is of index-2 in mode 1 and 2. In the remainder of this paper, we consider this is true, and we assume that ( 14) and ( 15) are always satisfied.

Let us denote C = {x ∈ R 2 sol. of (12')} and T C (x) the contingent cone of C at the point x, see Definition 14. For our particular example, the contingent cone is given in the following result.

Lemma 1. The computation of the contingent cone to C at the point x 0 , i.e., T C (x 0 ), can be separated in 5 cases as follows:

-If x 0 is such that 0 = x 2,0 + x 1,0 + 1 and x 1,0 < 0, that is x 0 strictly in mode 1, then:

T C (x 0 ) = {x ∈ R 2 | 0 = x 2 + x 1 } (30) -If x 0 is such that 0 = -x 2,0 + x 1,0 + 1 and x 1,0 > 0, that is x 0 strictly in mode 2, then: T C (x 0 ) = {x ∈ R 2 | 0 = -x 2 + x 1 } (31)
-If x 0 is such that 0 = x 1,0 and x 2,0 ∈ (-1, 1), that is x 0 strictly in mode 3, then:

T C (x 0 ) = {x ∈ R 2 | 0 = -x 1 } (32)
-If x 0 = A -, then T C (x 0 ), is constituted of two half lines:

T C (x 0 ) = {x ∈ R 2 | x 1 = 0, x 2 ≥ 0} ∪ {x ∈ R 2 | x 2 = -x 1 , x 1 ≤ 0} , (33)
-

If x 0 = A + , then T C (x 0 )
, is constituted of two half lines:

T C (x 0 ) = {x ∈ R 2 | x 1 = 0, x 2 ≤ 0} ∪ {x ∈ R 2 | x 2 = x 1 , x 1 ≥ 0} (34)
Proposition 2. Let x(t 0 ) = x 0 be a feasible initial condition. A necessary and sufficient condition for a local solution to Problem 1 is:

x 0 ∈ C . ∃ z(t + 0 ) ∈ R such that (1, 0) T + Bz(t + 0 ) ∈ T C (x 0 ) . ( 35
)
It follows that a necessary and sufficient condition for local solutions to Problem 1 is

(x(t 0 ), ẋ(t + 0 )) ∈ C × T C (x(t 0 )) . (36)
Proof. Let us consider the computation of T C (x) in Lemma 1. One notices that outside of the points A -and A + , the contingent cone is the tangent space to the manifold associated with the constraint in (9b), (9c) or x 1 = 0. Then, considering the classical conditions for solutions of differential equations on manifold [20, Theorem 6.2] we can assert that for an initial condition x 0 ∈ C \ {A -, A + }, a necessary and sufficient condition for the existence of a local solution to Problem 1 is:

x 0 ∈ C . ẋ(t + 0 ) ∈ T C (x 0 ) , (37)
that is solution of (35). Let us assume that x 0 = A -and ẋ(t

+ 0 ) ∈ T C (x 0 ), with T C (x 0 ) given in (33), it follows that:        ẋ1 (t + 0 ) = 0 , ẋ2 (t + 0 ) ≥ 0 or ẋ2 (t + 0 ) = -ẋ1 (t + 0 ) , ẋ1 (t + 0 ) ≤ 0 . (38a) (38b)
If ẋ(t + 0 ) satisfies (38a), then from [START_REF] Souza | Strategies for numerical integration of discontinuous DAE models[END_REF], it is equivalent to B 2 /B 1 ≤ 0 and from (27) it is equivalent to the existence of a local solution in A -that can be continued in mode 3. Similarly, if ẋ(t + 0 ) satisfies (38b), then from [START_REF] Pang | Differential variational inequalities[END_REF] it is equivalent to 26), to a local solution in A -that can be continued in mode 1. One can proceed in a similar manner with x 0 = A + and prove that ẋ(t + 0 ) ∈ T C (x 0 ), with T C (x 0 ) given in (34), is a necessary and sufficient condition for the existence of local solutions to Problem 1 with x(t 0 ) = A + . This concludes the proof.

(B 1 + B 2 )B 2 ≤ 0, (B 1 + B 2 ) = 0, which is equivalent, by (
Remark 1. Let us notice that the condition (36) on the initialisation x(t 0 ), and ẋ(t + 0 ) the right limit of the derivatives, is close to the one stated, for example, in [START_REF] Rabier | A geometric treatment of implicit differential-algebraic equations[END_REF] for the existence of solutions to smooth DAEs where the state variables must be initialised on a manifold M, and the derivative4 must be in the tangent space of M in x 0 . In the context of smooth DAE, such initialisation is called consistent initialisation. Now, let us state some additional results on the existence of global solutions to Problem 1 for any feasible initial condition. Such solutions are especially interesting in some modelling purposes as they characterise the possibility to initialize the system in any mode while keeping global solutions. Proposition 3. Problem 1 has, at least, one solution on [t 0 , T ), for some T ≤ +∞, and for any feasible initial condition x 0 , if and only if B 1 , B 2 satisfy:

         B 1 =0 B 2 B 1 ≤0 (B 1 + B 2 ) =0. ( 39
)
Furthermore, the algebraic variables z(t) is function of bounded variation and λ(t) is AC.

Proof. This proposition corresponds to conditions on (B 1 , B 2 ) T such that there is existence of local solutions in any point of the constraint set C. Then, the resulting condition is simply provided by the intersection of all the conditions for local solutions given in Proposition 1. We can also prove that λ(t) is AC by referring to the case 3 of Proposition 1's proof: if a transition occurs at t from mode 2 to mode 3 then x 2 (t ) = 1 and λ(t ) = 1. Similarly, if a transition occurs at t from mode 1 to mode 3 then x 2 (t ) = -1 and λ(t ) = -1, ensuring that λ(t) is AC. Finally, as seen in the study of the local solutions, z(•) is constant in each mode, and is defined to be right-continuous at mode switch. As it can be notice that the number of events is finite, we can conclude that z(•) is of bounded variations.

Remark 2. The above study does not prove the uniqueness of the global solutions. Indeed, if x(t 0 ) = (0, -1) there also exist two global AC solutions, one continuing in mode 1 and one continuing in mode 3, for vectors B such that (B 1 + B 2 )B 2 < 0 and B 2 /B 1 ≤ 0. For example, let us consider B = (-1, 0.5) T and x(t 0 ) = (0, -1) T : then, there exists two global AC solutions, one continuing in mode 1, with ẋ(t + 0 ) = (-1, 1) T , and another continuing in mode 3 with ẋ(t + 0 ) = (0, 0.5) T .

Proposition 4 (Uniqueness of a solution to Proposition 3). Problem 1 has a unique AC global solution (x(•), λ(•)), and a unique global right-continuous solution z(•), for any t > t 0 , and for any feasible initial condition x 0 , if and only if B 1 , B 2 satisfy:

     B 1 =0 (B 1 + B 2 )B 2 ≥0 (B 1 + B 2 ) =0. ( 40
)
Proof. Let us first notice that there is a unique solution if B 2 = 0, B 1 = 0, resulting in ẋ(t) = 0, and λ(t), z(t) unique and constant. Apart from the constant case, there is a unique solution everywhere outside A -and A + . The condition (B 1 + B 2 )B 2 > 0 is equivalent to ẋ1 (t) ≥ 0 in every mode, and there is a unique solution for x(t) in A -switching from mode 1 to mode 3, and a unique solution in A + switching from mode 3 to mode 2. Then, λ(t) is unique as it is AC, unique in mode 1 and 2, and equal to x 2 (t) in mode 3. Finally, let us remark that z(t) is of bounded variations and has a unique right-continuous solution at the switching time t 1 determined at t + 1 by the switch from mode 1 to mode 3 described in the case 4 of the proof of Proposition 1, or by the switch from mode 3 to mode 2 described in the case 5 of the proof of Proposition 1.

Remark 3. From Remark 2 and Proposition 4 we can distinguish three categories of solutions in Proposition 3:

-If B 2 = 0 one obtains the constant solutions, unique w.r.t. a given feasible initial condition. -If (B 1 + B 2 )B 2 > 0 one obtains "sliding-crossing" solutions that will cross the switching constraint if x 1 (t 0 ) < 0 by sliding on the switching surface x 1 = 0, and unique w.r.t. a given initial condition.

-If (B 1 +B 2 )B 2 < 0 one obtains "sliding-repulsive" solutions that are repulsive w.r.t to the switching surface if x 1 (t 0 ) < 0 or x 1 (t 0 ) > 0, but that will slide on the switching surface if x 1 (t 0 ) = 0. In particular there exist two solutions for the initial condition x(t 0 ) = (0, -1) T .

In Figure 2, we summarise the conditions of Proposition 3 for existence of a global AC solution for any feasible initial condition. In addition, we illustrate the three categories of solutions in Figures 2a and the associated conditions on the parameters (B 1 , B 2 ) are in Figure 2b.

In Proposition 3, conditions on B are given such that it exists global AC solutions to Problem 1, for all feasible initial conditions. For the other possible choices of B, there may exist local solutions to Problem 1, but only for a subset of the feasible initial conditions. Proposition 5. Let us state, the sets of feasible initial conditions x(t 0 ) = x 0 such that there exists a local solution to Problem 1 when conditions (39) are not satisfied. In particular, we can divide this study in two groups of values for B:

{B | B 1 = 0}, and {B | B 2 /B 1 > 0, B 1 = B 2 , B 1 = 0}.
• Assume B 1 = 0: x(t 0 ) = x 0 is a feasible initial condition such that there exists a local solution to Problem 1 if x 0 ∈ S 1 with:

S 1 = (x 1 , x 2 ) ∈ R * -× {-x 1 -1} ∪ {(x 1 , x 2 ) ∈ R + × {x 1 + 1}} (41)
• Assume B 2 /B 1 > 0, B 1 = B 2 , and B 1 = 0. Then, x(t 0 ) = x 0 is a feasible initial condition such that there exists a local solution to Problem 1 if x 0 ∈ S 2 with:

S 2 = {(x 1 , x 2 ) ∈ R 2 \{(0, -1)} | x 2 ∈ |x 1 | + sign(x 1 )} , (42)
Proof. Let us notice that the first case corresponds to a singularity of the DAE in mode 3. It follows that initial conditions outside, or at the border, of this mode are necessary for the existence of local solutions to Problem 1. Then, noticing that ẋ1 (t) ≥ 0 whatever the choice of B 2 , we remove the initial condition x(t 0 ) = (0, -1) which leads to the definition of S 1 . In the second case B 2 /B 1 > 0, B 1 = B 2 , and B 1 = 0, we deduce from the proof of Proposition 1 that any point on the constraint set, with the exception of A -= (0, -1), is a valid feasible initial condition for existence of local solution to Problem 1. From this, we can define the set S 2 , and the proof is complete.

Comparison with existing concepts of solutions.

Let us first notice that the concept of solutions to discontinuous DAEs proposed in [START_REF] Matrosov | Existence of solutions of the algebro-differential equations[END_REF], and which we recalled in Section 1.2, yields no sliding (a) In red (dashed line) the "sliding-repulsive" solutions, and in green (full line) the "sliding-crossing"solutions as defined in Remark 3

.

(b) As defined in Remark 3, the red cones (B2(B1 + B2) < 0) are the sets of parameterization (B1, B2) T leading to "sliding-repulsive" solutions. For example, B = (-1, 0.5) is such parameterization. The green cones (B2(B1 + B2) > 0) are the sets of parameterization (B1, B2) T leading to "sliding-crossing" solutions. For example, B = (-0.5, 1) is such parameterization.

Fig. 2: The conditions for existence of AC solutions given in Proposition 3 are given by the union of the the red and green cones.

solution to our problem as there is no continuous z(•) solution to (6) for our particular system (9) in case of switching. Now, let us compare the sliding mode solutions from mode 3 with the Filippov solutions [START_REF] Filippov | Differential Equations with Discontinuous Right-hand Side[END_REF] of the discontinuous ODE obtained by index reduction of the DAE in each mode: (9b) in mode 1 (x 1 < 0) and (9c) in mode 2 (x 1 > 0). The construction of such reduced solutions for discontinuous DAEs is close to the one defined in [START_REF] Mehrmann | Hybrid systems of differential-algebraic equations-analysis and numerical solution[END_REF]. After the index reduction, the "left-hand" vector field f 1 (•) (for x 1 < 0) and "right-hand" vector field f 2 (•) (for x 1 > 0) are given by:

f 1 (t, x(t)) = B2 B1+B2 -B2 B1+B2 (43) f 2 (t, x(t)) = -B2 B1-B2 -B2 B1-B2 (44)
Let us observe from the analysis in cases 1 and 2 in the proof of Proposition 1 that ż(t) = 0 in mode 2 and mode 1. The variable z(t) changes its value only after switching.

In the "sliding-repulsive" solutions case (see Remark 3), the switching ODE resulting from the index reduction yields the same sliding mode (using Filippov concept of solutions) than the one we obtain in the case 3 of Section 2.1. Indeed, in every point of the switching surface x 1 = 0, there exists a sliding solution associated with the vector field

f 0 (x) = co({f 1 (x), f 2 (x)}) ∩ {x ∈ R 2 |x 1 = 0}.
It follows that the solutions obtained by [START_REF] Mehrmann | Hybrid systems of differential-algebraic equations-analysis and numerical solution[END_REF] correspond to the same solutions we obtain by our relaxation of the switching constraint with a generalised equation. A particular example with B=(-1,0.5) is shown in Figure 3b.

In the particular case of "sliding-crossing" solutions (see Remark 3), the index reduced system does not lead to any sliding motion as co({f 1 (x), f 2 (x)}) does not intersect the switching surface. The solutions do not stay on the surface x 1 = 0, and due to the index reduction, the constraint in x 1 > 0 is not satisfied anymore if x 1 (t 0 ) < 0. In particular, we need an explicit transition function (re-initialization rule) for the continuation of the solution as in [START_REF] Mehrmann | Hybrid systems of differential-algebraic equations-analysis and numerical solution[END_REF] following the guidelines for sliding mode detection. The sliding solution, which we obtain using our relaxation, is not retrieved by the concept of solutions from [START_REF] Mehrmann | Hybrid systems of differential-algebraic equations-analysis and numerical solution[END_REF]. A particular example with B = (-0.5, 1) is shown in Figure 3a.

Let us note that the approach of convexifying the "left-hand" and "righthand" reduced DAEs has already been shown problematic for some cases in [START_REF] Matrosov | On right-hand uniqueness of solutions to nondegenerated algebro-differential equations with discontinuances[END_REF].

Analysis of solutions with jumps

Let us study the existence of discontinuous solutions when no continuation with an AC solution exists after some time t j . For example, this is the case if the trajectory reaches the point A -in Figure 2a with B 2 /B 1 > 0. Solutions with discontinuities make sense in a context where quite different time-scales exist in the same system. In particular, this may be found in mechanical systems with impacts [START_REF] Brogliato | Nonsmooth Mechanics[END_REF], or in circuits with ideal diodes or set-valued electronic components [START_REF] Acary | Nonsmooth Modeling and Simulation for Switched Circuits[END_REF].

(a) Example of solution with B = (-0.5, 1) which corresponds to solutions crossing the switching surface. The vector field of the reduced system is in black, and its convex hull is given in red.

(b) Example of solution with B = (-1, 0.5) which corresponds to repulsive solutions along the switching surface. The vector field of the reduced system is in black, and its convex hull is given in green.

Analysis of jump dynamics

The analysis of the dynamics with state jumps requires specific mathematical tools to describe the continuous time dynamics. First, the state x will be assumed to be of bounded variations (BV), see Definition 9. This functional setting is often well justified from a modelling point of view. The time derivative of a function of bounded variations is not defined in the usual sense at the discontinuity point. However, BV functions have a countable set of jump points. To give a correct meaning to the derivative, we resort to differential measures [START_REF] Acary | Numerical Methods for Nonsmooth Dynamical Systems: Applications in Mechanics and Electronics[END_REF][START_REF] Monteiro | Differential Inclusions in Nonsmooth Mechanical Problems: Shocks and Dry Friction[END_REF], that is a specification of the derivative in the distributional sense of a BV function. Let us denote dx the differential measure associated with the BV function x(t). Using the Lebesgue decomposition of measures on the real line, a differential measure can be decomposed as

dx = ẋ(t)dt + i (x(t + i ) -x(t - i ))δ ti + dx c ( 45
)
where dt is the usual Lebesgue measure, ẋ(t) is the usual time derivative of x existing dt-almost-everywhere, δ ti the Dirac measure supported at t = t i , and dx c is the measure such that ẋ(t)dt + dx c is the absolutely continuous part of the decomposition of dx. We first introduce the problem in terms of measure differential inclusions (MDI) (46) associated with [START_REF] Facchinei | Finite-dimensional Variational Inequalities and Complementarity Problems[END_REF] (see [START_REF] Monteiro | Differential Inclusions in Nonsmooth Mechanical Problems: Shocks and Dry Friction[END_REF] for theoretical aspects of MDIs). Problem 2. Let I = [t 0 , T ] be a time interval such that T > t 0 . The problem is to find a BV function x(t) = (x 1 (t), x 2 (t)) on I, and a differential measure dΛ z such that

     dx 1 = dt + B 1 dΛ z dx 2 = B 2 dΛ z 0 ∈ -x 2 (t) + |x 1 (t)| + sign(x 1 (t)) , (46a) (46b)
is satisfied, in the sense of measures, given the initial condition x(t - 0 ) = x 0 . In addition, we wish to construct solutions x(t) that jump at some time t j if and only if there is no continuous solution in x(t - j ): i.e., there is no solution to Problem 1 in x(t - j ). From Proposition 2 this is can be expressed by the additional condition:

z(t + j ) ∈ R , s.t. (1, 0) T + Bz(t + j ) ∈ T C (x(t - j )) . (47)
The continuous and the discrete parts of the measure dΛ z are identical to those of dx. We can also write a Lebesgue decomposition

dΛ z = z(t)dt + i σ z,i δ ti + dz c , (48)
with σ z,i the jump amplitude at time t i . For the sake of readability, we simply denote σ z,i = σ z . From the decomposition, we get a smooth dynamics that is equivalent to (10) dt-almost everywhere, and an algebraic problem that partly defines the jump at impact time t j , that is defined by the following problem:

Problem 3 (Jump algebraic problem). Let us consider the dynamics from (46). Let us assume that the left limit x(t - j ) is given and satisfies the constraints:

0 ∈ λ(t - j ) + |x 1 (t - j )| -x 2 (t - j ), λ(t - j ) ∈ sign(x 1 (t - j )). ( 49
)
The jump algebraic problem is to solve the generalized equation with unknown x(t + j ), λ(t + j ), and σ z :

           x 1 (t + j ) -x 1 (t - j ) = B 1 σ z x 2 (t + j ) -x 2 (t - j ) = B 2 σ z 0 ∈ λ(t + j ) + |x 1 (t + j )| -x 2 (t + j ) λ(t + j ) ∈ sign(x 1 (t + j )). ( 50
)
It is noteworthy that writing a set-valued constraint with right-limits is a quite natural thing to do if we assume that the solutions are right-continuous at jumps5 , and it also allows us to study continuation after the jumps (see Section 2.3.3).

Multiplying the first and second lines of (50) by B 2 and B 1 , respectively, one can eliminate σ z in (50) which can be rewritten as:

     B 2 x 1 (t + j ) -x 1 (t - j ) = B 1 x 2 (t + j ) -x 2 (t - j ) 0 ∈ λ(t + j ) + |x 1 (t + j )| -x 2 (t + j ) λ(t + j ) ∈ sign(x 1 (t + j )) . , (51)
Note that for now we do not enforce conditions for existence of a continuous solution at t + j immediately after the jump: we only define jump solutions respecting both formulation with the measures, and the index-2 constraint at t + j .

Solvability of the jump algebraic problem

Let us give a first result on the solvability of Problem 3.

Proposition 6 (Solvability of Problem 3). Let t j be a any instant and let x(t - j ) be a given value that satisfies the condition (49) at t - j . The solutions (x(t + j ), λ(t + j ), σ z ) of Problem 3 can be characterised as follows:

1. If B 1 = 0: (a) if B 2 /B 1 < -1 there is a unique solution, (b) if B 2 /B 1 ≥ -1
there are either one or several solutions depending on

x(t - j ). 2. If B 1 = 0 (a) if x 1 (t - j ) = 0
, there are infinitely many solutions, (b) if x 1 (t - j ) = 0, there is only one solution.

See Appendix A.2 for the proof.

Remark 4. Let us remark that if there is a unique solution then this solution satisfies x(t + j ) = x(t - j ) and σ z = 0 (cf. the proof of Proposition 6 in Appendix A.2). However, such result hides various behaviours in terms of solution to Problem 2. For example, if B 2 /B 1 ∈ (-1, 1) and x(t - j ) = (0, -1) T then there is a unique solution solution to the algebraic jump Problem 3 and x(t + j ) = x(t - j ) (cf. case (b) of the proof of Proposition 6 in Appendix A.2). This can be further separated into two sub-cases. If B 2 /B 1 ∈ (-1, 0], then from Proposition 1 there exists an AC solution in this point x(t j ) = (0, -1) T , and the solution σ z = 0 to the jump algebraic problem (50) is not a hinder to obtain a solution to the Problem 2. However, if B 2 /B 1 ∈ (0, 1), then there no AC solution in x = (0, -1) to Problem 1 as it is shown in Proposition 5: in this case the unique solution σ z = 0 to the jump dynamic implies there is no solution to the Problem 2, even though in Problem 2 we consider an extension to solutions x(t) of bounded variations.

In the next Section 2.3.3, we search to provide an additional condition on the jump dynamics (50) to ensure the existence of an AC solution after a jump. In addition, it will restrain Problem 3 solutions, in particular when σ z = 0, to the ones allowing the existence of a solution to Problem 2.

Analysis of consistent jumps

Let us now study what are the possible jumps such that an AC solution exists in the right-neighbourhood of t j , after the jump has occurred. They are called consistent jumps. Let us define them more formally.

Definition 4 (Consistent jumps).

A consistent jump at time t + j is defined as a solution (x(t + j ), λ(t + j ), σ z ) of Problem 3 such that a local solution of Problem 1 exists for the initial condition x(t + j ). In Proposition 5, we expose the set of feasible initial conditions where there there exists a solution to Problem 1. Then, we give the set of consistent jumps as defined in Definition 4 as the set of reachable point in Proposition 5 given the jump dynamics from Problem 3. Proposition 7. Let us consider x(t - j ) that satisfies (49). The set of points x(t - j ) such that there is no continuation to the right with an AC solution, is equal to P = P 1 ∪ P 2 with:

P 1 = x ∈ R 2 | x 1 = 0, x 2 ∈ [-1, 1) , if B 1 = 0 , (52)
and

P 2 = x ∈ R 2 | x = (0, -1) T = A -, if B 2 B 1 > 0, B 1 = 0 . ( 53
)
Then, it follows that:

a). If x(t - j ) ∈ P 1 and B 1 = 0, then x(t + j ) = A + is the only consistent jump. b). If x(t - j ) ∈ P 2 , B 2 /B 1 > 0, B 1 = 0, and B 2 -B 1 ≤ 0, then there is no consistent jump. c). If x(t - j ) ∈ P 2 , B 2 /B 1 > 0, B 1 = 0, and B 2 -B 1 > 0, then x(t + j ) = 2B1 (B2-B1) , (B1+B2) (B2-B1) T
is the only consistent jump.

Proof. Let us first notice that the sets P 1 and P 2 can be easily obtained as the complementary sets in C = {x ∈ R 2 sol. of (12')} to, respectively, S 1 and S 2 in Proposition 5. a). Assume B 1 = 0 and consider x(t - j ) ∈ P 1 . From Proposition 5, there is a consistent jump if x(t + j ) ∈ S 1 in (41). From (51), if x 1 (t - j ) = 0 and B 1 = 0, it follows that x 1 (t + j ) = 0 and the only only solution in

S 1 is x(t + j ) = A + .
b) and c). Assume B 2 /B 1 > 0, B 1 = 0 and x(t - j ) ∈ P 2 . Under this assumption, Equation ( 51) is:

0 ∈ sign x 1 (t + j ) + |x 1 (t + j )| - B 2 B 1 x 1 (t + j ) + 1 . (54)
Then, the solutions of (54), which are the possible jumps from x(t - j ) ∈ P 2 , are simply the intersections between the constraint c(x 1 ) = |x 1 | + sign(x 1 ) (in blue in Figure 4) and the real line l(x 1 ) = (B 2 /B 1 )x 1 -1 (in black in Figure 4). b). If (B 2 -B 1 ) ≤ 0, then there is a unique jump solution (x 1 (t + j ), x 2 (t + j )) = (0, -1) T = A -which is not in S 2 in (42): there is no consistent jump. c). If (B 2 -B 1 ) > 0, then there are two jump solutions: one in (x 1 (t + j ), x 2 (t + j )) = A -that is not consistent, and a consistent one in S 2 , with (x

1 (t + j ), x 2 (t + j )) T = 2B1 (B2-B1) , (B1+B2) (B2-B1)
T

. The proof is now complete.

The next result is a consequence of Proposition 7.

Corollary 1. There is no local solution to Problem 2 if and only if:

x(t - 0 ) = A -, B 2 /B 1 > 0, B 1 = 0, (B 2 -B 1 ) ≤ 0. (55)
Now, let us provide necessary and sufficient conditions for the existence of a consistent jump using the contingent cone condition from Proposition 2. Proposition 8. A necessary and sufficient condition for the solution (x(t + j ), λ(t + j ), σ z ) of Problem 3 to be a consistent jump is: there exists γ ∈ R,

such that                x(t + j ) -x(t - j ) = Bσ z 1 0 + Bγ ∈ T C (x(t + j )) 0 ∈ λ(t + j ) + |x 1 (t + j )| -x 2 (t + j ) λ(t + j ) ∈ sign(x 1 (t + j )) , (56)
with T C (x(t + j )) as defined in Lemma 1.

Fig. 4: Solutions of the GE (54) associated with jumps from x(t - j ) = (0, -1) T for various choices of B = (B 1 , B 2 ) T .

Proof. Let us observe from Proposition 2, that (x(t + j ), (1, 0

) T + Bγ) ∈ C × T C (x(t + j )
) is a necessary and sufficient condition for the existence of a local solution to Problem 1 in x(t + j ), which concludes the proof.

3 Analysis of an event-capturing backward Euler scheme Backward (implicit) Euler schemes have proved to be efficient schemes for the simulation of nonsmooth dynamical systems [START_REF] Acary | Nonsmooth Modeling and Simulation for Switched Circuits[END_REF][START_REF] Acary | Numerical Methods for Nonsmooth Dynamical Systems: Applications in Mechanics and Electronics[END_REF]. Therefore, let us now consider the backward Euler discretization of the system (10) as follows:

     x 1,k+1 -x 1,k = h(1 + B 1 z k+1 ) x 2,k+1 -x 2,k = hB 2 z k+1 0 ∈ sign(x 1,k+1 ) + |x 1,k+1 | -x 2,k+1 , (57)
with h > 0 the time step. For the sake of simplicity, we choose a fixed time step, h = T N , where [0, T ] is the interval of integration and N the number of fixed steps.

Well-posedness of the backward Euler discretization

One sees that (57) has a structure quite close to (46), which puts the backward scheme in a favourable perspective for the computation of solutions with jumps. This is the aim of the further analysis.

Using the same method as in the previous section, we can eliminate z k+1 , and we obtain the GE:

B 2 (x 1,k+1 -x 1,k ) = hB 2 + B 1 (x 2,k+1 -x 2,k ) 0 ∈ sign(x 1,k+1 ) + |x 1,k+1 | -x 2,k+1 . (58)
Proposition 9 (Well-posedness of the Backward Euler one-step problem (58)). Let us characterise the existence and uniqueness of solutions to the Backward Euler one-step problem (58) for various values of the parameteriza- Corollary 2. If there is no solutions to the backward Euler one-step problem (58) for all h > 0, then B 2 /B 1 ∈ (0, 1) and x k = A -, and there is no solution to Problem 2 in x k .

tion 6 B = (B 1 , B 2 ) T . 1. If B 1 = 0: (a) if B 2 /B 1 < -1,

Minimal implicit Euler discretization

As we have seen in Section 3.1, the classical implicit Euler discretization may output multiple solutions, for h > 0 as small as wanted. One needs to improve the implicit Euler discretization to select the discrete solution close the continuoustime solution. To this aim, we propose a minimisation over the results of the backward Euler scheme.

Definition 5. Let us consider a non-smooth DAE system [START_REF] Facchinei | Finite-dimensional Variational Inequalities and Complementarity Problems[END_REF]. The minimal norm backward Euler scheme is to find at each time step x k+1 , solution of:

x k+1 := argmin x x -x k , s.t. x 1 -x 1,k = h(1 + B 1 z) x 2 -x 2,k = hB 2 z 0 ∈ sign(x 1 ) + |x 1 | -x 2 .
(59) 6 Let us recall that we assume B1 + B2 = 0 and B1 -B2 = 0.

Although the implicit Euler scheme outputs multiple solutions, as long as one of the solutions is still on the same constraint as x k , we know this solution is an O(h) approximation. Now, let us prove this always occurs if x k is a AC consistent initial condition for our particular example.

Proposition 10 (Consistency of the Minimal Backward Euler scheme for Problem 1.). Consider the non-smooth DAE system from [START_REF] Facchinei | Finite-dimensional Variational Inequalities and Complementarity Problems[END_REF]. If there exists a solution x(t) that is AC on an interval [t 0 , t 0 + ε], then there exists a time step h > 0 such that the minimal norm backward Euler scheme (59) provides a consistent discrete solution to [START_REF] Facchinei | Finite-dimensional Variational Inequalities and Complementarity Problems[END_REF]. This means that given

x k = x(t k ) then x k+1 -x(t k + h) → 0 when h → 0.
The complete proof can be found in Appendix A.4.

Remark 5 (Necessary conditions of optimality).

The optimisation problem solved in Definition 5 is a mathematical program with equilibrium constraints (MPEC). Under the assumption of a mixed linear complementarity problem (MLCP) representation of the generalised equation in (59), necessary conditions of optimality depend on some constraint qualifications. We refer to [27] as a reference on this question. In the simulations presented in Section 3.3, we address this problem in a naive way by simply enumerating all the solutions and selecting the one of minimal norm, since the aim is to show the experimental convergence of such method for this problem.

Implementation and numerical results

In this section, we expose some simulation results of the minimal implicit Euler scheme (59) on the example studied in the previous sections. In particular, we show through experiments on the example associated with (10) that if there exists at least one continuous solution, then (59) converges in O(h) to one of these solutions. Furthermore, if the discretization (57) yields a unique solution for any step size, then it converges in O(h) to the unique solutions of [START_REF] Facchinei | Finite-dimensional Variational Inequalities and Complementarity Problems[END_REF].

Implementation has been performed using Siconos 4.2.0 [4], a platform for numerical simulation of non-smooth dynamical systems. The code of these simulations can be found in the github repository associated with the Siconos examples 7 . In this section, performance results are not discussed as the optimisation problem in (59) is currently solved by enumeration of all 8 the solutions of the generalised equation associated with the classical implicit Euler scheme (57). A way to implement this problem is to use a Linear Complementarity Problem (LCP) formulation (see Definition 19) to represent the non-smooth component of the constraint [START_REF] Hamann | Numerical solution of hybrid systems of differential-algebraic equations[END_REF]. Then, the constraint (12) can be expressed as an LCP with an additional equality constraint, that is, a Mixed Linear Complementarity 7 https://github.com/siconos/siconos-tutorials/tree/master/.sandbox/code IFAC 8 In the considered cases limited to three solutions.

Problem (MLCP) as follows:

           0 = -x 2 + |x 1 | + α 0 ≤ |x 1 | + x 1 ⊥ |x 1 | -x 1 ≥ 0 0 ≤ x - 1 ⊥ α ≥ -1 α ≤ 1 ⊥ x + 1 ≥ 0 , (60)
with α ∈ sign(x 1 ). This yields a Mixed Linear Complementarity System (MLCS) 9 :

                   1 0 0 0 1 0 0 0 0     ẋ1 (t) ẋ2 (t) ż(t)   =   1 + B 1 z(t) B 2 z(t) x 1 -x 2 + 1 + λ 1 (t) -λ 2 (t)   0 ≤ 2x 1 (t) + λ 1 (t) ⊥ λ 1 (t) ≥ 0 0 ≤ λ 3 (t) + x 1 (t) ⊥ λ 2 (t) ≥ 0 0 ≤ 2 -λ 2 (t) ⊥ λ 3 (t) ≥ 0 (61) with λ = (λ 1 , λ 2 , λ 3 ) = |x 1 | -x 1 , 1 -α, x -
1 . Some numerical results can be found in Figure 5 and Figure 6. In these figures, we consider the particular case of sliding-crossing solutions (here B = (-0.5, 1) T ) where uniqueness of AC solutions and discrete solutions is guaranteed. We notice that the resulting solutions in x(t) are Lipschitz continuous, and run through all the modes (the initial condition is taken with x 1 (t 0 ) < 0). In Figure 7, the error term x(T ) -x N is depicted as a function of the step size h. The term x N is the numerical approximation of x(T ) by the minimal implicit Euler numerical scheme (59) when the interval [t 0 , T ] is subdivided in N steps of size h. In the case of sliding-crossing solutions, we choose B = (-0.5, 1) T , x 0 = x(t 0 ) = (-5, 4), and T = 10. In the case of sliding-repulsive solutions, we choose B = (-1, 0.5) T , x 0 = x(t 0 ) = (0, 0), and T = 10. Time step sizes are taken equally spaced in log-scale. We observe the first order convergence of the implicit Euler scheme when there is uniqueness of the numerical solutions. In addition, we also observe a first order convergence of the minimal implicit Euler scheme when there is non-uniqueness of the discrete solution (for any time step) as it is shown in Fig 7 on the curve associated with the sliding-repulsive case. Finally, we also test a variant of the studied example where the dynamic ẋ(t) = Bz(t) + b is replaced by ẋ(t) = Ax(t) + Bz(t) + b, with

A = 0 1 -1 0 , B = -1 0.5 . ( 62
)
Some results are exposed in Figures 8,9, and convergence on some experiments is also in O(h) as it can be seen in Figure 7.

Relaxation of switching linear equality constraints

In this section, we analyse three relaxation strategies applied to switching equality constraints in order to generate a new constraint whose associated solution set is path-connected (see Definition 18 in Appendix A.1). In Section 4.1, the possibilities of a simple continuous bond of both sides of the switching constraint is formalised by the switching constraint connected (SCC) relaxation; in Section 4.2, we study the so-called multivalued step operator (MSO) relaxation (which is (4) with set-valued step functions); in Section 4.3, a closed convex hull (CCH) relaxation (which can be seen as an extension of Filippov's regularisation of switching ODEs to switching constraints) is analyzed. In particular, in every section we discuss a few examples stemming from the piecewise-linear DAE (see Definition 1), and the generalisation of the example in Section 2, that is, a piecewise-linear DAE with switching equality constraints, defined by switching hyperplanes.

Referring to Definition 2, we restrict ourselves to piecewise-linear DAEs with a single switching. A particular example of such piecewise DAEs was studied in Section 2. In this section, we mainly discuss properties of various relaxations of

0 = g 1 (x) = C 1 x + p 1 , if h(x) = Hx + q < 0 0 = g 2 (x) = C 2 x + p 2 , if h(x) > 0 , (63a) (63b)
where x ∈ R n1 , C T i=1,2 and H T ∈ R n1 , p i=1,2 and q ∈ R. Let us define N g1 , N g2 , and N h , the solution sets associated with the constraints (63a), (63b), and the switching surface h(x) = 0:

N g1 = {x ∈ R n1 | g 1 (x) = C 1 x + p 1 = 0} , (64)
Fig. 8: Phase space plot in (x 1 , x 2 ) of the numerical solutions for B = (-1, 0.5), A given in (62), and h = 0.9 or h = 0.3. Initial condition is x 0 = (0, 0). Fig. 9: Time plots of the solutions x 1 (t) and x 2 (t) for B = (-1, 0.5), A given in (62), and h = 0.9 or h = 0.3. Initial condition is x 0 = (0, 0).

N g2 = {x ∈ R n1 | g 2 (x) = C 2 x + p 2 = 0} , (65)
N h = {x ∈ R n1 | h(x) = Hx + q = 0} . ( 66
)
Let us remark that N g1 , N g2 , and N h are the zero spaces associated with the functions g 1 (•), g 2 (•), and h(•), respectively. We wish to study relaxation strategies in order to transform the switching surface into a sliding mode, and to enable the existence of paths in-between the "left-hand" constraint (63a) and the "right-hand" constraint (63b). To this aim, let us assume that both (64) and (65) intersect, not necessary at the same points, the switching surface (66):

N g1 ∩ N h = ∅ and N g2 ∩ N h = ∅ . ( 67
)
Finally, let us define the solution set of the switching constraint (63), G by

G = {x ∈ R n1 that solves (63)}. ( 68
)

Switching Constraint Connected (SCC) relaxation

The objective of the first relaxation is to define the extended constraint of the form :

0 = C 1 x + p 1 , if Hx + q ≤ 0 0 = C 2 x + p 2 , if Hx + q ≥ 0 , (69)
We do not enter in the details of the state-dependent switching DAE as in Definition 1, and only consider its switching constraint. However, let us remark that the path connectivity of the constraint solution set is a necessary condition (assuming (67)) for the existence of continuous solutions, in the sense of Proposition 3, to state-dependent switching DAE with constraints such as in (63).

Proposition 11 (Switching Constraint Connected (SCC) relaxation).

Let S be the set of solutions to the linear system:

S = {x ∈ R n1 | 0 = C 1 x + p 1 ; 0 = C 2 x + p 2 ; 0 = Hx + q} . ( 70
)
If S is non-empty, we define the Switching Constraint Connected (SCC) relaxation by the union of the switching constraint solution set G with S, such that

H e = G ∪ S = {x ∈ R n1 that solves (69)} (71)
Then, H e is path-connected.

Proof. Let x s be any point in S. Let α be any point satisfying (63a), meaning 0 = g 1 (α) and h(α) < 0. Similarly, let β be any point satisfying (63b), meaning 0 = g 2 (β) and h(β) > 0. Then, there is a path from α to x s since N g1 is a hyperplane and S is not empty. The same is true from x s to β. Finally, by transitivity we can build a path from α to β, which proves that the solution set of (69) is path-connected.

Multivalued Step Operator (MSO) relaxation

Let us now define a new kind of relaxation in the context of this section, the relaxation of switching constraints (4) where s(•) is the set-valued step operator. Definition 6 (Multivalued Step Operator (MSO) relaxation). The Multivalued Step Operator (MSO) relaxation of a switching constraint (63) is given by the roots of the GE:

0 = (1 -λ)g 1 (x) + λg 2 (x) , ( 77
)
where λ ∈ s(h(x)) and s(•) is the multivalued step function:

s(x) =      {0} if x < 0 [0, 1] if x = 0 {1} if x > 0 (78)
The MSO relaxation defines the set H s associated with the constraints by

H s = {x ∈ R n 1 | 0 = (1 -λ)g 1 (x) + λg 2 (x), λ ∈ s(h(x))} . ( 79
)
In Definition 6, we relax the constraint on the switching surface by the set H s defined as the intersection of points satisfying (77) and the switching surface included in the zero space N h defined by (66).

The MSO relaxation is the one intuitively built to combine two functions, and a similar approach has already been taken in the context of switching ODEs to combine two vector fields along a switching surface. In [START_REF] Souza | Strategies for numerical integration of discontinuous DAE models[END_REF], the authors apply a similar relaxation to exogenous switching DAEs by using smooth step, or sign functions approximation (respectively the sigmoid or the hyperbolic tangent) instead of a multivalued operator. However, the results of such relaxation in term of dimension and path-connectivity of H s are hard to predict. In particular, in Examples 1.b, 2.b and 3.b, we show that for each problem two possible relaxations can be defined by simply considering equivalent formulations 10 of the switching constraints. Furthermore, we note that in the Example 2.b, associated with the constraint of Section 2's example, an equivalent switching constraint can be considered whose relaxation in not path-connected. Remark 6. We can also remark that solutions x s of (70) are included in the ones of (77) as it can be trivially observed that if 0 = g 1 (x) and 0 = g 2 (x) then 0 = (1 -λ)g 1 (x) + λg 2 (x) for all λ.

0 = (1 -λ)x 2 + λx 2 , λ ∈ s(x 1 ) . (80)
This equation can trivially be reduced to x 2 = 0 and we retrieve the real line, as with the continuous extension from Example 1.a. In x 1 = 0, the set of solutions is {λ ∈ [0, 1], x 2 = 0} which is of dimension 0 in the plane (x 1 , x 2 ). Let us now consider the equivalent switching constraint:

0 = -x 2 , if x 1 < 0 0 = x 2 , if x 1 > 0 . (81a) (81b)
In (81a), the equality constraint x 2 = 0, has been replaced by the equivalent -x 2 = 0. This corresponds to the change of normal vector from C 1 to C 1 = (0, -1) as shown in Figure 10. The GE that corresponds to the relaxation of (81) yields:

H s = {x ∈ R 2 , 0 ∈ x 2 (2λ -1) , λ ∈ s(x 1 )} . ( 82
)
The set of solutions in

x 1 = 0 is {λ = 1/2, x 2 ∈ R} ∪ {λ ∈ [0, 1/2], x 2 = 0}
, which is larger than the one of (80), and is of dimension 1 in the plane (x 1 , x 2 ). This is exposed in green in Figure 10. Although the solutions set of ( 82) is still path-connected, the fact that x 2 ∈ R is solution in x 1 = 0 may allow multiple solutions to a DAE in this point.

Example 2.b. Let us now consider the switching constraint from Example 2.a, which is the same as the one studied in Section 2. As seen in ( 10) and Figure 1, the graph of the relaxation is path connected. In fact, for this example and Example 1.a, on the switching surface, the graph of the relaxation is the closure of the convex hull of the extended left and right constraints. However, we will see in Examples 3.b and 3.c that this may not always be the case. In Figure 11, we represent the switching constraint (74) in blue with the relaxation in x 1 = 0 in red. Again, in a similar way to the previous example, we now consider an equivalent switching constraint where one of the equality constraints is rewritten with the opposite normal

C 1 = (1 1) instead of C 1 = (-1 -1), that is 0 =x 1 + x 2 + 1 , if x 1 < 0 0 = x 1 -x 2 + 1 , if x 1 > 0 . (83)
The MSO relaxation associated with (83) is:

H s = {x ∈ R 2 , 0 ∈ x 1 + x 2 + 1 -2λx 2 , λ ∈ s(x 1 )} . (84)
Let us now study the behaviour in x 1 = 0. Let us assume that x 2 ≥ 0. Then, as λ ∈ [0, 1] this yields the inclusion 0 ∈ [-x 2 +1, x 2 +1] and this implies that x 2 ≥ 1.

Similarly, let us assume that x 2 ≤ 0, then it follows that: 0 ∈ [x 2 + 1, -x 2 + 1] and x 2 ≤ -1 is necessary. As a conclusion, the set H s is not path-connected, it is represented in green in Figure 11. This prevents the existence of AC solutions switching from one mode to the other one.

Example 3.b. Finally, let us consider the MSO relaxation on the switching constraint of Example 3.a. This example is a bit more complex since dim(x) = 3, with a switching surface orthogonal to each mode's hyperplane. The resulting GE yields:

H s = {x ∈ R 3 , 0 ∈ 1 + x 1 + x 2 -2λ(x 1 + 1) , λ ∈ s(x 3 )} . (85)
If x 1 + 1 ≥ 0 and x 3 = 0, we obtain the enclosure:

0 ∈ [x 2 -x 1 -1, 1 + x 1 + x 2 ] . (86)
This implies that solutions in the switching surface for (x 1 + 1) ≥ 0 are such that x 2 ≤ x 1 + 1 and x 2 ≥ -(x 1 + 1). This is the right red cone in Figure 12.

Similarly, if x 1 + 1 ≤ 0, we then obtain:

0 ∈ [1 + x 1 + x 2 , x 2 -x 1 -1] . (87)
The solutions are such that x 2 ≥ x 1 + 1 and x 2 ≤ -(x 1 + 1). This is the left red cone in Figure 12. The graph of the relaxation on the switching surface x 3 = 0 is composed of two cones. The set H s is still path connected, and is larger compared to the SCC relaxation, H e from Proposition 11. As in the Examples 1.b and 2.b we can consider the equivalent switching constraint:

0 = -x 2 -x 1 -1 , if x 3 < 0 0 = x 2 -x 1 -1 , if x 3 > 0 . (88)
The relaxation yields:

H s = {x ∈ R 3 , 0 ∈ -x 2 -x 1 -1 + 2λx 2 , λ ∈ s(x 3 )} . (89)
Similarly, the set of solutions is composed of two cones. If x 2 ≥ 0, then x 2 ≥ -x 1 -1 and x 2 ≥ x 1 + 1 the top green cone in Figure 12. If x 2 ≤ 0, then x 2 ≤ -x 1 -1 and x 2 ≤ x 1 + 1 that is the bottom green cone. In this example, it is even harder to select a "correct representation" between equivalent switching constraints as both relaxations are path connected and very similar in shape. Moreover, none of the relaxation defines a convex set on the switching surface unlike what we observed on the simpler planar examples.

Remark 7. Let us observe that the MSO relaxation proposed in (77) appears to be the limit of the smooth singularly perturbed relaxation:

0 = (1 -λ(α, x))g 1 (x) + λ(α, x)g 2 (x) , (90)
where λ(α, x) is a smooth approximation of the multivalued step operator s(•) that converges to s(•) as α → ∞. In Figures 13 and14, we plot the singularly perturbed versions of the Example 2.b and the Figure 11.

Closed Convex Hull (CCH) relaxation

In Section 4.2, we have seen that although the relaxation (77) seems to be the limit of the singularly perturbed relaxation (90) and has been used in previous works for switching ODEs, it may be hazardous to use it without further arguments. Indeed, two equivalent switching constraints may be relaxed differently.

In the example in Section 2, we noticed that the relaxation (77) yields the same graph as a convex relaxation of the "left-hand" and "right-hand" constraints on the switching surface (in a similar manner to a Filippov relaxation in switching ODEs). In this section, we study and discuss this convex relaxation.

Definition 7 (Closed Convex Hull (CCH) relaxation). Let us consider S - the set of solutions associated with the intersection of the continuous extension of the left constraint and the switching hyperplane:

S -= {0 = C 1 x + p 1 = g 1 (x) and 0 = Hx + q = h(x) } . (91)
Similarly, let us consider S + the set of solutions associated with the intersection of the continuous extension of the right constraint and the switching hyperplane:

S + = {0 = C 2 x + p 2 = g 2 (x) and 0 = Hx + q} . (92)
We define the Closed Convex Hull (CCH) relaxation of the switching constraint as :

     {x ∈ R n1 | 0 = g 1 (x)} , if h(x) < 0 x ∈ co(S -, S + ) , if h(x) = 0 {x ∈ R n1 | 0 = g 2 (x)} , if h(x) > 0 . (93)
which defines the set H c as

H c = {x ∈ R n1 that solves (93)} . (94)
Proposition 12. The set H c from Definition 7 is path-connected.

Proof. This is can be easily verified since the convex set co(S -, S + ) is pathconnected and one can use a transitivity argument of the path-connectivity similar to the one in the proof of Proposition 11 to obtain the path-connectivity of H c .

Again, this relaxation can be applied to the various examples from Section 4.1 and Section 4.2.

Example 1.c. Let us first consider the switching constraint (72) from Example 1.a and its equivalent alternative (81) in Example 1.b. The sets S -and S + are the same point x s = (0, 0), and the convex hull is the singleton {x s }. The CCH relaxation has the benefit to be independent of the choice of the constraint normal vectors C 1 and C 2 .

Remark 8. While in Section 4.2 the relaxation is the zero space of a convex combination of two affine applications, which does not have a clear structure, in the CCH relaxation, we construct a convex combination of the zero spaces of two affine applications. This definition is independent of the choice of the affine application as long as their zero spaces are the same. In particular in Example 1.c, f : x → x 2 and f : x → -x 2 have the same zero space, and changing the representation of the "left-hand" constraint does not influence the relaxation.

Example 2.c. For the example considered in Section 2, the switching surface given by the CCH relaxation is the set {x 1 = 0, x 2 ∈ [-1, 1]}, whatever the choice of the normal vectors, unlike in Example 2.b.

Example 3.c. Let us emphasize, in this example, that the CCH relaxation is not necessarily included in one of the possible solutions of the MSO relaxation from Definition 6. Indeed, when applying the CCH relaxation of Definition 7 to the switching constraints from Examples 3.a and 3.b, we obtain consistently the whole hyperplane {(x 1 , x 2 , x 3 ) ∈ R 3 | x 3 = 0}. In this particular case, the solution set of the MSO relaxed constraint are included in the CCH relaxation.

As seen in these examples, the CCH relaxation provides a consistent way to fill-in the graph of the constraint. However, unlike the automatic representation by a generalised equation in Definition 6, we need additional work to rewrite the solution set as the solution of an closed-form generalised equation.

Discussion

In the Section 4.1, 4.2, and 4.3 we have presented three different relaxation methods that may be used to obtain a path-connected constraint. Let us now discuss the effect of each relaxation on the actual solutions of state-dependent switching DAE. In the foregoing examples, only the examples 3.a, 3.b, and 3.c, yield different solution sets for each relaxation. Consequently, in order to put more emphasis on the differences between these relaxations, let us consider the switching constraint (75).

                 ẋ1 = 1 -2z ẋ2 = z ẋ3 = 1 -0.5z 0 = 1 + x 1 + x 2 , if x 3 < 0 0 = -1 -x 1 + x 2 , if x 3 > 0 . (95a) (95b) (95c)
Unlike Section 2, we will not detail all the possible solutions for each relaxation, but we will only highlight a particular case where each successive relaxation allows a greater set of solutions. Let us assume that x 3 (0) < 0, it follows from (95a) and (95b) that z(0) = 1. On the "left-hand" constraint (95b), the solutions x(t) are given by:     

x 1 (t) = -t + x 1 (0)

x 2 (t) = t + x 2 (0)

x 3 (t) = 0.5t + x 3 (0) .

(

) 96
Since we are interested in the differences for each solution at the switching on the sliding surface, we study the set of initial conditions in x(•) such that there exists a sliding motion on the surface x 3 = 0. Let us notice that ẋ3 (t) > 0 in (96): if there is no sliding solution, then there is no AC solution x(t) after t > 0 with x 3 (t ) = 0. Let us first recall from Example 3.a that there exists on the switching surface a set S = {(-1, 0, 0)} that is solution of (70). From Proposition 11, we can build an SCC relaxation H s , and an associated relaxed DAE.

     ẋ1 = 1 -2z ẋ2 = z ẋ3 = 1 -0.5z 0 = 1 + x 1 + x 2 , if x 3 ≤ 0 0 = -1 -x 1 + x 2 , if x 3 ≥ 0 . (97)
It can be immediately noticed that there exists an AC solution x(•) reaching the switching surface at t > t 0 only if (x 1 (t ), x 2 (t )) = (-1, 0) when x 3 (t ) = 0. From (96) we notice this is possible if and only if the initial conditions are on the half-line:

I a =    x ∈ R 3 | x =   1 -1 -0.5   u +   -1 0 0   , u ≥ 0    . ( 98
)
For any other initial conditions, under the assumption x 3 (0) < 0, there is no solution for t > 0 such that x 3 (t ) = 0.

Let us now consider the MSO relaxation (77) applied to this problem. As seen in Example 3.b, the choice of the constraint normal vector in the switching constraint representation is critical, as the graph of the relaxation may change on the switching surface (see Figure 12). There exists a sliding solution on the switching surface x 3 (t) = 0 if and only if z(t) = 2, and it follows that ( ẋ1 (t), ẋ2 (t)) = (-3, 2). It appears that apart from the initial conditions inside I a in (98), we can extend the set of initial conditions to obtain a sliding motion. However, this is only in the case for the switching constraint (88) where C 1 = (-1, -1, 0). Using the relaxed constraint (89) we obtain the switching DAE:

         ẋ1 = 1 -2z ẋ2 = z ẋ3 = 1 -0.5z 0 ∈ -x 2 -x 1 -1 + 2λx 2 , λ ∈ s(x 3 ) . (99)
Then, the set of initial conditions such that there exists a sliding motion can be extended to I b in (100) and solutions can slide temporarily in the cone x 2 ≤ 0, x 2 ≤ -x 1 -1, and x 2 ≤ x 1 + 1 (bottom green cone in Figure 12).

I b = x ∈ R 3 | x 3 < 0 , x 2 ≤ 2x 3 , x 2 = -x 1 -1 . (100)
It is interesting to note that for the dynamics given in (99) the solutions slide a finite amount of time on the surface x 3 (t) = 0, and inevitably reach the "righthand" constraint (95c) and continue on it.

Finally, let us consider the CCH relaxation in (93), i.e.,

         ẋ1 = 1 -2z ẋ2 = z ẋ3 = 1 -0.5z x ∈ H c , (101)
H c = {x ∈ R 3 | x = (1 -λ) (A 1 u + b 1 ) + λ (A 2 u + b 2 ) , λ ∈ s(x 3 )} , (102) where u , u ∈ R 2 , A 1 =   1 0 -1 0 0 1   , A 2 =   1 0 1 0 0 1   , b 1 = b 2 = (-1, 0, 0) T .
As stated in Example 3.c, the solution set of this relaxation on the switching surface is the whole plane x 3 = 0. Then, the whole "left-hand" constraint (95b) defines the set initial values I c in (103) such that there exists sliding motion. However, some solutions may never leave the sliding surface as they may not intersect the right constraint.

I c = x ∈ R 3 | x 3 < 0 , x 2 = -x 1 -1 . (103)
Overall, for this example the CCH relaxation (93) is the less constraining, but may define too large a set if the goal is to reach the right constraint as this may be intended for modelling purpose. To summarise, this example demonstrates that each relaxation has pros and cons. The simplest SCC relaxation from Proposition 11 is independent of the representation of the constraint, but also has the smallest set of valid initial conditions for the existence of continuous solutions. Furthermore, the SCC relaxation may not always have solutions (see Example 2.a). The MSO relaxation (Definition 6) is dependent on the choice of the constraint representation. However, assuming the correct representation, this relaxation produces a transitory sliding surface while keeping the uniqueness of the solutions. Finally, on this particular example the CCH relaxation from Definition 7 ensures the existence of solutions, and is independent from the constraint representation. However, the uniqueness of the solutions is lost and some solutions may never leave the sliding surface.

Summary and Conclusion

Summary

Throughout this article, we propose a concept of (AC) solutions for statedependent switching DAEs. We define solutions by considering a path-connected relaxation on the switching surface of the "left-hand" and "right-hand" algebraic constraints. In particular, three different strategies are introduced to obtain such relaxation. The CCH relaxation from Section 4.3 can be understood as a Filippov relaxation of the constraints on the switching surface. The MSO relaxation from Section 4.2 can be understood as a Filippov in the narrow-sense (or Aizerman-Pyatnitskiy) relaxation of the constraints on the switching surface. And, the SSC relaxation from Section 4.1 can be related to a Caratheodory extension of the constraints on the switching surface.

In the Section 2, we first consider a simple example of state-dependent switching DAE where the discontinuous constraint has been relaxed using the CCH relaxation, or the MSO relaxation. Using this example we show, in Section 2.1, that we can now construct AC solutions crossing the switching surface, and obtain a sliding motion. In addition, we also show that in this context the contingent cone can be used to obtain necessary and sufficient condition for the existence of local AC solutions. Furthermore, in this example, the contingent cone acts similarly to the tangent space in the concept of solutions for smooth DAEs. Using our concept of solution based on the constraints relaxation, we obtain well-posed solutions named "sliding-crossing" solutions.

In Section 2.3, we extend the study to solutions of bounded variations in order to discuss the problem of jumping solutions, or re-initialisation, when there is no possible continuation with an AC solution in some point of the relaxed constraint. In order to analyse this re-initialisation problem, we first study in Section 2.3.1, the jump dynamic boiling down from the measure representation of the statedependent switching DAE. Then, we study in Section 2.3.3 the consistent jumps that define valid re-initialisation points, and we introduce an associated jump law using the contingent cone to the solution set of the relaxed constraint.

In the Section 3.1, we study the solutions of the implicit Euler numerical scheme for the simulation of our newly defined solutions. This event-capturing scheme has proven to be an efficient method for the simulation of non-smooth dynamical system such as Linear complementary system (LCS), but is also widely use for the simulation of index-2 linear DAE. We show that the implicit Euler scheme cannot be used as reliable method for the simulation of such system. In Section 3.2, we provided a refinement of the Euler scheme to address the observed problems. Further properties of this numerical scheme are provided through additional simulations in Section 3.3.

In the Section 4, we expose three concepts of solutions associated with three strategies to relax the constraint on the switching surface. We show in Section 4.2, that the intuitive MSO relaxation, that is the convex combination of the "left-hand" and "right-hand" constraints, may not necessarily result in a pathconnected relaxation. On the other hand in Section 4.3, the CCH relaxation, that is a "Filippov-like" relaxation of the constraints, always provides a pathconnected relaxation. Finally, we discuss the variety of different solutions as well as the pros and cons of each concept of solutions in Section 4.4.

Conclusion

Overall, in this paper we explored, through various examples, new concepts of solutions for state-dependent switching DAEs of index-2. We show that these new methods may help to provide additional well-posed solutions to such system, which can be studied using classical mathematical tools, and simulated using some improvement of the well-known implicit Euler scheme. However, we also show that providing general results on such solutions will be a difficult problem as these new constraints cannot always be expressed in a reliable mathematical framework, where well-posedness can be more easily studied, such as MLCS or differential inclusion. In order to further extend the results, various paths are possible. The first one is to study when a relaxed constraint is equivalent to an MLCP, or an inclusion into a maximal monotone operator such as in [START_REF] Camlibel | Differential-algebraic inclusions with maximal monotone operators[END_REF]. For example, one can investigate whether or not the constraint can be rewritten in absolute normal form (ANF) [START_REF] Scholtes | Introduction to Piecewise Differentiable Equations[END_REF]. Then, an MLCP conversion exists and can be studied. Another research path is to look further into the role played by the contingent cone, which seems similar to the tangent space for classical DAEs.

A Appendix

A.1 Notations and Definitions

Vectors of real variables x = (x 1 , . . . , x i , . . . , x n ) T in R n are noted in bold. In the context of algebraic differential systems, the variables x and y will denote differential variables, while z will denote algebraic variables. In the context of non-smooth expressions, we will in general denote as λ the Lagrange multipliers. Finally, for a given function f : R → R n we denote f (t + ) the right limit of f (•) at t: Definition 9 (Bounded Variation). Let us consider an interval I = ∅, I ⊂ R. Let P denotes the set of finite partitions of I, each partition P N associated with nodes t 0 < t 1 < • • • < t N . The variation of a function x : I → X on a partition P N of I is defined by: var(x, I) = sup

f (t + ) = lim τ →t τ >t f (τ ) . Definition 8 (Absolute Continuity). Given a compact interval I = [t 1 , t 2 ] ⊆ R, a function f : I → R
P N ∈P N i=1 x(t i ) -x(t i-1 ) , (104)
The function x(•) is of bounded variations (BV) on I if and only if var(u, I) < +∞

We now introduce important tools of convex analysis we will use in the study of variational equations: Definition 10 (Normal cone). Let K ⊆ R n be a closed non-empty convex set. The normal cone to K at x ∈ K is the convex set:

N K (x) = {d ∈ R n | d, y -x , ∀y ∈ K}
Definition 11 (Subdifferential). A vector γ ∈ R n is said to be a subgradient of a proper lower semi-continuous convex function f (•) at a point x if it satisfies:

f (y) -f (x) ≥ γ T (y -x) ,
for all y ∈ R n . The set of all subgradients of f (•) at x is the subdifferential of f (•) at x and is noted ∂f (x).

Definition 12 (Conjugate Function). Let us consider

f : R n → (-∞, +∞]. The conjugate of f is f * : R n → [-∞, +∞] such that: f * (y) = sup x∈R n ( x, y -f (x)) , ∀y ∈ R n . ( 105
)
Definition 13 (Indicator function). The indicator function of a set K ⊆ R n , ψ K : R n → R ∪ {+∞}, is defined by :

ψ K (x) = 0 , if x ∈ K +∞ , if x / ∈ K If K is a closed, non-empty convex set, then ψ K (x) is convex proper lower semi-continuous and ∂ψ K = N K (x).
Definition 14 (Contingent Cone). The contingent cone or Bouligand tangent cone to a set K ⊂ X is given by:

T K (x 0 ) = {x ∈ X | ∃{t n } ∈ R, {x n } ⊂ X, with t n ↓ 0 , (t n > 0), and x n → x, s.t. x 0 + t n x n ∈ K, ∀n ∈ N} (106)
Definition 15 (Consistency11 of a numerical method). Given a numerical method of the form:

y k+1 = y k + h k f (t k , y k , h k ) for all k ≥ 0, t 0 = 0, t k+1 = t k + h k (107)
This numerical method is said to be consistent for a DAE with y(0) = y 0 , if for any solution of this DAE the consistency error

N -1 k=0 y(t k+1 ) -y(t k ) -h k f (t k .y(t k ), h k ) (108)
tends to 0 when h = max

w = M λ + q 0 ≤ w ⊥ λ ≥ 0 , (109)
where the complementarity equation 0 ≤ w ⊥ λ ≥ 0 means w, λ = 0, for all w, λ ≥ 0. Let us remark that an LCP (109) has a unique solution if and only if M is a P-matrix (i.e., all its principal minor are positive).

A.2 Proof of Proposition 6

Proof.

• Assume B 1 = 0, then (51) can be further reduced into:

0 ∈ sign x 1 (t + j ) + |x 1 (t + j )| - B 2 B 1 x 1 (t + j ) -x 1 (t - j ) -x 2 (t - j ) , (110)
which is a generalised equation (GE) of the form:

0 ∈ f (x) + F(x) , (111)
where F : R ⇒ R is the maximal monotone operator sign(•), f : R → R is a continuous function, and x = x 1 (t + j ). In particular, here we have:

f (x) = ax + b|x| + c , (112)
with a = -B2 B1 , b = 1, and c = B2 B1 x 1 (t - j ) -x 2 (t - j ). We can first notice that by assumption, x(t - j ) is solution of (110), and it follows that in this particular context of jump dynamics there is always existence of solutions. However, we will give a more in-depth study of the solutions of (112) in a general context, as it will prove to be useful for the study of numerical solutions in Appendix A.3. Let us now study the conditions for existence and/or uniqueness of solutions to to prove it by computing c for all the values of x 1 (t - j ). From the definition of c, from (49), and B 2 /B 1 ∈ (-1, 1), we obtain c ∈ (0, 2x 1 (t - j ) + 1), and c ≤ 1 if x 1 (t - j ) < 0. Similarly, if x 1 (t - j ) = 0, we compute c ∈ [-1, 1]. If x 1 (t - j ) > 0 then c ∈ (-2x 1 (t - j ) -1, 0). It follows that the case where there is the uniqueness of solution for c = 1 corresponds to x(t - j ) = (0, -1) T . Finally, a similar reasoning can be done for the case with a -b > 0 and a + b < 0. However, we notice this last case is not possible if b = 1 as in the particular example (110). In green an example of case (a) from the proof of Proposition 6 is depicted. In red, an example of case (b). Case (c) is constituted of a mix between the top and the bottom of the red and green graphs.

• Assume B 1 = 0, then from (50) it follows that:

    
x 1 (t + j ) = x 1 (t - j ) x 2 (t + j ) = x 2 (t - j ) + B 2 σ z x 2 (t + j ) ∈ |x 1 (t - j )| + sign(x 1 (t - j )) .

(114) (c) If a -b < 0 and a + b < 0, which correspond to B 2 /B 1 > 1, there is always existence of solutions to the discrete scheme, and it can be proven using arguments similar to Appendix A.2 case (c). In particular, there is a unique solution in two cases: c > 1 or c < -1. The case c > 1 corresponds to h > 0 (or x 1,k > 0) sufficiently large, and the case c < -1 corresponds to h > 0 (or x 1,k < 0) sufficiently small. As noted above, outside these cases where there are unique solutions, there is existence but uniqueness fails. In particular, as it can be seen in Proposition 5, in the case where B 2 /B 1 > 1, there exists a local AC solution to Problem 1 everywhere except in A -= (0, -1) T . Fig. 16: Example of non consistent Euler scheme with multiple solutions whatever the choice of h ≥ 0.

• If B 1 = 0, we obtain the system:

     x 1,k+1 = h + x 1,k hB 2 z = x 2,k+1 -x 2,k x 2,k+1 ∈ sign(h + x 1,k ) + |h + x 1,k | .
Then, for all x 1,k = -h there is a unique solution corresponding to either the continuous (Problem 1) or the discontinuous one with a jump (Problem 2). If x 1,k = -h, there is a non unique solution x 2,k+1 ∈ [-1, 1]. The proof is complete.

A.4 Proof of Proposition 10

Proof. In this proof, we show that the solution of the Backward Euler scheme of the linear DAE in each mode is a solution of (57) if a local AC solution exists to Problem 1. The consistency of the minimal Euler (59) follows from the fact that this foregoing solution associated with a single mode is consistent and bounds the solution of the minimal Euler Scheme.

Case 1. Let us assume that x(t k ) = x k is in mode 1, and that is exists an AC solution in mode 1. The existence of an AC solution in mode 1 implies B 1 + B 2 = 0, and if x 1,k = 0, it implies, furthermore, that (B 1 + B 2 )B 2 ≤ 0. Let us consider the following solution of the Backward Euler Scheme for the DAE in mode 1:

             x 1,k+1 = x 1,k + h B 2 B 1 + B 2 x 2,k+1 = x 2,k -h B 2 B 1 + B 2 z k+1 = -1 B 1 + B 2 (117)
If x 1,k < 0, then x 1,k+1 < 0 for sufficiently small h, and (x 1,k+1 , x 2,k+1 , z k+1 ) is a solution of (57) since the generalised equation reduces to 0 = -1 -x 1,k+1x 2,k+1 . If x 1,k = 0, then x 1,k+1 < 0 for sufficiently small h if (B 1 + B 2 )B 2 < 0. This latter condition is ensured by the existence of an AC solution that continues strictly in mode 1, and again, (x 1,k+1 , x 2,k+1 , z k+1 ) is a solution of (57). Finally, if B 2 = 0, (x 1,k+1 , x 2,k+1 , z k+1 ) provides us with a trivial constant solution of (57).

Case 2. Let us assume that x(t k ) = x k is in mode 2, and that is exists an AC solution in mode 2. The existence of an AC solution in mode 2 implies B 1 -B 2 = 0, and if x 1,k = 0, it implies, furthermore, that (B 1 -B 2 )B 2 ≤ 0. Let us consider the solution of the Backward Euler Scheme applied to the DAE in mode 2:

             x 1,k+1 = x 1,k -h B 2 B 1 -B 2 x 2,k+1 = x 2,k -h B 2 B 1 -B 2 z k+1 = -1 B 1 -B 2 (118)
If x 1,k > 0, then x 1,k+1 > 0 for sufficiently small h, and (x 1,k+1 , x 2,k+1 , z k+1 ) is a solution of (57). If x 1,k = 0, then x 1,k+1 > 0 for sufficiently small h if (B 1 -B 2 )B 2 < 0. This latter condition is ensured by the existence of a solution that continues strictly in mode 2. In this case, (x 1,k+1 , x 2,k+1 , z k+1 ) is a solution of (57). Finally, if B 2 = 0, (x 1,k+1 , x 2,k+1 , z k+1 ) provides us with a trivial constant solution of (57). Case 3. Let us assume that x(t k ) = x k is in mode 3, and that is exists an AC solution in mode 3. The existence of an AC solution in mode 3 implies B 1 = 0. Furthermore, it implies that B 2 /B 1 ≤ 0 if x 2,k = -1 or B 2 /B 1 ≥ 0 if x 2,k = 1.

Let us consider the following solution of the Backward Euler Scheme for the DAE in mode 3:

        
x 1,k+1 = 0

x 2,k+1 = x 2,k -h B 2 B 1 z k+1 = -1 B 1 (119)
If x 2,k ∈ (-1, 1), then we have x 2,k+1 ∈ (-1, 1) for sufficiently small h. The generalised equation in (57) reduces to x 1,k+1 = 0, and then (x 1,k+1 , x 2,k+1 , z k+1 ) is a solution of (57). If x 2,k = -1, then we have x 2,k+1 > -1 if B 2 /B 1 < 0, and this is ensured by the existence of an AC solution in mode 3. Again, (x 1,k+1 , x 2,k+1 , z k+1 ) is a solution of (57). The same reasoning applies for x 2,k = 1. Finally, if B 2 = 0, (x 1,k+1 , x 2,k+1 , z k+1 ) provides us with a trivial constant solution of (57).

Summary In all the cases, we found a solution of the Backward Euler Scheme, such that zk+1 is bounded provided that there exists a local AC solution starting from x(t k ). We can then conclude that

x k+1 -x k = h 1 0 + Bz k+1 = O(h) (120)
and from

x k+1 -x(t k + h) ≤ x k+1 -xk + x k -x(t k + h) (121)
that lim h→0 x k+1 -x(t k ) = 0 if the solution is AC. To conclude the proof, we note that x k+1 -x(t k + h) ≤ x k+1 -x(t k + h) (122) by the definition of x k+1 as the minimal solution in (59).

Fig. 3 :

 3 Fig. 3: Both figures are examples of "Filippov convexification" applied to the "reduced" DAE. The top figure represents the case of crossing-solutions and the bottom figure represents the case of repulsive-solutions (see Remark 3).

Fig. 5 :Fig. 6 :

 56 Fig.5: Phase space plot in (x 1 , x 2 ) of the numerical solutions for the sliding crossing case, B = (-0.5, 1) T , and h = 0.9, h = 0.3, or h = 0.003. Initial condition is x 0 = (-5, 4) T .

Fig. 7 :

 7 Fig.7: Error x(t) -x N with respect to time step h. We consider the two kind of AC solutions: the sliding-crossing solutions and the sliding-repulsive solutions.

Fig. 10 :Fig. 11 : 1 .Fig. 12 :

 1011112 Fig. 10: This figure depicts the various relaxations applied to Example 1.a. In red, the point x s is obtain by the continuous extension, the CCH relaxation as well as the MSO relaxation with the choice of normal C 1 . In green, we notice the MSO relaxation with the choice of normal C 1 .

Example 1 .

 1 b. Let us consider the switching constraint from Example 1.a. The GE built by the MSO relaxation is:

Fig. 13 :

 13 Fig. 13: Example 2.b smooth version of (12).

Fig. 14 :

 14 Fig. 14: Example 2.b smooth version of (84).

Example 3 .

 3 d. Let us consider the switching constraint (75) from Example 3.a in the context of a state-dependent switching DAE. For the purpose of comparing the three possible relaxations, let us define the state-dependent switching DAE:

0≤k≤N h k tends to 0 .Remark 9 .

 09 Definition 16 (Connected Sets). A topological space C is said to be disconnected if it is the union of two disjoint non-empty open sets. Otherwise, C is said to be connected. Definition 17 (Path). Let us assume that C is a non-empty subset of R n and that x and y ∈ C. Then a continuous function f : [0, 1] → C where f (0) = x and f (1) = y is called a path in C from x to y. For two points x, y ∈ C, let us denote x ∼ y the relation: there exists a path between x and y. Then, the relation ∼ is an equivalence relation on C:x ∼ x -If x ∼ y then y ∼ x -If x ∼ z and z ∼ y then x ∼ y.Definition 18 (Path-Connected Sets). A subset C of R n is said to be pathconnected if and only if, for all x, y ∈ C, there is a path in C from x to y: there exists a continuous function f : [0, 1] → C where f (0) = x and f (1) = y.Definition 19 (Linear Complementarity Problem). A Linear Complementarity Problem (LCP) is a set of equations:

Fig. 15 :

 15 Fig.15: Solutions of the the GE (113) for various signs of (a + b) and (a -b). In green an example of case (a) from the proof of Proposition 6 is depicted. In red, an example of case (b). Case (c) is constituted of a mix between the top and the bottom of the red and green graphs.

  there is a unique solution to (58) whatever the size of the time step h > 0.(b) if B 2 /B 1 ∈ (-1, 0],there are either one, or several solutions depending on x k and h. (c) if B 2 /B 1 ∈ (0, 1), there are either none, one, or several solutions depending on x k and h. (d) if B 2 /B 1 > 1, there are either one, or several solutions depending on x k and h.

2. If B 1 = 0: (a) if x 1,k = -h, there are infinitely many solutions. (b) if x 1,k = -h, there is only one solution

The complete proof can be found in Appendix A.3. From Proposition 9 and its proof, we deduce a relation in-between the lack of solution of the Euler one-step problem (58) for any h > 0, and the non-existence of local solution to Problem 2 (see Corollary 1). This result is given in Corollary 2.

  26. Trenn, S. Switched differential algebraic equations. In Dynamics and Control of Switched Electronic Systems. Springer, 2012, pp. 189-216. 27. Ye, J. J. Necessary and sufficient optimality conditions for mathematical programs with equilibrium constraints. Journal of Mathematical Analysis and Applications 307, 1 (2005), 350-369.

or using sign functions.

Let us remark that MCS are a particular case of DVI.

A differential algebraic inclusion in the case of[START_REF] Camlibel | Differential-algebraic inclusions with maximal monotone operators[END_REF] state-dependent switching.

When considering index 2 smooth DAEs with constraint of the form g(x) = 0 similar to our framework.

A property which is satisfied in jumping systems with solutions of bounded variations[START_REF] Monteiro | Differential Inclusions in Nonsmooth Mechanical Problems: Shocks and Dry Friction[END_REF].

Please note that this LCP formulation is not unique as it depends of the naming convention for the λi variables.

Please note the difference with the notion of consistent initial conditions.

The case a -b = 0 (respectively a + b = 0) corresponds to parameterization in mode 1 (respectively mode 2) where the DAE is not regular and C1B (respectively C2B) is singular.

Acknowledgement

This work was supported by the FUI ModeliScale DOS0066450/00 French national grant (2018-2021) and the Inria IPL ModeliScale large scale initiative (2017-2021, https://team.inria.fr/modeliscale/).

We will now provide some illustrating examples of switching constraints.

Example 1.a. First, let us consider the trivial switching constraint:

In this example, C 1 = (0, 1), C 2 = (0, 1), H = (1, 0), and (p 1 , p 2 , q) = (0, 0, 0). The set G can be obviously extended in x 1 = 0 by x 2 = 0 as given by the solution of (70) applied to this example to obtain

This is depicted in Figure 10. Although this example seems trivial, as both constraints are the same on either side of the discontinuity, some unexpected results arise when applying the formula from ( 4), as we will see Section 4.2.

Example 2.a. Let us now consider the switching constraint associated with the example (9) from Section 2:

In this example, C 1 = (-1, -1), C 2 = (1, -1), H = (1 0), and (p 1 , p 2 , q) = (-1, 1, 0). The problem (70) has no solution, and the set G cannot be extended by a SCC relaxation in the sense of Proposition 11 to a path connected set H e . This is depicted in Figure 11.

Example 3.a. Finally, let us consider the next switching constraint for x ∈ R 3 :

In this example, C 1 = (1, 1, 0), C 2 = (-1, 1, 0), H = (0, 0, 1), and (p 1 , p 2 , q) = (1, -1, 0). For this example, the problem (70) has a unique solution x s = (-1, 0, 0) and the graph of the constraint can be extended to give

This is depicted in Figure 12.

such GE. For the sake of briefness, proofs will be given in a succinct manner using Figure 15 as a support. Assume a -b = 0 and a + b = 0 12 . Then, depending on the signs of a -b and a + b, we define an associated continuous piecewise-linear function h(y).

(a) Let us first consider a -b > 0 and a + b > 0, which is equivalent to B 2 /B 1 < -1, and define h(y

As we will see, an important point is that under this assumption, h(•) is a continuous function with domain R.

We note that sign(x) = ∂|x|, and the conjugate of Definition 12 and 13). It follows [START_REF] Rockafellar | Variational Analysis[END_REF] that the inverse of sign(x)

is Definition 10). Consequently, the solutions of the GE (111) can be obtained by solving the inverse problem:

with N [-1,1] (y) the normal cone to [-1, 1] at y. This is the canonical form of a generalised equation as analysed in [START_REF] Facchinei | Finite-dimensional Variational Inequalities and Complementarity Problems[END_REF]. Finally, h( a -b > 0, as it can be seen using the green lines in Figure 15. Furthermore, we already know that the trivial solution x(t + j ) = x(t - j ) always exists: if there is a unique solution then this solution is x(t + j ) = x(t - j ), and σ z = 0. We have proved that a -b > 0 and a + b > 0 are sufficient conditions for existence and uniqueness of solutions to (112). In addition, these sufficient conditions do not depend on c and consequently do not depends on x(t - j ). However, they are not necessary conditions. (b) Indeed, let us now consider the case where a -b < 0 and a + b > 0, which is equivalent to B 2 /B 1 ∈ (-1, 1). Then, we can try to build another "piecewise linear function" h(y) by inverting the equation y = ax+b|x|+c for all x ∈ R. 49), and consequently σ z = 0 is always a solution, we know by construction that c ≤ 1. However, it also possible We note that if x 1 (t - j ) = 0 there is a unique solution, since |x 1 (t - j )|+sign(x 1 (t - j )) is uniquely defined on R\{0}. If x 1 (t - j ) = 0, then there are multiple solutions (infinitely many) with x 2 (t + j ) ∈ [-1, 1]. The proof is complete.

A.3 Proof of Proposition 9

Proof.

• If B 1 = 0, then we obtain the GE:

Sufficient conditions for uniqueness are the same as in Appendix A.2, identifying:

This also corresponds to case (a) in Appendix A.2. In this case, there is existence and uniqueness to the GE (115), as we can use the same arguments we used in the case (a) of Appendix A.2. Furthermore, the condition a-b > 0 excludes the constant solutions with B 2 = 0 where there is not necessarily uniqueness of the solution. (b) Let us now consider the case (a -b) < 0 and (a + b) > 0, that is B 2 /B 1 ∈ (-1, 1). The study of this case is itself separated in two part: B 2 /B 1 ∈ (-1, 0] and B 2 /B 1 ∈ (0, 1). If B 2 /B 1 ∈ (-1, 0], there is always existence of a discrete solution, as it can be proven that c ∈ [-1, 1] for all x k satisfying (12) and any h > 0. Furthermore, there is uniqueness if c = 1, for some h big enough, respectively small enough, depending of the sign of x 1,k . However, it is also possible to have multiple solutions whatever the choice of h ≥ 0, in which case the implicit Euler scheme is not consistent with solutions of Problem 1 (see Definition 15) and this is illustrated in Figure 16. If B 2 /B 1 ∈ (0, 1), we have seen in Appendix A.2 case (b) that there is either non-existence, existence, or existence and uniqueness. There is non-existence of solution to the implicit Euler scheme when c > 1: this corresponds to a time step size h such that there is no maximal solution to Problem 2 in x(t - 0 ) = x k for the interval [t 0 , t 0 + h]. In particular, in x k = A -there is no solution for all h > 0 and this corresponds to the case B 2 < B 1 in Figure 4. There is existence of solutions (but not uniqueness) for c < 1. Finally, uniqueness occurs when c = 1 which happens for some values of h and x k suitably chosen.