Growth and allocation of resources in economics: The agent-based approach