An algorithm based on the ability of TEO to track the changes in the envelope of ECG signal is proposed for identifying PVCs in ECG. Teager energy is calculated from DCT coefficients of ECG signal. This method can be considered as computationally efficient algorithm when compared with the well-known DCT cepstrum technique. EPE is derived from the teager energy of DCT coefficients in DCT-TEO method and from the cepstrum of DCT coefficients in the existing method. EPE determines the decay rate of the action potential of ECG beat and provides sufficient information to identify the PVC beats in ECG data. EPEs obtained by DCT-TEO and existing DCT cepstrum models are compared. The proposed algorithm has resulted in performance measures like sensitivity of 98–100%, positive predictivity of 100%, and detection error rate of 0.03%, when tested on MIT-BIH database signals consisting of PVC and normal beats. Result analysis reveals that the DCT-TEO algorithm worked well in clear identification of PVCs from normal beats compared to the existing algorithm, even in the presence of artifacts like baseline wander, PLI, and noise with SNR of up to −5 dB. SA node fires electrical impulses at regular intervals that travel through the conduction pathways of cardiac musculature . Only thDCT is a trigonometric transformation method , having x[n] for n = 0 … N − 1, with equal number of samples around R-peak, N point DCT is given asXc(k) represent the DCT coefficients or weights and the constant ck isx[n] can be interpreted as the convolution of action potential e[n] and excitatory function h[n] in time domain equal multiplication of their corresponding DFTs Ec[k] and Hc[k] in frequency domain, expressed by the following equations:Discrete cosine transform (DCT) can linearly transform the data in time domain to the frequency domain by a set of DCT coefficients . DCT repuations: in  timeiltering . Cepstrux[n] be a discrete time signal whose energy E is computed asx[n] is given asfs = 400 Hz is exhibiting the same energy of 4.09e + 005 units. But according to Kaiser, energy required to generate a sine wave varies as a function of both amplitude and frequency from the study of second order differential equation which motivated him to derive Teager energy operator (TEO). TEO concept implies that the energy required to generate a signal is directly proportional to the frequency of the signal. It was observed that the energy required to generate a 50 Hz signal is 7.9 units and energy required to generate a low frequency signal is 1.5 units using TEO from example illustrated in Energy of a signal is distributed in the frequency band of the signal. One way of defining the energy of a signal is to consider the squared absolute value of the Fourier transform of the given signal. Let x(t) is the generated ECG signal with respect to time, m is the mass of the heart, and k is a constant. Solution of the differential equation is the rhythmic heart beat given asA is the amplitude with initial phase φ.TEO concept was derived from the solution of a second order differential equation which describes the functioning of a nonlinear signal. TEO model is used to extract the instantaneous energy of the source that generated the signal. ECG signal is generated from SA node due to the depolarization and repolarization of atria and ventricles in the cardiac muscles of the heart. As per Kaiser it can be represented by a second order differential equationx[n] is the generated ECG signal in discrete domain represented asΩ is the digital frequency in radians/sample given asf is the analog frequency, fs is the sampling frequency, and Φ is the initial phase. Ω, f, and Φ are the three unknown parameters for which the solution is given by Kaiser using three samples x[n], x[n − 1], and x[n + 1]. The energy at any given instant of time n is given asΩ to be positive and less than one quarter of the sampling frequency for which the approximation error is less than 11%. TEO is defined from the above concept as the squared product of instantaneous amplitude and corresponding frequency.Similarly (1)x[n], that is, Xc[k].Compute DCT coefficients of the ECG signal (2)Xc[k], Xc[k − 1], and Xc[k + 1].Consider three samples: (3)Estimate the energy of DCT coefficients using TEO from the expression in  .(4)Calculate the decay rate defined as the number of DCT coefficients in which 90% of the energy is packed.(5)Compare the decay rates of both DCT-cepstrum technique and DCT-TEO model.(6)Identify the PVC beats from normal beats of ECG record.ECG signal can be considered as modulation of action potential  generated from the SA node with the excitation generated in the cardiac muscles. Teager energy evaluated for an ECG signal corresponds to the energy of the action potential generated by the SA node in the heart. It can be observed that TEO can be used to track the modulation energy (envelope) and identify the amplitude and frequency at any instant of time. SA node fires the impulses at a rate of 60–100 beats/min for a healthy person, where, as if SA node fails, its function is taken up by pacemaker cells which fires the impulses at a lower rate of 40–60 beats/min. Energy measured by TEO model reflects the disturbances in the impulse generation and conduction path. Keeping in view that TEO is sensitive to noise, TEO is applied on DCT coefficients of ECG beat, as DCT improves the signal to noise ratio. The algorithm for estimation of the envelope using TEO is given below.The proposed method is tested on the ECG data records and compared with the existing method of DCT-cepstrum. Envelopes extracted from DCT coefficients using nonlinear Teager energy operator for a PVC beat and normal beat with the proposed method are shown in Figures εi is considered as a quantitative measure to identify PVC beats. Energy is packed in first i DCT coefficients, as DCT brings all the high frequency energy components nearer to the origin. Energy εi being packed in the ith coefficient is calculated asεi = 0.9 is considered as distinguishing factor for arrhythmia beats and normal beats. EPE computed with the proposed DCT-TEO method differs for PVC beat and normal beat as shown in It can be seen that the envelope of PVC beat decays at a faster rate due to the wider QRS complexes in time domain compared to normal beats. Only first 150 coefficients can be considered for further analysis since the DCT coefficients decay to zero beyond 150 samples. Energy packing efficiency (EPE) denoted by The proposed method is compared with the estimation of envelope using DCT-cepstrum which requires more logic than the DCT-TEO method. In the DCT-cepstrum technique, cepstral analysis of DCT coefficients was used to identify the PVCs. Cepstrum can be decomposed into system and excitatory functions using cepstral filtering. Envelopes extracted using both the models are shown in εi = 0.9 is reached within the first 10–15 coefficients for a PVC beat and exceeds 34–48 coefficients for a normal beat. In case of proposed DCT-TEO method, εi = 0.9 is reached within 5–11 coefficients for a PVC beat whereas it exceeds 29–39 coefficients for a normal beat after which the energy decays to zero. TEO is able to identify the PVC beat with few DCT coefficients whereas DCT-cepstrum model is identifying the PVC beat with more number of DCT coefficients which imply that more computations are required by DCT-cepstrum model than DCT-TEO model in the PVC beat identification. The number of DCT coefficients, which represent 90% of the energy (εi = 0.9) are identified by computing equation  or right bundle branch block (RBBB). In LBBB right ventricle depolarizes prior to left ventricle resulting in splitted QRS complex with the second half of the complex being wider than the first due to lack of synchronization between left and right ventricles. Paced beat obtained at the right ventricle is the same as PVC of LBBB morphology and at the left ventricle is equal to the PVC of RBBB morphology. Envelope obtained for paced beats as shown in TEO has an attractive feature of following the instantaneous changes occurring in the energy of nonlinear signals which motivated us to use this operator for the analysis of nonlinear ECG data. So an attempt has been made to use TEO for extracting the energy of the envelope of ECG using just only three samples to identify PVCs from normal beats based on the decay rate of the envelope of DCT coefficients. DCT has the important characteristic of expressing the signal as sum of cosine (even) functions with different frequencies and concentrating the energy in only a few low frequency components nearer to the origin. So initially the ECG beat is transformed to frequency domain using DCT. Envelope of the ECG beat is obtained from the DCT coefficients using nonlinear Teager energy operator and compared with a known technique of cepstral filtering . The env


