from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'Round' players_per_group = None num_rounds = 20 instructions_template = 'Round/Instructions.html' determined_demand = [1433, 918, 425, 461, 1628,902, 861, 836, 1309, 217, 1466,1423, 1090, 1043, 1320, 1684, 838,405, 919, 1275, 1110, 906, 284,1313,1296, 1406, 1553, 534, 1144, 657] round_demand = [488,889,993, 1399, 626, 1102, 208, 1069, 888, 1410, 947, 1253, 1284, 573, 1777, 1103, 342, 539, 1431, 1074] underage = 9 overage = 3 name_apps = ['A', 'B'] class Subsession(BaseSubsession): def creating_session(self): players = self.get_players() for p in players: p.new_round_number = p.round_number + 30 class Group(BaseGroup): pass class Player(BasePlayer): quantity = models.IntegerField() demand = models.IntegerField() mismatch_cost = models.IntegerField() new_round_number = models.IntegerField()