Changeset 2064 for coopr.pyomo/trunk/coopr/pyomo/presolve/identify_vars.py
 Timestamp:
 Dec 29, 2009 5:16:16 PM (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

coopr.pyomo/trunk/coopr/pyomo/presolve/identify_vars.py
r1993 r2064 70 70 tmp.id = self.vnum 71 71 model._var[self.vnum] = tmp 72 if model._var[self.vnum].is_binary(): 73 model.statistics.number_of_binary_variables += 1 74 elif model._var[self.vnum].is_integer(): 75 model.statistics.number_of_integer_variables += 1 76 else: 77 model.statistics.number_of_continuous_variables +=1 72 78 self.vnum += 1 73 79 # … … 88 94 self.cnum=0 89 95 self.onum=0 96 model.statistics.number_of_binary_variables = 0 97 model.statistics.number_of_integer_variables = 0 98 model.statistics.number_of_continuous_variables = 0 90 99 # 91 100 # Indicate that all variables are unused … … 122 131 model._con[self.cnum] = C._data[cndx] 123 132 self.cnum += 1 124 model. vnum=self.vnum125 model. cnum=self.cnum126 model. onum=self.onum133 model.statistics.number_of_variables=self.vnum 134 model.statistics.number_of_constraints=self.cnum 135 model.statistics.number_of_objectives=self.onum 127 136 return model 128 137
Note: See TracChangeset
for help on using the changeset viewer.