Hi all,
I have a code that calculates emissions for different types of vehicles (old combustion, middle-aged combustion, new combustion, hybrid and electric) in a given study area using the gis extension. I ran BehaviorSpace with an emission diffusion variable for the patches-own variable p-emissions (0.0 to 1.0, in 0.1 increments) and it gives me the global and differentiated values emitted in the region. I have also exported the final maps as ASCII, transformed them in Arcgis Pro through a series of operations to polygon format so that I can know how many emissions there are in a given municipality. The problem here is that the sum of the municipality emissions obtained from the exported asci file aren't the same (or even close) as the global emissions from BehaviorSpace. For example, for 10 runs of emission diffusion 0.5, BehaviorSpace .xls gives me an average for the 10 runs of 1760,49 kg of daily CO2 emissions for the region (final run values are very similar between them). When using the shapefile information, it gives me a total of 201,1 kg of daily CO2 emissions. It seems to me that either the model is miscalculating the emissions of my cars or that for some reason, patches information is giving me wrong values.
I am a novice in Netlogo and had a lot of help developing this code. But I know my way around ArcGis fairly well, so I'm quite certain my procedure is correct and I am not somehow losing information.
Here is how I calculate total emissions for the cars in Netlogo:
to calculate-total-emissions ; Calculate emissions for each car
ask turtles
[
calculate-emissions self ; self refers to the current turtle
set all-emissions (all-emissions + emissions)
set emissions-turtle [emissions-turtle + emissions] of self
]
; Aggregate total emissions for each car type
ask turtles with [car-type = "ev"]
[
set all-ev-emissions (all-ev-emissions + emissions)
]
ask turtles with [car-type = "hybrid"]
[
set all-hybrid-emissions (all-hybrid-emissions + emissions)
]
ask turtles with [car-type = "ICE-old"]
[
set all-ICE-emissions-old (all-ICE-emissions-old + emissions)
]
ask turtles with [car-type = "ICE-middle"]
[
set all-ICE-emissions-middle (all-ICE-emissions-middle + emissions)
]
ask turtles with [car-type = "ICE-new"]
[
set all-ICE-emissions-new (all-ICE-emissions-new + emissions)
]
end
As for the patch emissions, I think it calculates in the Drive procedure:
to pick-where-to-drive-traffic ;; This is how the cars navigate with trafficEmissions are turtles-own (along with the emissions for different types of cars) and all-emissions (and different variations) are globals.
Maybe here patch emissions are overwritten every time a new car goes through that patch? If so, I have tried: set p-emissions (p-emissions + emissions), still with wrong results.
Am I wrong in assuming that the total values should be approximately the same for exported Netlogo map and BehaviorSapce xls? Or at least in the same ballpark? Because produced CO2 has to go somewhere... It can't just disappear, right? I appreciate any help I can get.
Thank you.
--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/3313b0ab-d6fb-4f1a-b511-0360281b3521n%40googlegroups.com.