2

Summary of my issue:
I have system of linear equations out of a petri net like this (ILP):

int[][] a = {
        {-1, 0, 0, 0},
        {1, -1, 0, 0},
        {1, 0, -1, 0},
        {0, 1, 0, -1},
        {0, 0, 1, -1},
        {0, 0, 0, 1}};

    int[] A = {0, 0, -1, 0, 0, 1};

x1, x2, x3, x4>=0;
x1, x2, x3, x4;  //--> must be integer

These problems could have many more variables and constraints. The equations are never inequations. It also could be maximized or minimized.

I checked a few examples for all integer problems, but they couldn't handle systems with more variables than constrains or the other way around.

In a software like lp_solve I could handle these problems, but for this solution I have to handle to many .dll files and wrapper stuff.

I'm searching for a solution in Java or an easy embedding library. I would really appreciate your help, since I'm kind of stuck.

Pika Supports Ukraine
  • 3,612
  • 10
  • 26
  • 42
Chris A.
  • 21
  • 4
  • http://stackoverflow.com/questions/260442/linear-programming-tool-libraries-for-java – Holt Mar 03 '16 at 12:43

1 Answers1

0

I have some Java code you could maybe use that is feeding this stuff to an SMT solver.

Basically the Petri net is represented as two sparse matrices see class hosting the net

A usage example feeding this to an SMT solver as constraints can be found here : code feeding a state equation

Wrapping an SMT solver has proven more versatile and comfortable than having plugged an ILP solver in my experience.

Yann TM
  • 1,942
  • 13
  • 22