示例#1
0
文件: Ocp.py 项目: jgillis/rawesome
 def minimizeLsqEndTerm(self, obj):
     if isinstance(obj, list):
         obj = C.veccat(obj)
     C.makeDense(obj)
     shape = obj.shape
     assert shape[0] == 1 or shape[1] == 1, "objective cannot be matrix, got shape: " + str(shape)
     assert not hasattr(self, "_minLsqEndTerm"), "you can only call minimizeLsqEndTerm once"
     self._minLsqEndTerm = obj
示例#2
0
文件: Ocp.py 项目: psinha/rawesome
 def minimizeLsq(self, obj):
     if isinstance(obj, list):
         obj = C.veccat(obj)
     C.makeDense(obj)
     shape = obj.shape
     assert shape[0] == 1 or shape[
         1] == 1, 'objective cannot be matrix, got shape: ' + str(shape)
     assert not hasattr(self,
                        '_minLsq'), 'you can only call minimizeLsq once'
     self._minLsq = obj
示例#3
0
 def minimizeLsqEndTerm(self, obj):
     C.makeDense(obj)
     shape = obj.shape
     assert shape[0] == 1 or shape[1] == 1, 'objective cannot be matrix, got shape: '+str(shape)
     assert not hasattr(self, '_minLsqEndTerm'), 'you can only call minimizeLsqEndTerm once'
     self._minLsqEndTerm = obj