1.     What does the tool do?
       Performs an abstraction level 0 and level 1 analysis on engine architectures.
2.     How does it work?
       A java program Builds an AMPL (level 0, 1)  and MATLAB (level 1) models from templates 
3.     What files are included?
       Java source, AMPL and MATLAB templates, Excel files 
4.     What language is it coded in?
       Java 
5.     What platform does it run on?
       Windows 
6.     How do you execute it?
       First the system must be built and configured (see below).
       There is a server and client component for the system. The server must be started first.
       Open a DOS Prompt window and navigate to the DEPLOY directory (H:\META2 for this example)
       run the runServer.bat to launch the RMI Services.

You should see the following :

RMI Registry started
Thrust Specific Fuel Consumption TSFC Service started
MATLAB location "YOUR MATLAB LOCATION matlab\R2010a\bin\matlab";
Fuel Consumption Service started
AEE Service started
Repository Service started

      
       Note: It takes some time for MATLAB to initialize

       Open a second DOS Prompt window and again navigate to the DEPLOY directory.
       run the runClient.bat script with 3 arguments platform, level and mission. Microsoft Excel
       will popup and a macro will enumerate architectures that will be optimized with AMPL

       runClient engine 0 mymission



       In the Server window you will see output like the following :


Number of objective function evaluations             = 51
Number of objective gradient evaluations             = 46
Number of equality constraint evaluations            = 51
Number of inequality constraint evaluations          = 51
Number of equality constraint Jacobian evaluations   = 46
Number of inequality constraint Jacobian evaluations = 46
Number of Lagrangian Hessian evaluations             = 45
Total CPU secs in IPOPT (w/o function evaluations)   =      0.093
Total CPU secs in NLP function evaluations           =      0.000

EXIT: Optimal Solution Found.

Ipopt 3.8.0: Optimal Solution Found

suffix ipopt_zU_out OUT;
suffix ipopt_zL_out OUT;
solution status: solved 0
AMPL Results for Arch_12 written to .\a.12
Repository: stored architecture 12 for platform engine level 0

When the client program has finished, you must close down Excel, and MATLAB, and the Sever. You
shutdown the Server window by ^C in its DOS window. 

=======================================================================================================
System Requirements:
MATLAB version R2010a or higher. 
AMPL and IPOPT solver. 
Microsoft Excel 2010 
Java JDK 1.6
ANT 1.7 or greater
Eclipse 

Building the system 
For this example, the system will be built from T:\Temp\MetaBuilder. It is assumed that the
zip file containing this distribution was unzipped to T:\Temp
The following 3rd party jars must be obtained and installed in the following locations:
 Directory of T:\Temp\MetaBuilder\work\Aee\lib

09/01/2011  12:19 PM           152,797 jdom.jar
               1 File(s)        152,797 bytes

 Directory of T:\Temp\MetaBuilder\work\FuelConsumption\lib

09/01/2011  12:19 PM           152,797 jdom.jar
09/01/2011  12:19 PM           239,262 jgrapht-jdk1.6.jar
09/06/2011  10:28 AM           200,089 matlabcontrol-4.0.0.jar
               3 File(s)        592,148 bytes

 Directory of T:\Temp\MetaBuilder\work\RMI\lib

09/01/2011  12:19 PM           226,915 jaxen-1.1.1.jar
09/01/2011  12:19 PM           152,797 jdom.jar
               2 File(s)        379,712 bytes

 Directory of T:\Temp\MetaBuilder\work\MetaController\lib

09/07/2011  01:16 PM           152,797 jdom.jar
               1 File(s)        152,797 bytes

 Directory of T:\Temp\MetaBuilder\work\MetaVisualization\lib

09/08/2011  11:50 AM           226,915 jaxen-1.1.1.jar
09/08/2011  11:50 AM           152,797 jdom.jar
               2 File(s)        379,712 bytes

http://code.google.com/p/matlabcontrol for matlabcontrol-4.0.0.jar
http://www.jdom.org for jdom.jar
http://www.jaxen.org for jaxen-1.1.1.jar
http://www.jgrapht.org for jgrapht-jdk1.6.jar

Make sure Ant and JDK 1.6 are in your path


Configure the system 

Edit the buildsetup.bat file and update values for your Eclipse location and
the directory where you wish the runtime distribution to be stored. For these
instructions, the deploy directory will be H:\META2
set ECLIPSEHOME=C:\eclipse
set DEPLOYDIR=h:\MetaII

Now run ant to build the system 

ant -f build.xml build

Now run ant again to deploy the system to H:\META2 (really what you've set DEPLOYDIR see above)

ant -f build.xml deploy

Edit fuelconsumption.properties  found in H:\META2\data
You need to update the matlab.location with the location where you have MATLAB installed.
You need to update template.dir to point to H:\\META2\\Templates
You need to update level1.template.dir to H:\\META2\\Templates
# The MATLAB executable location
matlab.location = "K:\\test\\Wnt\\math\\matlab\\R2010a\\bin\\matlab";
# MATLAB visible or hidden
matlab.visible = false
# MATLAB working directory 
matlab.workspace=H:\META2\Functions 
# The mfile that MATLAB will run
matlab.mfile = solver
# The MATLAB timeout 
matlab.timeout = 360000
#model template location
template.dir = H:\\META2\\Templates
level1.template.dir = H:\\META2\\Templates
# For debugging and testing the tool chain - returns a fake response.
mode.nop = false

Edit tsfc.properties found in H:\META2\data
template.dir = H:META2\\Templates\\level0

Edit runServer.bat found in H:\META2\bin
update the PATH for Java
update AMPL_HOME to point to your AMPL distribution  example ->  -DAMPL_HOME=D:\meta\ampl
Edit runClient.bat found in H:\META2\bin
update the PATH for Java