Changeset 880 for trunk/openopt/scikits/openopt/examples/userCallback.py
- Timestamp:
- 02/23/08 02:53:57 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openopt/scikits/openopt/examples/userCallback.py
r731 r880 33 33 # print 'curr x[:8]:', p.xk[:8] 34 34 print 'max constraint value', p.rk 35 36 """ 37 BTW you can store data in any unique field of p 38 for example 39 if some_cond: p.JohnSmith = 15 40 else: p.JohnSmith = 0 41 42 However, special field "user" is intended for the purpose: 43 p.user.mydata1 = (something) 44 # or, for another example: 45 if p.iter == 0: p.user.mylist = [] 46 p.user.mylist.append(something) 47 """ 35 48 36 49 if p.fk < 1.5 and p.rk < p.contol:
