[Bazel] enable highs for linear_solver by default; better support for highs in linear_solver; read .lp file in solve_model.py

This commit is contained in:
Laurent Perron
2025-08-05 10:26:22 -07:00
parent 9fa0db877b
commit 4ffb359524
3 changed files with 21 additions and 19 deletions

View File

@@ -32,11 +32,15 @@ def main(argv: Sequence[str]) -> None:
model = model_builder.ModelBuilder()
# Load MPS or proto file.
# Load MPS, LP, or proto file.
if _INPUT.value.endswith(".mps"):
if not model.import_from_mps_file(_INPUT.value):
print(f"Cannot import MPS file: '{_INPUT.value}'")
return
elif _INPUT.value.endswith(".lp"):
if not model.import_from_lp_file(_INPUT.value):
print(f"Cannot import LP file: '{_INPUT.value}'")
return
elif not model.import_from_proto_file(_INPUT.value):
print(f"Cannot import Proto file: '{_INPUT.value}'")
return