Bilevel Optimization, DEA, argmax

Hello I am new here. Can anyone provide me an example of coding a bilevel program? Do I need to specify any solver for bilevel optimization? Also how to write a DEA model for a small no. of DMUs to find efficiency scores between two inputs x1,x2 and two outputs y1,y2 and also how to write an argmax of lower level function as the constraint of upper level function?

AMPL does not have a syntax specifically for writing bilevel programs. So it is necessary to reformulate a bilevel program as a single-objective problem before it can be written in the AMPL language.

One common approach is to write the argmax of the lower level objective function as constraints for the upper level objective function; in other words, to replace the lower-level problem with its optimality conditions. Details of this approach are given, for example, in this open-access paper: G.B. Allende and G. Still, Solving bilevel programs with the KKT-approach.