V2Xgithub / WiLabV2Xsim

V2X simulator
GNU General Public License v3.0
79 stars 32 forks source link

cbrActive=True causes error when BRAlgorithm is not 18 #23

Open chestnutcase opened 1 year ago

chestnutcase commented 1 year ago

The application parameter cbrActive is set to True by default. If left as true, running other BR algorithms like the centralized algorithms will result in an error because the CBR code assumes stationManagement.sensingMatrixCV2X exists, but this field is only populated when the BRAlgorithm is set to 18.

https://github.com/V2Xgithub/WiLabV2Xsim/blob/557c68d725aa7d423d00ebc946eb3e55b7234c2d/MatCBRcalculations/cbrUpdateCV2X.m#L19C41-L19C41

Would calculating CBR be meaningful for centralized algorithms as well? If we would like to support CBR when the BR algorithm is not 18, we need to populate the sensing matrix for all BR algorithm cases - i don't think this is unreasonable, UEs might be able to sense what channels are in use while also waiting for the command from control plane to decide which BR to use. Otherwise, we should disable CBR by default, and add an extra guard clause to make sure that CBR can only be active when the BR algorithm is 18.

xxxxxy211 commented 1 year ago

Me too, I found the same problem.

VittorioTodisco commented 8 months ago

Yes, cbrActive can cause an error if it is set to true for algorithms different than 18. Nevertheless, running algorithms like 101 (random allocation) don't need the sensing to select resources. Therefore the execution is very fast. I agree that it could make sense to calculate the CBR also for centralized algorithms (if needed), we just haven't been working anymore on such a topic for quite a while. It is also well known that centralized algorithms will achieve better performances than the autonomous mode.