Nutrition Model

No preview image

1 collaborator

Default-person Nate Harner (Author)

Tags

(This model has yet to be categorized with any tags)
Model group EECS 372-Spring 2011 | Visible to everyone | Changeable by the author
Model was written in NetLogo 4.1.2 • Viewed 173 times • Downloaded 16 times • Run 1 time
Download the 'Nutrition Model' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This section could give a general understanding of what the model is trying to show or explain.

HOW IT WORKS

This section could explain what rules the agents use to create the overall behavior of the model.

HOW TO USE IT

This section could explain how to use the model, including a description of each of the items in the interface tab.

THINGS TO NOTICE

This section could give some ideas of things for the user to notice while running the model.

THINGS TO TRY

This section could give some ideas of things for the user to try to do (move sliders, switches, etc.) with the model.

EXTENDING THE MODEL

This section could give some ideas of things to add or change in the procedures tab to make the model more complicated, detailed, accurate, etc.

NETLOGO FEATURES

This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features.

RELATED MODELS

This section could give the names of models in the NetLogo Models Library or elsewhere which are of related interest.

CREDITS AND REFERENCES

This section could contain a reference to the model's URL on the web if it has one, as well as any other necessary credits or references.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

;;A tick is one minute of activity, there are 3600 ticks in a day. 
;;The color of the background represents how fast the body is using energy, i.e. metabolism

;;The 5 macronutrients. One agent represents a calorie of the nutrient
breed [fat fats]
breed [carbohydrate carbohydrates]
breed [protein proteins]
breed [fiber fibers]
breed [single-water water]

;;Persistent agents, body stores
breed [body-fat body-fats]
  
globals
[ 
  basal-metabolic-rate  ;;Calories/Day at rest
  height                ;;Height in meters
  weight                ;;Weight in Kilograms
  age                   ;;Age in years
]

to set-colors
end 

to setup
  ;;In the future, BMR could be a dynamic variable
  set basal-metabolic-rate 2000
  ;;Height, weight, and age are not dynamic variables in this model
  
  ;;http://nutrition.mcdonalds.com/nutritionexchange/nutritionfacts.pdf
  eat-food ( 29 45 3 6 0 ) ;;MC DONALDS BIG MAC 
end 

to eat-food [ grams-fat grams-carbohydrate grams-protein grams-fiber grams-water ]
 
  create-fats ( grams-fat * 9 )  ;; 9 Calories per gram of fat
  [
    set color yellow
    setxy random-xcor random-ycor
  ]
  create-carbohydrates ( grams-carbohydrate * 4 ) ;; 4 Calories per gram of carbs
  [
    set color brown
    setxy random-xcor random-ycor
  ]
  create-fiber ( grams-fiber * 4 ) ;; 4 Calories per gram of carbs
  [
    set color green
    setxy random-xcor random-ycor
  ]
  cretae-water ( grams-water )
  [
    set color blue
    setxy random-xcor random-ycor
  ]
end 

to consume-nutrients
end 

to burn-calories
end 

There is only one version of this model, created almost 13 years ago by Nate Harner.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.