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

PNE bug #38

Open
ssriram1992 opened this issue Jun 16, 2020 · 4 comments
Open

PNE bug #38

ssriram1992 opened this issue Jun 16, 2020 · 4 comments
Assignees
Labels
Bug Something isn't working

Comments

@ssriram1992
Copy link
Owner

src/Games.cpp Game::EPEC::make_pure_LCP

The PNE constraints are wrong in both the cases - if part as well as else part.

In the if part, it should read this->lcpmodel->addGenConstrIndicator( pure_bin[count], 0, ... as opposed to that argument being 1.

In the else part we need GRB_LESS_EQUAL.

Please check. Let me know, if I am misunderstanding.

@ssriram1992 ssriram1992 added the Bug Something isn't working label Jun 16, 2020
@ssriram1992
Copy link
Owner Author

And for consistency, please name the constraint analogously in the if and the else clause. Currently, we have a name for the former, and none for the latter.

@gdragotto
Copy link
Collaborator

gdragotto commented Jun 16, 2020

There is indeed a bug, but I believe in the else part.

In the Indicator Constraint section pure_bin[i] is set to 1 whenever the polyhedron is not part of the support (GRB_EQUAL 0). Then, the sum of pure_bin is maximized, and hence we search for equilibria minimizing their supports.

The else part is a bug, which wasn't debugged since by default indicator constraints are on.

I guess probably it would be more intuitive to have something like:

if (indicators) {
      this->EPECObject->LCPModel->addGenConstrIndicator(
          pure_bin[count], 0,
          ...->LCPModel->getVarByName(
              "x_" + std::to_string(this->getPositionProbab(i, j))),
          GRB_EQUAL, 0, "PNE_" + std::to_string(count));}`

     else {
      ...->addConstr(
          ...->getVarByName(
              "x_" + std::to_string(this->getPositionProbab(i, j))),
          GRB_LESS_EQUAL, pure_bin[count],  "PNE_" + std::to_string(count));
    }

And then
setObjective(objectiveTerm, GRB_MINIMIZE);

@gdragotto
Copy link
Collaborator

However, we should check if the other side of the clause is enforced for the first part.
For instance, if pure_bin[count] is set to 1 if "x_something" is not 0

@ssriram1992
Copy link
Owner Author

We need not mind that. We are minimizing the sum of pure_bin[count]. So if it can possibly take a value 0, it will take a value 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants