Skip to content

Commit 754bfc5

Browse files
committed
Added changeRowsBoundsByRange to FORTRAN and Csharp APIs
1 parent 9b01e2f commit 754bfc5

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

highs/interfaces/highs_csharp_api.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,9 @@ private static extern int Highs_addCols(
416416
[DllImport(highslibname)]
417417
private static extern int Highs_changeRowBounds(IntPtr highs, int row, double lower, double upper);
418418

419+
[DllImport(highslibname)]
420+
private static extern int Highs_changeRowsBoundsByRange(IntPtr highs, int from_row, int to_row, double[] lower, double[] upper);
421+
419422
[DllImport(highslibname)]
420423
private static extern int Highs_changeRowsBoundsBySet(IntPtr highs, int num_set_entries, int[] set, double[] lower, double[] upper);
421424

@@ -914,6 +917,11 @@ public HighsStatus changeRowBounds(int row, double lower, double upper)
914917
return (HighsStatus)HighsLpSolver.Highs_changeRowBounds(this.highs, row, lower, upper);
915918
}
916919

920+
public HighsStatus changeRowsBoundsByRange(int from, int to, double[] lower, double[] upper)
921+
{
922+
return (HighsStatus)HighsLpSolver.Highs_changeRowsBoundsByRange(this.highs, from, to, lower, upper);
923+
}
924+
917925
public HighsStatus changeRowsBoundsBySet(int[] rows, double[] lower, double[] upper)
918926
{
919927
return (HighsStatus)HighsLpSolver.Highs_changeRowsBoundsBySet(this.highs, rows.Length, rows, lower, upper);

highs/interfaces/highs_fortran_api.f90

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,16 @@ function Highs_changeRowBounds (h, row, lo, up) result(s) bind(c, name='Highs_ch
572572
integer(c_int) :: s
573573
end function Highs_changeRowBounds
574574

575+
function Highs_changeRowsBoundsByRange (h, from, to, lo, up) result(s) bind(c, name='Highs_changeRowsBoundsByRange')
576+
use iso_c_binding
577+
type(c_ptr), VALUE :: h
578+
integer(c_int), VALUE :: from
579+
integer(c_int), VALUE :: to
580+
real(c_double) :: lo(*)
581+
real(c_double) :: up(*)
582+
integer(c_int) :: s
583+
end function Highs_changeRowsBoundsByRange
584+
575585
function Highs_changeRowsBoundsBySet (h, nse, set, lo, up) result(s) bind(c, name='Highs_changeRowsBoundsBySet')
576586
use iso_c_binding
577587
type(c_ptr), VALUE :: h

0 commit comments

Comments
 (0)