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

Support MOI.VariableBasisStatus and MOI.ConstraintBasisStatus attributes #169

Closed
mzy2240 opened this issue Apr 22, 2023 · 3 comments
Closed

Comments

@mzy2240
Copy link

mzy2240 commented Apr 22, 2023

Currently when running lp_sensitivity_report after getting an optimal solution, the following error would be raised

Unable to query LP sensitivity information because this solver does not support querying the status of variables in the optimal basis.
@odow
Copy link
Member

odow commented Apr 24, 2023

AmplNLWriter does not support returning basis information for the variables and constraints.

Can you point to any examples or options where calling an AMPL executable would write out the basis information to the .sol file?

@odow
Copy link
Member

odow commented Apr 25, 2023

Some solvers return a sstatus suffix. Here's a Gurobi solve:

shell> cat model.nl
g3 1 1 0
 1 1 1 0 0 0
 0 1
 0 0
 0 0 0
 0 0 0 1
 0 0 0 0 0
 1 1
 0 0
 0 0 0 0 0
C0
n0
O0 1
n0
x1
0 0
r
1 1
b
2 0
k0
J0 1
0 1
G0 1
0 1

shell> cat model.sol
Gurobi 9.5.1: optimal solution; objective 1

Options
3
1
1
0
1
1
1
1
1
1
objno 0 0
suffix 0 1 8 0 0
sstatus
0 1
suffix 1 1 8 0 0
sstatus
0 2

but adding basis support to AmplNLWriter seems very niche. Just use the proper solver APIs instead. The NL files are really intended for nonlinear programs.

@odow odow changed the title Support lp_sensitivity_report Support VariableBasisStatus and ConstraintBasisStatus May 10, 2023
@odow odow changed the title Support VariableBasisStatus and ConstraintBasisStatus Support MOI.VariableBasisStatus and MOI.ConstraintBasisStatus attributes May 10, 2023
@odow
Copy link
Member

odow commented Feb 20, 2024

Closing as won't fix. I don't see a need for this. The solvers which support basis status have corresponding packages with proper APIs.

@odow odow closed this as completed Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants