Skip to content

11.1 Traders Move Part III (Maximize Welfare) #1

@huizhao0804z

Description

@huizhao0804z

I met the error as follows:


TypeError Traceback (most recent call last)

in
1 model = SugarcapeG1mt()
----> 2 model.run_model(step_count=1)

4 frames

in calculate_welfare(self, sugar, spice)
49 m_total = self.metabolism_sugar + self.metabolism_spice
50 # Cobb-Douglas functional form
---> 51 return sugar**(self.metabolism_sugar/m_total) * spice**(
52 self.metabolism_spice/m_total) # Error: cannot use / on tuples
53

TypeError: unsupported operand type(s) for /: 'tuple' and 'tuple'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions