Modeling of social and economic systems