unittest/python/crocoddyl/kkt.py
def computeDirection(self, recalc=True):
        '''
        Compute the direction of descent for the current guess xs,us.
        if recalc is True, run self.calc() before hand. self.setCandidate
        must have been called before.
        '''
        if recalc:
            self.calc()
        self.computePrimalDual()

        p_x = self.primaldual[:self.ndx]
        p_u = self.primaldual[self.ndx:self.ndx + self.nu]
        ix = 0
        iu = 0
        dxs = []
        dus = []
        lambdas = []
        for model, data in zip(self.problem.runningModels, self.problem.runningDatas):
            ndx = model.ndx
            nu = model.nu
            dxs.append(p_x[ix:ix + ndx])
            dus.append(p_u[iu:iu + nu])
            lambdas.append(self.dual[ix:ix + ndx])
            ix += ndx
            iu += nu
        dxs.append(p_x[-self.problem.terminalModel.ndx:])
        lambdas.append(self.dual[-self.problem.terminalModel.ndx:])
        self.dxs = dxs
        self.dus = dus
        self.lambdas = lambdas
        return dxs, dus, lambdas

        Compute the direction of descent for the current guess xs,us.
        if recalc is True, run self.calc() before hand. self.setCandidate
        must have been called before.
        
Compute the direction of descent for the current guess xs,us.
if recalc is True, run self.calc() before hand. self.setCandidate
must have been called before.
Compute the direction of descent for the current guess xs us . if recalc is True run self . calc () before hand . self . setCandidate must have been called before .
def computeDirection(self, recalc=True):
        if recalc:
            self.calc()
        self.computePrimalDual()
        p_x = self.primaldual[:self.ndx]
        p_u = self.primaldual[self.ndx:self.ndx + self.nu]
        ix = 0
        iu = 0
        dxs = []
        dus = []
        lambdas = []
        for model, data in zip(self.problem.runningModels, self.problem.runningDatas):
            ndx = model.ndx
            nu = model.nu
            dxs.append(p_x[ix:ix + ndx])
            dus.append(p_u[iu:iu + nu])
            lambdas.append(self.dual[ix:ix + ndx])
            ix += ndx
            iu += nu
        dxs.append(p_x[-self.problem.terminalModel.ndx:])
        lambdas.append(self.dual[-self.problem.terminalModel.ndx:])
        self.dxs = dxs
        self.dus = dus
        self.lambdas = lambdas
        return dxs, dus, lambdas
def computeDirection ( self , recalc = True ) : if recalc : self . calc ( ) self . computePrimalDual ( ) p_x = self . primaldual [ : self . ndx ] p_u = self . primaldual [ self . ndx : self . ndx + self . nu ] ix = 0 iu = 0 dxs = [ ] dus = [ ] lambdas = [ ] for model , data in zip ( self . problem . runningModels , self . problem . runningDatas ) : ndx = model . ndx nu = model . nu dxs . append ( p_x [ ix : ix + ndx ] ) dus . append ( p_u [ iu : iu + nu ] ) lambdas . append ( self . dual [ ix : ix + ndx ] ) ix += ndx iu += nu dxs . append ( p_x [ - self . problem . terminalModel . ndx : ] ) lambdas . append ( self . dual [ - self . problem . terminalModel . ndx : ] ) self . dxs = dxs self . dus = dus self . lambdas = lambdas return dxs , dus , lambdas
Compute the direction of descent for the current guess xs,us.
Compute the direction of descent for the current guess xs us .
'''
        Compute the direction of descent for the current guess xs,us.
        if recalc is True, run self.calc() before hand. self.setCandidate
        must have been called before.
        '''
self
recalc