Skip to content

Commit

Permalink
note on knitro installation validation
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
  • Loading branch information
jeandemanged committed Dec 13, 2024
1 parent 5aa77c9 commit b3d8f75
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,35 @@ Knitro supports Linux, Windows, and macOS; however, its Java bindings are curren
- `KNITRODIR`: Path to the Knitro installation directory.
- `ARTELYS_LICENSE`: Path to the Knitro license file or its content.

You may then validate your installation by running one of the Java examples like this (here on Linux):

```bash
cd $KNITRODIR/examples/java/examples
# compile example
javac -cp ".;../lib/*" com/artelys/knitro/examples/ExampleNLP1.java
# run example
java -cp ".;../lib/*" com.artelys.knitro.examples.ExampleNLP1
```

<details>

<summary>Here an example output (click to expand)</summary>

```
$ java -cp ".;../lib/*" com.artelys.knitro.examples.ExampleNLP1
--- snip ---
Optimal constraint values (with corresponding multiplier)
c[0] = 1,000000 (lambda = -700,000000)
c[1] = 4,500000 (lambda = -0,000000)
Feasibility violation = 0,000000
Optimality violation = 0,000003
```

</details>


### Installing Knitro Java Bindings
Knitro Java bindings require a private JAR file that must be installed locally, as it is not available on Maven Central.
Use the following command:
Expand Down

0 comments on commit b3d8f75

Please sign in to comment.