In this study we present a highly versatile and easily configurable system for measuring plant electrophysiological parameters and ionic flow rates, connected to a computer-controlled highly accurate positioning device. The modular software used allows easy customizable configurations for the measurement of electrophysiological parameters. Both the operational tests and the experiments already performed have been fully successful and rendered a low noise and highly stable signal. Assembly, programming and configuration examples are discussed.The system is a powerful technique that not only gives precise measuring of plant electrophysiological status, but also allows easy development of ad hoc configurations that are not constrained to plant studies.•We developed a highly modular system for electrophysiology measurements that can be used either in organs or cells and performs either steady or dynamic intra- and extracellular measurements that takes advantage of the easiness of visual object-oriented programming.•High precision accuracy in data acquisition under electrical noisy environments that allows it to run even in a laboratory close to electrical equipment that produce electrical noise.•The system makes an improvement of the currently used systems for monitoring and controlling high precision measurements and micromanipulation systems providing an open and customizable environment for multiple experimental needs. The system consists of different modules: mechanical, electrical, optical and digital. The control center is programmed using Labview object-oriented programming software  to control both the signal acquisition and the micromanipulator movement.The mechanical part of the system consists of an inverted microscope (Nikon Eclipse TE2000), a couple of positioning micromanipulators ; one holds the reference electrode and the other holds the measuring electrode The second micromanipulator is coupled to a hydraulically driven high precision micromanipulator (Nikon/Narishige MO-188). The knobs of this micromanipulator corresponding to the x and y axis are coupled to a custom-made retainer that is fixed to the axis of a stepper motor  which is electronically controlled by a P70530 stepper driver, connected to a UMI 772 distribution board which in turn is connected to a PCI 7330 dual axis motion controller . Detailed characteristics of the steeper motors can be found in the Additional Information section.The signal acquisition system consists in a WPI FO223a amplifier  connected to a PCI 6220 A/D-D/A acquisition board . Both the PCI7330 and PCI 6220 are plugged to a PC computer running windows. Different combinations of operating system and Labview software can be used although in our first development the system was running under Windows XP second edition and Labview 8.6, but we have made successful tests under windows 7 and Labview 11, which shows both the adaptability and compatibility of the system. An exhaustive list of operating system and Labview versions can be seen in A schematic representation of all the connections is displayed in The system was originally programmed using National Instruments Labview 8.6 software running on a Windows XP operating system, but this is not the only possible working environment, since, as stated above, it can run under several combinations of operating systems and Labview versions (for example. Windows 7 and Labview 11). The core of the programming can be seen in ® file just by dragging and dropping the text file into it. The data files can as well be managed in Mathlab® or other calculation and statistic packages.One of the most important considerations when designing the acquisition software was to take into account that the data could be saved for further calculations and processing. Thus, a data saving module was implemented in a routine that runs before and together with the acquisition process. This routine creates an ASCII tabulator separated text file that can be easily transferred to a Microsoft ExcelPrior to measurements, the system had to be checked both for mechanical and electrical precision, stability and performance.The mechanical benchmark yielded a precision of positioning up to of 1 μm with a very high repeatability (less than 0.5% error) using the combination of the hydraulic micromanipulator and stepper motors as listed in the above sections. An exhaustive list of the stepper motors characteristics can be seen in 1.The presence of parasitic noise resulting from earth lines. This issue was solved by plugging the system into two different Uninterrupted Power Supply (UPS) devices. Each UPS unit was plugged into a different power line. The acquisition board and the voltage amplifier were connected to the same UPS while the computer, the stepper motor controller and the stepper motor power supply were connected to a different UPS, thus isolating the earth lines from each other.2.The power line regional configuration. This issue is related to the coupling of the AC electrical phase with the acquisition frequency of the board. Both frequencies have to be in phase to ensure that each measurement or set of measurements are taken at the same level of the sinusoidal wave of the main power voltage to prevent the formation of a parasitic wave pattern. In our case, the best combination, as suggested by the hardware and software manufacturer, was to fix the board frequency to a multiplier of the mains frequency .3.−1). It is worth to remark that it is important to select a good compromise between performance and number of data acquired when developing a new application in order to reduce the number of data without losing accuracy. In fact the acquisition card is not actually slow; it can handle frequencies up to 10,000 Hz. However, working at such high rates, the signal appears with much noise. It is more desirable to work at high frequencies and to average a determinate number of raw data such as 500 or 1000 samples to try to cancel random fluctuations This strategy yields a speed of 20–10 measures per second, allowing a time resolution of 0.05–0.1 s. Any other combination of frequency and averaging can yield better signal-to-noise ratio maintaining the high sampling rates. Since we are working with glass electrodes and not with metallic ones, this speed is good enough for our purposes and limits the quantity of data written in the files, and concomitantly decreases the need of having to process a huge amount of data generated in long-term experiments. With an accurate selection of frequency, averaging and isolation, this device can handle a temporal resolution up to 0.01 s. Of course, using faster AD/DA cards with higher resolution, faster acquisition rates could be achieved, but this will lead to the neurophysiology ranges rather than the plant electrophysiology which is our concern.The third issue was due to the presence of several spikes in the recorded signal generated by devices connected to the general power line of the laboratory . It had to be removed by adjusting both the working frequency of the board and the number of samples taken in each cycle to avoid coupling with the parasitic currents generated by the laboratory hardware, that revealed quasi cyclic. In our case, the best combination was a cycling of 3000 samples per second and 200 samples per cycle, which rendered a sampling capacity of 1.5 samples per second. Although this sampling speed may seem rather low for determinate purposes it is fast enough for most measurements. Moreover, this is not the only combination that can be achieved and several other combinations yielded a faster and equally stable reading . An example of this procedure can be seen in next section. As a result that only data acquisition is involved, the signal acquisition rate can be very fast as described above. This method is suitable for measuring changes in membrane polarization which often appear within short time after treatment has been applied. Anyway, it has to be taken into account that when changing the bathing solution a disturbance is produced. This is a common issue that can be treated in different ways but the discussion is far away from the purposes of this publication. This disturbance, as can be seen in -Vibrating mode. In this mode, readings are taken at two positions in order to measure de gradient generated by the ionic flux across the membrane. Perhaps the word “vibrating” can induce to confusion due to the fact that the common idea of vibration corresponds to a fast change of the tip position which is not the case of ion flux measurements. Unfortunately, in this mode measurements cannot be as fast as in the precedent configuration since the electrode has to reach a steady state, which takes a while; but also the traveling of the tip between the two measuring positions takes its own time to be done. In this case, as in any vibrating electrode, the speed of the readings is considerably reduced if compared with the above configuration. One possible solution could be using two electrodes put at the far and near positions and measuring them at the same time. In this case, each electrode has to be calibrated independently and probably with this system faster measurements could be achieved leading to a further improvement of the technique.The two main configurations used by our system are continuous direct voltage monitoring, and Ionic flow estimation. The two main configurations are described below and can be summarized as follows:The system configuration for membrane potential measurements is a combination of x-axis movement and single channel acquisition voltage. As a measuring electrode, a microcapillary filled with 0.2 M KCl with a tip 1–3 μm in diameter was used. As reference electrode, a broad tipped capillary filled with 0.2 M KCl in phytoagar  was used A, left.2, pH = 6.8 under aeration). After 3 days, seedlings were fixed with BluTack® to a Petri dish cover (5.5 cm diameter) and a bathing solution with the same composition as the growing solution was added. The mounting was put on an inverted microscope stage and the electrodes were immersed in the bathing solution as seen in Wheat seedlings germinated on phytoagar (0.8%) were transferred to a growing solution .Ion flux is calculated using calibration results J: Net flux of the ion (mol m−2 s−1).c: Ion's free concentration (mol m−3).u: Mobility of the ion (m s−1 N mol−1).F: Faraday's constant .Nernst slope: Slope determined by the calibration procedure.V: Electric potential difference between the two positions of the microelectrode (volts).dx: Distance of the tip at the closest position (m).x: Distance between the two measuring positions (m).dr: Radius of the measured object (m).In our case, we adopted a similar procedure as in the Woods Hole system For calculating the dV at each interval, a modification of the method from Newman In this configuration, only the first positioning of the microelectrode tip and the bathing solution change has to be done by hand, while the rest of the experiment is automatically conducted by the system’s program which is displayed in Unlike in the previous experiment, the concentration of a determined ion is being measured by using a specific ionophore loaded into the microcapillary tip , the measuring program was started as described in the methods section. + concentration is higher at the distal than at the proximal position of the microelectrode tip  and from anthropic origin . Since any conductor is a potential antenna capable of picking up EM radiation and convert it into an electrical signal, good care has to be taken to prevent parasitic noise, such as shortening electrical connections, shielding any conducting wires and isolating earth lines as much as possible. One of the most used implementations for EMI is the Faraday’s cage This work was supported by the Spanish MICINN (Projects BFU2013-42839-R).Ana Rodrigo-Moreno. PhD fellowship from Ministerio de Ciencia e Innovación (BES-2008–005096).Simone Rankl stage in Barcelona has been funded by COST Action FA1103.Benet Gunsé has developed, programmed and tested the system and is in charge of its maintenance and evolution. Charlotte Poschenrieder and Juan Barceló introduced the idea of constructing this system in the framework of the projects that are carried out in the laboratory. Ana Rodrigo-Moreno has implemented the ion fluxes measurement technique and made her PhD thesis under supervision of Dr. Poschenrieder and Dr. Gunsé by using this installation among different other techniques. Simone Rankl used the system during her two stages in our lab and introduced the use of membrane potential measurements that are being carried out with the system described here under supervision of Dr. Poschenrieder and. Dr. Gunsé and under the direction of Dr. Peter Schroeder.


