Some integer linear programming needs more indexes than two. But this works
p = MixedIntegerLinearProgram(maximization=False, solver="GLPK")
x = p.new_variable(integer=True, nonnegative=True)
p.set_objective(sum(sum(x[i,t] for t in range(10)) for i in range(5)));
p.add_constraint(sum(sum(x[i,t] for t in range(10)) for i in range(5))<=1);
p.show()
and this doesn't.
p = MixedIntegerLinearProgram(maximization=False, solver="GLPK")
x = p.new_variable(integer=True, nonnegative=True)
p.set_objective(sum(sum(sum(x[i,j,t] for t in range(10)) for i in range(5)))for j in range(5));
p.add_constraint(sum(sum(sum(x[i,j,t] for t in range(10)) for i in range(5))) for j in range(5));
p.show()
Is there a way out ?