baumfalk / TrafficMAS

TrafficMAS, the code
MIT License
0 stars 0 forks source link

Prevent multiple additions of the same norm instantiation #32

Closed baumfalk closed 9 years ago

baumfalk commented 9 years ago

Currently, an agent can get the same norm instantiation multiple times. I'd say an agent should have a norm instantiation only once. A norm instantiation A is identical to B if

An easy solution could be to implement the current norms instantiations for agents as a set and implement the compare function.

baumfalk commented 9 years ago

I don't mean the compare function, but the equals and the hashcode function. See http://stackoverflow.com/questions/27581/what-issues-should-be-considered-when-overriding-equals-and-hashcode-in-java

baumfalk commented 9 years ago

Done!