Changeset 880

Show
Ignore:
Timestamp:
02/23/08 02:53:57 (9 months ago)
Author:
dmitrey.kroshko
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openopt/scikits/openopt/examples/userCallback.py

    r731 r880  
    3333        # print 'curr x[:8]:',  p.xk[:8] 
    3434        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    """ 
    3548     
    3649    if p.fk < 1.5 and p.rk < p.contol: