Changeset 3087


Ignore:
Timestamp:
Oct 13, 2010 1:30:18 PM (11 years ago)
Author:
jwatson
Message:

Fixing major issue identified in GUROBI plugin - string values were not being eval()ed when creating the solution object, which was causing all kinds of silliness downstream.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.plugins/trunk/coopr/plugins/mip/GUROBI.py

    r3086 r3087  
    182182                        soln.status = getattr(SolutionStatus, tokens[1])
    183183                    elif (tokens[0] == 'objective'):
    184                         soln.objective['f']=tokens[1]
     184                        soln.objective['f'].vale=eval(tokens[1])
    185185                    elif (tokens[0] == 'constraint'):
    186                         soln.constraint[tokens[1]].value = tokens[2]
     186                        soln.constraint[tokens[1]].value = eval(tokens[2])
    187187                    elif (tokens[0] == 'variable'):
    188                         soln.variable[tokens[1]].value = tokens[2]
     188                        soln.variable[tokens[1]].value = eval(tokens[2])
    189189                    else:
    190190                        setattr(soln, tokens[0], tokens[1])
Note: See TracChangeset for help on using the changeset viewer.