DATA 420 - Modeling and Simulation - Spring 2024

Systems Dynamics Models I

Possible experience: +40XP (or even +50XP)

Due: Friday, Feb. 16 Sunday, Feb. 18, midnight

1. Temperature

Modify the furnace simulation we developed in class to model Air Conditioning (A/C) instead (5XP). Then, answer the following questions, and include plots illustrating your answer to each:

Suppose we set our thermostat at 72°F, and it's a whopping 95° Virginia day outside. Suppose further that our insulation is fairly crappy, and leaks heat at a rate of .2 (degrees/hr)/degree. Then:

  1. About how strong an A/C unit would I need (in degrees/hour) for the house to be able to maintain my desired temperature at all? (5XP)
  2. About how strong a unit would I need in order for it to maintain my desired temperature and only be running half the day on average? (5XP)
  3. Suppose we fast-forward 100 years, to the point where global warming has made much of the planet (including Fredericksburg) intolerable. It is now 125°F outside in the summer. If your A/C had the power you computed in the previous item, what percentage of the day would it be running now? (5XP)

2. Drugs

Use the drug simulation we developed in class to complete one of the following items (choose wisely):

  1. A new medication has been developed to treat patients with a particular kind of liver deficiency. The MEC for this medication is 250 μg/ml and the MTC is 500 μg/ml. Its half-life is estimated to be about 15.5 hours. Develop a dosage schedule for adults (assumed to have between 2.7 and 3.3 liters of plasma each) and another one for children (assumed to have between 1.25 and 1.75 liters). Each dosage schedule should be in the form of "take X milligrams every Y hours," and should be accompanied by plot(s) demonstrating that such a schedule, when followed properly, will maintain proper levels of the drug in the patient's blood 24/7, for any patient within the above plasma assumptions. (+20XP)
  2. Up to now, we've modeled only the elimination of the drug from the patient's system as a time-varying quantity: the metabolism into the bloodstream has been instantaneous. Remedy this inaccuracy by extending the model to a two-compartment model. This somewhat amusing term means that you'll represent the human body as having two "compartments" into which the drug travels: first, the digestive tract (which in reality has many component parts, but which in your model will be just one big box), and then, the bloodstream (plasma). It takes time for the drug to metabolize from the first box to the second, but only the concentration of the second box has any therapeutic effect. (+30XP)

    Your revised simulation should correspond to the model below:
    After writing and debugging your simulation, analyze its behavior with respect to how the metabolism constant and the elimination constant interact. Experiment with values where the metabolism is higher, and where the elimination constant is higher, and where they are roughly equal. Produce plots demonstrating this behavior, and a brief analysis describing it.

Turning it in

For this assignment, send an email to data420submissions@gmail.com with subject line DATA 420 System Dynamics I turnin and with a zip file called "yourumwuserid_SD_I.zip" as an attachment. In it, should be all of the relevant files for parts 1 and 2 of this homework.

These relevant files are:

  1. A single PDF file (in PDF format) with all of your analysis and plots from the various problems you chose. Be very explicit and specific about which item of which part you are answering with a given narrative/plot. Do not make me guess.
  2. The .py files demonstrating the code (for each simulation) with your changes made to it. Each Python program, if I run it, should produce one or some of the plots you included in your PDF file. (I understand that for some items, you will be running the simulation several times with different parameter choices. You do not need to include an entire separate .py file for each such version. Just one representative version is okay. Please name these .py files sensibly; for instance, part1.py and drugs.py are both good names.)

Getting help

Come to office hours, or send me email with subject line "DATA 420 System Dynamics I help!!"