Пример #1
0
	def cpi(self):
		"""
		Returns the common problem interface. 
		
		Subgradient is not supported. 
		
		xmin is also not available. 
		
		See the :class:`CPI` class for more information. 
		"""
		itf=self.prepareCPI(self.n, self.m)
		itf['name']=self.name
		itf['x0']=self.initial
		itf['f']=MemberWrapper(self, 'f')
		itf['c']=MemberWrapper(self, 'c')
		
		# Gradient is not supported
		# itf['g']=MemberWrapper(self, 'g')
		
		if 'fmin' in self.__dict__:
			itf['fmin']=self.fmin
		
		itf['clo']=self.cl
		itf['chi']=self.ch
		
		return self.fixBounds(itf)
		
Пример #2
0
    def cpi(self):
        """
		Returns the common problem interface. 
		
		xmin is not available. 
		
		See the :class:`CPI` class for more information. 
		"""
        itf = self.prepareCPI(self.n, m=self.nc)
        itf['name'] = self.name
        itf['x0'] = self.initial
        itf['f'] = MemberWrapper(self, 'f')
        itf['c'] = MemberWrapper(self, 'c')

        itf['g'] = MemberWrapper(self, 'g')
        itf['cg'] = MemberWrapper(self, 'cjc')

        if 'fmin' in self.__dict__:
            itf['fmin'] = self.fmin

        itf['xlo'] = self.xl
        itf['xhi'] = self.xh
        itf['clo'] = self.cl
        itf['chi'] = self.ch

        return self.fixBounds(itf)
Пример #3
0
    def cpi(self):
        """
		Returns the common problem interface. 
		
		Gradient is not supported. 
		Anyway it is valid only where the functions are smooth. 
		
		xmin is also not available. 
		
		See the :class:`CPI` class for more information. 
		"""
        itf = self.prepareCPI(self.n, m=self.nc)
        itf['name'] = self.name
        itf['x0'] = self.initial
        itf['f'] = MemberWrapper(self, 'f')
        itf['c'] = MemberWrapper(self, 'c')
        itf['setup'] = MemberWrapper(self, 'setup')

        # Gradient is not supported
        # itf['g']=MemberWrapper(self, 'g')
        # itf['cg']=MemberWrapper(self, 'cg')

        if 'fmin' in self.__dict__:
            itf['fmin'] = self.fmin

        itf['xlo'] = self.xl
        itf['xhi'] = self.xh
        itf['clo'] = self.cl
        itf['chi'] = self.ch

        return self.fixBounds(itf)
Пример #4
0
    def cpi(self):
        """
		Returns the common problem interface. 
		
		xmin, fmin, and g are not available. 
		
		The info member of the returned dictionary is itself a dictionary with 
		the following members:
		
			* ``m`` - m parameter of the MWBM problem
			* ``s`` - s parameter of the MWBM problem
		
		See the :class:`CPI` class for more information. 
		"""
        itf = self.prepareCPI(self.n, m=0)
        itf['name'] = self.name
        itf['x0'] = self.initial
        itf['f'] = MemberWrapper(self, 'f')

        # No reliable minima available at this point
        #if self.problemType==0:
        #	itf['fmin']=self.fminTab[self.num]

        itf['info'] = {'m': self.m, 's': self.s}

        return self.fixBounds(itf)
Пример #5
0
	def cpi(self):
		"""
		Returns the common problem interface. 
		
		Gradient is not supported. 
		
		xmin and fmin are not available. 
		
		See the :class:`CPI` class for more information. 
		"""
		itf=self.prepareCPI(self.n, m=0)
		itf['name']=self.name
		itf['x0']=self.initial
		itf['f']=MemberWrapper(self, 'f')
		itf['setup']=MemberWrapper(self, 'setup')
		
		# Gradient is not supported
		# itf['g']=MemberWrapper(self, 'g')
		
		return self.fixBounds(itf)
Пример #6
0
        def cpi(self):
            """
			Returns the common problem interface. 
			
			xmin, f, and c are not available. Only fc is available. 
			
			See the :class:`CPI` class for more information. 
			"""
            itf = self.prepareCPI(self.n, m=self.nc)
            itf['name'] = self.name
            itf['x0'] = self.initial
            itf['fc'] = MemberWrapper(self, 'fc')
            itf['setup'] = MemberWrapper(self, 'setup')

            itf['xlo'] = self.xl
            itf['xhi'] = self.xh
            itf['clo'] = self.cl
            itf['chi'] = self.ch

            return self.fixBounds(itf)