Пример #1
0
    def play_1(self):
        # P1/A - propose contract
        fixed_pay = random.choice(money_range(-self.subsession.max_fixed_payment, self.subsession.max_fixed_payment, 0.50))
        return_share = random.choice([x/100.0 for x in range(10, 110, 10)])

        time.sleep(sleep_seconds())
        self.submit(views.Offer,
                    {'agent_fixed_pay': fixed_pay,
                     'agent_return_share': return_share})
Пример #2
0
    def play(self):

        # start
        self.submit(views.Introduction)

        # bid
        self.submit(views.Bid, {'bid_amount': random.choice(money_range(0, Constants.max_bid_amount))})

        # results
        self.submit(views.Results)
Пример #3
0
    def play(self):
        # compete price
        self.submit(
            views.Decide, {
                'price':
                random.choice(
                    money_range(self.subsession.marginal_cost,
                                self.subsession.maximum_price, 0.05))
            })

        # results
        self.submit(views.Results)
Пример #4
0
    def play_1(self):
        # P1/A - propose contract
        fixed_pay = random.choice(
            money_range(-self.subsession.max_fixed_payment,
                        self.subsession.max_fixed_payment, 0.50))
        return_share = random.choice([x / 100.0 for x in range(10, 110, 10)])

        time.sleep(sleep_seconds())
        self.submit(views.Offer, {
            'agent_fixed_pay': fixed_pay,
            'agent_return_share': return_share
        })
Пример #5
0
    def play(self):

        # start
        self.submit(views.Introduction)

        # bid
        self.submit(views.Bid, {
            'bid_amount':
            random.choice(money_range(0, Constants.max_bid_amount))
        })

        # results
        self.submit(views.Results)
Пример #6
0
 def sp_choices(self):
     return money_range(0, self.cash, 0.5)
Пример #7
0
 def bid_amount_choices(self):
     return money_range(self.subsession.min_allowable_bid, self.subsession.max_allowable_bid, 0.05)
Пример #8
0
    def play(self):
        # compete price
        self.submit(views.Decide, {'price': random.choice(money_range(Constants.marginal_cost, Constants.maximum_price, 0.05))})

        # results
        self.submit(views.Results)
Пример #9
0
 def contribution_choices(self):
     return money_range(0, self.endowment, 1.00)
Пример #10
0
 def agent_fixed_pay_choices(self):
     return money_range(-Constants.max_fixed_payment, Constants.max_fixed_payment, 0.50)
Пример #11
0
 def bid_amount_choices(self):
     return money_range(Constants.min_allowable_bid, Constants.max_allowable_bid, 0.05)
Пример #12
0
 def bid_amount_choices(self):
     return money_range(self.subsession.min_allowable_bid,
                        self.subsession.max_allowable_bid, 0.05)
Пример #13
0
 def calculate_value(self):
     self.random_value = random.choice(money_range(0.00, 1.00))
Пример #14
0
 def sent_back_amount_choices(self):
     """Range of allowed values during send back"""
     return money_range(0, self.sent_amount * 3, self.subsession.increment_amount)
Пример #15
0
 def calculate_value(self):
     self.random_value = random.choice(money_range(0.00, 1.00))
Пример #16
0
 def sent_amount_choices(self):
     """Range of allowed values during send"""
     return money_range(0, self.subsession.amount_allocated, self.subsession.increment_amount)
Пример #17
0
 def request_amount_choices(self):
     """Range of allowed request amount"""
     return money_range(0, self.subsession.amount_shared, 0.05)
Пример #18
0
 def claim_choices(self):
     """Range of allowed claim values"""
     return money_range(self.subsession.min_amount,
                        self.subsession.max_amount, 0.05)
Пример #19
0
 def request_amount_choices(self):
     """Range of allowed request amount"""
     return money_range(0, self.subsession.amount_shared, 0.05)
Пример #20
0
 def bid_amount_choices(self):
     return money_range(0, Constants.max_bid_amount, 0.05)
Пример #21
0
 def bid_amount_choices(self):
     return money_range(0, self.subsession.max_bid_amount, 0.05)
Пример #22
0
 def contribution_choices(self):
     return money_range(0,self.subsession.endowment,1.00)
Пример #23
0
 def sp_choices(self):
     return money_range(0, self.cash, 0.5)
Пример #24
0
 def bid_amount_choices(self):
     return money_range(0, self.subsession.max_bid_amount, 0.05)
Пример #25
0
 def bid_amount_choices(self):
     return money_range(0, Constants.max_bid_amount, 0.05)
Пример #26
0
 def offer_amount_choices(self):
     return money_range(0, self.subsession.allocated_amount, 0.05)
Пример #27
0
 def offer_amount_choices(self):
     return money_range(0, Constants.allocated_amount, 0.05)
Пример #28
0
 def price_choices(self):
     return money_range(Constants.marginal_cost, Constants.maximum_price, 0.05)
Пример #29
0
 def price_choices(self):
     return money_range(Constants.marginal_cost, Constants.maximum_price,
                        0.05)
Пример #30
0
 def price_choices(self):
     return money_range(self.subsession.marginal_cost,
                        self.subsession.maximum_price, 0.05)
Пример #31
0
 def price_choices(self):
     return money_range(self.subsession.marginal_cost, self.subsession.maximum_price, 0.05)
Пример #32
0
 def agent_fixed_pay_choices(self):
     return money_range(-self.subsession.max_fixed_payment,
                        self.subsession.max_fixed_payment, 0.50)
Пример #33
0
 def agent_fixed_pay_choices(self):
     return money_range(-self.subsession.max_fixed_payment, self.subsession.max_fixed_payment, 0.50)
Пример #34
0
 def offer_amount_choices(self):
     return money_range(0, Constants.allocated_amount, 0.05)
Пример #35
0
 def claim_choices(self):
     """Range of allowed claim values"""
     return money_range(self.subsession.min_amount, self.subsession.max_amount, 0.05)
Пример #36
0
 def offer_amount_choices(self):
     return money_range(0, self.subsession.allocated_amount, 0.05)