Hello I have the following task but I am struggling to find a solution or ideas for it
We have a database with shop_results, shop_position and result class. The whole project is about a mini mall simulation that gets income for every shop after running it. We have settings, we look up the database for similar or the same settings in simulations, we get all results connected to these simulations, the application makes an assoc array position ->; revenue, based on the best revenue you sort the array, the sim gets the best performing shop, and gives him its best performing position, tries the same for each shop if it can’t give him its best position, it goes down the array to the next best position. As a result we get an array shop -> position, where the positions do not repeat. If there are no results in the database, the simulation runs as many times as positions we have (in a rollercoaster way) and does the above mentioned script to determine the best positioning of the shops.