flextool
flextool copied to clipboard
Infeasible model not reported
I had an infeasible model:
Model name : flextool
Model status : Infeasible
Simplex iterations: 350
Objective value : -2.2600252500e+01
Relative P-D gap : 1.9498193202e-04
HiGHS run time : 0.00
Writing the solution to flextool.sol
HiGHS solved the problem
That results in flextool.sol that glpsol does not output with write functions. Consequently, there were no files and flextoolrunner.py fails as it cannot find all result files (even though glpsol does not report issues):
Reading basic solution from '/home/jkiviluo/sources/flextool/flextool.sol'...
1643 lines were read
GLPSOL wrote the results into csv files
INFO:flextoolrunner.py:1863:Success!
ERROR:run_flextool.py:64:Model run failed: [Errno 2] No such file or directory: 'output/annualized_dispatch_costs__period__t.csv'
Traceback:
Traceback (most recent call last):
File "run_flextool.py", line 62, in main
return_code = runner.run_model()
^^^^^^^^^^^^^^^^^^
File "/home/jkiviluo/sources/flextool/flextool/flextoolrunner.py", line 1915, in run_model
os.remove("output/annualized_dispatch_costs__period__t.csv")
FileNotFoundError: [Errno 2] No such file or directory: 'output/annualized_dispatch_costs__period__t.csv'
Kernel died (×_×)
Probably because of the clumsy way of checking of infeasibility. Try to change the check to search for only the word 'Infeasible' from the highs.log.