コード例 #1
0
    def set_swigwrapper(self, ds_swigwrapper):
        self._swigwrapper = ds_swigwrapper

        Xd = VariablePool()
        Xd.set_swigwrapper(DSGMASystemXd(DSDesignSpaceGMASystem(ds_swigwrapper)))
        ## for i in VariablePool():
        ##     if i not in self.dependent_variables:
        ##         raise NameError, 'Dependent Variables are inconsistent'
        self._dependent_variables = Xd.copy()
        Xd.set_swigwrapper(None)
        Xi = VariablePool()
        Xi.set_swigwrapper(DSDesignSpaceXi(ds_swigwrapper))
        self._independent_variables = Xi.copy()
        Xi.set_swigwrapper(None)
コード例 #2
0
    def set_swigwrapper(self, gma_swigwrapper):
        self._swigwrapper = gma_swigwrapper
        
        Xd = VariablePool()
        Xd.set_swigwrapper(DSGMASystemXd(gma_swigwrapper))
        for i in VariablePool():
            if i not in self.dependent_variables:
                raise NameError, 'Dependent Variables are inconsistent'

        Xi = VariablePool()
        Xi.set_swigwrapper(DSVariablePoolCopy(DSGMASystemXi(gma_swigwrapper)))
        self._dependent_variables = Xd.copy()
        self._independent_variables = Xi
        Xd.set_swigwrapper(None)
コード例 #3
0
 def set_swigwrapper(self, swigwrapper):
     self._swigwrapper = swigwrapper
     ## ds_swigwrapper = DSCyclicalCaseInternalDesignSpace(swigwrapper)
     
     Xd = VariablePool()
     Xd.set_swigwrapper(DSCyclicalCaseXd(swigwrapper))
     for i in VariablePool():
         if i not in self.dependent_variables:
             raise NameError, 'Dependent Variables are inconsistent'
     Xi = VariablePool()
     Xi.set_swigwrapper(DSCyclicalCaseXi(swigwrapper))
     self._independent_variables = Xi.copy()
     self._dependent_variables = Xd.copy()       
     Xd.set_swigwrapper(None)
     Xi.set_swigwrapper(None)
     eqs = list()
     eqs_expr = DSSSystemEquations(DSCyclicalCaseSSystem(self._swigwrapper))
     for i in xrange(0, DSCyclicalCaseNumberOfEquations(self._swigwrapper)):
         eqs.append(DSExpressionAsString(DSExpressionAtIndexOfExpressionArray(eqs_expr, i)))
         DSExpressionFree(DSExpressionAtIndexOfExpressionArray(eqs_expr, i))
     DSSecureFree(eqs_expr)
     self._ssystem = SSystem(self._equations,
                             name=self.name,
                             swigwrapper=DSSSystemCopy(DSCyclicalCaseSSystem(swigwrapper)))