An approach to the knowledge representation extraction from biomedical signals analysis concerning motor activity of Parkinson disease patients is proposed in this paper. This is done utilizing accelerometers attached to their body as well as exploiting video image of their hand movements. Experiments are carried out employing artificial neural networks and support vector machine to the recognition of characteristic motor activity disorders in patients. Obtained results indicate that it is possible to interpret some selected patient’s body movements with a sufficiently high effectiveness. Investigating biomedical signals may be treated as decomposing of knowledge into small entities of knowledge, called granules. Zadeh informal definition of granulation involves “decomposition of whole into parts” Zadeh . Pawlak PD belongs to the group of neurodegenerative diseases. It is a slowly progressing, degenerative disease of the central nervous system that is usually associated with disturbed dopamine production by the nervous cells of the brain. The disease manifests itself with movement disturbances. The cause of such disturbances has not yet been fully elucidated. The treatment of patients with PD is mainly based on minimizing the effects of symptoms. PD develops slowly and may last for many years. At its initial stage it is difficult to detect. It is crucial that once the disease is diagnosed, its fast development is restrained. Noticing changes in patient’s condition in a matter of short time is hard, especially that there are no fully objective tests that would allow for the assessment of its stage. The main symptoms of PD are associated with limitations in patient’s motor activity such as involuntary slowing of movements, bradykinesia, disturbances of gait including freezing of gait (FOG), disturbances of balance resulting in falls, problems with coordination of movements, resting effort tremor  and other neurodegenerative diseases progression and optimizing patients’ quality of life”) . Hand movement tests are included in the UPDRS examination. Automatic performance of such tests is an alternative to testing hand motor function with the use of gloves containing, for example, grip sensors or accelerometers . The experiment included 33 patients , average illness duration time was 9 (SD ± 5) years including both men and women in approximately the same number. The patient was supposed to perform a series of movements simulating everyday activities. The sequences of the performed movements and the recording were carried out in controlled conditions to make it possible to ascribe particular labels of movements to the signals at the stage of initial processing. Since PD is an asymmetrical disease, most of these symptoms were assessed separately for both right and left body sides.Each of the patients performed the following activities: walking in straight line with a turn, lifting an object with the left, right and both hands, lifting the left, right and both hands, sitting and getting up from a chair, lying down and getting up from bed, standing, sitting and lying. Each of the above was performed in a sequence of dynamic and static activity. For example, gait sequence was recorded in the following sequence: standing in place, walking with a turn and stopping. Each sequence of movement was repeated three times. During the recording of acceleration signals we also recorded the video image synchronized with the acceleration signals. Video records allowed for precise tagging of the beginning and end of each of movement categories.microSD cards integrated with the recording devices. During the tests we used the devices produced by Shimmer . The presence of the constant component for this axis is associated with the orientation of the accelerometers, which had been located in the following way: axis x—vertically, y—horizontally and perpendicular to the chest, axis z—vertically and parallel to the chest.On signal diagrams pertaining to the The analysis of acceleration signals is usually carried out after signal parameterization is performed  and low for static activities (e.g. sitting). The mean value of the acceleration signal can be counted in the following way:Standard deviation represents the range of signal variability:m4(x(n)) represents the fourth central moment.Another parameter—kurtosis was determined in order to establish the dynamics of changes in acceleration signal:The crest factor is a ratio of the maximum signal value to the RMS value. It describes the impulsiveness of the signal:i = 1…5, j = 1…5 represent the numbers of acceleration sensors and l = {x, y, z}, m = {x, y, z} are the axes of accelerometers. The correlation coefficient between the sensors was calculated for i ≠ j and l = m, correlation coefficients between axes of accelerometers for i = j and l ≠ m.In order to describe the relation between the movement of particular limbs and the body, a correlation coefficient was calculated corresponding to the same axes of accelerometers located on different body parts. As a result, 30 coefficients were obtained for five sensors. Additionally, a correlation coefficient was determined between each pair of axes of the same accelerometer, which completed the description of the movement by the relation of a temporary location of the sensor. The correlation coefficient was calculated using the following formula:A(k) is k-th amplitude spectrum line of the acceleration signal, K denotes the total number of spectrum lines.The complexity of movement was described with the use of the signal spectrum energy expressed in the following formula:p(k) represents the probability of A(k) value occurrence in the amplitude spectrum of the acceleration signal. Low value of entropy indicates the periodicity of the analyzed signal.The evaluation of periodicity is described by the entropy:The classification of acceleration signal was carried out using two independent classifiers designed for the recognition of the gait category and hand movement. The classifiers involved artificial neural networks (ANN) and the support vector machine (SVM) Vapnik . Due to y = {y1, y2, …, yd}, where yє{−1,1}. The classification is based on the assumption that it is possible to separate the sets of parameter vectors x = {x1, x2,…, xd} belonging to the Rn space into two subsets U1 and U2, using a linear function f(x) expressed by the following formula  separating the set of parameters is called a hyperplane. The training of the classifier involves finding a hyperplane separating two parameter sets with preserving of the largest possible margin, where the established hyperplane is counted as f(x) = 0, and the margin as f(x) = −1 and f(x) = +1. The highest value of the margin is achieved if the value of (9) is minimal and the assumptions described in formulas x, y} є Ux parameters from the Rn space to the Rm, space, where m > n. It is presupposed that after the transformation to the space of a higher dimension, i.e. the feature space, the sets will be separable and it will be possible to separate them using a linear function. Once the Φ, function mapping the parameters to the feature space has been taken into account, the function describing the hyperplane will take on the following form (12):φ(x) represents the mapping function. Just as in the case of separable data using a linear function, for the training of non-linear classifier the highest value of the margin between the hyperplanes f(x) = −1 and f(x) = +1 is determined. Once the mapping function has been included, the conditions which allow for the highest value of the margin can be determined in the following formula x parametφ(x) introduces an additional complexity into the calculations. In order to avoid the necessity of knowing the mapping function the so-called kernel trick can be used, which is described by the following formula  denotes the kernel function, and φ(x) and φ(z) the mapping functions. Thanks to relation . Decisions made by this classifier can be used by the algorithms assessing, for example, FOG . Since it was necessary to include the possibility of gait recognition (UPDRS29—“Gait”) with the use of a various number of sensors, a various number of parameters was fed to the input. Table nin is the number of neurons in the input layer, and nout in the number of neurons in the output layer.The neural network used had one hidden layer. The number of neurons in the input layer was dependent on the number of accelerometers used for the classification  and γ cost parameters selection were applied. Initially, we established fixed values of parameters C = 62.5 and γ = 0.5, regardless of the number of acceleration sensors that were used. The values of parameters were selected experimentally. In the second attempt, in order to find the parameters ensuring the best effectiveness of classification, we used the grid-search method available in the OpenCV library. This method is based on dividing the area of searching with a conventional net and then using for data calculations two parameters which change in every iteration. Finally, a pair of parameters C and γ, is chosen, which provides the best accuracy of recognition (Weka system). It should be pointed out that it is extremely crucial to find such a pair of parameters C and γ, so that the classifier recognizes unknown data in the most efficient way. At the second attempt values of parameters C and γ were obtained depending on the number of accelerometers that were used.For the training of the classifier based on the SVM method two different approaches to , all of which are supposed to distinguish one of the classes from the remaining ones. During the recognition of movement, the vector of the parameters is fed to the input of numerous classifiers, and the final decision as regards the assigning to a particular class is made on the basis of the certainty of the decision made by a classifier. If several classifiers make a decision that a vector belongs to a class recognized by them, finally the class for which the decision of the highest estimated probability has been made will be selected. The probability of decision making is calculated on the basis of the SVM model and the necessary implementation is available within the libSVM library . In the leave-one-out method the classifiers were trained in the following way: the training set contained parameters corresponding to movement activities performed by n−1 people, where n is the number of all patients, while the testing set contained the parameters for one person. The values of effectiveness presented in Tables Below are the results showing the effectiveness of movement activity recognition according to the algorithm of classification used and the testing method. Each algorithm was testes with the use of the cross-validation algorithm and the leave-one-out method  can be obtained with the use of the SVM classifier and analyzing the signals recorded by three accelerometers .Tables leave-one-out method shows that it is the neural network that has the best capability to generalize .Based on a comparison of results it can be observed that in the case of cross-validation Table  the bestAs the data in Tables This section describes a device called a VTP, which is based on hand image analysis. It is still being tested and has not yet been used in clinical studies.Recently, more and more study groups have been working on finding possible solutions that would allow for automatic assessment of hand motor activity in patients with PD  to be fastened to patient’s fingers or palm. Such systems are not comfortable and their use may cause problems for patients with advanced PD. Thus, methods that do not involve sensors are used as well. They are predominantly based on the analysis of hand image recorded by a video camera during test performance. Such a solution was used in the study by the MSD, GUT. The hardware layer of the system includes a computer and an Internet video camera on a specially-designed stand. The camera must be located in such a way that it can record the image of a hand placed parallel do the surface of a table/desk. Figure The algorithms of image processing were implemented with the use of the OpenCV library. The processing of the image involves seizing the picture form the video camera, recognizing hand gestures and producing results describing the movement. Image processing consists of two main steps: hand detection from the image and gesture recognition. The tests are conducted with the use of a specially-designed application which prompts how a given test should be performed and shows the results. Figure Hand detection is based on the algorithms of background removal and contour detection based on the captured video. The algorithm of background removal is based on a static model of a scene, which is built at the so-called algorithm initialization stage requiring 50 video frames. The background model is a set of two values representing each of the image pixels, i.e. the mean pixel value designated from the initializing images and the averaged differences between the same pixels in successive frames. A given pixel is considered a foreground object, if the value of its intensity exceeds the range of the defined model. Once the background is removed, we obtain a binary mask representing the foreground. The unusual location of a video camera results in a shadow, which adds to the image with removed background. This makes hand detection more difficult. Thus, it is then necessary to apply the algorithm of shadow removal. The implementation involved using a typical algorithm based on image thresholding in YCrCb colour space, where the comparison is conducted by analyzing the background pixels and objects from the foreground . Once the shadow is removed, a morphological operation of closing is carried out on the image mask, thanks to which any defects are eliminated from the image. Finally, the algorithm of contour recognition designates a hand contour. When the picture is being analyzed, it is presupposed that the image of the hand should have a surface of at least 5000 pixels.one-versus-all method. Three independent classifiers were established. Each of them was supposed to recognize different gestures depending on the type of UPDRS test in which it was used. The designed classifiers distinguished the following types of gestures: adjoining fingers/separated fingers , since at this stage of the study only healthy subjects with no disturbances of motor function were tested. The application does not provide assessment in the UPDRS scale but records objective parameters allowing the doctor to interpret them. The result of each of the tests was presented in a form of a diagram showing the interrelation between a particular gesture and time, as well as a table with a number of gestures performed during the test, mean number of gestures performed in one second and time taken for each gesture.As presented in this paper, owing to the analysis of biomedical signals and Internet video camera images, it was possible to monitor movement activity of patients with PD. The results obtained in experiments show that it is possible to identify motor activity of a PD patients based on the analysis of the acceleration signals. The high effectiveness and scalability of the described approach makes it practically feasible for a 24-h monitoring of patients. They may also constitute a basis for designing algorithm of a higher level, for example, for the analysis of PD symptoms such as FOG or slowness of hand movement. In the future, the algorithms based on video image analysis should allow for the creation of more objective parameters of patients’ evaluation that will be based on the results of the proposed tests.


