Warehouse/Stores seems like a common problem to solve. I assume you have load the Y matrix of stores similarly (read all var _NUM_ into Y;). How to you actually figure out which store should be supplied by which warehouse. Is there a way to use ID variables? Can you show the full code with this example?