I assume that the batteries are partitioned into clusters (i.e. each battery is in exactly one cluster). A little bit of GAMS code could check this and abort if false: this prevents a lot of head-scratching about infeasible models in case of data errors.
You could just have a variable P(cluster) instead of P(bat). To do this you would need to rewrite any algebra using P(bat) to use P(cluster) instead. This might require adjusting sums or other algebra. This is a common thing to do in GAMS.
You could also have a variable Pcl(cluster) and add an equation like this:
You introduce some extra variables in the formulation, but probably not too many. Many (most?) solvers will remove the extra variables during presolve, so the solver ultimately gets the same model in either case.
Hi Steve, each battery is in exactly one cluster.
the point is that moving from P(bat) to P(clust) will lead to a different results (the constraint is on the power of each battery)