Thank you very much Michael,
and sorry for missing the maling list and sending the email directly to you.
I applied
s.t. fred{b in 1..n, t in mouldTypes}: sum{i in I: mo[i]==t} x[i, b] <= 2 ;
doesn't limit the types to max 2.
To check whether s.t. fred worked properly, I added some printf stateme
Por favor no me envíen más correos, no pertenezco al grupo!!
El El vie, oct. 6, 2023 a la(s) 5:32 p.m., Leonardo Corato
escribió:
> Thank you very much Michael,
> and sorry for missing the maling list and sending the email directly to
> you.
>
> I applied
> s.t. fred{b in 1..n, t in mouldTypes}:
On Fri, 6 Oct 2023, Leonardo Corato wrote:
As you can see in bin 2 and 3 there are 3 mold types, so sadly s.t. fred is
not limiting to 2
I'd misunderstood.
I'd thought that you want no more than two of a given type.
Using an auxillary array is probably easiest:
y[t, b] == 1 iff bin b has an i
Your estimate of the number of bins necessary could be an underestimate.
It does not enforce the only two types in a bin requirement.
For larger problems, I think that that would be necessary.
--
Michael henne...@mail.cs.ndsu.nodak.edu
"Occasionally irrational explanations are required" -- Lu
On Fri, 6 Oct 2023, Michael Hennebry wrote:
Your estimate of the number of bins necessary could be an underestimate.
It does not enforce the only two types in a bin requirement.
For larger problems, I think that that would be necessary.
I think that all that is needed is another else if:
else