Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[HELP] HiGHS via Pyomo (appsi_highs)

28 views
Skip to first unread message

Bobby Heyer

unread,
Apr 6, 2025, 10:23:03 PMApr 6
to Pyomo Forum

Hi all 

I’ve been using Pyomo 6.9.1 with HiGHS (via appsi_highs, highspy 1.10.0) and I'm running into issues on larger MILP models.

What works:
  • appsi_highs works perfectly on small to medium LP/MILP problems, even with time series dimensions (e.g., 1,000+ timesteps).

  • I’m using it via:
    solver = SolverFactory("appsi_highs")
    solver.solve(model)

What fails:
  • On larger and more complex MILP models, HiGHS fails silently.

  • These same models run fine with Gurobi and CBC.

  • With HiGHS, the solver just stops working abruptly - no traceback, no error message, just hard failure (CPU drops out, but the wheels keep spinning in script).

  • I suspect it's a memory fault or unhandled exception inside HiGHS.

What I need help with:
  1. How do I enable solver logs and diagnostic output?

  2. Where do HiGHS logs go by default?

  3. Does highspy support writing detailed logs or dump files like Gurobi/CPLEX through pyomo?

  4. How can I intercept errors or force a verbose mode for debugging?

  5. Is there a example guide somewhere on what works with HiGHS in pyomo and what doesn't (i.e. QC problems, etc)

Thanks in advance!


Siirola, John

unread,
Apr 6, 2025, 10:27:23 PMApr 6
to pyomo...@googlegroups.com

This is very likely to be an issue with capturing / logging the output from HiGHS.  As a first step in debugging, can you try checking out & installing Pyomo/main from GitHub?  There have been a couple additional fixes that have been merged in in the last couple weeks that *might* resolve the issue.

 

John

 

 

From: pyomo...@googlegroups.com <pyomo...@googlegroups.com> On Behalf Of Bobby Heyer
Sent: Sunday, April 6, 2025 8:23 PM
To: Pyomo Forum <pyomo...@googlegroups.com>
Subject: [EXTERNAL] [HELP] HiGHS via Pyomo (appsi_highs)

 

You don't often get email from bharbi...@gmail.com. Learn why this is important

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pyomo-forum/b84511fd-d83c-4e62-9b92-4ce48fa226a8n%40googlegroups.com.

Andres Ramos

unread,
Apr 7, 2025, 1:03:41 AMApr 7
to pyomo...@googlegroups.com
Hi,
We had a similar similar issue with HiGHS 1.10 to the mentioned and put a PR on their develpment (https://github.com/ERGO-Code/HiGHS/issues/2246#issuecomment-2744021600). They tested it and their answer that there was a question of time. The problem solved by Gurobi qickly took like one hour in HiGHS.
Andrés

De: 'Siirola, John' via Pyomo Forum <pyomo...@googlegroups.com>
Enviado: lunes, 7 de abril de 2025 4:27
Para: pyomo...@googlegroups.com <pyomo...@googlegroups.com>
Asunto: RE: [EXTERNAL] [HELP] HiGHS via Pyomo (appsi_highs)
 

Bobby Heyer

unread,
Apr 10, 2025, 7:54:25 PMApr 10
to Pyomo Forum
Hi All

Thank you all for your help

I've downloaded latest pyomo (6.9.2.dev0) from github and HiGHs solver now works with Pyomo

I've run a simple benchmarking test (attached if anyone wanted to replicate). 

and the results ... have been lackluster, with cbc consistently outperforming HiGHs in terms of speed on LP problems. 

Model Specification

·         Type: LP (maximization)

·         Vars: 5,000 continuous

·         Constraints: 2,000 inequalities

·         Matrix: dense (A is 2,000 × 5,000 → 10 million nonzeros)

·         Objective and constraints generated randomly with fixed seed

Each solver is run using a clean, newly built model inside a loop to eliminate side effects.


Solver Performance Summary

Model Build Time: pretty consistent, between 1:01.53 to 1:07.93 

  1. CBC (SolverFactory - CLI interface)

    • CBC internal solve time: 9.01

    • Total Pyomo runtime: 26.45 sec

    • Solver iterations: 57

    • Solved Objective: 5.35

  2. HiGHS (SolverFactory - CLI interface)

    • HiGHS internal solve time: 4.80 sec

    • Total Pyomo runtime: 36.16 sec

    • Solver iterations: 541

    • Solved Objective: 5.35

  3. HiGHS (appsi_highs interface)

    • HiGHS internal solve time: 4.85 sec

    • Total Pyomo runtime: 38.93 sec

    • Solver iterations: 541

    • Solved Objective: 5.35

  4. HiGHS (direct API using Highs() from pyomo.contrib.appsi)

    • HiGHS internal solve time: 4.96 sec

    • Total Pyomo runtime: 36.05 sec

    • Solver iterations: 541

    • Solved Objective: 5.35

  5. CBC (SolverFactory - CLI interface, repeated)

    • CBC internal solve time: 11.38

    • Total Pyomo runtime: 29.49 sec

    • Solver iterations: 57

    • Solved Objective: 5.35


Question

1.      Is this level of overhead (20+ seconds) expected when using HiGHS through Pyomo (especially appsi_highs and direct Highs())?

2.      Are there ways to reduce this overhead — e.g., reusing model data, caching structures, or skipping result checks?


Any suggestions or guidance would be appreciated. 


Kind Regards

Bobby

cbc_vs_highs.txt
Reply all
Reply to author
Forward
0 new messages