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