Changeset 1965
- Timestamp:
- Dec 6, 2009 2:26:40 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
coopr.plugins/trunk/coopr/plugins/mip/CPLEX.py
r1954 r1965 299 299 variable_name = None 300 300 variable_value = None 301 variable_reduced_cost = None 301 302 for i in range(1,len(tokens)): 302 303 field_name = string.strip(tokens[i].split('=')[0]) … … 306 307 elif field_name == "value": 307 308 variable_value = field_value 309 elif field_name == "reducedCost": 310 variable_reduced_cost = field_value 311 308 312 # skip the "constant-one" variable, used to capture/retain objective offsets in the CPLEX LP format. 309 313 if variable_name != "ONE_VAR_CONSTANT": … … 313 317 except: 314 318 soln.variable[variable_name].value = variable_value 319 try: 320 soln.variable[variable_name].rc = eval(variable_reduced_cost) 321 except: 322 soln.variable[variable_name].rc = variable_reduced_cost 315 323 elif tokens[0] == "constraint": 316 324 constraint_name = None
Note: See TracChangeset
for help on using the changeset viewer.