No, when the patient signals, all blood units that are in the system respond. (The blood trajectory ends with checking for expiration via a branch, exiting the system if expired, rollback otherwise... so any unexpired blood is "around" to get the signal.)
The issue I'm having with the bloodtype is that while the patient can send a signal with their bloodtype (e.g., signal is named "BloodNeeded_APOS"), I am getting error messages when I try to use get_attribute inside trap.
Code snippet, this is what the Patient sends as a signal:
send(signals= function() {
paste0("BloodNeeded_Type_",
get_attribute(env,'bloodtype') )
I can set up the trap function to look for all 8 different signals (for 8 differnt blood types), and reply to all 8 types. What I can't do is set up the trap function to only look for signals that match only the unit's blood's type. e.g., if I format it as :
trap(signals= function() {
paste0("BloodNeeded_Type_",
get_attribute(env,'bloodtype') ) ,
I get the "there is no arrival running" error. I assume that is an issue with trying to get the blood arrival's attribute inside a trap function?