Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buggy Model for csplib-prob008 #437

Open
StephanGocht opened this issue Jul 1, 2019 · 4 comments
Open

Buggy Model for csplib-prob008 #437

StephanGocht opened this issue Jul 1, 2019 · 4 comments

Comments

@StephanGocht
Copy link

The model for csplib-prob008 is buggy. It can happen that two containers have the same class in which case the separation function is undefined.

As I understand the problem the intended constraint is class(c1) != class(c2) instead of c1 != c2. This would avoid accessing undefined values of the separation function.

@ChrisJefferson
Copy link
Collaborator

This sounds sensible. We already have a function which enforces that containers are not on top of each other.

@ozgurakgun
Copy link
Collaborator

@ott2 says (over email). I copy it here Andras, to keep the discussion in one place (and visible to @StephanGocht)

The suggested fix is reasonable, but there needs to be a comment noting
that the spec assumes that the separation between two containers of the
same class is always 0.

There is an issue, since "separation" is defined over distinct pairs of
Class elements, so there is never a value for separation(x,x). As the
issue suggests, this constraint will then fail (with a silent undefined)
if there are ever two different containers from the same class, as
occurs with the harder of the two example param files.

The spec seems prematurely optimised. To avoid writing out the whole
matrix not only the lower triangle is removed, but also the diagonal.

The fix might depend on the intended semantics. I could certainly see
an instance where a certain maximum amount of radioactive isotopes can
be placed in a container, but one wants to separate such containers from
each other.

@ozgurakgun
Copy link
Collaborator

To add,

I wonder if it is at all sensible to have separation between two containers of the same class? If so, would it make sense to change the type of separation to:

separation : function (total) set (maxSize 2) of Class --> int(0..)

I am not sure if this makes sense, I need to remind myself the problem specification, probably after the summer school though :)

@ott2
Copy link
Collaborator

ott2 commented Jul 9, 2019

As mentioned in email, this would require the separation function to be defined even for the empty set and singletons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants