Giter VIP home page Giter VIP logo

minilp's People

Contributors

carrascomj avatar ztlpn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

minilp's Issues

Panic at 'called `Result::unwrap()` on an `Err` value: SingularMatrix'

Hi, and thanks for this great crate! I got a panic at minilp-0.2.2/src/solver.rs:1301:10:

self.lu_factors = lu_factorize(
    basic_vars.len(),
    |c| {
        orig_constraints_csc
            .outer_view(basic_vars[c])
            .unwrap()
            .into_raw_storage()
    },
    0.1,
    &mut self.scratch,
)
.unwrap(); // TODO: When is singular basis matrix possible? Report as a proper error.
// ^^^^^^^^^^^^^^^^^^^^^ this line

I have a somehow weird query, which contains 30 variables in format a[i] = a[i-1] * 1000 and two variables x, y with x = a[30] and y = a[30] + 1 and x <= y conditions. I guess singularity occurs due floating point errors, but I know nothing about simplex and your code.

Unrelated to this, how reliable is an Infeasible answer? People can attack my code by creating some constraints that are actually feasible but my code detects it as Infeasible, so even a panic is better than a false Infeasible for me. Would it work correct even in case of floating point errors? How I can validating the result, or restrict the input to prevent that?

Set up CI

Hi!

I noticed there is not Continuous Integration for this one. Let me know if a PR (github actions I suppose) for that would be interesting.

panic: StructureError::NonSortedIndices

I'm just starting to use minilp and it panics with an unwrapped NonSortedIndices error from the sprs crate when calling

problem.add_constraint(
                    &[
                        (node_var, 1.0),
                        (other_node_var, -1.0),
                        (additional_var, -1.0),
                    ],
                    ComparisonOp::Le,
                    0.0,
                );

The panic originates from minilp's lib.rs line 279

  CsVec::new(self.obj_coeffs.len(), expr.vars, expr.coeffs),

What am I doing wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.