Reputation: 2213
I created an Agent Type and specified the property of "Use in flowcharts as: Resource Unit". I created a variable called "Location" of type double. In a release block, in the "On release" field, when I write unit.Location, Location variable is not identified and I get an error.
How to access variables from the resource agent unit in a seize/release block?
Thank you.
Upvotes: 0
Views: 267
Reputation: 12660
You can always typecast (i.e. enforce) it using ((MyAgentType)unit).Location
However, you must make sure that all resource units being released in that Release block are of that MyAgentType
type, else you will get a runtime error.
PS: Java convention has variable names in lower case, best keep those ;)
Upvotes: 1