Closed Mathijssch closed 3 years ago
@Mathijssch Thanks a lot for reporting this. I reproduced the error and I'll try to fix it.
I'm pasting this here for reference (from the auto-generated code):
/// Make constraints U
fn make_constraints() -> impl Constraint {
// - Cartesian product of constraints:
let bounds = CartesianProduct::new();
let idx_1 = 2;
let bounds = bounds.add_constraint(idx_1, NoConstraints::new());
bounds
let idx_2 = 5;
let xmin_2 :Option<&[f64]> = Some(&[-1.0,-2.0,-3.0,]);
let xmax_2:Option<&[f64]> = Some(&[0.0,10.0,-1.0,]);
let set_2 = Rectangle::new(xmin_2, xmax_2);
let bounds = bounds.add_constraint(idx_2, set_2);
bounds
}
The function returns bounds
prematurely.
The issue is solved in opengen version 0.6.3 (just released).
Describe the bug
In version 0.6.2 of Opengen, the following build error occurs whenever using Cartesian product constraints.
It likely has to do with line 200 in
optimization-engine/open-codegen/opengen/templates/optimizer.rs
. When I downgrade to version 0.6.0, the problem disappears.To Reproduce
Steps to reproduce the behavior:
Run the basic example in this Python module
Expected behavior
The optimizer to be built without error.
System information:
:warning: Please, provide the following information:
rustup show
?stable-x86_64-unknown-linux-gnu (default) rustc 1.44.1 (c7087fe00 2020-06-17)
rustc 1.44.1 (c7087fe00 2020-06-17)