**Challenges and our approach**

**challenges**

After conceptualizing the idea of the Glucosystem IV, the main challenge was finding out the mathematical relation between total insulin, blood glucose, and the requisite infused insulin.

While it is common knowledge that insulin brings down glucose, which brings down glucagon, which brings down, it was surprising to learn that there is really no consensus among scholars about the right mathematical model explaining all three variables because there are many unknown variables affecting the whole process. A research done by Shiang and Kandeel was closest to creating a complete computational model of the human glucose-insulin regulatory pathway. The relations described were as follows:

While it is common knowledge that insulin brings down glucose, which brings down glucagon, which brings down, it was surprising to learn that there is really no consensus among scholars about the right mathematical model explaining all three variables because there are many unknown variables affecting the whole process. A research done by Shiang and Kandeel was closest to creating a complete computational model of the human glucose-insulin regulatory pathway. The relations described were as follows:

where

*p**i*(*i*=*1, 2, 3, 4*), are positive constants,*J*is the rate of glucose infusion from the intestines (or intravenously),*g(t)*is the difference between blood glucose concentration*G(t)*and its baseline value*G**0*, and*i(t)*is the difference between plasma insulin concentration*I(t)*and its baseline value*I**0*, as shown in the following equations.Thus, if we were to create an array of blood glucose values for a 24 hour period based on available medical data, then in order to find the corresponding insulin fluctuations we would need the present insulin and glucose as well as their rate of change.

It was helpful to know that for both diabetic and non-diabetic patients, insulin and glucose during non-digestion times remained fairly constant, and that glucagon could be expressed as simply an inverse of blood glucose times a constant. Therefore, we focused our analysis only on the digestion times.

It was helpful to know that for both diabetic and non-diabetic patients, insulin and glucose during non-digestion times remained fairly constant, and that glucagon could be expressed as simply an inverse of blood glucose times a constant. Therefore, we focused our analysis only on the digestion times.

**Our approach**

Our program, Gu-InModel.c was responsible for taking in the blood glucose values and managing the computational aspect of Glucosystem IV. The program generated a daily clock cycle going from 0:00 (midnight) all the way to 23:55 (5 minutes before the following midnight). Each second, this clock progressed by 5 minutes, going from 0:00 to 0:05, 0:10 and so on. When a patient’s food requests were accepted, another clock cycle concurrently started – Digest Time – which progressed from 1 to 25. For the first 14 of the 25 Digest Time periods, glucose increased by certain amounts that were provided for in an array (see glucAdd). After the first 14 time periods, the glucAdd values remained constant as terh