Skip to content

Problem setting people location to building #184

Answered by kmamor
kmamor asked this question in Q&A
Discussion options

You must be logged in to vote

That runs but is creating (a lot!) more than 200 people(nb_people = 200). I think that because the create people is coded within the create building section then each time a building is created so too are 200 people. What I'm hoping for is the buildings per the shapefile to be created and then 200 people are spread randomly over those. I think I need to separate the create building and create people. The following I think is achieving this (using code from the incremental model):

create building from: shape_file_buildings with: (type:get("building")){
		color <- #green;
		}
	
create people number:nb_people {
	location <- any_location_in(one_of (building)); 		
		}
			 	    	}
	}

Thanks ag…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@kmamor
Comment options

Answer selected by kmamor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants