Ejemplo n.º 1
0
#pylint: disable=W0201
""" The FirmMultiTechnologies class allows you to set up firm agents with
complex or several production functions. While the simple Firm automatically
handles one technology, FirmMultiTechnologies allows you to manage several
technologies manually.

The create_* functions allow you to create a technology and assign it to
a variable. :meth:`abce.FirmMultiTechnologies.produce` and similar
methods use this variable to produce with the according technology.
"""
from __future__ import division
import operator
from builtins import object
from abce.trade import get_epsilon
from abce.notenoughgoods import NotEnoughGoods
epsilon = get_epsilon()


class FirmMultiTechnologies(object):
    def produce_use_everything(self, production_function):
        """ Produces output goods from all input goods, used in this
        production_function, the agent owns.

        Args::

            production_function: A production_function produced with
            py:meth:`~abceagent.FirmMultiTechnologies.create_production_function`, py:meth:`~abceagent.FirmMultiTechnologies.create_cobb_douglas` or
            py:meth:`~abceagent.FirmMultiTechnologies.create_leontief`

        Example::
Ejemplo n.º 2
0
""" The FirmMultiTechnologies class allows you to set up firm agents with
complex or several production functions. While the simple Firm automatically
handles one technology, FirmMultiTechnologies allows you to manage several
technologies manually.

The create_* functions allow you to create a technology and assign it to
a variable. :meth:`abce.FirmMultiTechnologies.produce` and similar
methods use this variable to produce with the according technology.
"""
from __future__ import division
import operator
from builtins import object
from functools import reduce
from abce.trade import get_epsilon
from abce.notenoughgoods import NotEnoughGoods
epsilon = get_epsilon()


class FirmMultiTechnologies(object):
    def produce_use_everything(self, production_function):
        """ Produces output goods from all input goods, used in this
        production_function, the agent owns.

        Args::

            production_function: A production_function produced with
            py:meth:`~abceagent.FirmMultiTechnologies.create_production_function`, py:meth:`~abceagent.FirmMultiTechnologies.create_cobb_douglas` or
            py:meth:`~abceagent.FirmMultiTechnologies.create_leontief`

        Example::