Changeset 1156

Show
Ignore:
Timestamp:
07/22/08 09:25:26 (4 months ago)
Author:
dmitrey.kroshko
Message:

some changes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openopt/scikits/openopt/Kernel/BaseProblem.py

    r1146 r1156  
    332332        for s in ['c', 'h']: 
    333333            if getattr(self.userProvided, s): 
    334                 getattr(self, s)(self.x0) 
     334                tmp = getattr(self, s)(self.x0) # I add ymp for debug 
    335335            else: 
    336336                setattr(self, 'n'+s, 0) 
  • trunk/openopt/scikits/openopt/Kernel/Function.py

    r1153 r1156  
    44from numpy import inf, asfarray, copy, all, any 
    55from oologfcn import OpenOptException 
     6from copy import deepcopy 
    67 
    78class oofun: 
     
    5455                self.f_val_prev = self.fun(Input) 
    5556        self.f_key_prev = copy(key_to_compare) 
    56         return copy(asfarray(self.f_val_prev)
     57        return deepcopy(self.f_val_prev
    5758 
    5859    __call__ = lambda self, *args: self.__getFunc__(*args) 
  • trunk/openopt/scikits/openopt/Kernel/objFunRelated.py

    r1128 r1156  
    7070                number = 0 
    7171                arr = [] 
    72                 for j, func in enumerate(fv): 
    73                     if not callable(func): 
    74                         func2 = lambda x, *args: func.get(x) 
    75                     else: func2 = func 
    76                     number += asarray(func2(*(p.x0,) + args)).size 
     72                for func in fv: 
     73#                    if func.__module__ == 'scikits.openopt.Kernel.Function': 
     74#                        func.x = p.x0 
     75                    number += asarray(func(*(p.x0,) + args)).size 
    7776                    arr.append(number) 
    7877                if len(arr) < number: p.functype[userFunctionType] = 'block'