Simulation of inter slice switching

Hello Everyone.
I am trying to simulate inter-slice switching(ISS) for X number of UEs (let’s say 30 UEs) using a script and Python code for it. The code chooses some UEs to trigger ISS, the idea is to take the UEs from the current network slice(NS) and move them to a different one without keeping its connection with the current slice, therefore, I trigger first its deregistration and then its registration to a different NS. The deregistration is done with the command: nr-cli -e “deregister switch-off”, and registrations are done with the command: nr-ue -c config/ue.yaml.

The simulation works well for a couple of minutes, but suddenly it starts to throws the following warning:

[nas][warning]De-registration could not be triggered. UE is already –Deristered.
After that, the simulation crashes.

Could you help me with this issue?

Regards.

Hello, could you provide relevant logs, pcap files and scripts? And describe in detail how you executed it, thanks.

Thank you Jerry. The problem was solved with multiprocesses in python.