Inconsistent Solution Paths in Repeated Runs Using APPSI Interface Solvers in Pyomo

83 Views Asked by At

I am currently working with the PREP-SHOT energy expansion model, which is based on Python/Pyomo. For solving the model, I have configured the solver as follows:

solver = SolverFactory("appsi_highs")

However, upon multiple executions of the model, I observe varying solution paths. This results in different sets of decision variables, even though the objective function values remain constant. To explore this issue further, I switched to the Gurobi solver with the following configuration:

solver = SolverFactory("appsi_gurobi")

Again, I encountered varied solution paths across different runs, as indicated by changing model fingerprints. Interestingly, when I set the solver to:

solver = SolverFactory("gurobi", solver_io="python")

I achieve consistent solution paths.

To rule out model configuration as a source of uncertainty, I exported the model as an LP file before each solving and after creating model. The exported LP files were identical for all solvings.

I am seeking insights into why the solution paths differ when using the APPSI interface solvers, as opposed to the direct use of the Gurobi solver via gurobipy.

For replication of this issue, I have uploaded the necessary scripts and data files here. They are available for download, unzipping, and execution in the PREP-SHOT folder using the following commands:

cd PREP-SHOT
conda env create -f prep-shot.yml
conda activate prep-shot-dev
python run.py

Please note, running python run.py multiple times will demonstrate the differing solution paths.

0

There are 0 best solutions below