Beispiel #1
0
    def produce(self, input_goods):
        """ Produces output goods given the specified amount of inputs.

        Transforms the Agent's goods specified in input goods
        according to a given production_function to output goods.
        Automatically changes the agent's belonging. Raises an
        exception, when the agent does not have sufficient resources.

        Args:
            {'input_good1': amount1, 'input_good2': amount2 ...}:
                dictionary containing the amount of input good used for the production.

        Raises:
            NotEnoughGoods:
                This is raised when the goods are insufficient.

        Example::

            self.set_cobb_douglas_production_function('car' ..)
            car = {'tire': 4, 'metal': 2000, 'plastic':  40}
            try:
                self.produce(car)
            except NotEnoughGoods:
                print('today no cars')
        """
        return FirmMultiTechnologies.produce(self, self._production_function, input_goods)
Beispiel #2
0
    def produce(self, input_goods):
        """ Produces output goods given the specified amount of inputs.

        Transforms the Agent's goods specified in input goods
        according to a given production_function to output goods.
        Automatically changes the agent's belonging. Raises an
        exception, when the agent does not have sufficient resources.

        Args:
            {'input_good1': amount1, 'input_good2': amount2 ...}:
                dictionary containing the amount of input good used for the production.

        Raises:
            NotEnoughGoods:
                This is raised when the goods are insufficient.

        Example::

            self.set_cobb_douglas_production_function('car' ..)
            car = {'tire': 4, 'metal': 2000, 'plastic':  40}
            try:
                self.produce(car)
            except NotEnoughGoods:
                print('today no cars')
        """
        return FirmMultiTechnologies.produce(self, self._production_function,
                                             input_goods)
Beispiel #3
0
 def sufficient_goods(self, input_goods):
     """ checks whether the agent has all the goods in the vector input """
     FirmMultiTechnologies.sufficient_goods(self)
Beispiel #4
0
 def sufficient_goods(self, input_goods):
     """ checks whether the agent has all the goods in the vector input """
     FirmMultiTechnologies.sufficient_goods(self)