Here's a 2013 presentation, posted on https://ideas.repec.org, describing two user-developed commands that do mathematical optimization in Stata: lp (linear programming) and milp (mixed integer linear programming)

They look very handy, but does anyone know where to find them? -findit lp- turns up nothing, and I have so far been unable to reach the author, Choonjoo Lee