If I understand this correctly, you do not want to do the coding in
AMPL. AMPL sets up models but does not solve them -- it exports the
necessary data to a solver, then imports the solution from the
solver. You need to code your algorithm in C++, Java or (dare I say?)
Fortran, perhaps using third-party libraries to do simplex
calculations etc.
If you want to use AMPL to generate the problems, you can have AMPL
export a problem file in a suitable format (if there is one), then
include in your code a routine to read the problem in. If you want
AMPL also to display and process the solution, you'll need to
investigate how to connect AMPL to a solver. I believe there is
information about that on the AMPL web site.
I have very limited experience with bilinear models, so I don't know
whether you can use something like MPS format for the problem files.
I'll leave that to someone else to address.
/Paul