00001 // Copyright (C) 2006, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 #ifndef AmplInterface_H 00004 #define AmplInterface_H 00005 typedef struct 00006 { 00007 int numberRows; 00008 int numberColumns; 00009 int numberBinary; 00010 int numberIntegers; /* non binary */ 00011 int numberSos; 00012 int numberElements; 00013 int numberArguments; 00014 int problemStatus; 00015 double direction; 00016 double offset; 00017 double objValue; 00018 double * objective; 00019 double * rowLower; 00020 double * rowUpper; 00021 double * columnLower; 00022 double * columnUpper; 00023 int * starts; 00024 int * rows; 00025 double * elements; 00026 double * primalSolution; 00027 double * dualSolution; 00028 int * columnStatus; 00029 int * rowStatus; 00030 int * priorities; 00031 int * branchDirection; 00032 double * pseudoDown; 00033 double * pseudoUp; 00034 char * sosType; 00035 int * sosPriority; 00036 int * sosStart; 00037 int * sosIndices; 00038 double * sosReference; 00039 int * cut; 00040 int * special; 00041 char ** arguments; 00042 char buffer[300]; 00043 int logLevel; 00044 int nonLinear; 00045 } ampl_info; 00046 #ifdef __cplusplus 00047 extern "C"{ 00048 #endif 00049 /* return nonzero if bad */ 00050 int readAmpl(ampl_info * info,int argc, char ** argv, 00051 void ** coinModel); 00052 /* frees some input arrays */ 00053 void freeArrays1(ampl_info * info); 00054 /* frees rest */ 00055 void freeArrays2(ampl_info * info); 00056 /* frees fake arguments */ 00057 void freeArgs(ampl_info * info); 00058 /* writes ampl stuff */ 00059 void writeAmpl(ampl_info * info); 00060 /* objective precision */ 00061 int ampl_obj_prec(); 00062 #ifdef __cplusplus 00063 } 00064 #endif 00065 #endif