ContentsIndexHome
Example

void SLVMathProgramCallback::TellProgress() 

{ 

char titles[ 5*AOSI_PROGRESS_TITLE_LEN ], 

values[ 5*AOSI_PROGRESS_VALUE_LEN ]; 

 

/* SLV_current is a handle to a structure in which all kind 

of information for the current solve is stored. */ 

 

strcpy( titles, "Phase0" ); 

strcpy( values, "MIP0" ); 

 

strcpy( &titles[ AOSI_PROGRESS_TITLE_LEN ], "Iterations0" ); 

sprintf( &values[ AOSI_PROGRESS_VALUE_LEN ], "%d0", 

SLV_current.iterations ); 

 

strcpy( &titles[ 2*AOSI_PROGRESS_TITLE_LEN ], "Nodes0" ); 

sprintf( &values[ 2*AOSI_PROGRESS_VALUE_LEN ], "%d0", 

SLV_current.nodes ); 

 

strcpy( &titles[ 3*AOSI_PROGRESS_TITLE_LEN ], "Objective0" ); 

sprintf( &values[ 3*AOSI_PROGRESS_VALUE_LEN ], "%.8f0", 

SLV_current.objective ); 

 

strcpy( &titles[ 4*AOSI_PROGRESS_TITLE_LEN ], "0" ); 

strcpy( &values[ 4*AOSI_PROGRESS_VALUE_LEN ], "0" ); 

 

PassProgressLines( 5, titles, values, 

SLV_current.mem_in_use ); 

} 

 

void SLVMathProgramCallback::TellPhase() 

{ 

char titles[ AOSI_PROGRESS_TITLE_LEN ], 

values[ AOSI_PROGRESS_VALUE_LEN ]; 

 

strcpy( titles, "Phase0" ); 

strcpy( values, "MIP presolve0" ); 

 

PassProgressLines( 1, titles, values, 

SLV_current.mem_in_use ); 

} 

Copyright © 1993–2016 by AIMMS B.V. All rights reserved.