Is there any way to make a GIS region an agent? For example, In Arizona we have 15 counties. Can I make the individual county area an individual agent? In the tutorials it mentions how to place one agent in a GIS region but it's not mentioned how to make the whole GIS region an agent which can have it's own statechart.
(If 1st one can be done) Suppose there lives some Person agent on each of those GIS region area (county). Is there any way to move those Person agent based on the state of the county agent?
In simple words, I want to move some Person agents from county "a" to another county "b" based on county's statechart. If I send msg or command to Person statechart, I have to make sure only those person agents living in the county "a" are getting the command to move. Is there any way to model that?
Number 1 can be done, but not directly. Here is how:
create an agent type "myGISRegion"
place a parameter into it and change its type to "GISRegion", name it "p_MyGISRegion"
when instantiating it on Main (or whereever), set the parameter to the GISRegion you like below
Related
I get problem with some of GIS map regions turning into multi regions as I try to use them as agents. So I applied the advised method to "create a normal agent type ("MyGISRegion") and provide it a parameter p_MyRegion of type GISRegion. For every region you create, you also now instantiate such an agent and set its parameter to the region created." and now the mentioned parameter type conflicts with regions as some of them are multi regions and some regular GISRegions. How to fix the conflict?
I've created my first weapon (item ID: 90000 | display ID: 42070) using Keira. I restarted the DB and clear the cache on the client. I spawned the weapon onto my character, but I get a question mark in the inventory. When I equip the weapon and the character is attacking I can see the weapon , but when it is sheath I can't see the weapon.
I've looked at several conversations that speak about patching the client, but its way over my current pay grade. I need to learn how to do this if I want to continue to create content. Where can I go to learn the skills that I am missing? or who can teach me how to fish so that I can fish for myself? Please advise...
~ tinywolf
You can do a workaround on this by changing a weapon that is already in the game in Keira3
Unless u have created a completely new model u maybe just wanna change another that already has the look
Suppose there are 1000 Person agent on 4 (a,b, c,d) GIS region area. On a certain event, I want to communicate with all the agents living inside GIS region "a" . In "a" region we have 200 person agents.If I send message or command to Person state chart, how I can make sure that only those 200 person agents living on that specific GIS region "a" is getting my command? Is there any way to model that?
You can filter messages inside the Agent's statechart transition, in order to only executethe transition when a certain expression is true (in your case: Agent is in the right region).
Of course you could do this filtering in a lot of other places too, for example when sending the message, or when receiving it. However you can always use this code to check if the Agent is located inside of a GISRegion:
main.gisRegion1.contains(this.getLatitude(), this.getLongitude())
This is assuming you executed this inside the Agent (therefore main. and this.) and the region you are looking for is named gisRegion1.
I have a topojson map that has both county and state data in json format. There are no actual names for the states, but the states do each have a unique id. I would like to find a way to return the id of a state if the user clicks on one of its containing counties.
The trouble is I cannot seem to be able to access the state ids in the json when I set up my click event listener. I have sliced and diced the json data every which way, but I keep going in circles. Is it possible to have asymmetric information within the json file? I feel like the state ids are in a black box when working with the containing counties.
Let me know if anything comes to mind. I have a fully functional minimalist example here, where I am trying to return a console log of the state id based on user click.
Note: I would prefer to avoid point in polygon solutions for complexity reasons.
Seems your json file ships with FIPS county code. That means that first two digits of county code are in fact the state code. So Math.floor(county.id / 1000) is what you‘re looking for in the end.
Say I've got an address like this:
Foobar Widget Team
c/o ACME Widgets Inc.
123 The Drive
Someplace Town
BN1 1AB
I want to mark this up as an hCard but I am not sure what class names I should apply to the two organisation names. Foobar Widget Team might be a group of employees who get together and run a local football team, supported and sponsored by ACME but not officially an organisational unit of ACME - they're just using ACME as the mailing address.
So what is the best way of expressing this using hCard? I thought of using the AGENT property, but that seems to apply to a person rather than an organisation acting on behalf of another. Organization-unit isn't quite right either as, strictly speaking, Foobar Widget Team isn't a unit of ACME. How else might I mark this up?
I think that AGENT would be correct to use for an organization as well; the only requirement is that it is something that is separately addressable which can act on behalf of the the intended recipient.
The other option would just be to use the free-form LABEL field for the address of Foobar Widget Team, including everything from the "c/o" to the end. Given that there aren't likely to be a lot of consumers that will get any value out of specifying the relationship precisely, just putting it into a freeform text value will allow simple programs that just extract the address to produce an address label that contains the right information, without having to understand what the "c/o" line means.