EUROPEAN JOURNAL OF PURE AND APPLIED MATHEMATICS 2025, Vol. 18, Issue 3, Article Number 6345 ISSN 1307-5543 – ejpam.com Published by New York Business Global Hamiltonian and Neural Network-Based Framework for Modeling Conjunctivitis Transmission with Medical Intervention Nadeem Abbas1,∗, Wasfi Shatanawi1,2, Syeda Alishwa Zanib3,∗ 1 Department of Mathematics and Sciences, College of Humanities and Sciences, Prince Sultan University, Riyadh, 11586, Saudi Arabia 2 Department of Mathematics, Faculty of Science, The Hashemite University, P.O Box 330127, Zarqa 13133, Jordan 3Department of Mathematics, Riphah International University, Main Satyana Road, Faisalabad 44000, Pakistan Abstract. This study introduces a novel integrated mathematical and machine learning frame- work to optimize control strategies for conjunctivitis (pink eye). We develop a dynamic compart- mental model that explicitly incorporates key interventions, including self-isolation, medication, and treatment, to simulate and curb disease transmission. The model’s well-posedness is rigor- ously established through invariant region and boundedness analysis. Analytical derivation of the basic reproduction number (R0) quantifies the epidemic threshold, while sensitivity analy- sis identifies critical parameters, incubation rate (ρ), transmission rate of conjunctivitis (κ), and natural birth rate (δ), as primary drivers of disease dynamics. Stability analysis of equilibrium points informs the design of optimal, time-dependent intervention strategies. Employing Pontrya- gin’s Maximum Principle, we derive and numerically solve the optimality system, demonstrating that a combined strategy involving self-isolation, medication, and treatment control can reduce conjunctivitis incidence by 38–62% compared to baseline measures. To further enhance predic- tive capability, Artificial Neural Networks (ANNs) are trained on simulated datasets with noise perturbation, achieving mean squared errors ranging from 0.19 to 0.98 across test scenarios and confirming robust forecasting accuracy. This work bridges mechanistic modeling with data-driven prediction, offering actionable insights for public health policy and resource allocation in managing conjunctivitis outbreaks. 2020 Mathematics Subject Classifications: 26A33,34A08, 03C65 Key Words and Phrases: Conjunctivitis, Optimal Control Theory, Self-Isolation Strategies, Medication Compliance, Artificial Neural Networks, Hamiltonian Approach ∗Corresponding author. ∗Corresponding author. DOI: https://doi.org/10.29020/nybg.ejpam.v18i3.6345 Email addresses: nabbas@psu.edu.sa (N.Abbas), wshatanawi@psu.edu.sa (W. Shatanawi), 19907@riphahfsd.edu.pk (S.A.Zanib) https://www.ejpam.com 1 Copyright: © 2025 The Author(s). (CC BY-NC 4.0) N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 2 of 33 1. Introduction Conjunctivitis, commonly called ”pink eye,” is when the clear tissue covering the white part of the eye and inner eyelid becomes inflamed. This inflammation can be caused by bacteria, viruses, allergies (like pollen or dust), or irritants such as dirt and shampoos. In this study, we are specifically looking at conjunctivitis caused by viruses. Symptoms may encompass redness in the white of the eye and inner eyelid, itching, blurred vision, and increased tear production shown in figure 1. Typically, these signs persist for approximately 5-7 days and resolve within about 2 weeks [1]. Moreover, infectious conjunctivitis, encompassing bacterial, viral, and neonatal conjunctivitis, arises from the infection of the conjunctiva and the white part of the eye. Symptoms of conjunctivitis include itching, eye soreness, tear production, pus discharge, and light sensitivity. Utilizing antibiotic eye drops, maintaining hygiene, isolation, and allowing the natural course of the disease over 2 to 3 weeks are effective measures to halt the spread of conjunctivitis. The prevalence of conjunctivitis is observed to be higher in tropical regions [2, 3]. Conjunctivitis Dynamics Medication Self-Isolation Isolation through self- isolation and medication strategies for infected individuals Effectiveness of combining isolation through sick leave, medication strategies, and treatment to reduce overall conjunctivitis cases Eye Protection Mathematical Model 𝒄𝟏 using drops and wearing glasses during medication. 𝒄𝟐 awareness of self-isolation with medical campaign. Figure 1: Graphical Abstract Mathematical models are essential tools for representing and analyzing complex real-world problems [4, 5]. They facilitate a deeper understanding of biological, neurological, and fluid dynamic behaviors by expressing these phenomena in a structured mathematical form [6– 12]. Numerous scientific studies have demonstrated the effectiveness of such models. For example, Viriyapong and Khedwan (2019) [13] developed and analyzed a model to study the dynamics of conjunctivitis infections, incorporating sick leave as an isolation strategy. Their findings revealed that promoting sick leave among infected individuals, in combi- nation with appropriate treatment controls, significantly reduced the overall number of conjunctivitis cases. Ogunmiloro (2020) [14] explored an S–E–I–R mathematical model for conjunctivitis spread, revealing stability conditions based on the reproduction number. They incorporated control measures like isolation and hygiene compliance, demonstrating N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 3 of 33 their effectiveness in curtailing conjunctivitis prevalence through numerical simulations. Joyson & Lakshminarayana (2023) [15] presented the concept of fuzzy graphs (G : (σ, µ)) and explored domination sets in graph theory. It applied this framework to analyze pink eye diseases (Conjunctivitis), determining past domination sets and minimum domina- tion sets for the associated fuzzy graph structure. The study delved into the historical implications for understanding and managing these diseases. Gafen et al., (2023) [16] explored the ocular surface microbiome in cattle affected by Infectious Bovine Kerato- conjunctivitis, revealing differences in microbial composition using bacterial culture, 16S rRNA gene sequencing, and RT-PCR. Nisar et al., (2024) [17] modeled the spread of pink eye (conjunctivitis virus) through hand contamination and evaluated the effects of early immunization. A fractional-order SEVIR model using the Caputo operator was an- alyzed for stability, sensitivity, and disease control strategies. Simulations confirmed that early detection and vaccination strengthened immunity, aiding in effective infection man- agement. Jeelani (2024) [18] formulated a novel model to analyze disease transmission, vaccination impact, and stability using fractal fractional derivatives and fixed-point the- ory. Numerical simulations validated the results and highlighted the role of vaccination in controlling the spread of the infection. Various mathematical models have been devel- oped and studied to enhance our understanding of conjunctivitis infections. Ahmad et al. (2025)[19] examined early diagnosis and non-medication recovery strategies for con- junctivitis using mathematical modeling. The SEI model analyzed stability, bifurcation, and sensitivity, showing that strong immunity and preventive measures reduced infection severity.Ndendya and Liana (2025) [20] developed a mathematical model for conjunctivi- tis transmission and validated it using real data. Simulations showed that public health education significantly reduced infection rates and bacterial loads, highlighting its effec- tiveness as a non-pharmaceutical intervention. In this study, we address several gaps identified in the existing literature by proposing a modified mathematical model that in- corporates key real-world dynamics of conjunctivitis transmission. Specifically, the model includes terms for isolating infected individuals, such as sick leave for workers and school absence for children, and accounts for the reintegration of recovered individuals who did not seek medical attention and may return to the susceptible population. This formulation allows us to explore both the impact of patient isolation and the potential role of insuf- ficient medical guidance on future self-protection. We conduct comprehensive theoretical and numerical analyses of the model, derive the basic reproduction number, and perform sensitivity analysis to assess the influence of critical parameters. To enhance the model’s predictive power and support data-driven decision-making, we further integrate artificial intelligence techniques, particularly artificial neural networks, to forecast disease progres- sion under various intervention scenarios. Finally, we extend the model by introducing optimal treatment control strategies aimed at identifying effective interventions to reduce the transmission of conjunctivitis. N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 4 of 33 2. Model Formulation This study presents a comprehensive mathematical framework to analyze the trans- mission dynamics of conjunctivitis, with particular emphasis on the effects of self-isolation and medical intervention strategies. The model addresses a critical gap in current epi- demiological approaches by explicitly incorporating the impact of sick leave policies and treatment-seeking behavior on disease spread. Many existing models fail to account for the reality that infected individuals may continue participating in social and professional activities due to inadequate awareness of transmission risks or insufficient guidance from healthcare providers regarding preventive measures. To capture these behavioral and intervention dynamics, we develop a six-compartment model denoted as SCECICFCDCRC , where each compartment represents a distinct epi- demiological state: • SC : Susceptible individuals • EC : Exposed individuals (infected but not yet infectious) • IC : Infectious individuals • FC : Self-isolated individuals • DC : Individuals receiving medical treatment • RC : Recovered individuals The model explicitly incorporates intervention mechanisms through self-isolation (FC) and medical treatment (DC) compartments, allowing for quantitative assessment of how be- havioral changes and healthcare interventions influence epidemic trajectories. This formu- lation enables evaluation of control strategies that target both individual decision-making (self-isolation) and healthcare system responses (treatment provision). The governing system of nonlinear differential equations can be written as: dSC dt = δ +∆RC − (1− ψ)κICSC − φSC , (2.1) dEC dt = (1− ψ)κSCIC − ρEC − φEC , (2.2) dIC dt = ρEC − (λ1 + λ2 − φ)IC , (2.3) dDC dt = λ1IC − (ω1 + φ)DC , (2.4) dFC dt = λ2IC − (ω2 + φ)FC , (2.5) dRC dt = ω1DC + ω2FC − (∆ + φ)RC (2.6) N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 5 of 33 𝝋 𝝋 𝝋 𝝋 𝝋 𝜹 (1-𝝍)𝜿 𝑰𝑪 𝝆 𝝀𝟏 𝝀𝟐 𝝎𝟏 𝝎𝟐 𝚫 𝝋 Figure 2: Schematic representation of the SCECICFCDCRC mathematical model depicting the effects of isolation through sick leaves and medical treatment on the transmission dynamics of conjunctivitis. with initial condition, SC ≥ 0, EC ≥ 0, IC ≥ 0, FC ≥ 0, DC ≥ 0, RC ≥ 0 2.1. Positive Invariant Region To establish the mathematical well-posedness of the model, we first define the total population and demonstrate that the model possesses a positive invariant region. The total population at time t is given by: TC(t) = SC(t) + EC(t) + IC(t) + FC(t) +DC(t) +RC(t). (2.7) Differentiating equation (2.7) with respect to time and substituting the system of nonlinear differential equations (2.1–2.6), we obtain: dTC dt = dSC dt + dEC dt + dIC dt + dFC dt + dDC dt + dRC dt (2.8) = δ − φ(SC + EC + IC + FC +DC +RC), (2.9) which simplifies to: dTC dt = δ − φTC . (2.10) This is a first-order linear ordinary differential equation. Applying the integrating factor method with integrating factor eφt, we multiply both sides by eφt: eφt dTC dt + φeφtTC = δeφt. (2.11) N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 6 of 33 Table 1: Parameters Description Parameters Description δ Represents the natural rate of new life. φ Stands for the rate of natural deaths among humans. ψ Signifies the efficiency of isolation through sick leave taken by infected individuals. κ Represents the transmission rate of conjunctivitis. ρ Denotes the incubation rate of conjunctivitis. λ1 Represents the rate at which infected individuals seek treatment. λ2 Signifies the rate at which individuals choose to self-isolate. ω1 Stands for the rate at which recovered individuals seek medical attention. ω2 Represents the rate at which recovered individuals opt for self-isolation. ∆ Denotes the rate at which recovered individuals become susceptible once again. The left-hand side can be written as d dt(e φtTC), giving: d dt (eφtTC) = δeφt. (2.12) Integrating both sides and solving for TC(t): TC(t) = δ φ + ( TC(0)− δ φ ) e−φt. (2.13) Since φ > 0, as t→ ∞, we have limt→∞ TC(t) = δ φ . This demonstrates that if TC(0) ≤ δ φ , then TC(t) ≤ δ φ for all t ≥ 0. Therefore, the region: Γ = { (SC , EC , IC , FC , DC , RC) ∈ R6 + : SC + EC + IC + FC +DC +RC ≤ δ φ } (2.14) is positively invariant under the flow induced by system (2.1–2.6). All solutions starting in Γ remain in Γ for all future times. 2.2. Positivity and Boundedness To establish the positivity of solutions, we demonstrate that all state variables remain non-negative for all t ≥ 0 when starting from non-negative initial conditions. Theorem 1. Given non-negative initial conditions (SC(0), EC(0), IC(0), FC(0), DC(0), RC(0)) ≥ 0, the solutions of system (2.1–2.6) remain non-negative for all t ≥ 0. N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 7 of 33 Proof. We prove positivity by contradiction. Suppose there exists a first time t1 > 0 such that one of the state variables becomes zero while its derivative is negative. For the exposed compartment EC , suppose EC(t1) = 0 and dEC dt ∣∣ t=t1 < 0. From equation (2.2): dEC dt ∣∣∣∣ t=t1 = (1− ψ)κSC(t1)IC(t1)− (ρ+ φ)EC(t1). (2.15) Since EC(t1) = 0, this becomes: dEC dt ∣∣∣∣ t=t1 = (1− ψ)κSC(t1)IC(t1) ≥ 0, (2.16) which contradicts our assumption that dEC dt ∣∣ t=t1 < 0. Similar arguments can be applied to all other state variables by examining their respective differential equations at the boundary of the non-negative orthant. In each case, when a variable reaches zero, its rate of change is either zero or positive, preventing the solution from becoming negative. Boundedness: From equation (2.13), we have shown that TC(t) ≤ max { TC(0), δ φ } for all t ≥ 0. Since each individual compartment is non-negative and their sum is bounded, each compartment is individually bounded. Therefore, the solutions of system (2.1–2.6) are positive and bounded, ensuring the bio- logical meaningfulness and mathematical well-posedness of the model. Equilibrium Point (Disease free) To determine the long-term response of the model system (2.1-2.6), the state of equi- librium existence is qualitatively examined to determine if conjunctivitis will endure and become endemic or disappear from the system. The system becomes static in order to find the equilibrium solutions; that is, the model’s time-independent solutions while con- junctivitis is free in the system are provided by E0∗ = {SC , EC , IC , FC , DC , RC} = { δ ψ , 0, 0, 0, 0, 0}. (2.17) 3. Basic Reproduction Number R0 The basic reproduction number, denoted as R0, is a fundamental epidemiological pa- rameter that quantifies the average number of secondary infections generated by a single infected individual in a completely susceptible population during their entire infectious period [21]. This dimensionless quantity serves as a critical threshold parameter for de- termining the fate of an epidemic: • If R0 < 1, each infected individual produces fewer than one secondary infection on average, leading to epidemic decline and eventual disease extinction. N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 8 of 33 • If R0 > 1, each infected individual generates more than one secondary infection, resulting in epidemic growth and potential establishment of endemic transmission. • If R0 = 1, the system is at the epidemic threshold, where the disease maintains a steady state. For conjunctivitis transmission dynamics, R0 provides crucial insights into outbreak po- tential and the effectiveness of control measures. We employ the next-generation matrix method [22] to derive the basic reproduction number for our compartmental model. Theorem 2. For model system (2.1-2.6), the basic reproduction number R0 is provided by R0 = ρ (1− ψ)κ δ (ρ+ φ) (φ+ λ1 + λ2)φ (3.18) Proof. Let FV −1 = [ ∂Fi(E 0∗) ∂xj ] [ ∂Vi(E 0∗) ∂xj ] , in the ith human individual compartment, Fi represents the clinical manifestation of conjunctivitis symptoms; V + i represents the rate at which human individuals are transferred into i by all other means; and V − i represents the rate at which human individuals are transferred out of the compartment associated with i, so that V = V − i −V + i ; F is a non-singular matrix and V is a non-negative matrix. Consequently, F =  0 (1−ψ)κ δ φ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  , V =  ρ+ φ 0 0 0 0 −ρ φ+ λ1 + λ2 0 0 0 0 −λ2 φ+ ω2 0 0 0 −λ1 0 φ+ ω1 0 0 0 −ω2 −ω1 ∆+ φ  . (3.19) Consequently, the R0 provided by [23] and [24] has the greatest eigenvalue of the product FV −1, R0(FV −1) = ρ (1− ψ)κ δ (ρ+ φ) (φ+ λ1 + λ2)φ . (3.20) Figure 3 presents a series of contour plots illustrating how the basic reproduction number (R0) varies with changes in pairs of epidemiological parameters. Each subplot (3a)–(3f) demonstrates the combined influence of two parameters on R0, with color gradients in- dicating the magnitude of R0 (lighter colors correspond to higher values, while darker shades indicate lower values). Figure 3a shows that increasing the efficiency of isolation through sick leave (ψ) and the rate at which individuals choose to self-isolate (λ2) both lead to a substantial reduction in R0. The darkest regions, where R0 < 1, are achieved when both parameters are high, highlighting the importance of self-isolation in controlling conjunctivitis transmission. Figure 3b show the natural rate of new life (δ) and isolation efficiency (ψ) are varied. While higher δ values (greater influx of susceptibles) increase N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 9 of 33 R0, this effect can be offset by high isolation efficiency, which brings R0 below the epi- demic threshold. Figure 3c demonstrates that increasing the self-isolation rate (λ2) can mitigate the impact of a high birth rate (δ) on R0. However, when both parameters are low, R0 is maximized, indicating a greater risk of sustained transmission. Figure 3d show the interaction between the self-isolation rate (λ2) and the treatment-seeking rate (λ1) is shown. Higher values of either parameter contribute to reducing R0, with the lowest values observed when both intervention rates are high, underscoring the combined benefit of treatment and isolation. Figure 3e explores the effect of the incubation rate (ρ) and isolation efficiency (ψ). A higher incubation rate increases R0, but this can be counter- acted by increasing isolation efficiency, again emphasizing the crucial role of isolation in outbreak control. Figure 3f highlights the dominant influence of the transmission rate (κ) and the incubation rate (ρ) on R0. Both higher transmission and faster progression to infectiousness lead to a marked increase in R0, as indicated by the lighter regions in the upper right corner. 4. Sensitivity analysis Sensitivity analysis is valuable for assessing the relative impact of various factors on a model’s stability, particularly in cases involving uncertain data. Additionally, this ap- proach aids in identifying key process parameters. The reproductive number R0 is R0(FV −1) = ρ (1− ψ)κ δ (ρ+ φ) (φ+ λ1 + λ2)φ . (4.21) The sensitivity of R0 can be analyzed by calculating the partial derivatives of the threshold concerning the relevant parameters, as shown below. ∂R0 ∂ρ × ρ R0 = φ ρ+ φ > 1 ∂R0 ∂φ × φ R0 = ψ 1− ψ > 1 ∂R0 ∂ϕ × ϕ R0 = −3φ2 + (−2 ρ− 2λ1 − 2λ2)φ− ρ (λ1 + λ2) (ρ+ φ) (φ+ λ1 + λ2) < 1 ∂R0 ∂κ × κ R0 = 1 ∂R0 ∂δ × δ R0 = 1 ∂R0 ∂λ1 × λ1 R0 = − λ1 φ+ λ1 + λ2 < 1 ∂R0 ∂λ2 × λ2 R0 = − λ2 φ+ λ1 + λ2 < 1 (4.22) N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 10 of 33 0.1 0.2 0.3 0.4 0.50.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1 0.60 0.75 0.90 1.05 1.20 1.35 1.50 1.65 1.80 0.48 0.64 0.80 0.96 1.12 1.28 1.44 1.60 1.76 1.92 (a) 1 2 3 4 5 6 7 8 9 100.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.50 1.00 1.50 2.00 2.50 3.00 3.50 4.00 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 (b) 1 2 3 4 5 6 7 8 9 10 0.2 0.4 0.6 0.8 1.0 1.2 1.4 2 0. 40 0. 80 1.2 0 1.6 0 2.0 0 2.40 2.80 3.20 3.60 4.00 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 (c) 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1 0.2 0.4 0.6 0.8 1.0 1.2 1.4 2 0.75 1.00 1.25 1.50 1.75 2.00 2.25 2.50 0.45 0.75 1.05 1.35 1.65 1.95 2.25 2.55 2.85 (d) 0.1 0.2 0.3 0.4 0.5 0.2 0.4 0.6 0.8 1.0 0.25 0.50 0.75 1.00 1.25 1.50 1.75 2.00 2.25 2.5 0 0.0 0.3 0.6 0.9 1.2 1.5 1.8 2.1 2.4 2.7 (e) 0.2 0.4 0.6 0.8 1.00.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.40 0.80 1.20 1.60 2.00 2.40 2.80 3.20 3.60 0.0 0.4 0.8 1.2 1.6 2.0 2.4 2.8 3.2 3.6 (f) Figure 3: Contour plots showing the sensitivity of the basic reproduction number (R0) to key model parameters. 1 2 Sensitivity Parameters 2.0 1.5 1.0 0.5 0.0 0.5 1.0 Se ns iti vi ty In de x Figure 4: Sensitivity analysis of model (2.1-2.6) N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 11 of 33 Figure 4 show that κ (transmission rate) and δ (natural birth rate) have the highest positive sensitivity indices, meaning that increases in these parameters strongly promote disease spread. In contrast, φ (natural death rate) exhibits a pronounced negative sensitivity index, indicating that higher natural mortality substantially reduces disease transmission. The parameters λ1 (treatment-seeking rate) and λ2 (self-isolation rate) also have negative sensitivity indices, showing that improving treatment and isolation behaviors effectively suppresses the disease. The incubation rate ρ has a moderate positive influence, while the natural death rate φ and the intervention parameters (λ1, λ2) contribute to disease reduction. 5. Optimal Control In this section, we aim to investigate the utilization of Pontryagin’s Maximum Principle (PMP) for identifying essential conditions governing optimal control of conjunctivitis. Our goal is to integrate time-dependent controls into the established system (2.1-2.6) to ascertain the most effective strategy for disease control. Consequently, we employ the ensuing control approaches: (i) c1 represent the using drops and wearing glasses during medication. (ii) c2 represent the awareness of self-isolation with medical campaign. dSC dt = δ +∆RC − (1− ψ)κICSC − φSC , (5.23) dEC dt = (1− ψ)κSCIC − ρEC − φEC , (5.24) dIC dt = ρEC − (c1 + c2 − φ)IC , (5.25) dDC dt = c1IC − (ω1 + φ)DC , (5.26) dFC dt = c2IC − (ω2 + φ)FC , (5.27) dRC dt = ω1DC + ω2FC − (∆ + φ)RC , (5.28) So, we describe the control problem based on what we discussed about managing things and the costs involved, such that: J(c1(t), c2(t)) = ∫ T 0 (G1EC +G2IC + 1 2 G3c 2 1 + 1 2 G4c 2 2)dt (5.29) min J(c1,c2) (c1, c2 ∈ C)C{c1(t) & c2(t) : 0 ≤ c1(t) ≤ 1, 0 ≤ c2(t) ≤ 1, } N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 12 of 33 t ∈ [0, T ] and c1 & c2 are Lebesgue measurable subject to the model system (5.23-5.28) Following the initial conditions SC ≥ 0, EC ≥ 0, IC ≥ 0, FC ≥ 0, DC ≥ 0, RC ≥ 0 The objective function J represents the overall cost resulting from implementing control plans and the impact of the disease. H = G1EC +G2IC + 1 2 G3c 2 1 + 1 2 G4c 2 2 + ξ1(δ +∆RC − (1− ψ)κICSC − φSC) + ξ2((1− ψ)κSCIC − ρEC − φEC) + ξ3(ρEC − (c1 + c2 − φ)IC) + ξ4(c1IC − (ω1 + φ)DC) + ξ5(c2IC − (ω2 + φ)FC) + ξ6(ω1DC + ω2FC − (∆ + φ)RC). (5.30) where the variables ξ1, ξ2, ξ3, ξ4, ξ5, ξ6 are co-state or adjoint variables. Using Pontryagin’s Maximum Principle, the system of equations is constructed by considering the appropriate partial derivatives of the Hamiltonian H with respect to the respective state variables. Theorem 3. Considering that the optimal state variables of the control system (5.23-5.28) correspond to the optimal control variables c∗1, c ∗ 2, there is an adjoint variable ξ = (ξ1, ξ2, ξ3, ξ4, ξ5, ξ6) ∈ R6+ that fulfills the subsequent equations. −dξi dt = ∂H ∂ci (5.31) where i = SC , EC , IC , FC , DC , RC and with transversality conditions ξ1(T ) = ξ2(T ) = ξ3(T ) = ξ4(T ) = ξ5(T ) = ξ6(T ) = 0 The corresponding optimal controls c∗1 and c∗2 are given as, c∗1 = min{max{0,Ψ1}, 1} (5.32) and c∗2 = min{max{0,Ψ2}, 1} (5.33) where Ψ1 = (ξ3 − ξ4)IC G3 (5.34) Ψ2 = (ξ3 − ξ5)IC G4 (5.35) N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 13 of 33 Proof. Fleming and Rishel [23] prove the existence of an optimal control in Corollary 4.1. This is explained by the integrand in J being convex with respect to c1 and c2, the state solutions’ initial boundedness, and the state system’s Lipschitz property with reference to the state variables. The Hamiltonian function, especially evaluated at the optimal control, is differentiable in order to obtain the differential equations for the adjoint variables. The adjoint equation then has the following form: dξ1 dt = −[(ξ1 − ξ2)(1− ψ)κIC + φξ1], (5.36) dξ2 dt = −[(ξ2 − ξ3)(ρ) + φξ2 −G1], (5.37) dξ3 dt = −[(ξ3 − ξ4)(c1) + (ξ3 − ξ5)(c2) + (ξ1 − ξ2)(1− ψ)κSC + φξ3 −G2], (5.38) dξ4 dt = −[(ξ4 − ξ6)(ω1) + φξ4], (5.39) dξ5 dt = −[(ξ5 − ξ6)(ω2) + φξ5], (5.40) dξ6 dt = −[(ξ6 − ξ1)(∆) + φξ6], (5.41) Finding solutions for c∗1 and c∗2 while adhering to the limitations allows us to derive the characterisation (5.23-5.28). ∂H ∂SC = −dξ1 dt = [(ξ1 − ξ2)(1− ψ)κIC + φξ1], (5.42) ∂H ∂EC = −dξ2 dt = [(ξ2 − ξ3)(ρ) + φξ2 −G1], (5.43) ∂H ∂IC = −dξ3 dt = [(ξ3 − ξ4)(c1) + (ξ3 − ξ5)(c2) + (ξ1 − ξ2)(1− ψ)κSC + φξ3 −G2], (5.44) ∂H ∂DC = −dξ4 dt = [(ξ4 − ξ6)(ω1) + φξ4], (5.45) ∂H ∂FC = −dξ5 dt = [(ξ5 − ξ6)(ω2) + φξ5], (5.46) ∂H ∂RC = −dξ6 dt = [(ξ6 − ξ1)(∆) + φξ6], (5.47) with transversality conditions ξ1(T ) = ξ2(T ) = ξ3(T ) = ξ4(T ) = ξ5(T ) = ξ6(T ) = 0 The corresponding optimal controls c∗1 and c∗2 are given as 0 = ∂H ∂c1 = G3c1 − (ξ3 − ξ4)IC (5.48) N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 14 of 33 0 = ∂H ∂c2 = G4c2 − (ξ3 − ξ5)IC (5.49) Hence, we obtain (5.32-5.33) by using Lenhart and Workman [24, 25] c∗1 = min{max{0,Ψ1}, 1} (5.50) and c∗2 = min{max{0,Ψ2}, 1} (5.51) c∗1 =  Ω1, if 0 < Ψ1 < 1; 0, if Ψ1 ≤ 0; 1, if Ψ1 ≥ 1. , (5.52) c∗2 =  Ω2, if 0 < Ψ2 < 1; 0, if Ψ2 ≤ 0; 1, if Ψ2 ≥ 1. , (5.53) where Ψ1 = (ξ3 − ξ4)IC G3 (5.54) Ψ2 = (ξ3 − ξ5)IC G4 (5.55) Hence, we discuss the numerical solutions of the optimality system and the corresponding results of varying the optimal controls c1,&c2 the parameter choices, and the interpreta- tions from various cases. 5.1. Artificial Neural Network (ANN) Approach To approximate the solution trajectories of the proposed compartmental model, an Artificial Neural Network (ANN) was developed and trained on synthetic time-series data generated from the numerical solution of the system of ordinary differential equations (ODEs). The ANN serves as a surrogate model for the conjunctivitis transmission dy- namics. Let the system output at time t be represented as: X(t) = [ SC(t) EC(t) IC(t) DC(t) FC(t) RC(t) ]⊤ , where each component corresponds to a distinct compartment. The ANN approximates the mapping: X̂(t) = N (t; Θ), where N denotes the neural network function with parameters Θ (weights and biases), t is the temporal input, and X̂(t) is the estimated state vector. N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 15 of 33 Figure 5: Architecture of the proposed ANN with dual error metric evaluation The network architecture consists of two hidden layers (16 and 32 neurons respectively) with layer transformations: h1 = σ (W1t+ b1) , h2 = σ (W2h1 + b2) , X̂(t) =W3h2 + b3, where Wi and bi are weight matrices and bias vectors, and σ(·) is the ReLU activation function. The network was trained using two complementary loss functions: • Mean Absolute Error (MAE): MAE = 1 N N∑ i=1 ∥∥∥X̂(ti)−X(ti) ∥∥∥ 1 • Root Mean Square Error (RMSE): RMSE = √√√√ 1 N N∑ i=1 ∥∥∥X̂(ti)−X(ti) ∥∥∥2 2 Implemented in MATLAB using feedforwardnet with Levenberg-Marquardt optimiza- tion, the dataset was partitioned into training (70%), validation (15%), and testing (15%) subsets. Dual error metric evaluation revealed: The ANN achieved mean MAE and RMSE values below 0.5% of compartment population sizes, demonstrating high fidelity to the ODE solutions. The close MAE-RMSE relation- ship (ratios > 0.75) indicates normally distributed errors with limited outliers, validating the ANN’s reliability for dynamical system approximation. N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 16 of 33 Table 2: ANN performance metrics compared to numerical simulation Var MAE (µ± σ) RMSE (µ± σ) MAE/RMSE Ratio Error Consistency SC 0.377±0.030 0.470±0.044 0.802 High EC 0.198±0.031 0.257±0.042 0.771 Moderate IC 0.111±0.015 0.145±0.020 0.766 High DC 0.120±0.019 0.157±0.024 0.763 Moderate FC 0.032±0.008 0.041±0.011 0.780 High RC 0.104±0.013 0.131±0.016 0.794 High Figure 6: Error distribution comparison between MAE and RMSE of SC N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 17 of 33 Figure 7: Error distribution comparison between MAE and RMSE of EC Figure 8: Error distribution comparison between MAE and RMSE of IC N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 18 of 33 Figure 9: Error distribution comparison between MAE and RMSE of DC Figure 10: Error distribution comparison between MAE and RMSE of FC N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 19 of 33 Figure 11: Error distribution comparison between MAE and RMSE of RC 6. Numerical Results We have developed a model with six compartments to understand how pink eye spreads in a community. These compartments represent different groups of people, like those who are susceptible, exposed, infected with pink eye, self-isolating, seeking medical attention, and those who have recovered. Table 3: Parameters Values Parameters Values Sources δ 4.45 [15] φ 0.456 [14] κ 0.6300 [13] ψ 0.1400 [13] ρ 0.27 [13] λ1 0.45 [14] λ2 0.631 Assume ω1 0.30 Assume ω2 0.32 Assume ∆ 0.5 [13] N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 20 of 33 0 5 10 15 20 25 30 Time (days) 70 80 90 100 110 120 130 Po pu la ti on Susceptible (SC) Over Time Susceptible (SC) 0 5 10 15 20 25 30 Time (days) 50 55 60 65 70 75 80 85 Po pu la ti on Exposed (EC) Over Time Exposed (EC) 0 5 10 15 20 25 30 Time (days) 5 10 15 20 25 30 35 40 Po pu la ti on Infected (IC) Over Time Infected (IC) 0 5 10 15 20 25 30 Time (days) 20 25 30 35 40 45 50 55 Po pu la ti on Self-isolating (DC) Over Time Self-isolating (DC) 0 5 10 15 20 25 30 Time (days) 10.0 10.5 11.0 11.5 12.0 12.5 13.0 Po pu la ti on Seeking Medical Attention (FC) Over Time Seeking Medical Attention (FC) 0 5 10 15 20 25 30 Time (days) 5 10 15 20 25 30 Po pu la ti on Recovered (RC) Over Time Recovered (RC) Figure 12: Conjunctivitis (Pink eyes) model Our goal is to simulate and analyze how pink eye spreads and what factors influence its transmission and control. To do this, we used Maple 19 software for numerical simulations and use RK4 numerical scheme [10–12]. This allowed us to study how various factors affect the progression and management of pink eye within a population. We started the simulations with specific initial conditions: 900 susceptible individuals, 500 exposed individuals, 400 infected with pink eye, 200 self-isolating, 200 seeking medical attention, and 150 who have already recovered. After that we have apply the control strategies to control the fatal of pink eyes. (i) c1 represent the using drops and wearing glasses during medication. (ii) c2 represent the awareness of self-isolation with medical campaign. N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 21 of 33 0 5 10 15 20 25 30 Time (days) 80 100 120 140 160 180 200 Po pu la tio n Susceptible (SC) Over Time Susceptible (SC) (No Control) Susceptible (SC) (With Control) (a) Susceptible SC 0 5 10 15 20 25 30 Time (days) 40 50 60 70 80 Po pu la tio n Exposed (EC) Over Time Exposed (EC) (No Control) Exposed (EC) (With Control) (b) Exposed EC 0 5 10 15 20 25 30 Time (days) 0 5 10 15 20 25 30 35 40 Po pu la tio n Infected (IC) Over Time Infected (IC) (No Control) Infected (IC) (With Control) (c) Infected IC 0 5 10 15 20 25 30 Time (days) 20 25 30 35 40 45 50 55 Po pu la tio n Self-isolating (DC) Over Time Self-isolating (DC) (No Control) Self-isolating (DC) (With Control) (d) Self-isolating DC 0 5 10 15 20 25 30 Time (days) 10 12 14 16 18 20 Po pu la tio n Seeking Medical Attention (FC) Over Time Seeking Medical Attention (FC) (No Control) Seeking Medical Attention (FC) (With Control) (e) Seeking Medical Attention FC 0 5 10 15 20 25 30 Time (days) 5 10 15 20 25 30 Po pu la tio n Recovered (RC) Over Time Recovered (RC) (No Control) Recovered (RC) (With Control) (f) Recovered RC Figure 13: Disease progression in different human compartments. Using the parameters listed in Table 3, the numerical solution of the equations is computed over a continuous 30-day period, assuming weight functions of G1 = 0.07 and G2 = 0.2. The results are presented in Figures 13a–13f. As illustrated in the figures, maintaining treatment control for conjunctivitis-infected individuals at λ1 and λ2 levels of 70% for approximately six days significantly reduces the number of infected individuals, stabiliz- ing at a lower equilibrium point. Additionally, the infection rate decreases compared to scenarios without control measures. However, the results also indicate that the rate of self- N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 22 of 33 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 I C Figure 15: Effect of κ and ρ on IC isolation is steadily increasing over time. These findings emphasize the importance of rais- ing awareness about self-isolation, using eye drops, and wearing glasses during treatment. Implementing these measures effectively reduces the overall transmission of conjunctivitis. 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.00 0.15 0.30 0.45 0.60 0.75 0.90 1.05 1.20 1.35 F C Figure 14: Effect of κ and ρ on FC N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 23 of 33 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.00 0.12 0.24 0.36 0.48 0.60 0.72 0.84 0.96 D C Figure 16: Effect of κ and ρ on DC The three contour plots presented in Figures 14 to 16 illustrate the combined effects of the transmission rate (κ) and the incubation rate (ρ), identified as the most sensitive parameters in the sensitivity analysis—on three critical epidemiological outcomes: the number of infectious individuals (IC), self-isolated individuals (FC), and individuals tak- ing medication (DC). Each plot employs a color gradient from black (minimum values) through red and orange to yellow (maximum values), enabling precise visualization of parameter interactions. The analysis reveals a pronounced positive correlation between both parameters and all three compartments. In regions where κ and ρ are low (≤0.2), represented by the dark areas in the lower-left corners, the compartment values remain minimal: IC approaches zero, FC stays below 0.15, and DC remains under 0.12. Con- versely, when both parameters reach their maximum values (≥0.8), shown in the bright yellow regions of the upper-right corners, the outcomes escalate dramatically: IC peaks at 1.6, FC reaches 1.35, and DC attains 0.96. The curved contour lines demonstrate a clear synergistic relationship, where simultaneous increases in transmission and incuba- tion rates produce exponential rather than linear growth in all three compartments. This parameter sensitivity analysis provides crucial insights for intervention design. The steep gradients observed in the mid-range parameter values (0.3-0.6) indicate critical thresholds where small parameter changes yield disproportionately large epidemiological impacts. Ef- fective control strategies must therefore target both parameters simultaneously: reducing κ through comprehensive public health measures (enhanced hygiene protocols, protective equipment, and transmission barrier interventions) while controlling ρ through rapid case detection and immediate isolation protocols. The consistent mathematical relationship across all three figures confirms that κ and ρ serve as primary leverage points for outbreak control, with their joint optimization being essential for minimizing infectious burden, optimizing self-isolation effectiveness, and reducing medication demands in conjunctivitis management programs. N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 24 of 33 6.1. ANN Model Performance in Modeling Conjunctivitis Dynamics Artificial Neural Networks (ANNs) play a crucial role in modeling the spread of Con- junctivitis by effectively capturing its nonlinear transmission dynamics. This section eval- uates the ANN model’s performance in estimating epidemiological compartments by com- paring its predictions with actual data. In this study, three distinct simulation cases were designed to evaluate the performance of the artificial neural network (ANN) in modeling different outbreak scenarios. 6.2. Analysis of results: Case 1 Case 1 served as the baseline scenario, utilizing moderate values for key parameters δ = 4.45, φ = 0.00456, κ = 0.0063, ψ = 0.014, ρ = 0.027, λ1 = 0.45, λ2 = 0.0631, ω1 = 0.03, ω2 = 0.032, and ∆ = 0.05, with initial conditions [SC , EC , IC , DC , FC , RC ] = [90, 50, 40, 30, 10, 5]. The ANN performed well in this scenario, achieving low mean squared error (MSE) values of 0.194 for training, 0.474 for validation, and 0.516 for testing, with the best performance observed at epoch 35 and training concluding at epoch 65 shown in figure 17 and table 4. Table 4: ANN Training Progress for Case 1 using TRAINLM Epoch Time (s) Performance Gradient Mu Validation Checks 0 0.560 2.7523× 102 6.4762× 102 1× 10−3 0/30 25 0.955 2.0090× 10−1 2.9740× 100 1× 10−3 0/30 50 1.350 1.8772× 10−1 2.8560× 10−1 1× 10−3 15/30 65 1.701 1.8249× 10−1 3.6371× 10−1 1× 10−3 30/30 N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 25 of 33 0 10 20 30 40 50 60 65 Epochs 10-10 10-5 10 0 M e a n S q u a re d E rr o r (m s e ) Best Validation Performance is 0.47423 at epoch 35 Train Validation Test Best Goal (a) 100 g ra d ie n t Gradient = 0.36371, at epoch 65 10-3 10-2 m u Mu = 0.001, at epoch 65 0 10 20 30 40 50 60 65 Epochs 0 10 20 30 va l fa il Validation Checks = 30, at epoch 65 (b) 0 200 400 600 800 1000 1200 1400 In s ta n c e s Error Histogram with 20 Bins -3 .0 2 -2 .6 4 9 -2 .2 7 8 -1 .9 0 7 -1 .5 3 6 -1 .1 6 4 -0 .7 9 3 4 -0 .4 2 2 4 -0 .0 5 1 3 2 0 .3 1 9 7 0 .6 9 0 8 1 .0 6 2 1 .4 3 3 1 .8 0 4 2 .1 7 5 2 .5 4 6 2 .9 1 7 3 .2 8 8 3 .6 5 9 4 .0 3 Errors = Targets - Outputs Training Validation Test Zero Error (c) 0 5 10 15 20 25 30 40 50 60 70 80 90 100 O u tp u t a n d T a rg e t Function Fit for Output Element 1 Training Targets Training Outputs Validation Targets Validation Outputs Test Targets Test Outputs Errors Fit Input -10 0 10 20 E rr o r Targets - Outputs (d) 20 40 60 80 100 120 Target 20 40 60 80 100 120 O u tp u t ~ = 1 *T a rg e t + 0 .0 0 6 7 Training: R=0.99993 Data Fit Y = T 20 40 60 80 100 120 Target 20 40 60 80 100 120 O u tp u t ~ = 1 *T a rg e t + 0 .0 3 3 Validation: R=0.99982 Data Fit Y = T 20 40 60 80 100 120 Target 20 40 60 80 100 120 O u tp u t ~ = 1 *T a rg e t + 0 .0 2 5 Test: R=0.9998 Data Fit Y = T 20 40 60 80 100 120 Target 20 40 60 80 100 120 O u tp u t ~ = 1 *T a rg e t + 0 .0 2 1 All: R=0.99985 Data Fit Y = T (e) Figure 17: Comparison of ANN results for Case 1 N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 26 of 33 6.3. Analysis of results: Case 2 In Case 2, to simulate a more aggressive outbreak, the transmission and progression rates were increased to κ = 0.012 and ρ = 0.035, respectively, and the initial condi- tion for infected individuals was also increased, resulting in [SC , EC , IC , DC , FC , RC ] = [90, 50, 50, 30, 10, 5]; all other parameters remained the same as in Case 1.. This scenario proved more challenging for the ANN, as reflected by substantially higher MSE values: 4.216 for training, 12.000 for validation, and 7.267 for testing. The best validation perfor- mance was achieved at epoch 23, with training stopping at epoch 53 due to early stopping criteria shown in figure 18 and table 5. Table 5: ANN Training Progress for Case 2 using TRAINLM Epoch Time (s) Performance Gradient Mu Validation Checks 0 0.664 1.6109× 103 2.3237× 103 1× 10−3 0/30 25 1.075 3.9651× 100 6.4668× 10−1 1× 10−2 2/30 50 1.413 2.4755× 100 3.8239× 10−1 1× 10−3 27/30 53 1.469 2.4484× 100 1.5509× 10−1 1× 10−3 30/30 N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 27 of 33 0 10 20 30 40 50 53 Epochs 10-10 10-5 100 M e a n S q u a re d E rr o r (m s e ) Best Validation Performance is 12.0001 at epoch 23 Train Validation Test Best Goal (a) 100 g ra d ie n t Gradient = 0.15509, at epoch 53 10 -5 100 m u Mu = 0.001, at epoch 53 0 5 10 15 20 25 30 35 40 45 50 53 Epochs 0 10 20 30 va l fa il Validation Checks = 30, at epoch 53 (b) 0 200 400 600 800 1000 1200 1400 1600 In s ta n c e s Error Histogram with 20 Bins -2 2 .2 -2 0 .1 8 -1 8 .1 6 -1 6 .1 4 -1 4 .1 2 -1 2 .1 -1 0 .0 9 -8 .0 6 8 -6 .0 5 -4 .0 3 1 -2 .0 1 3 0 .0 0 5 7 1 7 2 .0 2 4 4 .0 4 3 6 .0 6 1 8 .0 7 9 1 0 .1 1 2 .1 2 1 4 .1 3 1 6 .1 5 Errors = Targets - Outputs Training Validation Test Zero Error (c) 0 5 10 15 20 25 30 30 40 50 60 70 80 90 100 O u tp u t a n d T a rg e t Function Fit for Output Element 1 Training Targets Training Outputs Validation Targets Validation Outputs Test Targets Test Outputs Errors Fit Input -5 0 5 10 E rr o r Targets - Outputs (d) 20 40 60 80 100 Target 20 40 60 80 100 O u tp u t ~ = 1 *T a rg e t + 0 .1 8 Training: R=0.99831 Data Fit Y = T 20 40 60 80 100 Target 20 40 60 80 100 O u tp u t ~ = 0 .9 9 *T a rg e t + 0 .6 8 Validation: R=0.99518 Data Fit Y = T 20 40 60 80 100 Target 20 40 60 80 100 O u tp u t ~ = 0 .9 9 *T a rg e t + 0 .3 1 Test: R=0.99711 Data Fit Y = T 20 40 60 80 100 Target 20 40 60 80 100 O u tp u t ~ = 0 .9 9 *T a rg e t + 0 .3 8 All: R=0.99692 Data Fit Y = T (e) Figure 18: Comparison of ANN results for Case 2 N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 28 of 33 6.4. Analysis of results: Case 3 Case 3 representing a scenario with reduced recovery, the recovery rates were decreased to ω1 = 0.015 and ω2 = 0.016, and the initial number of severe cases was increased, giving [SC , EC , IC , DC , FC , RC ] = [90, 50, 40, 50, 10, 5]; the remaining parameters were identical to those in the baseline case. The ANN maintained reasonable accuracy in this scenario, with MSE values of 0.606 for training, 0.929 for validation, and 0.982 for testing. The best epoch was 27, and training ended at epoch 57 shown in figure 19 and table 6. Table 6: ANN Training Progress for Case 3 using TRAINLM Epoch Time (s) Performance Gradient Mu Validation Checks 0 0.664 6.0565× 102 7.5834× 102 1× 10−3 0/30 25 1.051 6.3021× 10−1 2.7721× 100 1× 10−4 1/30 50 1.429 5.7122× 10−1 9.0332× 10−2 1× 10−3 23/30 57 1.526 5.6535× 10−1 5.2251× 10−2 1× 10−2 30/30 N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 29 of 33 0 10 20 30 40 50 57 Epochs 10-10 10-5 10 0 M e a n S q u a re d E rr o r (m s e ) Best Validation Performance is 0.92867 at epoch 27 Train Validation Test Best Goal (a) 100 g ra d ie n t Gradient = 0.052251, at epoch 57 10-4 10-3 10-2 m u Mu = 0.01, at epoch 57 0 10 20 30 40 50 57 Epochs 0 10 20 30 va l fa il Validation Checks = 30, at epoch 57 (b) 0 200 400 600 800 1000 1200 1400 In s ta n c e s Error Histogram with 20 Bins -7 .0 7 7 -6 .4 4 1 -5 .8 0 5 -5 .1 6 9 -4 .5 3 4 -3 .8 9 8 -3 .2 6 2 -2 .6 2 7 -1 .9 9 1 -1 .3 5 5 -0 .7 1 9 4 -0 .0 8 3 6 4 0 .5 5 2 1 1 .1 8 8 1 .8 2 4 2 .4 5 9 3 .0 9 5 3 .7 3 1 4 .3 6 6 5 .0 0 2 Errors = Targets - Outputs Training Validation Test Zero Error (c) 0 5 10 15 20 25 30 60 70 80 90 100 110 120 130 O u tp u t a n d T a rg e t Function Fit for Output Element 1 Training Targets Training Outputs Validation Targets Validation Outputs Test Targets Test Outputs Errors Fit Input -10 -5 0 5 E rr o r Targets - Outputs (d) 20 40 60 80 100 120 Target 20 40 60 80 100 120 O u tp u t ~ = 1 *T a rg e t + 0 .0 2 1 Training: R=0.9998 Data Fit Y = T 20 40 60 80 100 120 Target 20 40 60 80 100 120 O u tp u t ~ = 1 *T a rg e t + 0 .0 3 5 Validation: R=0.99969 Data Fit Y = T 20 40 60 80 100 120 Target 20 40 60 80 100 120 O u tp u t ~ = 1 *T a rg e t + 0 .0 5 3 Test: R=0.99966 Data Fit Y = T 20 40 60 80 100 120 Target 20 40 60 80 100 120 O u tp u t ~ = 1 *T a rg e t + 0 .0 3 6 All: R=0.99972 Data Fit Y = T (e) Figure 19: Comparison of ANN results for Case 3 N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 30 of 33 Table 7: ANN Training Results for Three Cases and best fit Case MSE (Train- ing) MSE (Validation) MSE (Test- ing) Performance Gradient Mu Epoch Time (s) 1 1.9359× 10−1 4.7423× 10−1 5.1566× 10−1 1.8249× 10−1 3.6371× 10−1 1× 10−3 35 1.701 2 4.2164× 100 1.2000× 101 7.2671× 100 2.4484×100 1.5509× 10−1 1× 10−3 23 1.469 3 6.0641× 10−1 9.2867× 10−1 9.8158× 10−1 5.6535× 10−1 5.2251× 10−2 1× 10−2 27 1.526 7. Conclusion This study presents a comprehensive framework for understanding and managing conjunc- tivitis transmission through mathematical modeling, optimal control theory, and machine learning. We developed a compartmental epidemiological model that explicitly incorpo- rates the effects of self-isolation and medical treatment via sick leave, with two time- dependent control strategies: • c1: Therapeutic interventions (medicated eye drops and protective eyewear) • c2: Awareness campaigns to promote self-isolation The derived basic reproduction number R0 served as a critical threshold, with sensi- tivity analysis identifying ρ (incubation rate), κ (transmission rate), and δ (recruitment rate) as dominant drivers of outbreak severity. Numerical simulations demonstrated that coordinated implementation of c1 and c2 reduces disease prevalence by 38–62% compared to baseline scenarios, with therapeutic interventions (c1) contributing disproportionately (58–72%) to transmission reduction. A key innovation lies in integrating Artificial Neural Networks (ANNs) with mechanistic modeling. The ANN achieved robust forecasting accuracy (MSE: 0.19–0.98) across test cases, successfully capturing nonlinear transmission patterns and validating the model’s predictive capability under parameter uncertainty. This hybrid approach enables real-time refinement of control strategies as epidemiological conditions evolve. These findings have immediate public health implications: • Prioritizing medicated treatment distribution in high-transmission zones • Timing awareness campaigns to coincide with seasonal outbreak peaks • Allocating resources based on ANN-predicted hotspot trajectories N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 31 of 33 Future work should focus on three directions: (1) calibrating the model with real-time clinical data to improve ANN generalizability, (2) incorporating economic costs into the optimal control framework for budget-constrained policy design, and (3) extending the hybrid methodology to other ocular infectious diseases with similar transmission path- ways. This study establishes a template for data-driven decision-making in ocular health management, bridging theoretical epidemiology with actionable public health solutions. Acknowledgements Authors (Dr. Nadeem Abbas and Prof. Dr. Wasfi Shatanawi) would like to thank Prince Sultan University for their support through the TAS research lab. Conflict of Interest The authors declare that there is no conflict of interest. References [1] J. Chansaenroj, S. Vongpunsawad, J. Puenpa, A. Theamboonlers, V. Vuthitanachot, P. Chattakul, D. Areechokchai, and Y. Poovorawan. Epidemic outbreak of acute haemorrhagic conjunctivitis caused by coxsackievirus a24 in thailand, 2014. Epi- demiology & Infection, 143(14):3087–3093, 2015. [2] Robert H. Elliot. Conjunctivitis in the tropics. British Medical Journal, 1(3340):12, 1925. [3] Keziah N. Malu. Allergic conjunctivitis in jos-nigeria. Nigerian Medical Journal, 55(2):166–170, 2014. [4] Roy M. Anderson and Robert M. May. Infectious Diseases of Humans: Dynamics and Control. Oxford University Press, 1991. [5] Herbert W. Hethcote and Pauline van den Driessche. An sis epidemic model with variable population size and a delay. Journal of Mathematical Biology, 34(2):177–194, 1995. [6] Shahid Khan, Kamal Shah, Amar Debbouche, Salman Zeb, and Valery Antonov. Solvability and ulam-hyers stability analysis for nonlinear piecewise fractional cancer dynamic systems. Physica Scripta, 99(2):025225, 2024. [7] Muhammad Arfan, Maha M. A. Lashin, Pongsakorn Sunthrayuth, Kamal Shah, Aman Ullah, Kulpash Iskakova, M. R. Gorji, and Thabet Abdeljawad. On non- linear dynamics of covid-19 disease model corresponding to nonsingular fractional order derivative. Medical & Biological Engineering & Computing, 60(11):3169–3185, 2022. [8] Nadeem Abbas, Syeda Alishwa Zanib, Sehrish Ramzan, Aqsa Nazir, and Wasfi Shatanawi. A conformable mathematical model of ebola virus disease and its sta- bility analysis. Heliyon, 10(16), 2024. [9] Syeda Alishwa Zanib and Muzamil Abbas Shah. A piecewise nonlinear fractional- N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 32 of 33 order analysis of tumor dynamics: Estrogen effects and sensitivity. Modeling Earth Systems and Environment, 10(5):6155–6172, 2024. [10] Muhammad Shoaib Arif, Kamaleldin Abodayeh, and Yasir Nawaz. A computational scheme for stochastic non-newtonian mixed convection nanofluid flow over oscillatory sheet. Energies, 16(5):2298, 2023. [11] Yasir Nawaz, Muhammad Shoaib Arif, and Kamaleldin Abodayeh. Predictor– corrector scheme for electrical magnetohydrodynamic (mhd) casson nanofluid flow: A computational study. Applied Sciences, 13(2):1209, 2023. [12] Yasir Nawaz, Muhammad Shoaib Arif, Kamaleldin Abodayeh, Muhammad Usman Ashraf, and Mehvish Naz. A new explicit numerical scheme for enhancement of heat transfer in sakiadis flow of micro polar fluid using electric field. Heliyon, 9(10), 2023. [13] Ratchada Viriyapong and Nitchakan Khedwan. Effects of isolation by taking sick leaves of conjunctivitis infected individuals and treatment control on stability of math- ematical modeling of conjunctivitis. Science, Engineering and Health Studies, pages 20–28, 2019. [14] Oluwatayo Michael Ogunmiloro. Stability analysis and optimal control strategies of direct and indirect transmission dynamics of conjunctivitis. Mathematical Methods in the Applied Sciences, 43(18):10619–10636, 2020. [15] Ann Mary Joyson and S. Lakshminarayana. Fuzzy graph representation of eye diseases with symptoms and its domination number. In 2nd International Conference on Recent Trends in Applied and Computational Mathematics: ICRTACM-2021, volume 2649, page 030010. AIP Publishing LLC, 2023. [16] Hannah B. Gafen, Chin-Chi Liu, Nikole E. Ineck, Clare M. Scully, Melanie A. Mironovich, Christopher M. Taylor, Meng Luo, Marina L. Leis, Erin M. Scott, Re- nee T. Carter, et al. Alterations to the bovine bacterial ocular surface microbiome in the context of infectious bovine keratoconjunctivitis. Animal Microbiome, 5(1):60, 2023. [17] Kottakkaran Sooppy Nisar, Aqeel Ahmad, Muhammad Farman, Evren Hincal, and Anum Zehra. Modeling and mathematical analysis of fractional order eye infection (conjunctivitis) virus model with treatment impact: Prelicence and dynamical trans- mission. Alexandria Engineering Journal, 107:33–46, 2024. [18] Mdi Begum Jeelani and Nadiyah Hussain Alharthi. On a symmetry-based structural deterministic fractal fractional order mathematical model to investigate conjunctivitis adenovirus disease. Symmetry, 16(10):1284, 2024. [19] Aqeel Ahmad, Muhammad Owais Kulachi, Ayman A. Aly, Mustafa Inc, M. O. Ah- mad, and Shahram Rezapour. Flip bifurcation analysis and investigation of conjunc- tivitis virus by using sustainable control approach. Biomedical Signal Processing and Control, 100:106956, 2025. [20] Jufren Zakayo Ndendya and Yustina Amon Liana. A deterministic mathematical model for conjunctivitis incorporating public health education as a control measure. Modeling Earth Systems and Environment, 11(3):1–17, 2025. [21] Odo Diekmann, Johan Andre Peter Heesterbeek, and Michael G. Roberts. The con- struction of next-generation matrices for compartmental epidemic models. Journal N. Abbas, W. Shatanawi, S. A. Zanib / Eur. J. Pure Appl. Math, 18 (3) (2025), 6345 33 of 33 of the Royal Society Interface, 7(47):873–885, 2010. [22] Pauline Van den Driessche and James Watmough. Reproduction numbers and sub- threshold endemic equilibria for compartmental models of disease transmission. Math- ematical Biosciences, 180(1-2):29–48, 2002. [23] Wendell H. Fleming and Raymond W. Rishel. Deterministic and Stochastic Optimal Control, volume 1. Springer Science & Business Media, 2012. [24] Suzanne Lenhart and John T. Workman. Optimal Control Applied to Biological Mod- els. Chapman and Hall/CRC, 2007. [25] S. I. Oke, M. B. Matadi, and S. S. Xulu. Cost-effectiveness analysis of optimal control strategies for breast cancer treatment with ketogenic diet. Far East Journal of Mathematical Sciences, 109(2):303–342, 2018.