The efficacy of scarce drugs for many infectious diseases is threatened by the emergence and spread of resistance. Multiple studies show that available drugs should be used in a socially optimal way to contain drug resistance. This paper studies the tradeoff between risk of drug resistance and operational costs when using multiple drugs for a specific disease. Using a model for disease transmission and resistance spread, we show that treatment with multiple drugs, on a population level, results in better resistance-related health outcomes, but more interestingly, the marginal benefit decreases as the number of drugs used increases. We compare this benefit with the corresponding change in procurement and safety stock holding costs that result from higher drug variety in the supply chain. Using a large-scale simulation based on malaria transmission dynamics, we show that disease prevalence seems to be a less important factor when deciding the optimal width of drug assortment, compared to the duration of one episode of the disease and the price of the drug(s) used. Our analysis shows that under a wide variety of scenarios for disease prevalence and drug cost, it is optimal to simultaneously deploy multiple drugs in the population. If the drug price is high, large volume purchasing discounts are available, and disease prevalence is high, it may be optimal to use only one drug. Our model lends insights to policy makers into the socially optimal size of drug assortment for a given context. •We study the issue of socially optimal width of drug assortment for an infectious disease.•We study the tradeoff between risk of drug resistance and operational costs.•Treatment with multiple drugs results in better resistance related health outcomes.•The marginal benefit decreases as the number of drugs used increases.•We compare this benefit with the change in procurement and holding costs. Volume discounts are a common practice in the pharmaceutical sector, implying that using more types of drugs for the same disease would result in a higher per unit price for the sourced drugs. Also, when demand is uncertain, wider drug variety for a specific disease implies higher safety stocks and therefore higher inventory holding costs. On the other hand, when all patients are treated with the same drug, there is a demand variability pooling effect that allows one to hold less safety stock in order to achieve the same customer (patient) service level (probability of stock-out during replenishment). For a given number of sourced treatments, increased drug variety leads to higher cost of procuring the drugs, increased inventory holding costs and in some cases may lead to increased healthcare worker training costs. This paper studies the tradeoff between risk of drug resistance and operational costs when using multiple drugs for a specific disease.In this paper, we quantify the benefit of delayed resistance and disease containment associated with drug variety and compare it against the cost of higher variety in the supply chain. Our model lends insights to policy makers into the socially optimal size of the drug assortment. The rest of the paper is organized as follows: in section 2The field of pharmacoeconomics is concerned with optimal drug use. Issues of cost effectiveness are increasingly being placed alongside issues of clinical effectiveness in determining the desirability of introducing new drugs, especially given the rapid growth in drug expenditures combined with the ever increasing pressure to control healthcare expenditure Most of the literature that currently exists on the subject of antibiotic resistance is largely within the biological and medical science literature; optimal drug use has been addressed within an economic context by only a few researchers. Among the most notable papers that have dealt with the economic considerations surrounding biological resistance have been those of Laxminarayan In the epidemiology literature, a number of papers have shown that using a variety of drugs in a population has better drug-resistance outcomes than using a single drug. A key question in such studies has been to determine how multiple drugs should be deployed, whether as (1) combination therapy, (2) cycling the drugs on a fixed schedule, (3) cycling on an adaptive schedule, or (4) distributing all drugs simultaneously (“mixing”). The earliest attempt, known to us, that considered the deployment of multiple antimalarial drugs in a population was a simple mathematical model described by 3While treatment homogeneity is valued by health policy experts and limited drug choice has many operational advantages, such a policy may be undesirable when drug resistance is endogenous. In this paper we consider the case of infectious diseases that are curable by some drug or therapy. Selection pressure imposed by the use of any single drug sooner or later leads to the evolution of resistance to that drug. Two social externalities inherently characterize the treatment of infectious diseases. On the one positive side, treatment cures the patient, thereby preventing the disease from being transmitted to other individuals. On the negative side, drug treatment selects in favor of mutations that confer drug resistance, increasing the likelihood that the drug will be less effective in the future. The individual patient fails to consider either of these externalities when deciding whether or not to receive a treatment.3.1A simple disease transmission model that includes compartments for susceptible, infected with resistant strain or drug-susceptible strain, can be used to understand how drug variety impacts resistance and disease burden. A basic model for a single drug, two and three drugs is presented in n used to treat the disease. The reason why is that the system of equations needed to describe the dynamics of the disease and to derive the analytical expressions of interest changes with the number of available drugs. We therefore proceed with building a simulation model and rely on numerical solution of such an ODE system to approximate the functions of interest, under various disease settings.It is not possible to derive an analytical expression of disease prevalence and total resistance as a function of the number of drugs In order to incorporate more epidemiological realism into the analysis, we employ the malaria transmission model described by We calibrated the model to four endemicity scenarios, with equilibrium prevalences set to 0.1% (very low), 0.5% (low), 5.0% (moderate), 25% (high). Equilibrium prevalences are obtained by determining the prevalence at endemic equilibrium when 50% of the population is treated with an effective drug, in the absence of resistance evolution. Because our calculated prevalences are not age-specific, they do not have an exact correspondence to the classical epidemiological classifications of malaria as hypoendemic, mesoendemic, hyperendemic, or holoendemic.3.2For assessing the resistance burden under each scenario and therefore quantifying the cost associated with it, disability-adjusted life years (DALYs) are used In our context, we do not consider different death rates between infected population with a susceptible strain and infected with a strain resistant to a drug. Therefore disease and resistance burden are captured through the differences under each treatment scenario of disease prevalence and of treatment failures due to resistance emergence and spread.PR) is defined as the total fraction of the population that is infected with any type of strain. Let n be the number of drugs employed simultaneously in the population, W denote the fraction of the population that is infected with a susceptible strain and Xk the fraction of the population that is infected with a strain resistant to drug or drug combination k. Then prevalence at a fixed time t is given by:T is the set of all subsets of n. We define total resistance (TR) at a given time t as:gi is the fraction of all infected individuals that are infected with a strain resistant to exactly i drugs. Total resistance is a number between zero and one, and it is the probability that, a randomly chosen parasite would be resistant to a randomly chosen drug. Let fi be the fraction of patients treated with drug i, i = 1,2,…,n. The Number of Treatment Failures (NTF) due to resistance are given by the expression:Prevalence (DB) up to time t  is given by the expression:D is the average time of being sick when the patient receives no treatment or the treatment fails and S is a weight factor that reflects the severity of the disease into consideration. Note that the units of the disease burden are DALYs lost. By defining V as the value of one lost year of “healthy” life, usually mentioned in the literature as the value of a life year (VLY), we can define the Cost of Disease Burden: CDB = DALYs ·V.Therefore, Disease Burden  and the burden due to the individuals not receiving treatment at all (“untreated burden”). The impact of drug resistance is captured through the cumulative number of treatment failures up to time Resistance Burden. Simulation results for all endemicity settings, suggest that the NTF, evaluated at time t = 5, t = 10, t = 15 and t = 20, is decreasing exponentially with the number of available drugs. In all cases, for fixed t, n . By fitting the simulation results, as shown in b0 > 0 and b1 < 0.Untreated burden. For given t, simulation results of cumulative prevalence of the disease suggest that it is a monotonically decreasing and convex function in n. Thus, cumulative prevalence can be well approximated well by rational function of nR2 - is higher than 0.96 in all cases) and therefore we have evidence that:βi  are constants that depend on both the point in time when cumulative prevalence is evaluated and the endemicity setting.n and consequently total disease burden decreases with drug variety. On the other hand, a wider drug assortment has cost implications on the supply chain; this is the topic of the next section.Both resistance burden and disease prevalence are monotonically decreasing functions in 4In this section we argue that for a given service level the number of available drugs determines the procurement costs and also safety stock holding costs. More specifically, we show that for a fixed number of procured treatments, higher drug variety leads to an increase in purchasing and holding costs. When we incorporate the effect of a wider drug assortment on disease prevalence and resistance containment, which determine the quantity of treatments needed in future periods, higher drug variety does not necessarily lead to an increase in purchasing and holding costs.We begin by modeling procurement and safety stock holding costs for one period under the assumption that demand and procured quantity is exogenous and fixed. We define a period as the time interval during which there is only one procurement opportunity. Then, we consider the multi-period case, where we incorporate the effect of number of drugs employed on future demand for treatments. While the disease transmission model is a continuous time model, operational costs are incurred per period (i.e. a cycle), in discrete time. The following schematic figure shows the correspondence :4.1Volume discounts based on the total quantity purchased over a given period are common in many industries, especially in business-to-business transactions. In the pharmaceutical sector, volume discounts are a common practice while in some cases national systems require price reductions if volume exceeds target levels i as a decreasing function of the quantity purchased qi per period of time, i.e. ci(qi) = c0−kqi, where c0 and k are positive constants and c0 > kQ, where Q is the total quantity procured per period for treatments for a specific disease in a locus. Denoting by n the number of available drugs for the same disease, total procurement cost per period (PC) is defined by: Fi denotes the fixed transaction cost per period for retaining a relationship with a supplier and Considering all unit quantity discounts, we model the unit price of a drug 4.2Ensuring high product availability is of crucial importance in the health sector. In the presence of supply and demand variability, safety inventory is carried to satisfy any demand that exceeds the forecasted needs. Raising the level of safety inventory though comes at a cost; it increases inventory holding costs and the risk of product obsolescence, since shelf lives of drugs are often quite short.Demand volatility for each drug increases with drug variety because demand for each drug depends not only on the real population need for treatment but also on other factors like patients' changing tastes or promotional efforts of pharmaceutical companies. Forecasting accuracy decreases with higher drug variety, as a result of lower demand aggregation. It is more difficult to forecast the demand for each individual drug than forecasting the need for treatments in total for a certain disease. For any product, the narrower the assortment, the higher is the pooling of the demand variability and the lower the total safety inventory required, when the customer service level is above 50% ; p.318. D and variance σ2, available drugs n are used in equal proportions and there is no demand correlation for drugs. The directional effects described by our model and the insights we get do not depend on these assumptions. In this case, the demand per period for each drug i follows the normal distribution; n, is: F−1 is the inverse of the standard normal distribution, σL is the total demand standard deviation during the lead time and CSL the target service level (probability of stockout during the replenishment period) Total safety inventory holding cost per period is h is the holding cost per period and n. Also, For the sake of simplicity, we assume that total demand for a given period is normally distributed with mean Observation 1. Supply chain cost, defined as the sum of procurement and safety stock holding cost, is a monotonically increasing concave function in the number of drugs employed simultaneously in the population for a given time period, when demand and procured quantity can be regarded as exogenous.Proof:n we get:By taking the first and second derivatives with respect to n. By defining supply chain cost SC(n) as the sum of procurement and holding cost, we have: dSC(n)/dn > 0 and d2SC(n)/dn2 < 0. Supply chain cost, is an increasing concave function in n, as the sum of two monotonically increasing concave functions. Note that the definition of PC′(n) and HC′(n) holds for n > 0, as the procurement and holding costs functions, as defined in our model, are discontinuous at n = 0. Assuming n is continuous random variable, as we move from n = 0 to n = 0 + ε we treat from 0 a constant number of patients Q. In our analysis, we are focusing on the issue of the optimal number of drugs employed to treat a disease, and not on whether the disease should be treated or not.Thus, both procurement and holding cost are monotonically increasing, strictly concave functions in 4.3In this section, we consider a multi-period setting where demand for treatment in future periods depends on the width of drug assortment employed in a given period. As before, we compare the benefits of delayed and slower resistance evolution from a wider drug assortment with operational costs, but the demand in future periods (or quantity of treatments procured) is not exogenous or fixed but depends on the decisions on drug variety made in each time period.t∗, can be expressed as:β0,β1,β2,β3 are such that:b0 > 0, b1 < 0. The above expression is a monotonically decreasing convex function on n, as the weighted sum of two decreasing convex functions.Simulation results suggest that disease burden, for a given τ is:According to our definition, disease burden for a period τ as an increasing function of disease prevalence in period τ−1and the total procured quantity in period τ, Qτ, as an increasing function of demand of the same period. We have: Dτ = H(PRτ−1(n)), Qτ = G(Dτ) and τ∗ the number of periods within t∗, total procurement cost is given by:n identical drugs in terms of cost parameters and usage. It is straightforward to see that fixed costs go up as n increases. Variable costs though, may either increase or decrease as n increases. The total number of sourced treatments over time decreases nWe model the total demand for treatments in period τ∗ periods is given by the expression:τ of all drugs employed. It is reasonable to assume that standard deviation of demand during lead time is proportional to the mean demand of the same period (i.e. constant coefficient of variation). We therefore define γ > 0. We note that as the number of available drugs increases, both n as Dτ is a decreasing function of n. Therefore, depending on the specific parameters, safety stock holding costs may increase or decrease as drug variety becomes wider.The total safety stock holding cost for Observation 2. When demand is endogenous and the procured quantity of treatments per period is based on the level of disease transmission and resistance evolution dynamics, supply chain cost is not necessarily increasing on the number of available drugs.It follows directly from the analysis above that while fixed procurement cost and the per unit price of the sourced treatments increases, the total quantity to be procured decreases as drug variety becomes wider due to the benefit of disease and resistance containment. Regarding safety stock, smaller drug variety on one hand favors demand variability pooling but on the other hand increases demand and thus its variability during the lead time. We note that the total relevant cost function, defined as the sum of disease burden and supply chain cost, may not be unimodal in the number of drugs employed simultaneously.We show that for a given time horizon mixed treatment policies with multiple drugs result in a better health outcome when factoring in disease burden and resistance evolution. More interestingly this additional benefit is decreasing as the number of available drugs increases. Increasing drug variety may come at an operational cost though, increased procurement and holding costs. Thus, for certain range of disease transmission and cost parameters a clear trade-off will exist when deciding about the width of drug assortment; there is a point beyond which the additional health benefit and the corresponding decrease in quantity of treatments will not compensate for the increased operational costs from higher drug variety. Policy makers in resource limited settings need to explicitly consider this trade-off to achieve sustainable health outcomes over a longer time horizon. In the next section we conduct extensive numerical analysis to explore the endemicity settings, drug prices and volume discount parameters where this trade-off is most important to consider.5t = 15 years. We use the international disability weight for malariaWe begin our numerical analysis for a base population of one million and for μ/4, where μ is the average demand per period. The probability of a drug stock-out during the lead time is set to 5% and an annual inventory holding cost of 15% is assumed. For an average drug price of $10 and a volume discount of 1% for 100,000 units, the total procurement cost is calculated. The fixed cost of ordering per supplier per period is set to $1000. The safety stock needed to absorb fluctuations in supply and demand is calculated using standard deviation of demand during the lead time equal to n, the cost of disease burden decreases significantly in the number of drugs employed simultaneously due to the benefit of resistance containment and the decrease in disease prevalence. After a point though, it remains quite flat. This is because the marginal health benefit of an additional drug is heavily decreasing as the width of variety increases, as seen in n increases is lower than the rate of disease burden decrease because higher variety leads to higher unit cost per sourced treatment and higher fixed costs. In accordance with the analysis in Section n increases, at a flat rate, but its magnitude is small compared to the other two cost components.We observe that the total cost function, after the point where it reaches its minimum, remains quite flat as the number of drugs increases. As expected, for low values of t = 15, n when the price of the drug is high, when there are high volume discounts and when the fixed cost per supplier is very large.From the analysis in Section n increases because the potential gains from volume discounts are decreasing. In the presence of very high fixed cost per sourced drug, procurement cost increases when the drug variety is large and n is increasing. For high values of n, the fixed costs, which increase linearly in n, dominate the additional benefit of sourcing less treatments (which is decreasing as n increases). As expected, when the price of the drug is high , procurement cost is the main driver of total cost. Similar behavior is observed for the other three endemicity settings, while these effects become more pronounced the longer the time horizon considered. For expositional purposes, we present also the analogous results for high endemicity setting . This trend is reversed as the number of  setting .The appropriate time horizon to be considered depends on the disease under consideration and the expected time to the development of next-generation drugs. All other things equal, we study the effect of the chosen time horizon on the optimal number of drugs to employ. For the base case described above, t = 10 years.  on the optimal number of drugs. 0 years. .n remains similar under all endemicity settings. Disease prevalence seems to be a less important factor when deciding about the width of drug assortment compared to the disease duration. The only exception is when both the price of the drug and the volume discount offered are very high. The results show that in such a case, in the high endemicity scenario, it may even be optimal to employ only one drug. This is not the case under any other lower endemicity scenario.The results of the analysis are very similar under all four endemicity scenarios; in some cases the number of optimal drugs to be employed simultaneously is slightly higher in higher endemicity settings. Even if this may seem counterintuitive, it results from the fact that the shape of the disease burden curve as a function of the number of drugs For low and medium drug prices, the duration of disease when there is no treatment or the treatment is ineffective, is a significant factor determining the optimal number of drugs. When the average price of the drug is as small as $1, supply chain costs are of secondary importance. Especially when the severity of the disease is high and endemicity is high, it is optimal to employ simultaneously all available drugs. On the other hand, in the examples where the drug price is $100, the optimal number of drugs depends less on the severity of the disease and it even remains unchanged in the medium endemicity setting. In such cases, procurement cost is the main driver of total cost; a wider variety contains procurement costs, up to a point, through the more effective disease containment that results in less sourced treatments in total.Volume price discounts have an effect on the optimal number of drugs in the extreme case of high endemicity, high drug price and high discount. The results show that when the price of the drug is as high as $100, high volume discounts  may reduce the optimal number of drugs from 5 to 1 when disease endemicity is high. The magnitude of the discount mainly determines the shape of the procurement cost function see  and 6.n, for the case where the disease duration is 15 days (n in this case is 4) and the case where volume discount per 100,000 is reduced to 1% . We observe that for high discount, the total cost behavior is similar when both the disease duration is 15 and 30 days: total cost function has two local minima. The crucial difference is that for lower disease duration, even if total cost decreases for 2 < n < 4, its global minimum is attained at n = 1. When the disease severity is higher (i.e. disease duration is 30 days) the local minimum at n = 4 is also global minimum. On the contrary, when volume discount is lower, procurement cost, the main driver of total cost, is convex in n: monotonically decreases up to n = 5 and then starts increasing.We further explore this result - that it is optimal to employ only one drug - by studying the cost breakdown structure, as a function of  15 days . We comp6Drug efficacy is a public good that is threatened by the emergence and spread of resistance. Available drugs for the treatment of curable diseases should be used in a socially optimal way, explicitly considering the negative externalities associated with use. Various studies have argued that when more than one drug is employed in a population at any given time, the emergence and spread of drug resistance is delayed. In this paper, we compare the benefits of resistance and disease containment that may result from using a wider drug assortment in a given population with the corresponding increases in operational costs such as procurement and inventory holding costs. We employ a simple general disease transmission model that allows for treatment with more than one drug to estimate the disease burden and cost of resistance. We proceed by building a simulation model in order to numerically approximate disease prevalence and total resistance, the two main components of disease burden, as a function of the number of drugs employed simultaneously. We show that disease burden (as defined in this paper) decreases with the number of drugs used. On the other hand, for a given level of demand and procured quantity, higher drug variety results in increased procurement cost when volume discounts are present, and in increased safety stock holding cost, when demand is uncertain. Drug variety at a given time also impacts future demand because of disease expansion and resistance evolution. When this effect of drug variety on future demand is considered, then higher drug variety does not necessarily lead to monotonically increasing procurement and safety stock holding cost.Large scale numerical analysis shows that when the severity of the disease is high and the average price of the drugs is as small as $1, it is optimal to simultaneously employ all available drugs. In such cases supply chain related costs are very small as compared to the disease burden related costs and it is always better to use more drugs. This insight suggests that countries in sub-Saharan Africa with high malaria burden should consider incorporating as many available malaria medicines in their treatment guidelines and not worry about the higher supply chain costs resulting from using a wider assortment of drugs.Only in some select instances when the disease endemicity is high, the drugs are expensive (>$100), and manufacturers offer significant volume purchasing discounts it would be optimal to use only one or very few of the available drugs. Infectious diseases with expensive drugs and high endemicity include HIV/AIDS and MDR-TB but the disease transmission and resistance development model used in this paper does not directly apply to those diseases.In all cases, the optimal width of drug assortment decreases with the cost of the drugs. When drugs are cheaper it is optimal to use most or all of the available drugs. For cheaper drugs, the optimal variety increases with the disease duration. When drugs are cheap the cost of disease burden is the main driver of total cost and disease duration is an important component of the disease burden. For more expensive drugs and/or when higher volume discounts are available, the duration of the disease is of lesser importance. The main reason is that the most significant component of total cost in this case is the cost of procuring the drugs. Variable procurement cost may decrease with variety because the number of sourced treatments is reduced. On the contrary, the unit price and the fixed cost dealing with each supplier increase with the number of drugs employed simultaneously. Thus, when the additional health benefit of variety is small (around 5 drugs in our examples) another drug is not justified; it leads to an increased unit price and additional fixed costs not compensated with the decrease in the number of treatments sourced.The numerical analysis also shows that compared to the duration of the disease and the price of the drugs, disease endemicity appears to be a less important factor in determining the optimal width of drug assortment. This implies that for a given disease e.g. malaria the optimal drug assortment will be the same or at least very similar across countries with varying levels of endemicity. This greatly simplifies the social planner's problem and implies that each country's optimal assortment problem does not need to be solved individually.The model has several limitations. We assume that the diseases considered do not influence the patients' death rate and thus they do not affect population dynamics. This may not be the case for some infectious diseases with a very high associated mortality. Furthermore, overall demand for drugs for some disease may be affected by the assortment of drugs available. For given prevalence that determines the size of the market (an upper bound of demand), wider drug variety may lead to an increase of treatment seeking, according to consumer theory. An interesting extension and a topic of further research would be to incorporate the effect of drug assortment on the fraction of the patients that seek treatment.Procurement cost is often not a linear function of quantity as is modeled in this paper. Hence, when this analysis is applied to a specific situation, we need to be aware what part of the procurement–cost curve we are working with. For example, at a national level, volume discounting may have a negligible effect if a country decides to purchase three million instead of two million doses of a drug. Similarly, supranational pooled purchasing arrangements may eliminate some of the volume discount effects.In this paper we assume that all available drugs are used in equal proportions. However, it remains unclear what treatment guidelines to healthcare providers can achieve this equal and uniform use of multiple drugs. In addition, we need to be able to determine if moderate deviations from a uniform distribution of drugs have small or large effects on procurement costs, holding costs, and disease burden. Boni et al. Finally, in many situations the number of drugs available to treat a disease is very limited to start with. For instance, a country managing its antimalarial supply would realistically only consider the simultaneous use of at most two or three drugs, given various logistical challenges and the fact that only certain antimalarials (artemisinin-combination therapies) are the most likely ones to be used due to their high cure rates. The analysis conducted in this paper may appear less relevant for such settings today but has high relevance for policy makers as they think about future drug assortments.


