Autonomy and viability in agent-based manufacturing systems