Your problem doesn't seem to be, "that the sum of the "agents" have to supply exactly a discrete portion of energy or nothing for each single demand ...", right? Or you did not understand me. So I'll try to describe my problem better, also because I found a solution.
In my problem, I have a set of agents where each one has a budget of certain resources, who can share the cost of tasks, which should be "executed" 1 time or not (many-to-many-assignment without the need to "execute" every task).
It means: the sum of partial solutions of agents for task x should be less or equal to cost of task x. The objective is to find the set of tasks with most value which agents can pay.
I'm working with gams software so i describe it in gams-style:
set a agents, t tasks
parameter cost(t), value(t)
parameter resources(a)
positive variable y(a,t) (non-int), part of agent a for cost of task t
objective:
maxvalue =e= sum((a,t), value(t) * y(a,t) / cost(t) );
agentresource_max_constraint(a).. sum(t, y(a,t)) =l= resources(a);
taskcost_max_constraint.. sum(a, y(a,t)) =l= cost(t);
As I wrote, I had a solution but didn't know how to separate partial task solutions. But now I found out that I can build a constraint with a
binary variable z(t)
taskcost_bin_constraint z(t) =e= sum(a, y(a,t)) / cost(t);
sum(a, y(a,t)) / cost(t)
in the equation formulation is something between 0 and 1 and by this constraint, z
is 0 for all less than 1 and 1 for 1.
with this taskcost_bin_constraint
objective would be:
maxvalue =e= sum(t, value(t) * z(t));
I was wondering but this works and gives me better solutions under the constraint, to build a task full or not.
Maybe you can also add such a constraint? A Constraint to fullfill the demands exactly, expressed in a expression with value between 0 and 1.