Closed jcavat closed 5 years ago
6d97ca8 close first step of this issue
The implementation of your parsing rules (e.g. on this line) will fail if the variable isn't found in the HashMap
. So, you seem to assume, that all variables are always present in the output. Unfortunately, this isn't always true as e.g. CBC just puts nonzero values in the results file (if there are more than a certain number of variables).
E.g. this input yields an output which looks like:
Optimal (within gap tolerance) - objective value -4186.00000000
3 d3_v10 1 -724
7 d3_v19 1 -521
16 d3_v08 1 -172
19 d3_v13 1 -149
20 d3_v04 1 -141
21 d3_v05 2 -140
32 d1_v02 1 -334
33 d1_v01 1 -323
36 d1_v03 2 -288
39 d1_v22 2 -162
40 d1_v17 2 -154
54 d2_v02 1 -334
Good point ! 7d59fff should fix this
66a904b close second step of this issue
eval
should be used with caution. Need to add more test for this new feature.
Thanks to @zappolowski for the eval
function given here : https://github.com/jcavat/rust-lp-modeler/issues/37#issuecomment-544129756
This would change the dsl API
from:
to:
struct
eval
function can be call to eval the overall objective function of the problem