domain: math stat

text:
Nicolas Bloyet

Hélène Flourent

Emmanuel Frénod

Marouan Handa

Harold Moundoyi

Thuy Vo

Thi Phuong

Construction of a statistical learning tool based on ordinary differential equations to model the digestive behaviour of ross chickens

de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Introduction

Being able to monitor and forecast farm animals performances is a strategic problem in the agronomy industry: since several decades, endeavors have been made in this activity sector, with the aim to optimize the breedingrelated production, as for example meat, eggs, milk, etc. (See [START_REF] Filipe | Multiphasic individual growth models in random environments[END_REF].

Today, new technologies permit to monitor farm animals and collect a wide range of information as explained in [START_REF] Büchel | Short communication: Decrease in rumination time as an indicator of the onset of calving[END_REF][START_REF] Miekley | Detection of mastitis and lameness in dairy cows using wavelet analysis[END_REF][START_REF] Suganthi | A sensor-based forage monitoring of grazing cattle in dairy farming[END_REF][START_REF] Van Der Tol | Time series analysis of live weight as health indicator[END_REF][START_REF] Holman | Comparison of oestrus detection methods in dairy cattle[END_REF]. Yet, those tools are still expensive and their use still infrequent. Furthermore, biological data contain high variability (Noise, heterogeneity, missing and aberrant values, etc.) (See Locke et al. 2005Qi et al. 2006). Therefore, to treat most of biological issues we have to build precise predictive tools from few exploitable data.

Animals are complex living organisms in which intakes induce complex physico-chemical phenomena. Therefore to be able to link inputs and outputs concerning the evolution of some sensed biological factors, we need a mathematical model taking into account some aspects of the animal's body dynamics (See [START_REF] Renzullo | Multi-sensor model-data fusion for estimation of hydrologic and energy ux parameters[END_REF].

The main objective of this study is to build a tool which is able to predict outputs from inputs concerning farm animals and also able to manage the existence of underlying complex biological phenomena. In this paper we are going to present the construction of a Statistical Learning tool based on a dynamical mathematical model corresponding to a system of Ordinary Dierential Equations (ODE). The rst application of this Statistical Learning tool consisted to simulate and predict the growth of chickens.

Purpose

Growth simulation is a well-known problem, and some classical models -such as the Gompertz's and the Verhulst's models -are very well suited to t some growth data as it is showed in [START_REF] Birch | A new generalized logistic sigmoid growth equation compared with the richards growth equation[END_REF][START_REF] Roush | Comparison of gompertz and neural network models of broiler growth[END_REF]. Nevertheless those classical growth models do not permit to perform data assimilation. Indeed, almost no input data can be integrated in those kind of models.

On another hand, some works had already treated biological modeling issues by developing realistic and specic models as in Taghipoor 2012. But the construction of those realistic models is a costly task resulting in models containing a lot of equations and unknown parameters making them dicult to implement.

A model-free approach is also explored, as in [START_REF] Guardabasso | A model-free approach to estimation of relative potency in dose-response curve analysis[END_REF] for instance. Machine Learning tool based on Neural Networks were developed to simulate and predict the evolution of biological factors in Gorczyca et al. 2018. This approach, which are only based on data does not need knowledge about the link existing between the used inputs and outputs and permits to develop easier to handle models. But those models need a large amount of data to be tted and compensate the lack of taken into account knowledge (See Valletta et al. 2017).

In the light of the existing methods for predicting biological responses, we decided to explore an approach which can be dened as being half-way between model-free and full-model approaches: we explored the Model-Data Coupling theory to construct a tool integrating biological knowledge in a mathematical model, and using data, to optimize the model parameters. Model-Data Coupling is an expanding approach but primarily developed to treat issues in meteorology (See [START_REF] Simmons | Some aspects of the improvement in skill of numerical weather prediction[END_REF], hydrology (See [START_REF] Kim | Spacetime characterization of soil moisture from passive microwave remotely sensed imagery and ancillary data[END_REF][START_REF] William | Assimilating remote sensing data in a surface uxsoil moisture model[END_REF][START_REF] Mackay | Multi-objective parameter estimation for simulating canopy transpiration in forested watersheds[END_REF]) and biogeochemistry (See [START_REF] Barrett | Prospects for improving savanna biophysical models by using multiple-constraints model-data assimilation methods[END_REF][START_REF] Barrett | Steady state turnover time of carbon in the australian terrestrial biosphere[END_REF][START_REF] Rayner | Two decades of terrestrial carbon uxes from a carbon cycle data assimilation system (ccdas)[END_REF][START_REF] Sacks | Modeldata synthesis of diurnal and seasonal co2 uxes at niwot ridge, colorado[END_REF].

We built our model by splitting the whole complex kinetic into several parsimonious sub-biomimetic-processes performed by a combination of successive compartments. All those compartments compute their respective behaviors, and then exchange messages, assimilable to uxes. To do that we built several Ordinary Dierential Equations integrating the mathematical expressions of biological phenomena (storage, saturation, etc.).

Scope

In the scope of this study, we focus on meat poultry and specically two biological strains :

• Ross 308 (Aviagen)

• Cobb 500 (Cobb-Vantress) Some informations on those animals (an average individual of each strain) are publicly available (REF) and so we know, for each sex of those strains:

• their daily consumption of food, during 70 days • their daily growth, during 70 days As a rst step, we are going to consider the growth (mass gained each day) and the loss (ratio of food unmetabolized).

In this paper we are going to introduce in Section 1 the applied methodology. Then in Section 2 we will present the developed mathematical model and the results obtained by using this model to simulate the growth of chickens. The basis computational unit used in the following work is what we dened here as organ-like compartment.

We dene it as a tuple :

• input ∈ R in , in ∈ N • output ∈ R out , out ∈ N • f unction : R in → R out • state ∈ R states , states ∈ N
where input and output can be treated as vectors of xed dimensions in and out, which are each relative to a ux of a particular kind. There is a mapping between those vectors through function, which corresponds to a biological-like function. This function models a biological phenomenon in a synthesized way. Finally, state is a vector allowing these computational units to have a state, in other words a kind of memory, which can take part in the expression of the said function.

The dimensions of these input / output vectors therefore correspond to information exchanges in the form of messages between the organ-like compartments, the nature of which can be, for example, nutrients, drugs active principles, etc. These functions can for example try to mimic a phenomenon of xing, convection, diusion, etc.

Figure 1 shows how such a biological-like function can be summarized as a computational unit.

Functions network

These deliberately simple functions are not complex enough to model an organism. However, by making the contact between them, it becomes possible to model a more complex structure. To do this, a communication is established from the output vector of a biomimetic function to the input vector of the following function (Figure 2). Since these functions have states, the network as a whole can be likened to a nite state machine.

Optimization steps

This network acting like a model containing several parameters to optimize. We can distinguish two groups of parameters. The rst step of optimization is at the level of biological-like functions. Most of the phenomena that we are trying to model involve parameters corresponding for example to the part of information exchanged between the compartments, saturation thresholds, etc. These are optimized in order to t as much as possible the data.

To determine these parameters we use an non-linear optimization algorithm implmented in Matlab (fmincon).

This algorithm allows us to nd the set of parameters minimizing the model error towards data used.

Network structure (organism level)

The nature of the links between these dierent functions also involves parameters (weighting link, preprocessing of the vector), and is therefore also subject to optimization.

In our study, these parameters essentially correspond to the amount of information exchanged between the compartments. Given the small number of computational units involved at this stage, and so a reasonable dimensionality of the problem, it is possible to use a conventional optimization by just including them in the above set of parameters, but potentially on a complex structure, a heuristic search method (genetic algorithm for example) could be preferred.

We could also favor separated processes of optimization, where each organ would be adjusted independently, before adjusting the whole network.

Main goals

The goal of the following work is to build a Statistical Learning tool that can be used to simulate the food consumption and mass gain of poultry, to obtain results close to what one would obtain with a growth law tting, with the singular dierence that this association of function will not only be a function of time but also of the food consumed, and thus would have an increased biological correspondence.

It therefore seeks to replicate stem growth data, but adjusting a network of biomimetic functions instead of a Gompertz logistic function. The latter will, however, be used as a reference point for the metrics considered (coecient of determination R 2 and root mean square error RMSE ).

Construction of the model

Growth requires substrate and complex physico-chemical phenomena to convert substrate into dry weight.

Weight formation can be inuenced by many factors such that substrate provision, assimilation, digestibility, storage, daily losses, environmental parameters, etc. Modeling of all those processes would lead to the construction of a huge model. Therefore we do not want to reproduce the digestion kinetic but just integrate into the mathematical model information exchanges, delay, xation, accumulation and saturation eects.

In the model, we use the Gompertz growth equation as in M. C. [START_REF] Even | The use of gompertz models in growth analyses, and new gompertz-model approach: An addition to the unied-richards family[END_REF] :

W (t) = A ln W f W (t) W (t), ( 1
)
where W is the weight which varies in time t, W f is the maximum weight that can be reached with the available nutrients and A is a constant.

Assumptions

In our model, we assume that the organs participating in the food digestion are the stomach, the small intestine and the large intestine. We built our model under the following assumptions:

(A1) The ingested food is stored in the compartment named crop before moving to the compartment assimilable to the stomach.

(A2) The ux rates are constant between compartments.

(A3) There exist some transmission delays between some compartments.

(A4) The small intestine emptying dynamic starts after some time τ .

Figure 3. Digestive system graph

Following those assumptions, we can draw the graph associated to our model and synthesizing the digestive system of a chicken as in Figure 3, where

• S d is the amount of food consumed each day;

• Q cp (resp. Q st , Q si , Q Li , Q w )
is the information inside the crop (resp. stomach, small intestine, large intestine, storage compartment);

• γ cp , (resp. γ st , γ si , γ abs ) is the rate of nutrients transferred from crop to stomach (rep. from stomach to small intestine, from small intestine to large intestine, from small intestine to storage compartment).

• γ o , corresponds to the non-metabolized part of the nutrients.

The dynamical system of the digestive functions at each day d are synthesized by the ODEs:

Q cp,d = -γ cp Q cp,d (2)
Q st,d = γ cp (1 -exp(-β 1 t)) Q cp,d -γ st Q st,d (3)
Q si,d = γ st Q st,d , t ≤ τ γ st Q st,d -(γ abs + γ si )Q si,d , t > τ (4) Q Li,d = γ si Q Li,d -γ Li Q Li,d , (5)
with the initial conditions

Q cp,d (0) = S d ; (6) Q st,d (0) = 0; (7) Q si,d (0) = 0; (8) Q Li,d (0) = 0. (9)
Note here that there is some delay in the procedure of information transmission from crop to stomach exponentially with rate β 1 . The storage compartment uses a proportion of nutrients going out from small intestine to gain weight and all the information left from the day before is kept to be used in the present day, that gives

Q w,d = γ abs Q si,d -αQ w,d ; (10)
Q w,d (0) = Q w,d-1 . ( 11
)
The quantity of the growth machinery is proportional to the amount of information transmitted to the storage compartment. However, there are some losses during the information transmission corresponding to the part of the nutrient used via physical activities, reproduction needs and the non-metabolizable nutrients. Those losses are proportional to the weight of the animal and nutrients produced from metabolism,

W d = κQ w,d -W max Q w,d K+Q w,d 1 K W d W d (0) = 0 .
The eectiveness of the machinery κ exponentially decays in time with the delay µ, κ = -µκ µ = β 2 (µ max -µ) .

(12) Equation ( 12) follows that

κ(t) = κ 0 exp -µ max t - 1 -exp(-β 2 t) β 2 . ( 13
)
As a result, the nal weight is the total gain up to considering day,

W f = W 0 + N d d=1 W d (t f ), (14)
where N d is the number of days and t f is the time at the end of a digestive cycle of a day.

Global optimization

The parameters contained into the dierent biological-like functions are initially unknown. Those parameters which can be learned by using data and optimization algorithms confer to the model a learning capability.

Therefore we used the function directL [START_REF] Johnson | The nlopt nonlinear-optimization package[END_REF]) existing in R (R Core [START_REF] Core | R: A Language and Environment for Statistical Computing[END_REF]), to learn the model parameters. To nd the values of the parameters permitting the model to t the data, this function minimize an objective function. In this application the objective function corresponds to the mean squared dierence between the initial and the predicted curves (15),

f Obj = 1 n n i=1 P redCurve(i) -InitCurve(i) 2 ( 15
)
where P redCurve(i) and InitCurve(i) respectivelly correspond to the i th point of the predicted curve and the i th point of the initial curve, and n is the total number of point, that is 70 days.

In this application we xed τ and we tted β 1 , γ st , γ abs , γ si , γ o , µ max , β 2 , V max , K and γ cp .

Simulation results

After the tting we parametrized the model with the obtained values of the parameters (Table 1).

The dynamics of the model throughout one day and throughout two days (Figure 4) were simulated with the Female Model, that is the model simulated the growth of the female chiken. We also simulated the growth of the animals throughout the whole studied period (Figure 5). First of all, considering for the same strain males on one side, and females on the other, it is interesting to note that some parameters seem to be stable, while only a part of them vary signicantly among poultry's sex.

In that way, the adjusted model give us back some information, that could be confronted to some business expertise (here zootechnicians).

Indeed, it appears that organism's dierence of behavior is concentrated on parameters :

• β 2 , relative to the eectiveness of the organism 1

• γ abs , the link's strength between the small intestine and the storage compartment • γ si , the link's strength between the small and the large intestine • γ cp , the link's strength between the crop and the stomach

In particular, we observe that male's organism seem to stay highly ecient longer than female's (a fact that we observe in ground truth), characterized by a slightly better β 2 on the male. At the same time, we observe that on female's, the amount of material sent from the small intestine to the big intestine (which is going to be lost) is higher than male's, where a bigger part is sent to the storage compartment.

Those observations would need to be conrmed on other strains on to be confornted to a zootechnician expertise, but is by itself a rst step of knowledge feedback.

Accuracy

Figure 5 shows that the built model ts the data with a goodness of t close to our target. We chose to compare our model with two types of models : a Gompertz growth (17) law usually used to simulate growth phenomena, and a two order Polynomial Model ( 16) took as a basis with the same number of parameters. The latter one doesn't have a biological likelyhood, so the rst goal is to perform better.

W (t) = p 0 + p 1 t + p 2 t 2 (16) W (t) = g 0 exp -g 1 exp(-g 2 t) (17)
We tted the parameters of the Polynomial Model (p 0 , p 1 , p 2 ) and the ones of the Gompertz's Model (g 0 , g 1 , g 2 ) on the data concerning the female and the male chikens. We calculated for each model the mean of the R 1 its ability to metabolize a high ratio of ingered food with respect of time 8 The developed approach allows us to stay very modular with regards to the nature of the simulated model, so it could adapt to a higher level of information for a few adaptations.

Fluxes multiplication

In the scope of this work, the model was only trained to deal with simple weightings data, and so not in a context where it could out-perform classic growth laws. The actual added value to those models would appear as soon as more ne data would be available.

Indeed, the objective at mid-term is to exploit an eventual higher level of knowledge (theoretical or measured) about modelized phenomenons, helping to dene in a more precise way what happens inside the organism, typically with data centered on an organ's input and output. Unlike classic growth laws based on temporal axis (Gompertz, Verhulst for example), this kind of model could handle data made of several dimensions (time, ingered proteins, drugs, etc.), and among everything, could pretend to follow a biological likelyhood.

Model reinterpretation

At a longer term, and in a context where the previous hypothesis about new data would be validated, the goal would be to optimize automatically the weigth parameters between biological-like functions.

Knowing the oragnism's structure to a sucient level of details, and having a sucient number of measures, it would be possible to rene the knowledge concerning the nature of the connections between these dierent virtual organs, by set of parameters optimization (genetical optimization for example).

As those parameters do have a relationship with actual phenomenon due to their biological likelyhood, it would be interesting to confront the nal set of optimized parameters to a business expertise.

Conclusion

We explored a Data-Model Coupling approach and built a biomimetic dynamic tool containing Ordinary Dierential Equations. Those Dierential Equations contain parameters conferring a learning capability to the developed tool. Therefore, our tool is a Statistical Learning tool able to learn the value of parameters from eld data.

An optimization process permits to learn the parameters and then parametrize the mathematical model by integrating input data concerning the feed consumption of the chikens. After the learning step we obtained a model able to model the growth of Ross chickens to a level of precision similar to a classic growth law.

The number of parameters to determine is important and only one structure of the model was tested. Therefore model selection methods should be used to determine the optimal structure of the model in terms of accuracy and the number of parameters to learn.

Figure

  Figure 1. A biological-like function

Figure 2 .

 2 Figure 2. Example of a graph-model

Figure 4 .

 4 Figure 4. Dynamics of the model throughout one day (left) and throughout two days (right).

Figure 5 .

 5 Figure 5. Comparison between the initial curve (Data) and the curve simulated via the Biomimetic Model (Simulation) for the Female (left) and the Male Model (right).

Figure 6 .

 6 Figure 6. Comparison between the initial curve (Data) and the curve simulated via the Gompertz's Model (Simulation) for the Female (left) and the Male Model (right).

Figure 7 .

 7 Figure 7. Comparison between the initial curve (Data) and the curve simulated via the Polynomial Model (Simulation) for the Female (left) and the Male Model (right).

Table 1 .

 1 Parameter values of the Male and Female Models.

	Parameters	Female Model	Male Model
	β 1	0.405	0.402
	γ st	0.601	0.650
	γ abs	0.650	1.00
	γ si	0.020	0.014
	γ o	0.424	0.512
	µmax	0.008	0.008
	β 2	0.016	0.048
	V max	0.051	0.050
	K	24.70	24.90
	γ cp	1.654	0.971

Table 2 .

 2 2 and the RM SE values associated the Female and the Male Models. Figures 5, 6 and 7 and the results contained in Table2show that the accuracy of those dierent models is globally equivalent. Therefore we built a model satisfying in terms of accuracy. But the real advantage of the Biomimetic Model is its capability to integrate biological knowledge and assimilate input data. Comparison of the models in terms of R 2 and RM SE values.

	Model	RM SE	R 2
	Gompertz's Model	94.2	0.997
	Order 2 Polynomial Model	147.4	0.992
	Biomimetic Model	102.1	0.996


Florence Ducros

Patrick Pamphile
email: patrick.pamphile@u-psud.fr

Maintenance cost forecasting for a fleet of vehicles

Generally, when purchasing of a fleet of vehicles, after-sales service includes maintenance, repair and overhaul (MRO) contract : this contract guarantees the fleet availability during several years under usage constraints. MRO contract is an undeniable marketing argument for automobile manufacturers, but it is also an additional cost which must be assessed. Particularly as this contracts last far beyond the equipments useful life. To manage the spare parts warehouse and to to assess the costs of maintenance and repairs, manufacturer must be able to forecast the number of failures for a list of critical equipments, throughout the contract. Extensive researches on spare parts inventory management could be found. But in the case of MRO contract on a fleet of vehicles, this issue is particulary difficult. First of all, guaranteed maximum availability during several years requires information on both equipments reliability and vehicles usages. Furthermore, there were many factors of instability of the spare parts requirement over the years: on the one hand equipments may have various modes of ageing either an equipment may be subjected to several mode of ageing ; on the other hand, vehicle usages may vary significantly according to the mission profile.

The purpose of this article is forecast the spare parts requirement for a fleet of vehicles, over several years, using a simulation model based on statistical analysis of equipments inter-occurrences of failure and vehicle usages. By integrating this these two different cost drivers over the years, we provide a flexible tool of decision-making to prepare or manage a MRO contract for a fleet of vehicles.

Introduction

Products degrade with age and usage and fail when they are unable to perform a required function, under given environmental and operational conditions cf. [START_REF] Meeker | Statistical methods for reliability data[END_REF]. Therefore, customers need assurance that the product will perform satisfactorily over the useful life period (i.e. before ageing). A warranty is then a legal contract which requires that, after the sale, the seller agrees to remedy or compensate the buyer, for certain defects or failures in the product and for a specified time or amount of usage. See [START_REF] Murthy | Warranty management and product manufacture[END_REF] for a review on warranty policies.

For highly engineered products, "custom-built" products or industrial products bought in lots as fleet of vehicles or aircrafts, it can be more economical for the buyer to outsource the maintenance to an external service agent (e.g. the manufacturer or an independent specialized company) through an outsourcing maintenance service contract. Furthermore, warranty contract guarantees free repair during the warranty period, but does not guarantee the availability. But in some cases, persistent product performance is a crucial stake of purchase. This is the case for nuclear plants, fleet of aircrafts or military vehicles. Maintenance, repair and overhaul (MRO) contrats provide customers with an outsourcing MRO service, to keep the product in service throughout the duration of the contract, but under usage constraints, see cf. [START_REF] Murthy | Data management in maintenance outsourcing[END_REF] for an overview on maintenance outsourcing. Recently, due to the rapid technological development and fierce competition linked to the globalization, the manufacturers are under pressure to provide its clients with an maintenance service in their after-sale-servicing. As example, purchases of a fleet of tanks by a government may include ten years of maintenance with a guaranteed high level of availability.

For manufacturers, providing a maintenance service is an undeniable marketing argument, but it is also an additional cost. To set up a MRO contract it is necessary to gather not only information on systems reliability and maintenance but also on their usages(i.e. operational environment, operator skill and usage intensity,...). Furthermore, a system such as an automobile consists of many modular systems (e.g. powertrain, undercarriage, electrical,...), equipments (subsystems e.g. motor, wheels, batteries,...) and thousands of components that are supplied through an extensive suppliers network. Reliability performance of a systems, equipments or components is under control of suppliers based on their design and their quality production. Vehicle usage conditions are under control of drivers, according to operating environment, mission profil and usage intensity. In this context, the statement of a MRO contract for a fleet is especially challenging. Collection and analysis of equipments warranty claims and vehicle usage records can then help in the decision-making.

In this paper, we consider MRO contract proposed by a automobile manufacturer, to maintain a fleet of several hundred vehicles in service throughout the duration of the contract, but under specific usage conditions. The contract covers a list of equipments during more than 10 years. Vehicles usages are also periodically recorded in a vehicles-database. When equipments failed, usage between successive failures are recorded in an equipments-database. It should be noted that MRO contrats issues include both system reliability and maintenance but also usages data analysis (i.e. operational environment, operator skill and usage intensity,...). Extensive works has been done on reliability, maintenance and warranty management, see [START_REF] Blischke | Warranty data collection and analysis[END_REF] and [START_REF] Wu | Warranty data analysis: a review[END_REF] for a detailed review. But very few address the issues related to mathematical aspects of MRO contract with the requirement of permanent availability for a fleet. Among these latter include [START_REF] Zaino | Some renewal theory results with application to fleet warranties[END_REF], [START_REF] Wang | A model for maintenance service contract design, negotiation and optimization[END_REF], [START_REF] Anderson | Using Copulas to Model and Simulate Two-dimensional Warranty Data[END_REF] and references therein. Generally, the mean cumulative number of failures is estimated, but considering same usage or same rate of failure occurrences for all vehicles of the fleet. Here, vehicles were deployed over several years and consequently equipments have various degradation levels. Furthermore, vehicles were used intermittently in highly varied conditions (e.g. harsh and sloping terrain,...), for long periods (e.g. several dozen hours,...) and various mission profiles (e.g. normal or intensive usage).

Therefore, equipment lifetimes and vehicle usages have typically large variance. These various sources of variability are not controlled or not observed. But neglecting existing non-homogeneity can lead to large estimation errors. On the other side, more appropriate mathematical models lead to intractable computations.

Therefore, to forecast the number of failures during the MRO conrtatc, a simulation based model was developed incorporating both equipments failures database and vehicles usages database. Failures data and usages data have been processed specifically. Weibull distributions have been extensively used for modelling life data in medical or industrial applications. In particular, Weibull distributions exhibit decreasing, constant or increasing hazard function which makes them suitable for modelling complex failure data, cf. [START_REF] Murthy | Weibull models[END_REF]. Three different models of Weibull distributions are used to modelling failure inter-occurrences : either a simple Weibull model or two-fold Weibull competing risk for homogeneous population of equipments with one or two failure modes, either a two-component mixture of Weibull for inhomogeneous population of equipment (each subpopulation has its own mode of failure). Vehicles usages regularly collected provide a signifiant, but non-homogeneous database. Indeed, according to the mission profile, vehicles can switch from the nominal usage mode of the fleet to a intensive one. Mission profile is not disclosed in the database, and yet it is an essential information for the management of the spare parts. Hence, a cluster analysis allowed us to obtain usage profiles for vehicles.

Simulation based approach is an alternative method to yield maintenance cost forecasting under realistic assumptions on equipment failures and vehicles usages. In addition, our approach provides a flexible decision-making tool before and after execution of the MRO contract for a fleet. The remainder of this paper is structured as follows. The problem is formalized in Section 2. The simulation based model is described in Section 3. Equipments inter-occurrence of failures and vehicles usages profiles modeling are discussed in following sections. This method is illustrated with alternative scenarios to forecast the number of equipments failed during the contact in Section 6. Section 7 summarizes the conclusions of this paper and discusses future extensions of this research.

Problem description

An equipment installed on a fleet of κ vehicles is considered. These vehicles were deployed over several years. They are used intermittently. A MRO contract is intended to maintain the fleet for t years and covers a list of critical equipments. After each failure, equipments are rapidly replaced by a new one. Free replacements are supplied under constraints on the average usages of the vehicles. Vehicles are equipped with various features differently used according to the purpose of the mission. Usage features are measured with different scales (e.g. motor usage in hours, battery usage in hours, kilometers travelled, number of usages of a feature,...). The manufacturer has then selected three scales of measure which will be stored in the vehicles database. Inter-occurrences of failures are measured with a scale specific to each equipment (e.g. hours for the motor, kilometers for wheels,etc).

Notation

For 1 ≤ k ≤ κ, let us denote

X ki
= i e failure inter-occurrence of an equipment installed on the k-th vehicle ; U k (t) = cumulated usage of the k-th vehicle, on t years N k (t) = number of equipments failed for k-th vehicle, on t years:

P(N k (t) ≥ n) = P(X k1 + • • • + X kn ≤ U k (t))
N (t) = total number of failures for κ vehicles of the fleet, during t years

= κ k=1 N k (t).
In this paper, the random variables (X ki ) are assumed to be independent and identically distributed. A failed equipment is replaced by a new one. Let F X denote their common distribution.

Problem statement

The decision problem related to MRO contract include both to maximize the fleet availability for the costumer, and minimizing the maintenance cost for the manufacturer. Hence, this study is motivated by forecasting of the spare parts requirement. We'll have to compute

• the stock of spare parts n max , for a required availability p:

P (N (t) ≤ n max ) = p; (1)
• the expected number of failures:

E [N (t)] . (2)
To solve Eq. ( 1) and Eq. ( 2), the distribution of N (t) has to be computed. A failed equipment is replaced by a new one, thus counting processes (N i (t)) are renewal processes and N (t) is a superimposed renewal processes cf. [START_REF] Ascher | Repairable Systems-Modeling, inference, misconceptions and their causes[END_REF]. Generally, explicit analytical expression for N (t) distribution is not available. Therefore to predict the number of equipments failed during the contract, we provided a simulation-based model from vehicles usages database and equipments failure database cf. Figure 1.

Equipments failures database

Vehicles usages database

Equipments failures inter-occurrences

Simulation algorithm

The random nature of the number of equipment failures is related to the occurrence of equipment failures and the vehicle usages during the period cf. Algorithm 1.

Algorithm 1: Failures simulation algorithm

Initialisation:

N ← 0 U ← vehicle usage during a period X ← equipment usage until failure while X < U do N ← N + 1 U ← U -X X ← equipment usage until failure end return N
Model selection for both distribution of equipments inter-occurrence of failures X and vehicles usage U is made respectively from the equipment database and vehicle database. Effective data modelling requires a good understanding of properties of different models and tools and techniques to estimate parameters. In this respect, it is worth mentioning that usage between failures data and vehicle usages data are of a different nature and have to modelled in a specific manner.

Equipments failures inter-occurrence

Since more than five decades, Weibull distributions is extensively used for modelling life data in industrial applications. Indeed, Weibull distributions exhibit decreasing, constant or increasing hazard function which makes them suitable for modelling complex failure data cf. [START_REF] Murthy | Weibull models[END_REF]. Here, vehicles were deployed to the field over several years and used in highly varied conditions (e.g. harsh and sloping terrain,...). Therefore, equipments lifetimes will have various failure rates. These various sources of variability are not controlled or not observed. From the equipments failure database analysis three models were considered.

• A single two-parameter Weibull model (SW) with probability density fonction :

f X (x) = f W (x|β, η) = β η x η β-1 e - x η β , (3)
where β > 0 is the shape parameter and η > 0 the scale parameter. Here, equipment is assumed to have only one mode of failure.

• A two-fold Weibull competing risks model (CRW) with cumulative density fonction :

F X (x) = 1 -(1 -F W (x|β 1 , η 1 ))(1 -F W (x|β 2 , η 2 )) (4)
where F W is the cumulative density function of a single Weibull distribution. Here, as for SW model, the population of equipments is homogeneous, but an equipment is subject to two different failure modes.

• A two-component mixture of Weibull distributions model (MW) with probability density fonction :

f X (x) = α f W (x|β 1 , η 1 ) + (1 -α) f W (x|β 2 , η 2 ) (5)
Here, unlike SW model or CRW model, the population of equipments is not-homogeneous. Two main subpopulations with each their own failure mode can be distinguished (e.g. early or random failure, random or wear out failure, two designs or production processes,...).

Weibull quantiles-quantiles plot (WQQP) can provide a quick and simply confirmatory method for data non-homogeneity cf. [START_REF] Murthy | Weibull model selection for reliability modelling[END_REF]:

• for single Weibull distribution, the WQQP has a straight line shape;

• for mixture of Weibull distributions, the WQQP has a single inflection point (S-shaped) with parallel asymptotes;

• for competing risks of Weibull distinctions, the WQQP has a convex shape.

Furthermore, WQQP provides crude estimates of model parameters, see [START_REF] Murthy | Weibull models[END_REF] for computational details. These estimates are non precise nor robust but nonetheless can be used as starting values for alternative estimation algorithms. Different methods can be used for fitting a parametric model to data, but they have substantial difficulties in the setting of heavily censored data. Indeed equipment of critical equipment of vehicle are highly reliable, and consequently censoring rate are usually greater than 70%. With such levels maximum likelihood approaches (ML), Estimation-Maximization method include, provide estimate highly biased particulary for MW and CRW models, cf. [START_REF] Jiang | Maximum likelihood estimates, from censored data, for mixed-Weibull distributions[END_REF] and [START_REF] Chauveau | A stochastic EM algorithm for mixtures with censored data[END_REF]. Full Bayesian approach provides alternatives to ML methods. It consists of incorporating prior information on parameters to make inference [START_REF] Hamada | Bayesian reliability[END_REF]. Bayesian method require complex integrations for which Markov chain Monte Carlo algorithms (MCMC) are usually used ([? ] is a good reference). For highly censored data MCMC methods appear to be deceptive in terms of convergence for MV et CM cf. [START_REF] Bacha | Bayesian estimation of a Weibull distribution in a highly censored and small sample setting[END_REF] and [START_REF] Marin | Bayesian modelling and inference on mixtures of distributions[END_REF]. Bayes method via Markov chain Monte Carlo algorithms is time consuming and convergence is difficult to be assessed, see [START_REF] Marin | Bayesian modelling and inference on mixtures of distributions[END_REF]. In the context of highly censored data, the Bayesian restoration maximization (BRM) method provide an efficient alternative. It is a Bayesian bootstrap method which provides a sampling from the posterior distribution. Using an importance sampling technique, this sample is focused on the posterior mean. For computational details, see [START_REF] Bacha | Bayesian estimation of a Weibull distribution in a highly censored and small sample setting[END_REF] for CRW model and [START_REF] Ducros | Bayesian estimation of Weibull mixture in heavily censored data setting[END_REF] for MW model.

Vehicles usage profiles

Whether they are personal, commercial or military vehicles are equipped with various features differently used, according to the purpose of the mission. Usage of these features are measured by three different scales (e.g. hours, kilometers, number of uses,...). Therefore, usages of each vehicle are periodically stored in the database with three different scales. For confidentiality reasons they are denoted here scale 1, scale 2 and scale 3, see Figure 2. Sometimes, some vehicles can switch from a the nominal usage mode of the fleet to a intensive one according to the mission profile. In case of conflict or intensive training for example. Such types of changes have an impact on the variability of the spare part request and must be integrate in the simulations. Unfortunately, mission profile is not disclosed in the vehicles database. To tackle this problem, a cluster analysis was used on the vehicles usages. The objective of clustering is to partition a population of items in homogeneous subgroups, such as items in the same subgroup are highly "similar", and items different subgroups are as different as possible cf. [START_REF] Jain | Data clustering: 50 years beyond K-means[END_REF]. Two questions then arise : how to measure similarity ? how many groups shall be selected ? From quantitative measures on items, the k-means algorithm with Euclidean metric as measure of similarity is the simplest clustering algorithm, see [START_REF] Hastie | The elements of statistical learning: prediction, inference and data mining[END_REF] for computational details. In our case, the aim is to identify vehicles profiles with usage intensities which are either normal or high. To ensure that profiles can be related to actual operating missions, the three usage units were used for clustering. As can be seen in Figures 3,4, 5 and ??, the two clusters match vehicles mission profiles with specific values of the three scales.

• Cluster 1: 96,5% of usages, low values with scale1 and scale 2, but some extreme values for scale 2.

This profile is denoted P 1.

• Cluster 2: 3,5% of usages, high values with scale1 and scale 2. This profile is denoted P 2.

Clusters % mean min Quantile 25% Median Quantile 75% max Cluster 1 96.5% 83.9 The simulation based model provides to forecasting of the failure number of equipment during the contract, which can be applied to determine spare parts ordering quantity. It is then a flexible decision-making tool which can be used for before and after execution of the MRO contract for a fleet. As an example, from several scenarios with different equipment failures and various vehicles usages profiles, a projection of the number of spare parts have been made for 20 years.

Average usage per vehicle

During a year, failed equipments are free replaced if the average usage per vehicle is below a threshold specified in the contract. Figure 6 shows that this threshold is not exceeded with a nominal usage, but it is however reached even with a small percentage of intensive usages. Therefore, a policy of use and management of the fleet by parks of vehicles should allow to optimize the cost : using specific usage profile by parks of vehicles nominal usage profile P 1 nominal and intensive profiles mixture P 1, P 2

Homogeneous population of equipments with various usages profiles

The vehicle usage is a factor of instability of the spare parts requirement overs the years. From an homogeneous population of equipments with only one mode of failure, various scenarios of the vehicle usages have been investigated. Figure 7 shows the forecasting overs 20 years. The exponential behaviour of the curves is due to the deployment of the vehicles over the first nine years. nominal and intensive profiles mixture P 1, P 2 nominal usage profile P 1 X ∼ W(β = 2 ; η = 2000)

X ∼ W(β = 2 ; η = 2000)

Figure 7: Cumulative count of failures with simple Weibull

Non-homogeneous population of equipments with various usages profiles

The heterogeneity of equipments ageing is a factor of instability of the spare parts requirement overs the years. Various scenarios of mixing are investigated.

X ∼ Mix Weibull X ∼ Mix Weibull α 1 = 0.2, W(β 1 = 4, η 1 = 1000) α 1 = 0.2, W(β 1 = 4, η 1 = 1000) α 2 = 0.8, W(β 2 = 2, η 2 = 2000) α 2 = 0.8, W(β 2 = 2, η 2 = 2000)

Conclusion

In this paper, we consider MRO contract proposed by an automobile manufacturer to maintain a fleet of several hundred vehicles. Throughout the duration of the contract, a maximum availability of the fleet is guaranteed. The contract covers repairs of a list of critical equipments during more than ten years. In this context the spare parts inventory management is particulary difficult due to several factors of instability over the time. Particularly, the heterogeneity of equipments ageing and heterogeneity of vehicles usages are two main cost drivers. To tackle this issue, a simulation model was used, based on statistical analysis of equipments inter-occurrences of failures and vehicle usages. Failure data and usages data were processed specifically. For modeling various ageing, three Weibull models was used. A simple Weibull for a homogeneous population of equipments with only one mode of failure, a two-fold Weibull competing risk when equipment have two modes of failure, and finally a two-component mixture of Weibull for heterogeneous population of equipments. Vehicles usages regularly collected provide a signifiant, but non-homogeneous database. Hence, a cluster analysis allowed us to obtain usages profiles for vehicles. Simulation based approach yield spare part forecasting under realistic assumptions on equipment failures and vehicles usages. By integrating these two different cost drivers over the years, we provide a flexible tool of decision-making to prepare or manage a MRO contract for a fleet of vehicles.

Therefore, a simulation based model was developed incorporating both equipments failures database and vehicles usages database.

Figure 1 :

 1 Figure 1: Forecasting of equipment failures of a fleet of vehicle using simulation based on vehicles usages and equipment failures

Figure 2 :

 2 Figure 2: Scales of vehicles usages

Figure 5 :

 5 Figure 5: Vehicle usage unit 1 by clusters

Figure 6 :

 6 Figure 6: Annual average usage by vehicle

Figures 8 -

 8 [START_REF] Ascher | Repairable Systems-Modeling, inference, misconceptions and their causes[END_REF] show forecasting overs 20 years with various vehicles usage profiles.

Figure 8 :

 8 Figure 8: Cumulative count of failures with various mixture of Weibull

Figure 9 :Figure 10 :

 910 Figure 9: Cumulative count of failures with various mixture of Weibull


Mickaël Duruisseau
email: mickael.duruisseau@gmail.com

Jean-Claude Tarby
email: jean-claude.tarby@univ-lille1.fr

Xavier Le Pallec
email: xavier.le-pallec@univ-lille1.fr

Sébastien Gérard
email: sebastien.gerard@cea.fr

VisUML: a live UML visualization to help developers in their programming task

Keywords: Human-Computer Interaction, Model Driven Engineering, Software Engineering, Unified Modeling Language, Human-Centered Design

Developers produce a lot of code and most of them have to merge it to what already exists. The required time to perform this programming task is thus dependent on the access speed to information about existing code. Classic IDEs allow displaying textual representation of information through features like navigation, word searching or code completion. This kind of representation is not effective to represent links between code fragments. Current graphical code representation modules in IDE are suited to apprehend the system from a global point of view. However, the cognitive integration cost of those diagrams is disproportionate related to the elementary coding task. Our approach considers graphical representation but only with code elements that are parts of the developer's mental model during his programming task. The corresponding cognitive integration of our graphical representation is then less costly. We use UML for this representation because it is a widespread and well-known formalism. We want to show that dynamic diagrams, whose content is modified and adapted in real-time by monitoring developer's actions can be of great benefit as their contents are perfectly suited to the developer current task. With our live diagrams, we provide to developers an efficient way to navigate through textual and graphical representation.

Introduction

Human-Computer Interaction (HCI) has significantly evolved in recent years with the appearance of mobile and tactile devices, voice and gesture recognition, augmented and virtual reality, etc. Nowadays, most of the smartphone users know how to interact with a map, using simple interactions like touch, but also some more complex, like swipe or pinch. In the meantime, software practitioners still develop applications only with a keyboard and a mouse. Furthermore, "development tools are showing mainly text with (so much) obstinacy" [START_REF] Girba | Pervasive software visualizations (keynote)[END_REF] despite some improvements concerning HCI in their IDE, like syntax coloration and auto-completion. We may consider software visualization tools as an improvement of the HCI, but their place in IDE and their use remain anecdotal. Visualization tools generally help developers to understand the global architecture of the application they are working on or the impact of what they are changing. Development consists mainly in producing code but not dealing with considerations of macroscopic nature. We argue these visualization tools are not focused on the most important and elementary task: programming. We claim that a graphical representation of elements that are currently knitted by a developer may be more easily accepted. The first reason is it can quickly provide information that is less visually explicit in textual code and still relevant for coding. More specifically it may highlight the different relations between elements (structural relations or specific execution flow). The second reason is that graphical representations are more suited to mobile and tactile devices (like tablets) than textual code and so, by taking advantage of them, they can provide HCI improvements of IDE.

In this paper, we present VisUML1,2 a tool which uses a "live diagramming" approach and implements this point of view of software visualization. We defined live diagrams as being diagrams (UML or not) that display information according to the current task of the developer. We assume that currently opened elements in an IDE refer to this task and are therefore part of developers' mental models. These diagrams are updated instantly each time the code changes. Our approach consists in reducing the number of displayed elements but also to ease the navigation between code and diagrams.

To present this approach, we first describe the scientific background on which VisUML is based, as well as our design guidelines. Second, we review works that are related to our idea. Then we explain how VisUML works, with a focus on user interactions. Finally we highlight the contributions of this tool and we discuss its features and its evolutions. At last, we conclude with a summary and perspectives.

Scientific background and design guidelines

The psychological mechanisms related to programming received much attention during the 90s [START_REF] Brooks | Towards a Theory of the Cognitive Processes in Computer Programming[END_REF][START_REF] Davies | Skill Levels and Strategic Differences in Plan Comprehension and Implementation in Programming[END_REF][START_REF] Détienne | Expert Programming Knowledge: A Schema-based Approach[END_REF]. Notable among these was the fact that developers work in little "spurts" [START_REF] Olson | Empirical studies of programmers : second workshop[END_REF] (sprint). Green [START_REF] Olson | Empirical studies of programmers : second workshop[END_REF] mentions the notion of spurts to emphasize that programming is a series of small steps where each one refers to a mental chunk or scheme. Therefore it is logical that the developer's main concern consists in connecting the spurt result with what has been produced so far. Indeed, developers often read and analyze what has been done in order to properly "knit" (link) what they do with the rest of code.

The development environment should therefore optimize the "reading / production" cycle. It must be adapted to the current spurt and simultaneously provides quick access to information that will help developers to link their code to the existing one [START_REF] Davies | Externalising Information During Coding Activities: Effects of Expertise, Environment and Task[END_REF].

Thus, it is no wonder that most of current code editors propose shortcuts to go quickly to the definition of the selected element or to list all the invocations of the selected method. However, navigation is not the only way to find relevant information. Changing visual properties of code elements is another way to highlight what can interest the developers in their knitting task; for instance, the indentation clearly shows the different control structures in which the current line of code is nested, background color variation is sometimes used to identify the different places where a variable is used, etc. Visual changes can go further with concrete transformations of shapes and concerned elements. That is the speciality of what the software community called visualization tools. These ones are of great help in order to understand the existing code; this is particularly mentioned in the SoftVis / VISSOFT conferences cycle. [START_REF] Girba | Pervasive software visualizations (keynote)[END_REF] insists on the necessity of the requisite ubiquity of visualization in development environments, even if it means rethinking them entirely. A majority of the work on software visualization results in tools that allow finding or obtaining macroscopic information.

At the opposite, our approach provides microscopic information by focusing on more specific and activity related data. We do not aim to provide information about possible impacts of each modification, nor knowing which application's parts have to be rewritten. Instead, our goal is to allow developers to have a visual support of their code. This will enable them to quickly find information about entities and their relations and will also add an easy navigation mean. In addition, this visual support could be shared with peoples that have different needs in terms of visualization. For example, a product manager will not use the same kind of representations than a developer, but the displayed entities remain identical. In the same idea, developers can have a fully detailed class diagram, whereas project leader may want to see a class diagram without attributes or operations, with a color code that indicates the code quality of each class or their modification date, number of commits, etc. Developers constantly execute code reading operations to find information in order to allow them to modify their code. We wish to shorten these reading operations by giving a quick access to elements often used or viewed by the developers. These elements are mostly represented as entities connected by links. The textual support is not very effective to represent a system with interconnected elements; however the diagrammatic representations are much more efficient in this task [START_REF] Larkin | Why a Diagram is (Sometimes) Worth Ten Thousand Words[END_REF]. Furthermore, works on the psychology of senior developers show that they have mainly problems understanding the control flow rather than the basic bricks of a language (e.g. variables names) [START_REF] Church | A fox not a hedgehog: What does PPIG know?[END_REF]. Thus, in addition to the two aspects to be displayed (entities and links), we can add the control flow between entities that are associated to the active coding task. To ensure that the access of information through the graphical representation is as fast as possible, the reading/decoding of this representation must take as little time as possible. The cognitive fit is a main concern for our tool, and the time spent when switching between a representation to another, or when switching between tasks in general (e.g. code review vs. diagram creation, class dependencies search vs. debugging), is thus very important. This concern is the heart of the cognitive dimensions [START_REF] Green | Usability Analysis of Visual Programming Environments: A 'Cognitive Dimensions' Framework[END_REF] and can be found as a rule cognitive integration in the physics of notations [START_REF] Moody | The "Physics" of Notations: Toward a Scientific Basis for Construct-ingVisual Notations in Software Engineering[END_REF]. In our case, when switching from a textual code editor to a graphical representation, it is clearly necessary that developers keep their references. For example it is important that developers recognize the entities they have just been manipulating. Therefore the graphical representation has to be close to their mental model and display information about:

-Entities linked to the active coding task: whether they are open or not in the IDE and which element is currently active -Neighbourhood data: accessible via variables of a method, attributes of an object, inheritance... -Control flow: the content of a currently consulted method, or at the origin of a search or navigation.

We use the UML language for the graphical representation because it remains a language known and mastered by developers, even if according to different surveys it is not enough used in firms. This selection was made according to the principle of cognitive integration [START_REF] Green | Usability Analysis of Visual Programming Environments: A 'Cognitive Dimensions' Framework[END_REF]: adapt to the knowledge of developers.

Forward and Dzidek [START_REF] Lethbridge | Perceptions of Software Modeling : A Survey of Software Practitioners Table of Contents[END_REF][START_REF] Dzidek | A realistic empirical evaluation of the costs and benefits of UML in software maintenance[END_REF] attest that two of the three most widely used UML diagrams are the class and the sequence ones. We consequently chose them in VisUML. The class diagram is important because developers can recognize the entities they manipulate, as well as consult other related entities thanks to the different types of links.

In order to display the control flow, especially for the body of a method, we opted for the sequence diagram. We assume that this diagram is a complementary visual support for developers that are working on the implementation of a method. They will be able to see all the classes that are involved in this method, and especially the different exchanges (and thus links) between them. In addition, the temporality of these exchanges is emphasized because it is represented on the y-axis. This correspondence between y-axis and temporality reduces subjectivity in the layout, and is therefore less subject to interpretation than communication diagram, where the placement at x and y is arbitrary. Activity diagrams and states machines can be used for the implementation of a method but their point of view (activity or state) adds a semantic gap which is likely to increase the time required for decoding (without taking into account the ordering of instructions).

The navigation between the code and these two types of representation (class and sequence diagrams) is explained in the next section. Finally, we chose to display our diagrams in web pages (of a web browser) so that we can easily connect our module into any IDE. This aspect may seem purely technical but it is not: one of the cognitive dimensions is the visibility in which the juxtaposition of two points of view is a way to easily switch from one to the other. If the IDE does not allow two large windows to be displayed next to each other (each one on a screen or both on the same screen), it is natively possible with our approach, even when using a tablet or any display device with an OS containing a web browser. However, in addition to these web pages, we also made modeling tools plugins (see section 4.4) that enable live diagrams on them.

Related Works

In this part, we first describe works about visualization tools for code, their UML diagrams features as well as the possible interactions and navigation. Then we talk about reverse-engineering tools, especially how they generate diagrams and in what way the generated elements and source code are connected. Finally we conclude with a summary of these reviews and an opening to the presentation of our tool.

Code visualization tools usually allow to have graphical and exhaustive views of projects. These views can use 2D or 3D (for example [START_REF] Gregorovic | Analysis and Design of Object-oriented Software Using Multidimensional UML[END_REF] uses 2D diagrams connected in 3D and 2D diagrams overloaded with information in 3D like a city map with buildings), even in virtual reality. However, they require significant cognitive efforts (understanding the graphic representation, which is often unusual for the developers), as well as large screens or even specific equipment for VR. The advantage of this type of representation is the "macroscopic" view of projects (dependencies between packages or classes, code versioning...). The major drawback of these representations is the "off-line" aspect since they do not allow to reflect in real time the project in its current state. On the contrary, and on a "microscopic" aspect, [START_REF] De Line | Code Thumbnails: Using spatial memory to navigate source code[END_REF] can see in real time the code of a project in a simplified way and thus making it easier to navigate in it. Unfortunately, this representation is only textual and requires time to adapt to the developer.

Since class diagrams, sequence diagrams and code, share elements, IDE and modeling tools propose more and more often a "find usages" or "find in diagram" command. These commands may be triggered in two ways. The first one is by using the top toolbar menus, but it requires to select which element must be looked for. The second is via contextual menus; in that case, the element is already selected and the menu shows only information and commands about it. One of the easiest way currently implemented in MagicDraw3 is by adding an item in the elements' contextual menu. Thus right-clicking an element will bring up the menu and browsing it will allow users to open a related diagram. However this menu is yet too much complicated since it does not just show a list of diagrams but displays the full (UML) path to a related element. Figure 1 shows this menu.

This navigation is indeed based on the UML relations between elements while we have a user-centered approach. This is especially true for tools using EMF 4 , such as Papyrus, since the relations are even more complicated and less direct for the user; for instance a class inside a sequence diagram is the type of the property that the lifeline represents (e.g. In figure 1, the lifeline property has "Client" for type). This navigation action requires at least 8 clicks to switch IntelliJ meanwhile implements a similar feature: when displaying a class diagram, it is possible for users to "Jump to Source" or "Find Usage" of any subelements (attributes and methods). The advantages of IntelliJ over MagicDraw is that it is directly linked to the code representation. As a result, it is possible to quickly switch from a diagram view to the code. Two visualization modes are available. The first one is classic: the diagram is displayed on a new tab (which can be shown near another tab). The second is interesting as it creates a popup window with the diagram inside. In the popup mode, nothing can be modified, but this allows a quick preview of a diagram. Despite these two modes of visualization, the work context is broken because developers must do several actions in order to generate and see any diagrams.

IntelliJ only supports class diagrams, it is therefore not possible to create the sequence diagram of a selected method. In addition, there is no navigation between diagrams (whether class diagram to class diagram, or class diagram to sequence diagram). Figure 2 is an example of how IntelliJ shows usages of a class inside the project: an unordered list of all the occurrences of this class, without filtering options. In this example we wanted to find the class that extends Entity, the useful results are bordered in green, only 4 of 18 lines are relevant.

Reverse engineering is now widespread among IDE and modeling tools. It allows developers to create a graphical representation of their code, or part of code. All the tools proposing reverse engineering allow developers to produce class diagrams. However, sequence diagrams remain yet less common.

ObjectAid 5 is one of the tools (together with MaintainJ 6 , VisualParadigm 7 and MagicDraw) that handle sequence diagrams. Depending on the tools, there are several ways to generate a sequence diagram. All of them (except MaintainJ) use a common menu that allows developers to choose which elements they want to reverse-engineer in a sequence diagram. ObjectAid and IntelliJ (only for class diagrams) also add drag&drop support, from any location in the IDE. This Fig. 2: IntelliJ -Find Usages of "Entity" (only 4 of 18 lines are relevant) means that developers can add elements on diagrams easily, without having to browse the entire project. However, it is still up to them to choose which elements should appear or not. In VisualParadigm, developers have to navigate through four windows, when they want to "instant" reverse a method. For this, they must (1) select the source code folder and (2) find the correct class. Once they've found it, they must (3) select the method they want to reverse. This process is complicated as it takes at least twenty clicks.

At last, some tools are specialized in visualization after code execution, such as MaintainJ, which only works at runtime, and ObjectAid which can analyze Java stack-traces. These tools can therefore generate sequence diagrams that reflect the execution of a particular method, but not its complete representation (e.g. "alt" or "loop" fragments are missing). Although they can generate a lot of sequence diagrams which are interconnected, it is up to the developers to choose which one to display, and then navigate through them, using basic interactions, i.e. right click on a specific invocation to see its own sequence diagram.

Finally, among all the tools we have analyzed, none allows developers to have live diagrams that fit their current task. Some presented solutions propose to display diagrams at runtime, with information and values extracted from stack traces or execution, but this does not necessarily correspond to the active coding task. Moreover, interactions in these diagrams remain basic. Most of the navigation actions must be triggered with contextual menus and clicks on elements, and they simply allow developers to switch from one diagram to one of its sub-diagrams. In addition, some interactions can link the diagram with the code, but most of them use the "search" function. Overall, each navigation interaction forces users to choose from a list of elements, rather than automatically display elements that are relevant to their task.

VisUML is a tool composed of two parts: an IDE plugin, presented in section 4.3, and multiple visualization tools8 of two types of UML diagrams (class and sequence diagrams). These two parts are connected through our communication bus which is named WSE. This bus allows applications to send and receive information in JSON messages. Those messages can contain any kind of information, whether it comes from the IDE or from a diagram.

As previously described, we aim to help developers in their coding task. To this end, all the information displayed on the UML diagrams refers to elements currently opened in the developer's IDE. This tool does not aim to do a full synchronization between the code and the models, but focuses on the active coding task of the developers. As a result, we use a light mechanism of synchronization, using WSE as way of communication.

Figure 3 gives an overview of the interactions between the IDE and both diagrams. In this section, we present the different parts of VisUML: the class diagram view, the sequence diagram view, the IDE plugins and to conclude, a Papyrus class diagram plugin.

The first two sub-sections are split into two parts: displayed elements and interactions, in which we present the elements that our views display, as well as the interactions that are triggered from these views. The IDE plugins part presents the interactions triggered by the IDE, as well as the messages passing through WSE. Finally, the Papyrus plugin sub-section shows that VisUML visualizations also work on modeling tools.

VisUML Class Diagram view

The UML class diagram of our tool only shows the most important part of a class diagram: the classifiers (class, interface...), their attributes and operations, as well as the links (generalization, association...) between them, and the packages. According to empirical studies on UML in industry [START_REF] Lethbridge | Perceptions of Software Modeling : A Survey of Software Practitioners Table of Contents[END_REF][START_REF] Chaudron | How effective is UML modeling?: An empirical perspective on costs and benefits[END_REF][START_REF] Petre | UML in practice[END_REF], the class diagram is often used in a simple way and informally. The displayed elements and the possibilities offered by our template are thus enough for our use.

Displayed elements. Once activated, VisUML class diagram displays all the Java elements that are currently opened in the IDE. These elements can be classes, enumerations, interfaces, . . . and they may or may not be related to any other element.

In addition to these elements, VisUML also displays unopened elements that have at least one relation with an opened element. However, those elements are differentiated by their opacity, as they appear more transparent than the others.

In order to highlight the element that is active in the IDE, we change the color of the associated graphical representation to green. Moreover, any links This allows users to easily detect related elements. Figure 4 shows a class diagram with the active tab in a different color, as well as unopened related elements.

Filters. In order to allow users to limit the number of displayed elements, we added several filters to our class diagram view.

First, we added 4 visualization profiles (see part 1 of figure 5). Each profile has a different configuration, showing or not part of the diagram. Moreover, a simple button toggles the visibility of unopened related elements. This function aims to quickly switch between a diagram that matches exactly Fig. 4: Class Diagram with unopened related elements and active tab highlighted opened tabs in the IDE, and a diagram that also shows relations associated to these elements. In the same idea, another button allows to show or hide getters and setters operations in every classes. These buttons are in part 2 of figure 5.

VisUML displays two lists of elements (that are currently loaded in the tool). These lists show respectively classifiers (class, enum, interface. . . ) and packages. They are displayed in part 3 of figure 5. On each element of either list, a checkbox allows to change the visibility of the related element. So, one can simply check or uncheck any element, which allows to quickly filter elements according to their name or package.

Finally, we chose to hide some elements that do not provide useful information to developers. For example, we hide the java.lang.Object element because it is inherited by all other Java classes. In the same idea, primitives types are also hidden. In the same idea, we can hide elements according to a specific framework or language. For example, when working on an Android project, we hide some Android specific elements such as android.app.Activity. There is currently no graphical interface to add or remove elements in this list, but this can be done easily by modifying the source code of the class diagram.

Interactions. In order to make the class diagram visualization interactive, we added interactions on each displayed element. These interactions send messages on our communication bus, and those messages are then received by any connected tools. Interactions in the class diagram view (also visible on figure 3) are: Fig. 5: VisUML Filters -A click on a classifier (besides its attributes/methods) will update the IDE by putting forward this element (changing the active tab, or opening the corresponding file). -A click on an attribute or a method will switch the active tab to the associated file if needed, scroll the IDE to the definition of the chosen element and highlight or select it. Moreover, in the case of a method, the sequence diagram view will automatically be updated in order to display the selected method body. -Finally, a click on the cross (X) on the top right corner of an element will delete its graphical representation and close the associated tab on the IDE.

Handling these events allows the IDE to remain entirely synchronized with our graphical representations ("live diagram" when the developer navigates inside a diagram or interact with it. It is therefore possible to switch between the two representations (code and model) without losing the context of work (since navigation inside the diagram or the IDE also updates the other). For instance, the selected class (in the diagram) will always be the active tab in the IDE. With this visual aid, the developer does not need to look for the active element. Moreover, a clicked / selected attribute or method in the diagram will always be visible (i.e. the IDE's editor will scroll if needed) and highlighted in the code. Finally, the currently browsed method (in the code, according to the caret location) is emphasized in bold and blue.

VisUML Sequence Diagram view

In addition to the class diagram, we chose to implement a sequence diagram view, as explained in section 2. This diagram is often used to represent control flow, here the body of a method. Displayed elements. UML is often used in an informal way [START_REF] Lethbridge | Perceptions of Software Modeling : A Survey of Software Practitioners Table of Contents[END_REF][START_REF] Chaudron | How effective is UML modeling?: An empirical perspective on costs and benefits[END_REF][START_REF] Petre | UML in practice[END_REF] but we chose to create a representation as close to the code as possible. However our sequence diagram differs from the UML standard in several ways as explained below.

Fig. 6: Sequence Diagram with colored fragments and highlighted message First, our sequence diagram acts like an UML one, but with more code specific information. For example, we create an "alt" fragment for each "try" and "catch" block and we display invocation details such as parameters (types and values). Moreover, when VisUML users let their mouse on an element, a tooltip appears with all code comments associated to this element. Finally, we added a specific color code on fragments which allows developers to easily recognize the type of a specific fragment, as well as their nesting level. We chose to be closer to the code in order to reduce the cognitive integration of the model, since our goal is to help developers in their current task but not to abstract their code. Figure 6 shows an example of colored fragments.

Interactions. As explained in the previous section, visualizations allow users to interact with the displayed elements. Possible interactions on this diagram are similar to the ones implemented on the class diagram:

-A click on a lifeline (which can be created at any time during the method) will scroll the IDE directly to the associated class, or variable assignment.

-A click on a message (link between two lifelines) or an activity (block on a lifeline), which is linked to a method invocation, will scroll the IDE to the corresponding code line. -A click on a group, or fragment (alt, loop, ...), will highlight this group on the IDE (full selection of all the lines of this group).

In addition to these interactions, we added a caret listener in the IDE. As a result, when the developer moves the caret, we check if it is in the body of a method and send a message containing information about this method, as well as the line where the caret is located. This message is then received by the sequence diagram view, which automatically updates its display to show the graphical representation of this method. Moreover, since the message contains the location of the caret (the line in the code file), the sequence diagram knows what UML message (represented by links between Lifelines) is concerned and we highlight it by changing its color. Figure 6 shows an example of highlighted message (message setEntity is orange and bold).

Since the communication between the IDE and the visualizations is very fast (less than 100ms between sending and receiving a message in normal conditions), it is possible for the users to see, in real-time, the sequence diagram lights up (highlight the related message) when the cursor moves in the code. This is especially convenient when browsing methods inside a file.

VisUML IDE Plugins

The current VisUML IDE implementation refers to an IntelliJ9 plugin and an Eclipse10 one. IntelliJ is a Java IDE developed by JetBrains. Android Studio11 is based on this IDE, with specific functions for Android developers. IntelliJ uses a plugin system, allowing us to add functionality to any IntelliJ based IDE.

As mentioned, IntelliJ (as well as Eclipse) offers an API that entirely manages the interactive part of the IDE. Therefore it is possible to add listeners on any kind of event. In our case, we are mainly listening to five events: 1. A file has been opened 2. A file has been saved (or its content has been modified) 3. The user has changed the active tab 4. A tab has been closed 5. The caret has been moved Each handled event contains parameters, primarily the name of the concerned file, which allows us to make a link between the code element inside it and the file name, as well as create a representation of that element (in which we store every needed information, such as its flags, attributes, methods, relations, etc.). Once the event has been received and the element identified, the plugin sends a specific message via WSE, to give an order to the connected applications.

For events 1, 2 and 3, a "createOrUpdateUML" message is generated with all the information of the class (or several messages, if there are intern or anonymous classes in addition to the main class). These messages are then sent to WSE. Once received the UML class diagram (whether on the web page or on Papyrus) will create or update the UML graphical representations associated to this element.

The event 3 also sends a message of type "highlightClass", containing the main class of the file in foreground on the IDE; it allows to put forward its graphical representation. In this way, the active tab of the IDE will always be highlighted on the diagrams, whether via a different background coloration, a flashing border or a zooming effect. Figure 4 shows an example of highlighted element.

The event 4 creates a "remove" message (or several) with the Fully Qualified Name (FQN) 12 of the element that has been closed by the user as parameter.

Finally, the event 5 sends a "highlightMethod" message, which is filled with the active class information, the currently browsed method and the line on which the caret is. This event is triggered by following the position of the user's caret in the code.

These five events allow the IDE and the diagram views to be synchronized at any time.

Plugins for modeling tools

In addition to the visualization into web pages, we also made a Papyrus plugin that listens to the same messages as these web pages, in order to create UML class or sequence diagrams. Papyrus13 is an UML modeling tool based on Eclipse. It is developed by the Laboratory of Model Driven Engineering for Embedded Systems (LISE) which is a part of the French Alternative Energies and Atomic Energy Commission (CEA-List) 14 . Papyrus can either be used as a standalone tool or as an Eclipse plugin.

Our VisUML Papyrus plugin is still an early prototype. When connected to an IDE, the current Papyrus model shows a live representation of the opened tabs of the IDE. Several interactions have also been implemented, such as the click on a class (switchToClass message) and on an attribute or method (high-lightAttribute / highlightMethod ).

The advantages of Papyrus compared to a web page is that it implements a lot of useful features to UML diagrams, such as formal validation, exportation in various formats, easy refactoring, code generation, etc. Even if in our web pages the goal is to have live and transient diagrams, Papyrus allows users to store these diagrams and do UML operations on them.

In the same idea, we are developing a GenMyModel 15 plugin that works the same way. GenMyModel is an online UML editor that provides collaboration to its users, as well as a history mechanism. With this history, each modification is saved and can be replayed, helping users to understand the evolution of the UML model.

To sum up, VisUML is independent of IDE and modeling tools or UML visualizations. Any modeling tool with an open API and connectable to WSE (i.e. able to send and receive HTTP requests) can be connected to VisUML.

VisUML contributions and discussion

In this section we will describe what are the contributions of VisUML. At first, we will show that according to its technical implementation, VisUML is a flexible tool. Then we will point out that it is developer-centered, which is an important concept for such a tool, since we aim to ease the work of developers. With all these points, we partly answer to Chaudron's vision [START_REF] Chaudron | A Vision on a New Generation of Software Design Environments[END_REF] (e.g. "mixing formal notations with informal notations", "higher level of integration of tools"). Indeed, we use both formal and informal representations of UML models. More, we make sure that our tools are focused on one specific aspect while being connected to each other. Finally, even if there is not yet any particular gestural interaction, our tools work on tablets and can manage touch and gestural events.

Distributed and linked applications

VisUML is composed of several applications that are independent and simply connected through WSE. It is therefore easy to add an application at anytime, or even replace one by another (e.g. UML visualization can be done by the GoJS 16 web pages as well as with the Papyrus plugin. With VisUML, a developer can switch at anytime between those two visualizations). Figure 7 shows how VisUML can be used in different work contexts.

In addition, because of their technologies and implementations, these applications are able to run on any platform and OS (Java works on Windows, OS X and Linux). The web pages can even work on Android and iOS, in any web browser app. Moreover, the UML class diagram view automatically switches to a specific template when it is displayed on a smartphone (with a "small" screen). This template shows only the name of the classes, but all the links between them. A simple click (or touch) on a class display all its details.

Finally, the applications are able to run on different devices (PC, tablet and smartphone) at the same time, allowing developers to use this tool in their environment without changing their habits.

VisUML is then entirely multi-platform; developers can develop on a Mac or PC, visualize their live diagrams on the same machine with a different screen, or on their tablet or another machine. They can also have a PC with their code, a laptop with Papyrus showing their UML class diagram, and a tablet with the sequence diagram on it. Thanks to WSE, each view is synchronized and interactive. shown that some information were missing. Indeed, in the code, a developer can rapidly know if a class extends another class or not. However, if a diagram only shows opened Java classes, this kind of information will not be displayed.

In order to fix this lack of information, in addition to every opened elements, VisUML displays all their related elements (an element can be in relation with another if one extends or implements the other, or if there is an association between them), even if they are not opened. This allows the developer to easily navigate in the graphical representation without losing their context.

Simplify the use of diagrams

Another important aspect in VisUML is to reduce the number of required actions for the developers to see and navigate in their diagrams. In most of the current IDE or modeling tools, developers have to select which classes or elements they want to reverse-engineer or model, by navigation through the list of all the possible elements of the project and checking which one they want to process.

This results in a loss of the work context of the developers. They have to stop their work, take time to select what to show, and then they can resume their task. This is a big waste of time and concentration, because they changed their context and active task (cognitive overload of short-term memory), then they will have to do some cognitive work to restart their task. Moreover, if afterwards they realize that they forgot some elements, they will have to redo all the process, which will result in another waste of time, as well as a discouragement to build UML diagrams.

With VisUML however, we want to reduce to a minimum this waste of time and the consequences. Once developers started the plugin, everything is done automatically, without any actions from them. Obviously, developers must do some actions in their code (or IDE), for example open, edit or close a file, but nothing specific to VisUML. They just have to work as usual with new live diagrams views of the code on the desired screens and devices. If they want to see an element, they just have to open it. If they open an element A that extends another element B, then B will be shown (with lower opacity), and a simple click on B will open the corresponding code in the IDE. Therefore, in addition to easily navigate between UML diagrams and the corresponding code, VisUML adds a new and efficient way of navigation inside UML diagrams; indeed, a simple click on a method in the class diagram will update the sequence diagram to display the representation of this method.

Discussion

In this section, we discuss some of the side effects of VisUML, as well as improvements that can be made to this tool in order to makes it even more efficient.

Malleable environment

Our first goal with VisUML is to adapt to the current work environment of developers. Instead of making a new IDE or modeling application, we created plugins that work with commonly used IDEs. This reduce the changes needed to adopt the tool and so ease its use.

In addition, we aim to add flexibility to the environment by separating features in multiple applications that share data to each others. With VisUML, most of the data come from the code and are transmitted through our communication bus (WSE). Any compatible application can connected to WSE to listen data and send actions if needed. This On-The-Go principle allows users to configure their work environment as they wish. Moreover, there is no limit on how many devices or applications can connect to WSE. It is possible to be in any kind of configuration. For example, a user could have VisUML views and code, another Papyrus and VisUML sequence diagram view. A third could use only its IDE while sending data to others. Then a fourth could use a tablet with GenMyModel.

On another hand, UML diagrams are not only used by developers. They are commonly used in firms by multiple peoples, all of them doing specific actions. We previously describe "profiles" in the class diagram view. The profiles we defined are developers oriented, but we thought about job oriented profiles. According to its job, a user could see only a part of a diagram, add extra information such as code quality, or even implementation of specific view, like Android layouts or SQLite databases.

As explained in section 4.4, in addition to web pages, VisUML views are also available as a plugin for Papyrus (and soon GenMyModel). This allows developers to benefit from the modeler features (e.g. save, UML validation, XMI export, code generation...) without having to create the model and diagrams, as they are generated by VisUML. This aspect validates one of our goals, which was to adapt to the developers environments by implementing live diagrams on modeling tools.

Evolutions

Because our goal is to display information about the active task and not to ensure a complete synchronization, we did not add model to code transformation even if it would be easy to do it. This would allow a bidirectional modification between the model and the code, which would increase the efficiency of VisUML by reducing the number of switches between code and model.

In the same idea, many refactoring interactions are considered (some of them currently tested in a prototype) in both the class and sequence diagrams. For example, messages (links) in a sequence diagram could be moved, which implies a reorganization of the invocations order (code refactoring), as well as their belonging to a fragment or not. In the same idea, a simple deletion of the graphical representation of a link or a group could delete their corresponding element in the code. Likewise in the class diagram, developers could be able to move elements in or out packages.

Finally we also thought about adding new listeners on the IDE. For example, listeners on the code execution would enable information of debugging (breakpoints, execution errors, ...) to be displayed on diagrams. In the same idea, listeners on the syntax errors or code errors (shown in the IDE) could also be displayed on a sequence diagram (e.g. an incorrect type or a private method called in a wrong context would be highlighted).

Conclusion

In this paper we presented VisUML, a tool that helps developers in their coding and debugging tasks. We explained the current limitations of visualizations tools and the contributions provided by VisUML.

Whether it is to understand a project or to find interesting classes, developers spend their time looking for files, classes or methods. These subtasks disrupt developers concentration, as they force them to switch from one activity (e.g. write code) to another (e.g. find an element) and thus it breaks their context of work and overload their short-term memory. Indeed, most of the time, developers look at the code editor part of their IDE. However in order to find files they must look at menus, sub-menus and other windows, which is not efficient and results in a waste of time.

UML could help them to quickly understand a project architecture and its elements relations, since graphical representations of the code are more efficient for developers to understand all the existing relationships than text. However, modeling tools and UML itself are not generally used, or used in an informal way. Nowadays tools allow developers to reverse-engineer the entire project, which results for instance in a unreadable UML class diagram. It is also possible to create a class diagram using a subset of the project, but this requires a lot of interactions and time for developers, as they have to select which files should be considered.

Finally, we show that with our tool, developers could be able to access a view displaying live diagrams of their projects. These diagrams are designed to be easy to read as they only use information provided by the developers IDE.

We focused on two UML diagrams for the moment, but we do consider extending this set to other UML diagrams, such as Activity diagram (work in progress) or Object diagram. In the same idea, since our tool is not a modeling tool, we decided to use UML diagrams informally, and add extra information on them. For example, we thought about Android activities representations, using the XML layout, as well as the intents to build links between those activities. This would really be helpful for Android developers to be able to see their views and the links between them in a simple interface, without having to navigate through different files (activities and layouts files).

On the other hand, improving the visual representation of our diagrams would be interesting, but these changes are slightly outside the main domain of our work, which are interaction and navigation for the developers. Indeed, another thesis in the team [START_REF] El Ahmar | Enhancing the communication value of UML models with graphical layers[END_REF], and in collaboration with CEA LIST, works on UML representations and semiology of graphics, which is complementary to this work.

Fig. 1 :

 1 Fig. 1: MagicDraw -Class diagram: "Usage In" feature requires 8 clicks

Fig. 3 :

 3 Fig. 3: Navigation interactions and resulting actions

-

  Packages only: Display only packages, without any classifier inside -Classes: Display classes, without attributes or operations -Public&Protected elements: Display classes, with only public and protected attributes or methods. Private fields are hidden. -All details: Default profile. Display everything.

Fig. 7 :

 7 Fig. 7: Examples of VisUML contexts of work

VisUML website : http://these.mickaelduruisseau.fr/VisUML/

VisUML demonstration video : https://youtu.be/buyGojmbUpQ

MagicDraw: http://www.nomagic.com/products/magicdraw.html

Eclipse Modeling Framework: https://eclipse.org/modeling/emf/

ObjectAid: http://www.objectaid.com/sequence-diagram

MaintainJ: http://maintainj.com/

VisualParadigm: https://www.visual-paradigm.com/

As of today, VisUML visualization tools are available on web pages, Papyrus and GenMyModel plugins.

IntelliJ: https://www.jetbrains.com/idea/

Eclipse: https://eclipse.org/

Android Studio: https://developer.android.com/studio/index.html

A FQN is an unambiguous name that specifies an object (e.g. com.myapp.model.Client).

Papyrus: https://eclipse.org/papyrus/

CEA LIST: http://www-list.cea.fr/

GenMyModel: https://www.genmymodel.com/