Intestinal microbiota plays an important role in the human health. It is involved in the digestion and protects the host against external pathogens. Examination of the intestinal microbiome interactions is required for understanding of the community influence on host health. Studies of the microbiome can provide insight on methods of improving health, including specific clinical procedures for individual microbial community composition modification and microbiota correction by colonizing with new bacterial species or dietary changes.In this work we report an agent-based model of interactions between two bacterial species and between species and the gut. The model is based on reactions describing bacterial fermentation of polysaccharides to acetate and propionate and fermentation of acetate to butyrate. Antibiotic treatment was chosen as disturbance factor and used to investigate stability of the system. System recovery after antibiotic treatment was analyzed as dependence on quantity of feedback interactions inside the community, therapy duration and amount of antibiotics. Bacterial species are known to mutate and acquire resistance to the antibiotics. The ability to mutate was considered to be a stochastic process, under this suggestion ratio of sensitive to resistant bacteria was calculated during antibiotic therapy and recovery.The model confirms a hypothesis of feedbacks mechanisms necessity for providing functionality and stability of the system after disturbance. High fraction of bacterial community was shown to mutate during antibiotic treatment, though sensitive strains could become dominating after recovery. The recovery of sensitive strains is explained by fitness cost of the resistance. The model demonstrates not only quantitative dynamics of bacterial species, but also gives an ability to observe the emergent spatial structure and its alteration, depending on various feedback mechanisms. Visual version of the model shows that spatial structure is a key factor, which helps bacteria to survive and to adapt to changed environmental conditions. The gut microbiota is a complex system of various microorganisms, e.g. bacteria, archaea, viruses, which interact to each other and the host. About 100 trillion microbial cells inhabit our gut, altogether they encode numerous unique enzymes needed for digestion (eupepsy) . IntestiThere are many studies focused on the investigation of the composition and function of the gut microbiota –9. Most Various types of microorganisms do not exist independently in the microbial community, but rather form a complex ecological interaction network –15. Intein vivo, whereas computer models allow to test any hypothesis based on known facts. Theoretical computer models are used to hypothesize and test major principles and to visualize the processes, which are impossible to observe.Computer modeling is frequently used for testing scientific hypothesis on interactions between agents –24. It pSome of the most popular models for complex systems are differential equations based and agent-based models. Differential equations based models are defined by ordinary differential equations (ODE) and often used in theoretical modeling focused on studying interactions between bacteria –26. AgenWe have constructed a simplified model of intestinal microbiota using an ABM approach. The model describes host-bacterial interactions and agents are presented by: two bacterial species, metabolites and a gut. A bacterial interaction scheme in presented model was based on short-chained fatty acids (SCFAs) metabolism as key controlling process. Levels of SCFAs in the gut are implicitly associated with obesity and overweigh . The hypFirst step was to produce a stable system. Real biological self-regulating systems include feedbacks as necessary mechanisms for stability and flexibility –39. We hWhile it was possible to construct a stable system based on feedbacks, it was even more challenging to to study how this system woul respond to perturbation. It is known that such self-regulating systems are resilient to external influence, which can be random, periodic or programmed  has two stages. The first stage is a network definition. This step includes choosing objects and specifying interactions between them. The second stage is describing model dynamics.10. In the same study kinetic equations corresponding the scheme were provided, which made possible to calculate reaction velocity and Michaelis constants , nutritional metabolites , toxins and an immobilized object gut (object container). Each member of any class is the "agent" and has its own behavior pattern. Agents of class Bacteria, are active and have an ability to choose next action. Agents of class Metabolite are passive, move along the gut and, in the end, are excreted or absorbed by gut wall. The gut interacts with active agents by excreting metabolites (toxins and polysaccharides) thus controlling their abundance and directly influences the metabolites’ flux.Life cycle and development of bacteria in the gut is affected by many parameters of the environment, including microbiota composition. In the model bacterium behavior depends on substances conversion reaction rate constants, the rate of nutrients uptake by intestine, the rate of metabolites flux, and the amount of given objects (metabolites and bacteria). Also, bacteria are characterized by a set of parameters, which define their movement and survival .A scheme describing behavior of the bacteria was developed. Bacteria searches for food, moves, converts substrate into appropriate metabolites, divides and dies. Action of the bacterium at the next moment is determined by its current state, local environment and random processes. Each action requires certain amount of time  are set for all object types . Every bacterium begins the cycle from one of the states in lifecycle, i.e. they can be producing metabolites, searching nutrients, dividing or dying.The initial parameters are described in In the basic version of the model combination of initial parameters and behavior rules did not lead to finding the "steady state" of the system. System was set to run multiple times with various intial conditions. Here by "steady state" we mean a state of the system, characterized by maintaining constant and not zero average number of bacterial agents of each type over the prolonged course of time. The initial set up of the model does not have regulating mechanisms, so it can not support balance in the system. Therefore this step became a validation of correctness of the model.It is well known that feedbacks are required mechanisms for self-regulating systems. The feedbacks provide the systems’ sensitivity to signals (noise filtering), optimal performance (use of resources), stability/multistability and resistance to environmental changes. Driven by the presence/absence of feedbacks and their types, positive or negative, different types of interactions emerge in the system: mutualism, commensalism, competition, amensalism and parasitism –60. The Following modification of the initial system have been considered (bellow we define “feedback” as “FB”):FB1: Bacteria of type 2 produce toxins which lead to bacteria type 2 death later on, bacteria of type 1 consume these toxins  thereforFB2: Bacteria of type 2 produces toxins inhibiting growth of type 1, thus controlling its abundance, i.e. if bacteria of type 1 is dominant, type 2 produces toxins . These tBacterial interactions:FB3: Toxins are of the same type as in the toxin-antitoxin system. The amount of produced toxins corresponds to a difference between abundances of two bacterial types .FB4: Toxins are of the same type as in the toxin-antitoxin system. The amount of the produced toxins depends on difference of SCFA concentrations. This type of feedback increases response time of the system to the bacterial abundance variation compared to FB3.FB5, FB6: Gut produces toxins of a different type, which are harmful to one bacterial type. Amount of toxins corresponds to number (concentration) of absorbed SCFA produced by this bacterial type: that is propionate for bacteria of type 1, butyrate for bacteria of type 2 .FB7: Gut produces polysaccharides degraded only by bacterial type 1, depending on butyrate concentration . There iAbundance of bacterial colony is regulated by toxins/nutrient production of the gut mucus as response to absorption of SCFAs , bacterial abundance or total SCFA concentration in the gut:Further systems containing single feedbacks from the above list were constructed. The general behavior of the system is determined not only by the presence of specific communication mechanisms, but also by sensitivity and by the time it takes system to respond. We observe following dependencies:The average number of bacteria depends on reaction constantsThe period and amplitude of the oscillations depend on the sensitivity of feedbacks.The model parameters were selected for the model in the following way:The dominant links remained to be from SCFA metabolism pathwayAll the other links (feedbacks) could cause a noticeable change in the quantitative dynamics of bacteria.Each feedback type is defined by set of parameters: reaction constant or threshold of sensitivity (Methods). The program was run 3 times for each feedback type for each hypothetical value, in total 210 times. Using above described criterion parameters for each additional mechanism were chosen. We have also taken into account the average number of bacteria and period and amplitude of oscillation. These three parameters do not influence general trends in the system behavior however alter the calculation time. Chosen parameters presented in The results of the experiments with feedbacks were compared with those of basic model and classified according to their impact on the system . In the During the system behavior research, for each combination the model was run 588 times (14*14*43): three replicates for each set of initial quantities of bacteria (from 200 to 3000 with increment of 200). The overall number of tests was 16464, which took around 24 hours of computation on a 6 node cluster. The system with a single feedback can have only one stable state. When the system has multiple feedbacks, their combination may lead to the existence of two stable states . For exaInterestingly, visualized version of the model showed that feedbacks also affect the spatial distribution of bacteria. For example, addition of mutualistic bacterial interactions leads to a strong mixing of the two species . In caseIn general, the force of FB mechanisms determines distance between peaks of stable states. The program was run several times with same initial parameters (numbers of bacteria and feedback parameters) and different results were acquired. The basic spatial distribution of bacteria at initial time is random and we suggest that the final system state depends on initial spatial distribution of bacteria.Antibiotics are one of the most powerful agents of perturbations in gut microbial ecology to date . An effeAntibiotic treatment course in our model is defined by following parameters: antibiotic dose (k_ant_intake [mmol/hours]), frequency (per day) and period (AntibiticPeriod [days]) of intake. The model output is almost the same for different values of antibiotic dose, which is quite expected. The most part of antibiotics is moving along the gut lumen while the large part of bacteria end to occupy place near gut wall during treatment. Thus, small change  of antibiotic dose do not lead to significant change of bacterial abundance during treatment . CompariIt is known that bacteria can be sensitive or resistant to the antibiotics. We added new parameter for bacterial sensitivity in the model. The bacterial sensitivity was defined by a certain threshold, which equals to a quantity of the drug lethal for the bacterium. According to the model, antibiotic molecules get into a bacterium by diffusion and after its death of antibiotics dissolve into the gut. Thus, there are four cases:Both bacterial type are sensitiveBacterial type 1 is more sensitive than bacterial type 2 Bacterial type 2 is more sensitive than bacterial type 1 Both bacterial types are resistant.We examined system behavior and stability in first three cases while the fourth obviously will not show any influence of antibiotic treatment.Here and further stability is defined as an ability of the system to keep the functional properties after an impact of an external perturbation.As follows from the previous point, relationship between components regulates not only density of the community, but also forms its spatial structure. Interestingly, model shows spatial factor influence on stability: in a dense population structure sensitive species could be hidden from drug access by resistant , this situation is only possible when bacteria have tight feedback connection. Antibiotics mostly affect the bacteria in an intestinal lumen and only a small dose of "drug" reaches bacterial layer near gut epithelium. There are no differences in system behavior between cases 2 and 3 when bacterial spatial organization is intermixed. If bacteria are separated into layers, in case 3 this spatial structure didn't change, but in case 2 bacteria of type 2 suffer from antibiotics and are forced to live mixed up with bacterial type 1.The most interesting situations are when both bacterial species are sensitive to the antibiotics, then the differences in a "steady state" recovery processes are observed. Also new steady states can be established after recovery. These processes are dependent on different mechanisms of interactions and different sensitivity to the antibiotic. We clearly observed two cases:During antibiotic treatment the numbers for both species decrease to the similar level . BacteriBacteria are separated into bacterial layers and Type 1 is less affected by antibiotics, than type 2 . SpatialModel was run 3 times for each schema of bacterial interactions. The recovery time was defined as difference between the end of antibiotic course and the time, then number of bacteria equals 80% of these before treatment. After that, recovery time was averaged over all runs with the same number of feedbacks . To estiDemand of bacteria in each other was found to depend on quantity and types of feedbacks. Strong coherence of bacterial types helps system to keep a steady state. An initial state recovery occurs simultaneous for both bacterial types because their interactions promote maintenance of their population. Steady state recovery time in system decreases  for systSystems with weak feedback interconnectivity between species show different pattern: the fast-growing type recovers faster and promotes recovery of the other. After continuous antibiotics treatment the community becomes almost completely extinct with only a small part of the bacterial population left in a mucin layer, where access of drugs is restricted.Existence of antibiotics in an organism creates the conditions contributing to selection of bacteria with mutations leading to antibiotic resistance. Bacteria possessing antibiotic resistance have both advantages and disadvantages. They are protected from drug influence, yet, for example, they have to spend energy on production of proteins protecting against drugs like efflux pumps–this type of bacterial expenditures are called fitness cost .To introduce the antibiotic resistance mutation in the model the following assumptions were made:Since intracellular mechanisms are not defined in the model, retardation of substances transformation processes was chosen as fitness cost: bacteria has to distribute energy between a production of proteins, necessary for resistance, and proteins, necessary for nutrient interconversion, consequently, if the bacterium spends more time for food, it divides less often. We introduce the retardation constant Rc and divide the rate of nutrients transformation by Rc.We introduce the probability of resistance mutation as function depending on antibiotic concentration in the intestine and Rc.Depending on a ratio of the parameters connected with advantages and disadvantages of resistance we obtained three structural variants of the bacterial community after recovery:Class 1. High mutation probability, low fitness-cost  and bacterial spatial distribution . These two parameters are defined by interactions network.For example, base interactions network with FB №7 is set. The most of the type 2 bacteria are located in the gut lumen and top layer of mucin, whereas the most of the type 1 bacteria are located in mucin layer. Both bacterial types have two nutrient sources. In this case proportion of resistant is higher in bacterial type 1.To compare our observations with real world data we have used profiles of microbiota compositions in from four major studies of nation wide microbiota, these data sets were recalculated by same approach in study of Russian micorbiome , additioWe presented each sample as a graph containing all complimentary relationships between all members of community . Such a The issue of modeling complex biological systems requires a balance between the simplicity of the model and its ability to demonstrate non-linear effects. The object of the study–microbiome–was represented by minimal number of agents: gut wall, metabolites and bacteria. Using only two bacterial types allowed to keep the model simple and build complex interactions inside the community. The basic interaction in the microbiome is metabolic interconversion and one of the essential processes of SCFA biosynthesis was incorporated in the model. While the model itself does not pretend to simulate physiology of the gut and digestion, the physical and chemical parameters were chosen according to real world data.Agent based modeling was selected to keep the model as simple as possible on the stage of model description. The algorithm of decision making itself was built upon rational thinking and according to general observations in microbiology, the parameters of the algorithm could be varied in a wide range.The robustness of the system is supported by number of feedback loops discussed in literature. To our knowledge this is the first attempt to model the gut microbiota using the ABM. The aim of the ABM modeling is to capture emergent properties of the system built with simple components and simple properties.We have shown the emergent properties of the system in three different domains:steady state and bimodal distribution in the normal gut.recovery processes after antibiotic usage and shifts of community composition.antibiotic resistance spread and fixation inside the community.The robustness of the system is acquired through feedback loops and even in the case of bacteria with profound capabilities of metabolizing the energy rich nutrients the bacteria has no chance for robustness unless it has a set up of numerous feedback loops. This observation is connected with two intriguing facts in intestinal microbiota studies–transient flora and inflammation induced bacterial pathogenesis. Observation in our model could be applied to both.The transience of probiotic components is well known –66 and iThe other aspect of robustness shown in the model is a bistable distribution—this aspect has not been predicted by initial setup and is indeed an emergent property of the model proposed. Interestingly the bistability that is shown in the two stable ratios between bacterial types. This could be interpreted as a variety of stable compositions in real world microbiota and could have a direct connection to observed enterotypes . In the The model for system perturbation was antibiotic treatment. There are numerous reports on the effects of antibiotic treatment and animal experimental models. Most reports show distinct diversity drop after antibiotic treatment . In the Peculiar is the result on dynamics and spatial distribution acquired in the series of experiments. It was possible to model the spatial inhomogenity caused by antibiotic treatment , this in18. We hypothesize that this could be an emergent effect of the community where population dynamics could be dependent on the number of feedbacks and as the model shows the population can be organized into spatial structures. The crude calculation of community graph properties also support the idea that antibiotic resistance could be supported by more interconnected community, i.e. that microbiomes in China and Russia could be depleted from species with low feedback connectivity with others.Modeling the whole amount of microbial interactions could lead to explanation of the results acquired by next-generation sequencing profiling–it is clearly shown that some of the bacteria are more probable to be extinct after course of antibiotic treatment while others are prone to antibiotics . It is sAntibiotic resistance acquisition modeling allowed us to speculate on the resistance rise and clearance. While most of the results were predictable and proportion of the resistant bacteria was the function of the treatment period. Antibiotic resistance was observed after the end of administration. Interestingly in the longer administration periods persistent antibiotic resistance appeared, resistant strains were observed long after the end of the administration. The modeled situation of persistent resistance, however the fitness cost, is explained by spatial factors. Resistant strains occupy the distinct areas of the gut and do not let more faster growing bacteria without resistance displace them. In part this could be due to the constant flow rate in the model, however this also allows to hypothesize the niche explanation. Although the fitness cost should lead to diminishing the number of resistant bacteria, niches could exist where resistant bacteria take over during the treatment and hinder sensitive bacteria from taking over no matter the fitness advantage. This is a good point to be experimentally tested, so far antibiotic resistance is averaged for the whole gut, but technologies will emerge to scan multiple niches at ease.in vivo observations on resistance spread and provides insights on the niche hypothesis.To conclude the study presents a simple model with a simple metabolic circuit. All the parameters of the model have a certain relation to realty. The system effect of layering and bistability after introduction of feedback loops is observed and antibiotic treatment is studied as a perturbation. System stability is shown to depend on spatial factors and community structure. Finally problem of resistance was modeled, the model parameters allow for observations connected to 5 ticks). For observation over system behavior the program was started on the personal computer. Statistical processing of the output data was carried out with using a software environment "R" (https://www.r-project.org/).The model is constructed by means of object-oriented programming in the Java language. Multiple start of the program for receiving data files was made on a high-performance computing (HPC) clusters , we calculate the absorption rates of nutrients in the intestines and speed along it for each "piece" of nutrient in the gut. From Eqs We do the assumption that the components passing near intestines walls cling to them and has speed smaller in comparison with food speed in the intestinal lumen. Thus, components of intestines move with a speed corresponding to some power law depending on location concerning the center of a gut.D–diameter of intestineL–length of intestineEq  is true in such event general trends in the behavior of the system do not change). Variation of parameters for studying their influence on the system carried out in the range of from 1% to 1000% with steps of 1% of the estimated value of the quantity.External parameters of system are described in The parameters are read from an external file when the program starts, as a result of the program creates a file with the values of the number of bacteria and metabolites in each run of the program.Facts taken into account for model construction:1Given physiological value of colonic transition time (CTT) approximately 30–40 hours, the parameter of substrate transition through colon is ~ = 0,08 1/h. CCT though can significantly vary between healthy individuals: from 12 to 80 hours .2The most probable SCFA transport system was considered to be bicorbanate-dependent antiporter (MCT-1) . Paramet3Normal level of SCFA absorption by colonocytes per day was estimated to be 400–600 mM/day . It corr3Even though the most part of the substrate comes with food, a smaller part is secreted by enterocytes (mucin). Suggesting almost all the substrate to be metabolized, the constant input of it is 40 mM/h and endogenic substrate input rate is 1 mM/h. However, substrate input rate can vary significantly depending on diet.4SCFA excretion with feces is 10–30 mM/day .In order introduce feedback mechanisms into model following pseudo codes and suggestions were used:FB1: if (bacterium of type 2 get acetate) {        if (random(100) < percentage of toxins) {bacterium produces toxin killing themselves}        else {bacterium produces butyrate}FB2: if  {        bacteria of type 1 produce toxins inhibiting growth of type 2}Notice: toxins and other metabolite conversed from polysaccharides produced together by bacterial type 1FB3: if  {        gut produce toxins inhibiting growth of type 2}FB4: if (amount of butyrate—amount of propionate > 100) {        gut produce toxins inhibiting growth of type 2}FB5/6: if (amount of butyrate/propionate > threshold) {        gut produce toxins inhibiting growth of type 2/1}FB7: if (amount of butyrate < threshold) {        gut produce polysaccharides for baterial type 1}In most cases we used concentration as observed parameter rather than agent interaction rules in order to reduce calculating time of program.Artificial gut was divided into 3 areas:mucin layer: (0 –D/5) and (4D/5 –D) mkmlumen: (D/5 – 4D/5) mkmborder between mucin layer and lumen: (2D/15 – 4D/15) and (11D/15 – 13D/15)where D–gut width, 0 –coordinates if the top wall, D–coordinated of the bottom wall.i) is defined as:i, bj) = 0 if bi and bj belong to different bacterial type, or, σ = 1 if bi and bj belong to the same bacterial type, and Nr is the number of neighborhood bacteria falling within distance of r = R = 30000 mkm.Segregation index was calculated for each part of gut using methodology of Mitri et al. . Thirst,1 (seg2) of bacterial type 1 (2) for each part of gut is defined using following equation:1(2) is the number of bacteria of corresponding type.Second, the segregation index segMetabolic complementarity graphs for each gut metagenome were constructed using its species-level taxonomic composition and metabolic complementarity index  (MCI) fohttps://github.com/dreamlab13/abmbiotaCode for the model is available at S1 Fig(TIFF)Click here for additional data file.S2 FigAxis x: percentage of bacteria survival during treatment; Axis y: antibiotic dose. A–bacterial type 1, B–bacterial type 2.(TIFF)Click here for additional data file.S3 Fig(TIFF)Click here for additional data file.S1 Table(PDF)Click here for additional data file.S2 Table(PDF)Click here for additional data file.