示例#1
0
文件: tests.py 项目: ccoppe/oTree
    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
文件: tests.py 项目: czehnder/oTree
    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
文件: tests.py 项目: ddarai/oTree
    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
文件: models.py 项目: czehnder/oTree
 def sp_choices(self):
     return money_range(0, self.cash, 0.5)
示例#7
0
文件: models.py 项目: ccoppe/oTree
 def bid_amount_choices(self):
     return money_range(self.subsession.min_allowable_bid, self.subsession.max_allowable_bid, 0.05)
示例#8
0
文件: tests.py 项目: czehnder/oTree
    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
文件: models.py 项目: ddarai/oTree
 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
文件: models.py 项目: ccoppe/oTree
 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
文件: models.py 项目: ccoppe/oTree
 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
文件: models.py 项目: ccoppe/oTree
 def calculate_value(self):
     self.random_value = random.choice(money_range(0.00, 1.00))
示例#16
0
文件: models.py 项目: ccoppe/oTree
 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
文件: models.py 项目: ccoppe/oTree
 def request_amount_choices(self):
     """Range of allowed request amount"""
     return money_range(0, self.subsession.amount_shared, 0.05)
示例#18
0
文件: models.py 项目: ccoppe/oTree
 def claim_choices(self):
     """Range of allowed claim values"""
     return money_range(self.subsession.min_amount,
                        self.subsession.max_amount, 0.05)
示例#19
0
文件: models.py 项目: ccoppe/oTree
 def request_amount_choices(self):
     """Range of allowed request amount"""
     return money_range(0, self.subsession.amount_shared, 0.05)
示例#20
0
文件: models.py 项目: czehnder/oTree
 def bid_amount_choices(self):
     return money_range(0, Constants.max_bid_amount, 0.05)
示例#21
0
文件: models.py 项目: ccoppe/oTree
 def bid_amount_choices(self):
     return money_range(0, self.subsession.max_bid_amount, 0.05)
示例#22
0
文件: models.py 项目: ddarai/oTree
 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
文件: models.py 项目: ccoppe/oTree
 def offer_amount_choices(self):
     return money_range(0, self.subsession.allocated_amount, 0.05)
示例#27
0
文件: models.py 项目: czehnder/oTree
 def offer_amount_choices(self):
     return money_range(0, Constants.allocated_amount, 0.05)
示例#28
0
文件: models.py 项目: czehnder/oTree
 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
文件: models.py 项目: ccoppe/oTree
 def price_choices(self):
     return money_range(self.subsession.marginal_cost, self.subsession.maximum_price, 0.05)
示例#32
0
文件: models.py 项目: ccoppe/oTree
 def agent_fixed_pay_choices(self):
     return money_range(-self.subsession.max_fixed_payment,
                        self.subsession.max_fixed_payment, 0.50)
示例#33
0
文件: models.py 项目: ccoppe/oTree
 def agent_fixed_pay_choices(self):
     return money_range(-self.subsession.max_fixed_payment, self.subsession.max_fixed_payment, 0.50)
示例#34
0
文件: models.py 项目: ddarai/oTree
 def offer_amount_choices(self):
     return money_range(0, Constants.allocated_amount, 0.05)
示例#35
0
文件: models.py 项目: ccoppe/oTree
 def claim_choices(self):
     """Range of allowed claim values"""
     return money_range(self.subsession.min_amount, self.subsession.max_amount, 0.05)
示例#36
0
文件: models.py 项目: ccoppe/oTree
 def offer_amount_choices(self):
     return money_range(0, self.subsession.allocated_amount, 0.05)