Changeset 2063


Ignore:
Timestamp:
Dec 29, 2009 4:56:35 PM (10 years ago)
Author:
wehart
Message:

Reformatting this example to make it narrower.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pyomo/trunk/examples/pyomo/p-median/solver2.py

    r2045 r2063  
    4646            val=0.0
    4747            for j in range(1,instance.M.value+1):
    48                 val += min([instance.d[i,j].value for i in range(1,instance.N.value+1) if sol[i-1] == 1])
     48                val += min([instance.d[i,j].value
     49                            for i in range(1,instance.N.value+1)
     50                            if sol[i-1] == 1])
    4951            if best is None or val < best:
    5052                best=val
Note: See TracChangeset for help on using the changeset viewer.