#NEWLINE# def parse_output( self , outfile ) : #NEWLINE# #INDENT# fp = open ( outfile ) #NEWLINE# for row in fp : #NEWLINE# #INDENT# if row . startswith ( 'objective value' ) : #NEWLINE# #INDENT# obj_row = row #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# results = [ ] #NEWLINE# for row in row : #NEWLINE# #INDENT# '\n            objective value:               8\n            x1                             1   (obj:5)\n            x2                             1   (obj:3)\n            ' #NEWLINE# if ( row . strip ( ) == '' ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# x = row . split ( ) [ 0 ] #NEWLINE# results . append ( ( int ( x [ 1 : ] ) - 1 ) ) #NEWLINE# #UNINDENT# if results : #NEWLINE# #INDENT# self . obj_val = flexible_cast ( obj_row . split ( ':' ) [ 1 ] . strip ( ) ) #NEWLINE# #UNINDENT# fp . close ( ) #NEWLINE# if self . clean : #NEWLINE# #INDENT# self . cleanup ( ) #NEWLINE# #UNINDENT# return results