ykrist / rust-grb

Rust library bindings to the Gurobi optimiser.
MIT License
19 stars 8 forks source link

Update parameters to version 9.1.2 #5

Closed sbeyer closed 2 years ago

sbeyer commented 2 years ago

The parameter list is updated for Gurobi 9.1.2.

This is performed by the following sh script:

echo param,dtype > build/params.csv
sed -n 's/^#define GRB_\(...\)_PAR_.*"\([A-Za-z0-9]\+\)"$/\2,\L\1/p' \
       /opt/gurobi912/linux64/include/gurobi_c.h >> build/params.csv

Fixes #4.

sbeyer commented 2 years ago

Note that cargo test does not succeed on my machine. However, I used this updated variant on my development code and it works as before for the parameters that existed before plus the new PoolSolutions and PoolSearchMode parameters work like a charm.

ykrist commented 2 years ago

I added some tests for check attributes/parameters are recognised by Gurobi, as well as instructions on how to run the tests in the readme. I found that ScenNX was incorrectly marked as a Model attribute (it's apparently a Var attribute) so the script may need to be tweaked.