# How to use a web-embedded model in a computational workflow?

There is a model embedded in a web browser (Caprio 1998) that I would like to use in an MCMC algorithm. What is the best way to do this?

I could implement the model in my favorite language but I would like to know if it is possible to either write a web-scraping / mechanize script to evaluates the model and dumps the output into a file, or somehow capture the existing model implementation as a desktop executable.

The interface is fairly straightforward:

And I envision a script that takes the parameters in the fields on the left side as inputs, and returns the results provided in the right column of fields as outputs:

 ./runmodel.sh 0.001 0.002 1 0.04 0.001 1.0 1.0 0.5 0 > model.out


Can I efficiently do this using the current implementation (in Java 1.0), or should I just start from scratch?

Caprio, MA (1998) The evolution of resistance: a simple deterministic model. http://web.archive.org/web/20011118202519/http://www.msstate.edu/Entomology/PGjava/ILSImodel.html

-
Having the source code here web.archive.org/web/20020129140946/http://www.msstate.edu/…, wouldn't it be easier to write a simpler interface (say, getting rid of the GUI) in Java? – Juanlu001 Apr 18 '12 at 10:11
@Juanlu001 yep. That helps me for this specific case (but the question would still hold for the general case). I did not see that the code was available on my first pass. Thanks. – David Apr 18 '12 at 22:16