00001 // $Id: AAP_init.cpp,v 1.2 2003/12/03 01:52:30 magh Exp $ 00002 00003 /*------------------------------------------------------------------------- 00004 Author: Matthew Galati (magh@lehigh.edu) 00005 00006 (c) Copyright 2003 Lehigh University. All Rights Reserved. 00007 00008 This software is licensed under the Common Public License. Please see 00009 accompanying file for terms. 00010 ---------------------------------------------------------------------------*/ 00011 00012 #include "AAP_init.hpp" 00013 #include "AAP_tm.hpp" 00014 #include "AAP_lp.hpp" 00015 #include "AAP.hpp" 00016 00017 /*---------------------------------------------------*/ 00018 USER_initialize * BCP_user_init(){ 00019 //Initialize the USER interface to BCP 00020 return new AAP_init; 00021 } 00022 00023 /*---------------------------------------------------*/ 00024 BCP_lp_user * AAP_init::lp_init(BCP_lp_prob& p){ 00025 //Initialize the user-defined LP interface to BCP 00026 return new AAP_lp; 00027 } 00028 00029 /*---------------------------------------------------*/ 00030 BCP_tm_user * AAP_init::tm_init(BCP_tm_prob& p, 00031 const int argnum, 00032 const char * const * arglist){ 00033 00034 //Initialize the user-defined TM interface to BCP 00035 AAP_tm* tm = new AAP_tm; 00036 00037 //Read in the TM and LP parameters from the arg ParamFile: parameter file 00038 tm->tm_par.read_from_arglist(argnum,arglist); 00039 tm->lp_par.read_from_arglist(argnum,arglist); 00040 00041 //Read and construct the AAP data instance (a member of TM) 00042 string datafile(tm->tm_par.entry(AAP_tm_par::AAP_datafile).c_str()); 00043 tm->aap = new AAP(datafile); 00044 00045 return tm; 00046 }