Skip to content

No way to get logs for highs::Model::try_new #35

@taktoa

Description

@taktoa

Sometimes, when you call highs::Model::new, you get this vexing informationless output:

HiGHS error: invalid problem: Error

The only way around this is to patch the highs crate:

diff --git a/src/lib.rs b/src/lib.rs
index 3176008..a876b94 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -290,7 +290,7 @@ impl Model {
     /// Returns an error if the problem is incoherent
     pub fn try_new<P: Into<Problem<ColMatrix>>>(problem: P) -> Result<Self, HighsStatus> {
         let mut highs = HighsPtr::default();
-        highs.make_quiet();
+        // highs.make_quiet();
         let problem = problem.into();
         log::debug!(
             "Adding a problem with {} variables and {} constraints to HiGHS",

Can this be made configurable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions