A general space-time model for combinatorial optimization problems (and not only)