@@ -183,7 +183,7 @@ public class HighsLpSolver : IDisposable
183183
184184 private const string highslibname = "highs" ;
185185
186- [ DllImport ( highslibname ) ]
186+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
187187 private static extern int Highs_call (
188188 Int32 numcol ,
189189 Int32 numrow ,
@@ -204,31 +204,31 @@ private static extern int Highs_call(
204204 int [ ] rowbasisstatus ,
205205 ref int modelstatus ) ;
206206
207- [ DllImport ( highslibname ) ]
207+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
208208 private static extern IntPtr Highs_create ( ) ;
209209
210- [ DllImport ( highslibname ) ]
210+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
211211 private static extern void Highs_destroy ( IntPtr highs ) ;
212212
213- [ DllImport ( highslibname ) ]
213+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
214214 private static extern int Highs_run ( IntPtr highs ) ;
215215
216- [ DllImport ( highslibname ) ]
216+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
217217 private static extern int Highs_readModel ( IntPtr highs , string filename ) ;
218218
219- [ DllImport ( highslibname ) ]
219+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
220220 private static extern int Highs_writeModel ( IntPtr highs , string filename ) ;
221221
222- [ DllImport ( highslibname ) ]
222+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
223223 private static extern int Highs_writePresolvedModel ( IntPtr highs , string filename ) ;
224224
225- [ DllImport ( highslibname ) ]
225+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
226226 private static extern int Highs_writeSolutionPretty ( IntPtr highs , string filename ) ;
227227
228- [ DllImport ( highslibname ) ]
228+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
229229 private static extern int Highs_getInfinity ( IntPtr highs ) ;
230230
231- [ DllImport ( highslibname ) ]
231+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
232232 private static extern int Highs_passLp (
233233 IntPtr highs ,
234234 int numcol ,
@@ -246,7 +246,7 @@ private static extern int Highs_passLp(
246246 int [ ] aindex ,
247247 double [ ] avalue ) ;
248248
249- [ DllImport ( highslibname ) ]
249+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
250250 private static extern int Highs_passMip (
251251 IntPtr highs ,
252252 int numcol ,
@@ -265,7 +265,7 @@ private static extern int Highs_passMip(
265265 double [ ] avalue ,
266266 int [ ] highs_integrality ) ;
267267
268- [ DllImport ( highslibname ) ]
268+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
269269 private static extern int Highs_passModel (
270270 IntPtr highs ,
271271 int numcol ,
@@ -289,7 +289,7 @@ private static extern int Highs_passModel(
289289 double [ ] qvalue ,
290290 int [ ] highs_integrality ) ;
291291
292- [ DllImport ( highslibname ) ]
292+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
293293 private static extern int Highs_passHessian (
294294 IntPtr highs ,
295295 int dim ,
@@ -299,64 +299,64 @@ private static extern int Highs_passHessian(
299299 int [ ] qindex ,
300300 double [ ] qvalue ) ;
301301
302- [ DllImport ( highslibname ) ]
302+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
303303 private static extern int Highs_setOptionValue ( IntPtr highs , string option , string value ) ;
304304
305- [ DllImport ( highslibname ) ]
305+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
306306 private static extern int Highs_setBoolOptionValue ( IntPtr highs , string option , int value ) ;
307307
308- [ DllImport ( highslibname ) ]
308+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
309309 private static extern int Highs_setIntOptionValue ( IntPtr highs , string option , int value ) ;
310310
311- [ DllImport ( highslibname ) ]
311+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
312312 private static extern int Highs_setDoubleOptionValue ( IntPtr highs , string option , double value ) ;
313313
314- [ DllImport ( highslibname ) ]
314+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
315315 private static extern int Highs_setStringOptionValue ( IntPtr highs , string option , string value ) ;
316316
317- [ DllImport ( highslibname ) ]
317+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
318318 private static extern int Highs_getBoolOptionValue ( IntPtr highs , string option , out int value ) ;
319319
320- [ DllImport ( highslibname ) ]
320+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
321321 private static extern int Highs_getIntOptionValue ( IntPtr highs , string option , out int value ) ;
322322
323- [ DllImport ( highslibname ) ]
323+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
324324 private static extern int Highs_getDoubleOptionValue ( IntPtr highs , string option , out double value ) ;
325325
326- [ DllImport ( highslibname ) ]
326+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
327327 private static extern int Highs_getStringOptionValue ( IntPtr highs , string option , [ Out ] StringBuilder value ) ;
328328
329- [ DllImport ( highslibname ) ]
329+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
330330 private static extern int Highs_getSolution ( IntPtr highs , double [ ] colvalue , double [ ] coldual , double [ ] rowvalue , double [ ] rowdual ) ;
331331
332- [ DllImport ( highslibname ) ]
332+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
333333 private static extern int Highs_getNumCol ( IntPtr highs ) ;
334334
335- [ DllImport ( highslibname ) ]
335+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
336336 private static extern int Highs_getNumRow ( IntPtr highs ) ;
337337
338- [ DllImport ( highslibname ) ]
338+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
339339 private static extern int Highs_getNumNz ( IntPtr highs ) ;
340340
341- [ DllImport ( highslibname ) ]
341+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
342342 private static extern int Highs_getHessianNumNz ( IntPtr highs ) ;
343343
344- [ DllImport ( highslibname ) ]
344+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
345345 private static extern int Highs_getBasis ( IntPtr highs , int [ ] colstatus , int [ ] rowstatus ) ;
346346
347- [ DllImport ( highslibname ) ]
347+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
348348 private static extern double Highs_getObjectiveValue ( IntPtr highs ) ;
349349
350- [ DllImport ( highslibname ) ]
350+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
351351 private static extern int Highs_getIterationCount ( IntPtr highs ) ;
352352
353- [ DllImport ( highslibname ) ]
353+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
354354 private static extern int Highs_getModelStatus ( IntPtr highs ) ;
355355
356- [ DllImport ( highslibname ) ]
356+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
357357 private static extern int Highs_addRow ( IntPtr highs , double lower , double upper , int num_new_nz , int [ ] indices , double [ ] values ) ;
358358
359- [ DllImport ( highslibname ) ]
359+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
360360 private static extern int Highs_addRows (
361361 IntPtr highs ,
362362 int num_new_row ,
@@ -367,7 +367,7 @@ private static extern int Highs_addRows(
367367 int [ ] indices ,
368368 double [ ] values ) ;
369369
370- [ DllImport ( highslibname ) ]
370+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
371371 private static extern int Highs_addCol (
372372 IntPtr highs ,
373373 double cost ,
@@ -377,7 +377,7 @@ private static extern int Highs_addCol(
377377 int [ ] indices ,
378378 double [ ] values ) ;
379379
380- [ DllImport ( highslibname ) ]
380+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
381381 private static extern int Highs_addCols (
382382 IntPtr highs ,
383383 int num_new_col ,
@@ -389,76 +389,76 @@ private static extern int Highs_addCols(
389389 int [ ] indices ,
390390 double [ ] values ) ;
391391
392- [ DllImport ( highslibname ) ]
392+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
393393 private static extern int Highs_changeObjectiveSense ( IntPtr highs , int sense ) ;
394394
395- [ DllImport ( highslibname ) ]
395+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
396396 private static extern int Highs_changeColCost ( IntPtr highs , int col , double cost ) ;
397397
398- [ DllImport ( highslibname ) ]
398+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
399399 private static extern int Highs_changeColsCostBySet ( IntPtr highs , int num_set_entries , int [ ] set , double [ ] cost ) ;
400400
401- [ DllImport ( highslibname ) ]
401+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
402402 private static extern int Highs_changeColsCostByMask ( IntPtr highs , int [ ] mask , double [ ] cost ) ;
403403
404- [ DllImport ( highslibname ) ]
404+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
405405 private static extern int Highs_changeColBounds ( IntPtr highs , int col , double lower , double upper ) ;
406406
407- [ DllImport ( highslibname ) ]
407+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
408408 private static extern int Highs_changeColsBoundsByRange ( IntPtr highs , int from_col , int to_col , double [ ] lower , double [ ] upper ) ;
409409
410- [ DllImport ( highslibname ) ]
410+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
411411 private static extern int Highs_changeColsBoundsBySet ( IntPtr highs , int num_set_entries , int [ ] set , double [ ] lower , double [ ] upper ) ;
412412
413- [ DllImport ( highslibname ) ]
413+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
414414 private static extern int Highs_changeColsBoundsByMask ( IntPtr highs , int [ ] mask , double [ ] lower , double [ ] upper ) ;
415415
416- [ DllImport ( highslibname ) ]
416+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
417417 private static extern int Highs_changeRowBounds ( IntPtr highs , int row , double lower , double upper ) ;
418418
419- [ DllImport ( highslibname ) ]
419+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
420420 private static extern int Highs_changeRowsBoundsBySet ( IntPtr highs , int num_set_entries , int [ ] set , double [ ] lower , double [ ] upper ) ;
421421
422- [ DllImport ( highslibname ) ]
422+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
423423 private static extern int Highs_changeRowsBoundsByMask ( IntPtr highs , int [ ] mask , double [ ] lower , double [ ] upper ) ;
424424
425- [ DllImport ( highslibname ) ]
425+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
426426 private static extern int Highs_changeColsIntegralityByRange ( IntPtr highs , int from_col , int to_col , int [ ] integrality ) ;
427427
428- [ DllImport ( highslibname ) ]
428+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
429429 private static extern int Highs_changeCoeff ( IntPtr highs , int row , int col , double value ) ;
430430
431- [ DllImport ( highslibname ) ]
431+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
432432 private static extern int Highs_deleteColsByRange ( IntPtr highs , int from_col , int to_col ) ;
433433
434- [ DllImport ( highslibname ) ]
434+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
435435 private static extern int Highs_deleteColsBySet ( IntPtr highs , int num_set_entries , int [ ] set ) ;
436436
437- [ DllImport ( highslibname ) ]
437+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
438438 private static extern int Highs_deleteColsByMask ( IntPtr highs , int [ ] mask ) ;
439439
440- [ DllImport ( highslibname ) ]
440+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
441441 private static extern int Highs_deleteRowsByRange ( IntPtr highs , int from_row , int to_row ) ;
442442
443- [ DllImport ( highslibname ) ]
443+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
444444 private static extern int Highs_deleteRowsBySet ( IntPtr highs , int num_set_entries , int [ ] set ) ;
445445
446- [ DllImport ( highslibname ) ]
446+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
447447 private static extern int Highs_deleteRowsByMask ( IntPtr highs , int [ ] mask ) ;
448448
449- [ DllImport ( highslibname ) ]
449+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
450450 private static extern int Highs_getDoubleInfoValue ( IntPtr highs , string info , out double value ) ;
451451
452- [ DllImport ( highslibname ) ]
452+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
453453 private static extern int Highs_getIntInfoValue ( IntPtr highs , string info , out int value ) ;
454454
455- [ DllImport ( highslibname ) ]
455+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
456456 private static extern int Highs_getInt64InfoValue ( IntPtr highs , string info , out long value ) ;
457457
458- [ DllImport ( highslibname ) ]
458+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
459459 private static extern int Highs_setSolution ( IntPtr highs , double [ ] col_value , double [ ] row_value , double [ ] col_dual , double [ ] row_dual ) ;
460460
461- [ DllImport ( highslibname ) ]
461+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
462462 private static extern int Highs_getColsByRange (
463463 IntPtr highs ,
464464 int from_col ,
@@ -472,7 +472,7 @@ private static extern int Highs_getColsByRange(
472472 int [ ] matrix_index ,
473473 double [ ] matrix_value ) ;
474474
475- [ DllImport ( highslibname ) ]
475+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
476476 private static extern int Highs_getColsBySet (
477477 IntPtr highs ,
478478 int num_set_entries ,
@@ -486,7 +486,7 @@ private static extern int Highs_getColsBySet(
486486 int [ ] matrix_index ,
487487 double [ ] matrix_value ) ;
488488
489- [ DllImport ( highslibname ) ]
489+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
490490 private static extern int Highs_getColsByMask (
491491 IntPtr highs ,
492492 int [ ] mask ,
@@ -499,7 +499,7 @@ private static extern int Highs_getColsByMask(
499499 int [ ] matrix_index ,
500500 double [ ] matrix_value ) ;
501501
502- [ DllImport ( highslibname ) ]
502+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
503503 private static extern int Highs_getRowsByRange (
504504 IntPtr highs ,
505505 int from_row ,
@@ -512,7 +512,7 @@ private static extern int Highs_getRowsByRange(
512512 int [ ] matrix_index ,
513513 double [ ] matrix_value ) ;
514514
515- [ DllImport ( highslibname ) ]
515+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
516516 private static extern int Highs_getRowsBySet (
517517 IntPtr highs ,
518518 int num_set_entries ,
@@ -525,7 +525,7 @@ private static extern int Highs_getRowsBySet(
525525 int [ ] matrix_index ,
526526 double [ ] matrix_value ) ;
527527
528- [ DllImport ( highslibname ) ]
528+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
529529 private static extern int Highs_getRowsByMask (
530530 IntPtr highs ,
531531 int [ ] mask ,
@@ -537,53 +537,53 @@ private static extern int Highs_getRowsByMask(
537537 int [ ] matrix_index ,
538538 double [ ] matrix_value ) ;
539539
540- [ DllImport ( highslibname ) ]
540+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
541541 private static extern int Highs_getBasicVariables ( IntPtr highs , int [ ] basic_variables ) ;
542542
543- [ DllImport ( highslibname ) ]
543+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
544544 private static extern int Highs_getBasisInverseRow ( IntPtr highs , int row , double [ ] row_vector , ref int row_num_nz , int [ ] row_indices ) ;
545545
546- [ DllImport ( highslibname ) ]
546+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
547547 private static extern int Highs_getBasisInverseCol ( IntPtr highs , int col , double [ ] col_vector , ref int col_num_nz , int [ ] col_indices ) ;
548548
549- [ DllImport ( highslibname ) ]
549+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
550550 private static extern int Highs_getBasisSolve (
551551 IntPtr highs ,
552552 double [ ] rhs ,
553553 double [ ] solution_vector ,
554554 ref int solution_num_nz ,
555555 int [ ] solution_indices ) ;
556556
557- [ DllImport ( highslibname ) ]
557+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
558558 private static extern int Highs_getBasisTransposeSolve (
559559 IntPtr highs ,
560560 double [ ] rhs ,
561561 double [ ] solution_vector ,
562562 ref int solution_nz ,
563563 int [ ] solution_indices ) ;
564564
565- [ DllImport ( highslibname ) ]
565+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
566566 private static extern int Highs_getReducedRow ( IntPtr highs , int row , double [ ] row_vector , ref int row_num_nz , int [ ] row_indices ) ;
567567
568- [ DllImport ( highslibname ) ]
568+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
569569 private static extern int Highs_getReducedColumn ( IntPtr highs , int col , double [ ] col_vector , ref int col_num_nz , int [ ] col_indices ) ;
570570
571- [ DllImport ( highslibname ) ]
571+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
572572 private static extern int Highs_clearModel ( IntPtr highs ) ;
573573
574- [ DllImport ( highslibname ) ]
574+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
575575 private static extern int Highs_clearSolver ( IntPtr highs ) ;
576576
577- [ DllImport ( highslibname ) ]
577+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
578578 private static extern int Highs_passColName ( IntPtr highs , int col , string name ) ;
579579
580- [ DllImport ( highslibname ) ]
580+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
581581 private static extern int Highs_passRowName ( IntPtr highs , int row , string name ) ;
582582
583- [ DllImport ( highslibname ) ]
583+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
584584 private static extern int Highs_writeOptions ( IntPtr highs , string filename ) ;
585585
586- [ DllImport ( highslibname ) ]
586+ [ DllImport ( highslibname , CallingConvention = CallingConvention . Cdecl ) ]
587587 private static extern int Highs_writeOptionsDeviations ( IntPtr highs , string filename ) ;
588588
589589 public static HighsStatus call ( HighsModel model , ref HighsSolution sol , ref HighsBasis bas , ref HighsModelStatus modelstatus )
0 commit comments