mru07
mru07

Reputation: 1

turtles-own variable to global variable on NetLogo

I am creating a NetLogo model to simulate the use of appliances in a household and I've got 2 turtles: people & appliances. I have declared a peoples-own for appliances_hit and appliances-own for times_used.

I want to be able to calculate the total times_used from ALL of the appliances ie. times_used of (appliance1 + appliance2 + ... appliance6) I will use that total to plot a graph by performing some calculations to show the usage data.

I would highly appreciate any sort of help.

Upvotes: 0

Views: 120

Answers (1)

bee
bee

Reputation: 41

You can use the sum command and it will return the total of time_used for all appliances. It will be like this:

sum [time_used] of appliances

Upvotes: 1

Related Questions