File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,16 @@ impl Variable {
5858 unsafe { ffi:: SCIPvarGetUbLocal ( self . raw ) }
5959 }
6060
61+ /// Returns the local lower bound of the variable.
62+ pub fn lb_local ( & self ) -> f64 {
63+ unsafe { ffi:: SCIPvarGetLbLocal ( self . raw ) }
64+ }
65+
66+ /// Returns the local upper bound of the variable.
67+ pub fn ub_local ( & self ) -> f64 {
68+ unsafe { ffi:: SCIPvarGetUbLocal ( self . raw ) }
69+ }
70+
6171 /// Returns the type of the variable.
6272 pub fn var_type ( & self ) -> VarType {
6373 let var_type = unsafe { ffi:: SCIPvarGetType ( self . raw ) } ;
@@ -177,7 +187,9 @@ mod tests {
177187
178188 assert_eq ! ( var. index( ) , 0 ) ;
179189 assert_eq ! ( var. lb( ) , 0.0 ) ;
190+ assert_eq ! ( var. lb_local( ) , 0.0 ) ;
180191 assert_eq ! ( var. ub( ) , 1.0 ) ;
192+ assert_eq ! ( var. ub_local( ) , 1.0 ) ;
181193 assert_eq ! ( var. obj( ) , 2.0 ) ;
182194 assert_eq ! ( var. name( ) , "x" ) ;
183195 assert_eq ! ( var. var_type( ) , VarType :: ImplInt ) ;
You can’t perform that action at this time.
0 commit comments