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

Why the basis inverse for artifical variable at first iteration is the identity matrix? #172

Open
dxyzx0 opened this issue Apr 10, 2023 · 3 comments

Comments

@dxyzx0
Copy link

dxyzx0 commented Apr 10, 2023

From the code in OSI, I know that the artifical variable is defined as lb <= s <= ub, Ax - s = 0.

As a result, the basis matrix of the artificial variables s should be the -I instead of I(identity matrix), but in s.basisInverse, I still see I.

Can anyone explain this confusion?

@tkralphs
Copy link
Member

Could you post a minimal script that shows exactly what you're doing?

@dxyzx0
Copy link
Author

dxyzx0 commented Apr 10, 2023

I'm just trying to understand relationship and difference between the structural variables and artifical variables in CyLP.

Assume the problem is max c'x s.t. lA <= Ax <= uA, l <= x <= u. In CLP, the problem will become max c'x s.t. lA <= s <= uA, l <= x <= u, Ax = s. x are the structural variables and s are the artificial variables.

However, at the first iteration, I found that all the artifical variables are set to basic and with basisInverse same as the identity matrix, which is confused since the constraints are Ax - s = 0, the basisInverse of s should be -I instead of I.

I'm sure I make some mistakes. Can you help me about this?

@tkralphs
Copy link
Member

Your understanding is pretty much correct, but precisely what should be expected is a function of the exact form of the problem you hand to CyLP, so I was asking you to post actual code that builds an instance and passes it to CyLP where things don't behave as you expect. Then I can try to see why. It's often some minor detail of the code that is important in explaining things like this.

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

2 participants