We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 26b632a + 87b08e8 commit 2584a4dCopy full SHA for 2584a4d
examples/call_highs_from_csharp.cs
@@ -11,7 +11,7 @@ static void Main(string[] args) {
11
// minimize x_2 + (1/2)(2x_1^2 - 2x_1x_3 + 0.2x_2^2 + 2x_3^2)
12
//
13
// subject to x_1 + x_2 + x_3 >= 1; x>=0
14
- double[] cc = {0, 1, 0};
+ double[] cc = {0, 1, 0};
15
double[] cl = {0, 0, 0};
16
double[] cu = {1.0e30, 1.0e30, 1.0e30};
17
double[] rl = {1};
@@ -52,10 +52,10 @@ static void Main(string[] args) {
52
Console.WriteLine("x" + i + " = " + sol.colvalue[i] + " is " + bas.colbasisstatus[i]);
53
}
54
// Add the Hessian
55
- int dim = 2;
56
- int[] qstart = {0, 2, 3};
57
- int[] qindex = {0, 1, 1};
58
- double[] qvalue = {2, -1, 2};
+ int dim = 3;
+ int[] qstart = {0, 2, 3, 4};
+ int[] qindex = {0, 1, 1, 2};
+ double[] qvalue = {2, -1, 0.2, 2};
59
HessianFormat q_format = HessianFormat.kTriangular;
60
HighsHessian hessian = new HighsHessian(dim, qstart, qindex, qvalue, q_format);
61
status = solver.passHessian(hessian);
0 commit comments