Online partitioning method for decentralized control of linear switching large-scale systems