Could you write some more background on this. There are loads of excellent textbooks about this to take inspiration from. At least define the objects you are dealing with, and the problem we are solving, and its solutions