Dispatch Logic for PyPSA with Electrical Load, Hydrogen Load and BESS

Hi everyone! So I am modelling a network in PyPSA made up of electrical loads, Hydrogen Loads and a BESS. I would like to understand how the loads are prioritized in PyPSA. In my model, I am forcing the wind and solar to operate exclusively based on their profiles instead of being dispatched. In case of any excess, I would like it to be used for hydrogen production and then if there’s still excess be used to charge a BESS. How do I implement this logic? I had inquired from one expert and he mentioned that PyPSA sees the Hydrogen load as a load that needs to be met and will therefore prioritize it like the electrical load. However the BESS is seen as a flexibility option and will therefore be last in the prioritization of loads to be met. I am looking also looking for sources/documentation to support this logic. Thank you