
1. Prerequisites for Deployment 

* pdptool_linuxpkg.zip after extraction must contain - 

 - pdptool: This is the pdptool executable.
 
 - This readme.txt
 
* This package requires  MATLAB Compiler Runtime (MCR), version 7.14.


 
========================================================================
MCR - MATLAB Compiler uses the MATLAB Compiler Runtime (MCR),
which is a standalone set of shared libraries that enable the execution
of M-files. The MCR provides complete support for all features of
MATLAB without the MATLAB GUI. When you package and distribute an
application to users, you include supporting files generated by the
builder as well as the MATLAB Compiler Runtime (MCR). If necessary,
run MCRInstaller to install the correct version of the MCR. For more
information about the MCR, see the MATLAB Compiler documentation.

For more information on the MCR Installer, see the MATLAB Compiler 
documentation.    

========================================================================

2. Verify that MCR version 7.14 is installed on your system.If it 
   is,continue to step (3).

   If the MCR is not installed or if it is an older version, download 
   the MCRInsaller.bin file from 

   http://stanford.edu/group/pdplab/pdptool/standalone/MCRv7.14/linux
	
    Run MCRInstaller by typing on the shell prompt ./MCRInstaller.bin
    
   (a) This will bring up a dialog box and start InstallShield wizard 
       for MATLAB Compiler Runtime.

   (b) Click on 'Next' button. You will be prompted for a directory name
       to install it in. You can create a new directory under your home 
       directory or if you have root access, you can specfiy any other 
       directory on the system.Let us call this directory MCRRootDir for
       future reference. Click the 'Next' button.

   (c) If the directory name is accepted, the install shield wizard will
       present a summary information. You can now click the 'Install' 
       button to initiate installation. It may take several minutes to 
       complete this process.

   (d) Click on 'Finish' to close the wizard.

3. Set up the environment- 

   (a) If you are using bash shell - ( If you are not sure about your   
       shell type echo $SHELL on the command prompt)

       place the following commands in your .bash_profile file after   
       replacing MCRRootDir with the name of the directory in which you     
       installed MCR Compiler Runtime( see step 1(b))

       .bash_profile file will be directly under your home directory. 

       MCRROOT=MCRRootDir
       MCRJRE=${MCRROOT}/v714/sys/java/jre/glnxa64/jre/lib/amd64
       LD_LIBRARY_PATH=${MCRROOT}/v714/runtime/glnxa64: 
       ${MCRROOT}/v714/bin/glnxa64:${MCRROOT}/v714/sys/os/glnxa64:    
       ${MCRJRE}/native_threads:${MCRJRE}/server:${MCRJRE}/client: 
       ${MCRJRE}
       export XAPPLRESDIR ${MCRROOT}/v714/X11/app-defaults
       export LD_LIBRARY_PATH ${LD_LIBRARY_PATH}
       
       Add pdptool executable to your PATH environment variable.        
       Replace pdptool_path with the full directory name of the 
       extracted package.
       export PATH=${PATH}:pdptool_path

       The above changes to .bash_profile file will be applied when you 
       source the file using the command : 
       source .bash_profile 

    (b) If you are using C shell, place the following commands in your   
        .cshrc file after replacing MCRRootDir with the name of the 
        directory in which you installed MCR Compiler Runtime ( see 
        step 1(b))

       .cshrc file will be directly under your home directory. 
 
        set MCRROOT=MCRRootDir
        set MCRJRE = ${MCRROOT}/v714/sys/java/jre/glnxa64/jre/lib/amd64
        set LD_LIBRARY_PATH = ${MCRROOT}/v714/runtime/glnxa64:
        ${MCRROOT}/v714/bin/glnxa64:${MCRROOT}/v714/sys/os/glnxa64:   
        ${MCRJRE}/native_threads:${MCRJRE}/server:${MCRJRE}/client:
        ${MCRJRE}
        setenv XAPPLRESDIR ${MCRROOT}/v714/X11/app-defaults
        setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}

        Add pdptool executable to your PATH environment variable.    
        Replace pdptool_path with the full directory name of the 
        extracted package

        set path= ( ${path} pdptool_path )

        The above changes to .cshrc file will be applied when you 
        source the file using the command : 
        source .cshrc

4. You are now ready to start using pdptool.

   To just bring up the gui to create your own network, you can simply
   double click the pdptool.exe icon.

   To run any existing networks based on preconfigured network
   scripts, open a shell or terminal of your choice. Change directory 
   to where your .m scripts reside. For example, you might have the 
   pdptool directory hierarchy with subdirectories in 
   /home/YourUserName/ .  
   
   If you want to run the iac model using the jets.m script, you would
   cd to /home/YourUserName/pdptool/iac.

   Then, on the command line, you would type:

      pdptool jets.m

   This will bring up the gui and execute all the statements in jets.m
   file. 

   You will notice on the cmd prompt, a pdp prompt like this -

   '>>pdp'
   
   You can type more pdptool commands on the pdp prompt to inspect
   variables and/or set options. You can also execute files containing
   sets of commands using 'runscript script.ext' where 'script.ext' is
   the name of the script file.  Ext can be 'm' or 'txt', among
   others. Each line of the file must contain a single complete matlab
   expression in ascii text format.

