This file is indexed.

/usr/share/doc/lp-solve-doc/O-Matrix.htm is in lp-solve-doc 5.5.0.15-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<HEAD>
		<TITLE>Using lpsolve from O-Matrix</TITLE>
		<style TYPE="text/css"> BODY { font-family:verdana,arial,helvetica; margin:15; }
	</style>
	</HEAD>
	<BODY>
					<h1 align="left"><u>Using lpsolve from O-Matrix</u></h1>
<a name="O-Matrix"></a>
<h3>O-Matrix?</h3>

<P>O-Matrix is an
integrated environment for analysing and visualizing data, and building turnkey
scientific and engineering computing solutions. The program includes hundreds of
engineering and statistical functions for solving a broad range of technical
computing problems. Easy-to-use and flexible plotting commands
enable you to rapidly build design prototypes, and implement sophisticated
systems.</P>
<P>The foundation of
O-Matrix is a high-performance matrix language that is
specifically designed for high-performance technical computing. The
notation of this language will dramatically reduce your design and
implementation efforts, and enable the construction of systems that execute far
quicker than other interpreted environments. O-Matrix also provides
a compatibility mode that enables you to run MATLAB© m-files. This enables you
to leverage existing m-files, and simplifies the transition to
O-Matrix for users experienced with MATLAB.</P>

<P>The O-Matrix environment is
interpreted which means your commands are immediately executed as you enter
them. Textual output is displayed in the <I>Command</I> window, and plotting
commands are displayed in one or more <I>Graphic</I> windows. The environment
provides a debugger for debugging, analysing, and profiling complex algorithms.
</p>

<p>We will not discuss the specifics of O-Matrix here but instead refer the reader to the
<a href="http://www.omatrix.com/">O-Matrix</a> website.
</p>

<a name="O-Matrix_and_lpsolve"></a>
<h3>O-Matrix and lpsolve</h3>

<p>lpsolve is callable from O-Matrix via a dynamic linked DLL function. As such, it looks like lpsolve is fully integrated
with O-Matrix. Matrices can directly be transferred between O-Matrix and lpsolve in both directions. The complete interface
is written in C so it has maximum performance. The whole lpsolve API is implemented with some extra's specific for
O-Matrix (especially for matrix support). So you have full control to the complete lpsolve functionality via the omlpsolve
O-Matrix driver. If you find that this involves too much work to solve an lp model then you can also work via higher-level
script files that can make things a lot easier. See further in this article.
</p>

<a name="Quickstart"></a>
<h3>Quickstart</h3>
<pre>
Compile and build omlpsolve:
----------------------------

1. Under Windows, the Microsoft Visual C/C++ compiler must be installed
   and the environment variables must be active do that when a command prompt
   is opened, the cl and nmake commands can be executed.

2. Go to directory lp_solve_5.5\extra\O-Matrix\lpsolve

3. To compile and build omlpsolve, enter the following command:
      cvc

Load the omlpsolve driver in the O-Matrix memory space:
-------------------------------------------------------

1. Under Windows, make sure that the lpsolve55.dll file is somewhere in the path
   (archive lp_solve_5.5.0.15_dev.zip)

2. A precompiled library is provided for Windows (omlpsolve.dll).

3. Start O-Matrix

4. Enter the following command in O-Matrix:
      O> dll &lt;path&gt;\omlpsolve.dll, omlpsolve
   This can also be added in autoexec.oms to automatically load the omlpsolve driver.
</pre>

<p>
Note that O-Matrix version 5.8 or above is strongly recommended. Lower versions (at least 5.7) should
work with this driver, but these versions don't have the ability to print information on the command prompt.
For example default while a solve is done, information is printed to the command window. This will
only be visible from version 5.8 or above.
</p>

<p>O-Matrix is ideally suited to handle linear programming problems.
These are problems in which you have a quantity, depending linearly on several variables,
that you want to maximize or minimize subject to several constraints that are expressed
as linear inequalities in the same variables. If the number of variables and the number
of constraints are small, then there are numerous mathematical techniques for solving a
linear programming problem.
Indeed these techniques are often taught in high school or university level
courses in finite mathematics. But sometimes these numbers are high, or even if low,
the constants in the linear inequalities or the object expression for the quantity
to be optimized may be numerically complicated in which case a software package like
O-Matrix is required to effect a solution.</p>

<a name="Installation"></a>
<h3>Installation</h3>

<p>To make this possible, a driver program is needed: omlpsolve (omlpsolve.dll under Windows).
This driver must be loaded in O-Matrix and O-Matrix can call the omlpsolve solver.</p>

<p>This driver calls lpsolve via the lpsolve shared library (lpsolve55.dll under Windows).
This has the advantage that the omlpsolve driver doesn't have to
be recompiled when an update of lpsolve is provided. The shared library must be somewhere in the Windows path.</p>

<p>So note the difference between the O-Matrix lpsolve driver that is called omlpsolve and the lpsolve library that implements the
API that is called lpsolve55.</p>

<p>There are also some O-Matrix script files (.oms) as a quick start.</p>

<p>The first thing that must be done, each time O-Matrix is restarted and you want to use lpsolve is load
the omlpsolve driver into the O-Matrix workspace. This is done via the dll command. Suppose that omlpsolve.dll
is installed in c:\omwin\dll, then the following command must be used to load the driver:</p>

<pre>dll c:\omwin\dll\omlpsolve.dll, omlpsolve</pre>

<p>That is basically all you need to do. From now on, you can use the library. This until a clear command
is given or O-Matrix is restarted. Then this command must be given again to reload the library.</p>

<p>To make things easier, you can edit the file autoexec.oms with your favourite editor (or notepad) in the omwin folder
and add above line at the end of this file (before the last end).
That will automatically load the lpsolve driver in memory when O-Matrix is started and also when a clear command is executed.
So it will appear as if the omlpsolve command is then always available.</p>

<p>To test if everything is installed correctly, enter omlpsolve in the O-Matrix command prompt.
If it gives the following, then everything is ok:</p>

<pre>omlpsolve O-Matrix Interface version 5.5.0.6
using lpsolve version 5.5.0.15

Usage: [ret1, ret2, ...] = omlpsolve("functionname", arg1, arg2, ...)
</pre>

<p>Possibly, this is followed with:</p>

<pre>No printing capability to command window available.
You need to upgrade to version 5.8 for this feature.</pre>

<p>Then you are working with an O-Matrix version lower than 5.8. The driver should work, but nothing is printed
on the command window when lpsolve has something to report (for example while solving).</p>

<p>However, if you get a message box with the following:</p>

<pre>The identifier omlpsolve is not defined.</pre>

<p>Then either the dll command that was previous given was unsuccessful (or not given at all) or something was misspelled after the ,</p>

<p>If you get the following:</p>

<pre>This application has failed to start because lpsolve55.dll was not found.
Re-installing the application may fix this problem.</pre>

<p>Then O-Matrix can find the omlpsolve driver program, but the driver program cannot find the lpsolve library
that contains the lpsolve implementation. This library is called lpsolve55.dll and should be on your system
in a directory that in the PATH environment variable. This path can be shown via the command getenv("PATH")</p>

<p>The lpsolve55.dll files must be in one of these specified directories. It is common to place this in the WINDOWS\system32 folder.</p>

<p>All this is developed and tested with O-Matrix version 5.7. This is the minimum supported release.
Older releases are unsupported.</p>

<a name="Solve_an_lp_model_from_O-Matrix_via_omlpsolve"></a>
<h3>Solve an lp model from O-Matrix via omlpsolve</h3>

<p>In the following text, <i>O&gt;</i> before the O-Matrix commands is the O-Matrix command line.
Only the text after <i>O&gt;</i> must be entered.
</p>

<p>To call an lpsolve function, the following syntax must be used:</p>

<pre><i>O&gt;</i> [ret1, ret2, ...] = omlpsolve("functionname", arg1, arg2, ...)</pre>

<p>The return values are optional and depend on the function called. functionname must always be enclosed between double
quotes to make it alphanumerical and it is case sensitive. The number and type of arguments depend on the function called.
Some functions even have a variable number of arguments and a different behaviour occurs depending on the type of the argument.
functionname can be (almost) any of the lpsolve API routines (see <a href="lp_solveAPIreference.htm">lp_solve API reference</a>)
plus some extra O-Matrix specific functions.
Most of the lpsolve API routines use or return an lprec structure. To make things more robust in O-Matrix, this structure
is replaced by a handle or the model name. The lprec structures are maintained internally by the lpsolve driver.
The handle is an incrementing number starting from 0.
Starting from driver version 5.5.0.2, it is also possible to use the model name instead of the handle.
This can of course only be done if a name is given to the model. This is done via lpsolve routine
<a href="#set_lp_name">set_lp_name</a> or by specifying the model name in routine <a href="#read_lp">read_lp</a>.
See <a href="#Using_model_name_instead_of_handle">Using model name instead of handle</a>.
</p>

<p>Almost all callable functions can be found in the <a href="lp_solveAPIreference.htm">lp_solve API reference</a>.
Some are exactly as described in the reference guide, others have a slightly different syntax to make maximum
use of the O-Matrix functionality. For example make_lp is used identical as described. But get_variables is slightly
different. In the API reference, this function has two arguments. The first the lp handle and the second the
resulting variables and this array must already be dimensioned. When lpsolve is used from O-Matrix, nothing must
be dimensioned in advance. The omlpsolve driver takes care of dimensioning all return variables and they are
always returned as return value of the call to omlpsolve. Never as argument to the routine. This can be a single
value as for get_objective (although O-Matrix stores this in a 1x1 matrix) or a matrix or vector as in get_variables.
In this case, get_variables returns a 4x1 matrix (vector) with the result of the 4 variables of the lp model.
</p>

<a name="An_example"></a>
<h3>An example</h3>

<p>(Note that you can execute this example by entering command per command as shown below or by just entering example1.
This will execute example1.oms.)</p>

<pre><i>O&gt;</i> lp=omlpsolve("make_lp", 0, 4);
<i>O&gt;</i> omlpsolve("set_verbose", lp, 3);
<i>O&gt;</i> omlpsolve("set_obj_fn", lp, [1, 3, 6.24, 0.1]);
<i>O&gt;</i> omlpsolve("add_constraint", lp, [0, 78.26, 0, 2.9], 2, 92.3);
<i>O&gt;</i> omlpsolve("add_constraint", lp, [0.24, 0, 11.31, 0], 1, 14.8);
<i>O&gt;</i> omlpsolve("add_constraint", lp, [12.68, 0, 0.08, 0.9], 2, 4);
<i>O&gt;</i> omlpsolve("set_lowbo", lp, 1, 28.6);
<i>O&gt;</i> omlpsolve("set_lowbo", lp, 4, 18);
<i>O&gt;</i> omlpsolve("set_upbo", lp, 4, 48.98);
<i>O&gt;</i> omlpsolve("set_col_name", lp, 1, "COLONE");
<i>O&gt;</i> omlpsolve("set_col_name", lp, 2, "COLTWO");
<i>O&gt;</i> omlpsolve("set_col_name", lp, 3, "COLTHREE");
<i>O&gt;</i> omlpsolve("set_col_name", lp, 4, "COLFOUR");
<i>O&gt;</i> omlpsolve("set_row_name", lp, 1, "THISROW");
<i>O&gt;</i> omlpsolve("set_row_name", lp, 2, "THATROW");
<i>O&gt;</i> omlpsolve("set_row_name", lp, 3, "LASTROW");
<i>O&gt;</i> omlpsolve("write_lp", lp, "a.lp");
<i>O&gt;</i> omlpsolve("get_mat", lp, 1, 2)
   78.2600
<i>O&gt;</i> omlpsolve("solve", lp)
     0
<i>O&gt;</i> omlpsolve("get_objective", lp)
   31.7828
<i>O&gt;</i> omlpsolve("get_variables", lp)
{
28.6
0
0
31.8276
}

<i>O&gt;</i> omlpsolve("get_constraints", lp)
{
92.3
6.8640
391.293
}
</pre>

<p>Note that there are some commands that return an answer. To see the answer, the command was not terminated with
a semicolon (;). If the semicolon is put at the end of a command, the answer is not shown. However it is also possible
to write the answer in a variable. In that case the result is never shown. With or without a terminating semicolon.
For example:
</p>

<pre><i>O&gt;</i> obj=omlpsolve("get_objective", lp)
</pre>

<p>Or:</p>

<pre><i>O&gt;</i> obj=omlpsolve("get_objective", lp);</pre>

<p>Both will only write the result in variable obj without showing anything on screen.
get_variables and get_constraints return a vector with the result. This can also be put in a variable:</p>

<pre><i>O&gt;</i> x=omlpsolve("get_variables", lp);
<i>O&gt;</i> b=omlpsolve("get_constraints", lp);
</pre>

<p>It is always possible to show the contents of a variable by just giving it as command:</p>

<pre><i>O&gt;</i> x
{
28.6
0
0
31.8276
}
</pre>

<p>Don't forget to free the handle and its associated memory when you are done:</p>

<pre><i>O&gt;</i> omlpsolve("delete_lp", lp);</pre>

<a name="Using_model_name_instead_of_handle"></a>
<h3>Using model name instead of handle</h3>
From driver version 5.5.0.2, it is possible to use the model name instead of the handle. From the moment the model
has a name, you can use this name instead of the handle. This is best shown by an example. Above example would look
like this:

<pre><i>O&gt;</i> lp=omlpsolve("make_lp", 0, 4);
<i>O&gt;</i> omlpsolve("set_lp_name", lp, "mymodel");
<i>O&gt;</i> omlpsolve("set_verbose", "mymodel", 3);
<i>O&gt;</i> omlpsolve("set_obj_fn", "mymodel", [1, 3, 6.24, 0.1]);
<i>O&gt;</i> omlpsolve("add_constraint", "mymodel", [0, 78.26, 0, 2.9], 2, 92.3);
<i>O&gt;</i> omlpsolve("add_constraint", "mymodel", [0.24, 0, 11.31, 0], 1, 14.8);
<i>O&gt;</i> omlpsolve("add_constraint", "mymodel", [12.68, 0, 0.08, 0.9], 2, 4);
<i>O&gt;</i> omlpsolve("set_lowbo", "mymodel", 1, 28.6);
<i>O&gt;</i> omlpsolve("set_lowbo", "mymodel", 4, 18);
<i>O&gt;</i> omlpsolve("set_upbo", "mymodel", 4, 48.98);
<i>O&gt;</i> omlpsolve("set_col_name", "mymodel", 1, "COLONE");
<i>O&gt;</i> omlpsolve("set_col_name", "mymodel", 2, "COLTWO");
<i>O&gt;</i> omlpsolve("set_col_name", "mymodel", 3, "COLTHREE");
<i>O&gt;</i> omlpsolve("set_col_name", "mymodel", 4, "COLFOUR");
<i>O&gt;</i> omlpsolve("set_row_name", "mymodel", 1, "THISROW");
<i>O&gt;</i> omlpsolve("set_row_name", "mymodel", 2, "THATROW");
<i>O&gt;</i> omlpsolve("set_row_name", "mymodel", 3, "LASTROW");
<i>O&gt;</i> omlpsolve("write_lp", "mymodel", "a.lp");
<i>O&gt;</i> omlpsolve("get_mat", "mymodel", 1, 2)
   78.2600
<i>O&gt;</i> omlpsolve("solve", "mymodel")
     0
<i>O&gt;</i> omlpsolve("get_objective", "mymodel")
   31.7828
<i>O&gt;</i> omlpsolve("get_variables", "mymodel")
{
28.6
0
0
31.8276
}

<i>O&gt;</i> omlpsolve("get_constraints", "mymodel")
{
92.3
6.8640
391.293
}
</pre>

<p>So everywhere a handle is needed, you can also use the model name. You can even mix the two methods.
There is also a specific O-Matrix routine to get the handle from the model name: <a href="#get_handle">get_handle</a>.<br>
For example:</p>

<pre>
<i>O&gt;</i> omlpsolve("get_handle", "mymodel")
0
</pre>

<p>Don't forget to free the handle and its associated memory when you are done:</p>

<pre><i>O&gt;</i> omlpsolve("delete_lp", "mymodel")</pre>

<p>In the next part of this documentation, the handle is used. But if you name the model, the name could thus also be used.</p>

<a name="Matrices"></a>
<h3>Matrices</h3>
In O-Matrix, all numerical data is stored in matrices; even a scalar variable. O-Matrix also supports complex numbers.
omlpsolve can only work with real numbers.
For example:
<pre><i>O&gt;</i> omlpsolve("add_constraint", lp, [0.24, 0, 11.31, 0], 1, 14.8);</pre>

<p>Most of the time, variables are used to provide the data:</p>

<pre><i>O&gt;</i> omlpsolve("add_constraint", lp, a1, 1, 14.8);</pre>

<p>Where a1 is a matrix variable.</p>

<p>Matrices with too few or too much elements gives an 'invalid vector.' error.</p>

<p>Most of the time, omlpsolve needs vectors (rows or columns).
In all situations, it doesn't matter if the vectors are row or column vectors. The driver accepts them both.
For example:</p>

<pre><i>O&gt;</i> omlpsolve("add_constraint", lp, {0.24, 0, 11.31, 0}, 1, 14.8);</pre>

<p>Which is a column vector, but it is also accepted.</p>

<p>An important final note. Several lp_solve API routines accept a vector where the first element (element 0) is not used.
Other lp_solve API calls do use the first element. In the O-Matrix interface, there is never an unused element in the matrices.
So if the lp_solve API specifies that the first element is not used, then this element is not in the O-Matrix matrix.</p>

<a name="Maximum_usage_of_matrices_with_omlpsolve"></a>
<h3>Maximum usage of matrices with omlpsolve</h3>

<p>Because O-Matrix is all about matrices, all lpsolve API routines that need a column or row number to get/set information for that
column/row are extended in the omlpsolve O-Matrix driver to also work with matrices. For example set_int in the API can
only set the integer status for one column. If the status for several integer variables must be set, then set_int
must be called multiple times. The omlpsolve O-Matrix driver however also allows specifying a vector to set the integer
status of all variables at once. The API call is: return = omlpsolve("set_int", lp, column, must_be_int). The
matrix version of this call is: return = omlpsolve("set_int", lp, [must_be_int]).
The API call to return the integer status of a variable is: return = omlpsolve("is_int", lp, column). The
matrix version of this call is: [is_int] = omlpsolve("is_int", lp)<br>
Also note the get_mat and set_mat routines. In O-Matrix these are extended to return/set the complete constraint matrix.
See following example.
</p>

<p>Above example can thus also be done as follows:<br>
(Note that you can execute this example by entering command per command as shown below or by just entering example2.
This will execute example2.oms.)</p>

<pre><i>O&gt;</i> lp=omlpsolve("make_lp", 0, 4);
<i>O&gt;</i> omlpsolve("set_verbose", lp, 3);
<i>O&gt;</i> omlpsolve("set_obj_fn", lp, [1, 3, 6.24, 0.1]);
<i>O&gt;</i> omlpsolve("add_constraint", lp, [0, 78.26, 0, 2.9], 2, 92.3);
<i>O&gt;</i> omlpsolve("add_constraint", lp, [0.24, 0, 11.31, 0], 1, 14.8);
<i>O&gt;</i> omlpsolve("add_constraint", lp, [12.68, 0, 0.08, 0.9], 2, 4);
<i>O&gt;</i> omlpsolve("set_lowbo", lp, [28.6, 0, 0, 18]);
<i>O&gt;</i> omlpsolve("set_upbo", lp, [INF, INF, INF, 48.98]);
<i>O&gt;</i> omlpsolve("set_col_name", lp, {"COLONE", "COLTWO", "COLTHREE", "COLFOUR"});
<i>O&gt;</i> omlpsolve("set_row_name", lp, {"THISROW", "THATROW", "LASTROW"});
<i>O&gt;</i> omlpsolve("write_lp", lp, "a.lp");
<i>O&gt;</i> omlpsolve("get_mat", lp)
{
[ 0 , 78.26 , 0 , 2.9 ]
[ 0.24 , 0 , 11.31 , 0 ]
[ 12.68 , 0 , 0.08 , 0.9 ]
}

<i>O&gt;</i> omlpsolve("solve", lp)
0
<i>O&gt;</i> omlpsolve("get_objective", lp)
31.7828
<i>O&gt;</i> omlpsolve("get_variables", lp)
{
28.6
0
0
31.8276
}

<i>O&gt;</i> omlpsolve("get_constraints", lp)
{
92.3
6.8640
391.293
}
</pre>

<p>Note the usage of INF in set_upbo. This stands for "infinity". Meaning an infinite upper bound.
It is also possible to use -INF to express minus infinity. This can for example be used to create a free variable.</p>

<p>To show the full power of the matrices, let's now do some matrix calculations to check the solution.
It works further on above example:</p>

<pre><i>O&gt;</i> A=omlpsolve("get_mat", lp);
<i>O&gt;</i> X=omlpsolve("get_variables", lp);
<i>O&gt;</i> B = A * X
<i>O&gt;</i> B
{
92.3
6.864
391.293
}
</pre>

<p>So what we have done here is calculate the values of the constraints (RHS) by multiplying the constraint matrix
with the solution vector. Now take a look at the values of the constraints that lpsolve has found:</p>

<pre><i>O&gt;</i> omlpsolve("get_constraints", lp)
{
92.3
6.864
391.293
}
</pre>

<p>Exactly the same as the calculated B vector, as expected.</p>

<p>Also the value of the objective can be calculated in a same way:</p>

<pre><i>O&gt;</i> C=omlpsolve("get_obj_fn", lp);
<i>O&gt;</i> X=omlpsolve("get_variables", lp);
<i>O&gt;</i> obj = C * X
<i>O&gt;</i> obj
31.7828
</pre>

<p>So what we have done here is calculate the value of the objective by multiplying the objective vector
with the solution vector. Now take a look at the value of the objective that lpsolve has found:</p>

<pre><i>O&gt;</i> omlpsolve("get_objective", lp)
31.7828
</pre>

<p>Again exactly the same as the calculated obj value, as expected.</p>

<a name="Using_string_constants"></a>
<h3>Using string constants</h3>
From driver version 5.5.0.15 on, it is possible to use string constants
everywhere an lp_solve constant is needed or returned. This is best shown by an example.
In the above code we had:

<pre><i>O&gt;</i> lp=omlpsolve("make_lp", 0, 4);
<i>O&gt;</i> omlpsolve("set_verbose", lp, 3);
<i>O&gt;</i> omlpsolve("add_constraint", lp, [0, 78.26, 0, 2.9], 2, 92.3);
<i>O&gt;</i> omlpsolve("add_constraint", lp, [0.24, 0, 11.31, 0], 1, 14.8);
<i>O&gt;</i> omlpsolve("add_constraint", lp, [12.68, 0, 0.08, 0.9], 2, 4);</pre>

<p>Note the 3rd parameter on set_verbose and the 4th on add_constraint. These are
    lp_solve constants. One could define all the possible constants in O-Matrix and
    then use them in the calls, but that has several disadvantages. First there
    stays the possibility to provide a constant that is not intended for that
    particular call. Another issue is that calls that return a constant are still
    returning it numerical.</p>
<p>Both issues can now be handled by string constants. The above code can be done as
    following with string constants:</p>

<pre><i>O&gt;</i> lp=omlpsolve("make_lp", 0, 4);
<i>O&gt;</i> omlpsolve("set_verbose", lp, "IMPORTANT");
<i>O&gt;</i> omlpsolve("add_constraint", lp, [0, 78.26, 0, 2.9], "GE", 92.3);
<i>O&gt;</i> omlpsolve("add_constraint", lp, [0.24, 0, 11.31, 0], "LE", 14.8);
<i>O&gt;</i> omlpsolve("add_constraint", lp, [12.68, 0, 0.08, 0.9], "GE", 4);</pre>

<p>This is not only more readable, there is much lesser chance that mistakes are
    being made. The calling routine knows which constants are possible and only
    allows these. So unknown constants or constants that are intended for other
    calls are not accepted. For example:</p>

<pre><i>O&gt;</i> omlpsolve("set_verbose", lp, "blabla");
BLABLA: Unknown.

<i>O&gt;</i> omlpsolve("set_verbose", lp, "GE");
GE: Not allowed here.</pre>

<p>Note the difference between the two error messages. The first says that the
    constant is not known, the second that the constant cannot be used at that
    place.</p>
<p>Constants are case insensitive. Internally they are always translated to upper
    case. Also when returned they will always be in upper case.</p>
<p>The constant names are the ones as specified in the documentation of each API
    routine. There are only 3 exceptions, extensions actually. "LE", "GE" and "EQ" in
    <a href="add_constraint.htm">add_constraint</a> and <a href="is_constr_type.htm">is_constr_type</a>
    can also be "&lt;", "&lt;=", "&gt;", "&gt;=", "=". When returned however, "GE", "LE", "EQ"
    will be used.</p>
<p>Also in the matrix version of calls, string constants are possible. For example:</p>

<pre><i>O&gt;</i> omlpsolve("set_constr_type", lp, {"LE", "EQ", "GE"});</pre>

<p>Some constants can be a combination of multiple constants. For example
    <a href="set_scaling.htm">set_scaling</a>:</p>

<pre><i>O&gt;</i> omlpsolve("set_scaling", lp, 3+128);</pre>

<p>With the string version of constants this can be done as following:</p>

<pre><i>O&gt;</i> omlpsolve("set_scaling", lp, "SCALE_MEAN|SCALE_INTEGERS");</pre>

<p>| is the OR operator used to combine multiple constants. There may optinally be
    spaces before and after the |.</p>
<p>Not all OR combinations are legal. For example in set_scaling, a choice must be
    made between SCALE_EXTREME, SCALE_RANGE, SCALE_MEAN, SCALE_GEOMETRIC or
    SCALE_CURTISREID. They may not be combined with each other. This is also tested:</p>

<pre><i>O&gt;</i> omlpsolve("set_scaling", lp, "SCALE_MEAN|SCALE_RANGE");
SCALE_RANGE cannot be combined with SCALE_MEAN</pre>

<p>Everywhere constants must be provided, numeric or string values may be provided.
    The routine automatically interpretes them. </p>
<p>Returning constants is a different
    story. The user must let lp_solve know how to return it. Numerical or as string.
    The default is numerical:</p>

<pre><i>O&gt;</i> omlpsolve("get_scaling", lp)
131</pre>

<p>To let lp_solve return a constant as string, a call to a new function must be
    made: return_constants</p>

<pre><i>O&gt;</i> omlpsolve("return_constants", 1);</pre>

<p>From now on, all returned constants are returned as string:</p>

<pre><i>O&gt;</i> omlpsolve("get_scaling", lp)
SCALE_MEAN|SCALE_INTEGERS</pre>

<p>Also when an array of constants is returned, they are returned as string when
    return_constants is set:</p>

<pre><i>O&gt;</i> omlpsolve("get_constr_type", lp)

LE
EQ
GE</pre>

<p>This for all routines until return_constants is again called with 0:</p>

<pre><i>O&gt;</i> omlpsolve("return_constants", 0);</pre>

<p>The (new) current setting of return_constants is always returned by the call.
    Even when set:</p>

<pre><i>O&gt;</i> omlpsolve("return_constants", 1)
1</pre>

<p>To get the value without setting it, don"t provide the second argument:</p>

<pre><i>O&gt;</i> omlpsolve("return_constants")
1</pre>

<p>In the next part of this documentation, return_constants is the default, 0, so all
    constants are returned numerical and provided constants are also numerical. This
    to keep the documentation as compatible as possible with older versions. But
    don"t let you hold that back to use string constants in your code.</p>

<a name="oms_scripts"></a>
<h3>oms scripts</h3>

<p>O-Matrix can execute a sequence of statements stored in files. Such files are called
oms files because they must have the file type of ".oms" as the last part of their filename (extension).</p>

<p>oms scripts can be compared with batch files or scripts. You can put O-Matrix commands in them and execute them at
any time. The oms script is executed like any other command, by entering its name (without the .oms extension).</p>

<p>The omlpsolve O-Matrix distribution contains some example oms scripts to demonstrate this.</p>

<p>You can also edit these files with your favourite text editor (or notepad).</p>

<h4>example1.oms</h4>

<p>Contains the commands as shown in the first example of this article.
To execute and also see which commands are executed in the debug window, use following commands:</p>
<pre><i>O&gt;</i> stop
<i>O&gt;</i> trace on example1.oms
<i>O&gt;</i> quit
<i>O&gt;</i> example1</pre>

<p>Note however that execution is much slower when trace is on. It is only used here to see the statements executed.</p>

<h4>example2.oms</h4>

<p>Contains the commands as shown in the second example of this article.
To execute and also see which commands are executed in the debug window, use following commands:</p>
<pre><i>O&gt;</i> stop
<i>O&gt;</i> trace on example2.oms
<i>O&gt;</i> quit
<i>O&gt;</i> example2</pre>

<p>Note however that execution is much slower when trace is on. It is only used here to see the statements executed.</p>

<h4>example3.oms</h4>

<p>Contains the commands of a practical example. See further in this article.</p>

<h4>example4.oms</h4>

<p>Contains the commands of a practical example. See further in this article.</p>

<h4>example5.oms</h4>

<p>Contains the commands of a practical example. See further in this article.</p>

<h4>example6.oms</h4>

<p>Contains the commands of a practical example. See further in this article.</p>

<h4>lp_solve.oms</h4>

<p>This script uses the API to create a higher-level function called lp_solve.
This function accepts as arguments some matrices and options to create and solve an lp model.
See the beginning of the file to see its usage:</p>

<pre> LP_SOLVE  Solves mixed integer linear programming problems.

   SYNOPSIS: [obj,x,duals] = lp_solve(f,a,b,e,vlb,vub,xint,scalemode,keep)

      solves the MILP problem

              max v = f'*x
                a*x &lt;&gt; b
                  vlb &lt;= x &lt;= vub
                  x(int) are integer

   ARGUMENTS: The first four arguments are required:

            f: n vector of coefficients for a linear objective function.
            a: m by n matrix representing linear constraints.
            b: m vector of right sides for the inequality constraints.
            e: m vector that determines the sense of the inequalities:
                      e(i) = -1  ==&gt; Less Than
                      e(i) =  0  ==&gt; Equals
                      e(i) =  1  ==&gt; Greater Than
          vlb: n vector of lower bounds. If empty or omitted,
               then the lower bounds are set to zero.
          vub: n vector of upper bounds. May be omitted or empty.
         xint: vector of integer variables. May be omitted or empty.
    scalemode: scale flag. Off when 0 or omitted.
         keep: Flag for keeping the lp problem after it's been solved.
               If omitted, the lp will be deleted when solved.

   OUTPUT: A nonempty output is returned if a solution is found:

          obj: Optimal value of the objective function.
            x: Optimal value of the decision variables.
        duals: solution of the dual problem.
</pre>

<p>Example of usage. To create and solve following lp-model:</p>

<pre>max: -x1 + 2 x2;
C1: 2x1 + x2 &lt; 5;
-4 x1 + 4 x2 &lt;5;

int x2,x1;
</pre>

<p>The following command can be used:</p>

<pre><i>O&gt;</i> include lp_solve.oms
<i>O&gt;</i> [obj, x]=lp_solve([-1, 2], {[2, 1], [-4, 4]}, [5, 5], [-1, -1], [], [], [1, 2])
<i>O&gt;</i> obj
3
<i>O&gt;</i> x
{
1
2
}
</pre>

<h4>lp_maker.oms</h4>

<p>This script is analog to the lp_solve script and also uses the API to create a higher-level function called lp_maker.
This function accepts as arguments some matrices and options to create an lp model. Note that this scripts only
creates a model and returns a handle.
See the beginning of the file to see its usage:</p>

<pre> LP_MAKER  Makes mixed integer linear programming problems.

   SYNOPSIS: lp_handle = lp_maker(f,a,b,e,vlb,vub,xint,scalemode,setminim)
      make the MILP problem
        max v = f'*x
          a*x &lt;&gt; b
            vlb &lt;= x &lt;= vub
            x(int) are integer

   ARGUMENTS: The first four arguments are required:
            f: n vector of coefficients for a linear objective function.
            a: m by n matrix representing linear constraints.
            b: m vector of right sides for the inequality constraints.
            e: m vector that determines the sense of the inequalities:
                      e(i) &lt; 0  ==&gt; Less Than
                      e(i) = 0  ==&gt; Equals
                      e(i) &gt; 0  ==&gt; Greater Than
          vlb: n vector of non-negative lower bounds. If empty or omitted,
               then the lower bounds are set to zero.
          vub: n vector of upper bounds. May be omitted or empty.
         xint: vector of integer variables. May be omitted or empty.
    scalemode: scale flag. Off when 0 or omitted.
     setminim: Set maximum lp when this flag equals 0 or omitted.

   OUTPUT: lp_handle is an integer handle to the lp created.
</pre>

<p>Example of usage. To create following lp-model:</p>

<pre>max: -x1 + 2 x2;
C1: 2x1 + x2 &lt; 5;
-4 x1 + 4 x2 &lt;5;

int x2,x1;
</pre>

<p>The following command can be used:</p>

<pre><i>O&gt;</i> include lp_maker.oms
<i>O&gt;</i> lp=lp_maker([-1, 2], {[2, 1], [-4, 4]}, [5, 5], [-1, -1], [], [], [1, 2])
<i>O&gt;</i> lp
0
</pre>

<p>To solve the model and get the solution:</p>

<pre><i>O&gt;</i> omlpsolve("solve", lp)
0
<i>O&gt;</i> omlpsolve("get_objective", lp)
3
<i>O&gt;</i> omlpsolve("get_variables", lp)
{
1
2
}
</pre>

<p>Don't forget to free the handle and its associated memory when you are done:</p>

<pre><i>O&gt;</i> omlpsolve("delete_lp", lp);</pre>

<h4>lpdemo.oms</h4>

<p>Contains several examples to build and solve lp models.
To execute and also see which commands are executed in the debug window, use following commands:</p>
<pre><i>O&gt;</i> stop
<i>O&gt;</i> trace on lpdemo.oms
<i>O&gt;</i> quit
<i>O&gt;</i> lpdemo</pre>

<p>Note however that execution is much slower when trace is on. It is only used here to see the statements executed.</p>

<h4>ex.oms</h4>

<p>Contains several examples to build and solve lp models.
Also solves the lp_examples from the lp_solve distribution.
To execute and also see which commands are executed in the debug window, use following commands:</p>
<pre><i>O&gt;</i> stop
<i>O&gt;</i> trace on ex.oms
<i>O&gt;</i> quit
<i>O&gt;</i> ex</pre>

<p>Note however that execution is much slower when trace is on. It is only used here to see the statements executed.</p>

<a name="A_practical_example"></a>
<h3>A practical example</h3>

<p>We shall illustrate the method of linear programming by means of a simple example,
giving a combination graphical/numerical solution, and then solve both a slightly as well as a substantially
more complicated problem.</p>

<p>Suppose a farmer has 75 acres on which to plant two crops: wheat and barley.
To produce these crops, it costs the farmer (for seed, fertilizer, etc.) $120 per acre for the
wheat and  $210 per acre for the barley. The farmer has $15000 available for expenses.
But after the harvest, the farmer must store the crops while awaiting favourable market conditions.
The farmer has storage space for 4000 bushels. Each acre yields an average of 110 bushels of wheat
or 30 bushels of barley.  If the net profit per bushel of wheat (after all expenses have been subtracted)
is $1.30 and for barley is $2.00, how should the farmer plant the 75 acres to maximize profit?</p>

<p>We begin by formulating the problem mathematically. 
First we express the objective, that is the profit, and the constraints
algebraically, then we graph them, and lastly we arrive at the solution
by graphical inspection and a minor arithmetic calculation.</p>

<p>Let x denote the number of acres allotted to wheat and y the number of acres allotted to barley.
Then the expression to be maximized, that is the profit, is clearly</p>

<p align="center">P = (110)(1.30)x + (30)(2.00)y = 143x + 60y.</p>

<p>There are three constraint inequalities, specified by the limits on expenses, storage and acreage.
They are respectively:</p>

<p align="center">
120x + 210y &lt;= 15000<br>
110x + 30y &lt;= 4000<br>
x + y &lt;= 75
</p>

<p>Strictly speaking there are two more constraint inequalities forced by the fact that the farmer cannot plant
a negative number of acres, namely:</p>

<p align="center">x &gt;= 0, y &gt;= 0.</p>

<p>Next we graph the regions specified by the constraints. The last two say that we only need to consider
the first quadrant in the x-y plane. Here's a graph delineating the triangular region in the first quadrant determined
by the first inequality.</p>

<pre>
<i>O&gt;</i> clear
<i>O&gt;</i> X = 0.1:0.05:125;
<i>O&gt;</i> Y1 = (15000. - 120*X)/210;
<i>O&gt;</i> bar(X, Y1)
</pre>

<p><IMG alt="Source" src="http://lpsolve.sourceforge.net/5.5/O-Matrix1.jpg" border="0"></p>

<p>Now let's put in the other two constraint inequalities.</p>

<pre>
<i>O&gt;</i> clear
<i>O&gt;</i> X = 0.1:0.05:38;
<i>O&gt;</i> mlmode
<i>O&gt;</i> Y1 = (15000. - 120*X)/210;
<i>O&gt;</i> Y2 = max((4000 - 110.*X)./30, 0);
<i>O&gt;</i> Y3 = max(75 - X, 0.);
<i>O&gt;</i> Ytop = min(min(Y1, Y2), Y3);
<i>O&gt;</i> omatrix
<i>O&gt;</i> bar(X, Ytop)
<i>O&gt;</i> gtitle("Solution space")
</pre>

<p><IMG alt="Source" src="http://lpsolve.sourceforge.net/5.5/O-Matrix2.jpg" border="0"></p>

<p>The black area is the solution space that holds valid solutions. This means that any point in this area fulfils the
constraints.
</p>

<p>Now let's superimpose on top of this picture a contour plot of the objective function P.</p>

<pre>
<i>O&gt;</i> mlmode meshgrid.m
<i>O&gt;</i> [U, V] = meshgrid(0:1:40, 0:1:80);
<i>O&gt;</i> Ur = U.row(1)
<i>O&gt;</i> Vc = V.col(1)
<i>O&gt;</i> Z = 143.*U + 60.*V
<i>O&gt;</i> levels = (0:1:11)*1000.
<i>O&gt;</i> contour(Z', levels, Ur', Vc');
<i>O&gt;</i> gtitle("Solution space and objective")
</pre>

<p><IMG alt="Source" src="http://lpsolve.sourceforge.net/5.5/O-Matrix3.jpg" border="0"></p>

<p>The lines give a picture of the objective function.
All solutions that intersect with the black area are valid solutions, meaning that this result also fulfils
the set constraints. The more the lines go to the right, the higher the objective value is. The optimal solution
or best objective is a line that is still in the black area, but with an as large as possible value.
</p>

<p>It seems apparent that the maximum value of P will occur on the level curve (that is, level
line) that passes through the vertex of the polygon that lies near (22,53).<br>
It is the intersection of x + y = 75 and 110*x + 30*y = 4000<br>
This is a corner point of the diagram. This is not a coincidence. The simplex algorithm, which is used
by lp_solve, starts from a theorem that the optimal solution is such a corner point.<br>
In fact we can compute the result:</p>

<pre>
<i>O&gt;</i> x = {[1, 1], [110, 30]} \ {75, 4000}
<i>O&gt;</i> print "x =", x
x = {
21.875
53.125
}
</pre>

<p>The acreage that results in the maximum profit is 21.875 for wheat and 53.125 for barley.
In that case the profit is:</p>

<pre>
<i>O&gt;</i> P = [143, 60] * x
<i>O&gt;</i> print "Profit, P =", P
Profit, P = 6315.63
</pre>

<p>That is, $6315.63.</p>

<p>Note that these command are in script example3.oms</p>

<p>Now, lp_solve comes into the picture to solve this linear programming problem more generally.
After that we will use it to solve two more complicated problems involving more variables
and constraints.</p>

<p>For this example, we use the higher-level script lp_maker to build the model and then some lp_solve API calls
to retrieve the solution. Here is again the usage of lp_maker:</p>

<pre> LP_MAKER  Makes mixed integer linear programming problems.

   SYNOPSIS: lp_handle = lp_maker(f,a,b,e,vlb,vub,xint,scalemode,setminim)
      make the MILP problem
        max v = f'*x
          a*x &lt;&gt; b
            vlb &lt;= x &lt;= vub
            x(int) are integer

   ARGUMENTS: The first four arguments are required:
            f: n vector of coefficients for a linear objective function.
            a: m by n matrix representing linear constraints.
            b: m vector of right sides for the inequality constraints.
            e: m vector that determines the sense of the inequalities:
                      e(i) &lt; 0  ==&gt; Less Than
                      e(i) = 0  ==&gt; Equals
                      e(i) &gt; 0  ==&gt; Greater Than
          vlb: n vector of non-negative lower bounds. If empty or omitted,
               then the lower bounds are set to zero.
          vub: n vector of upper bounds. May be omitted or empty.
         xint: vector of integer variables. May be omitted or empty.
    scalemode: scale flag. Off when 0 or omitted.
     setminim: Set maximum lp when this flag equals 0 or omitted.

   OUTPUT: lp_handle is an integer handle to the lp created.
</pre>

<p>Now let's formulate this model with lp_solve:</p>

<pre>
<i>O&gt;</i> f = [143, 60];
<i>O&gt;</i> A = {[120, 210], [110, 30], [1, 1]};
<i>O&gt;</i> b = {15000, 4000, 75};
<i>O&gt;</i> lp = lp_maker(f, A, b, [-1, -1, -1], [], [], [], 1, 0);
<i>O&gt;</i> solvestat = omlpsolve("solve", lp)
<i>O&gt;</i> omlpsolve("get_objective", lp)
6315.63
<i>O&gt;</i> omlpsolve("get_variables", lp)
{
21.875
53.125
}
<i>O&gt;</i> omlpsolve("delete_lp", lp);
</pre>

<p>Note that these command are in script example4.oms</p>

<p>With the higher-level script lp_maker, we provide all data to lp_solve. lp_solve returns a handle (lp) to the
created model. Then the API call 'solve' is used to calculate the optimal solution of the model.
The value of the objective function is retrieved via the API call 'get_objective' and the values of the variables
are retrieved via the API call 'get_variables'. At last, the model is removed from memory via a call to 'delete_lp'.
Don't forget this to free all memory allocated by lp_solve.</p>

<p>The solution is the same answer we obtained before. 
Note that the non-negativity constraints are accounted implicitly because variables are by default non-negative
in lp_solve.</p>

<p>Well, we could have done this problem by hand (as shown in the introduction) because it is very small and it
can be graphically presented.<br>
Now suppose that the farmer is dealing with a third crop, say corn, and that the corresponding data is:</p>

<blockquote>
<table cellSpacing="1" cellPadding="1" border="1">
<tr><td>cost per acre</td><td>$150.75</td></tr>
<tr><td>yield per acre</td><td>125 bushels</td></tr>
<tr><td>profit per bushel</td><td>$1.56</td></tr>
</table>
</blockquote>

<p>With three variables it is already a lot more difficult to show this model graphically. Adding more variables
makes it even impossible because we can't imagine anymore how to represent this. We only have a practical understanding
of 3 dimentions, but beyound that it is all very theorethical.</p>

<p>If we denote the number of acres allotted to corn by z, then the objective function becomes:</p>

<p align="center">P = (110)(1.30)x + (30)(2.00)y + (125)(1.56) = 143x + 60y + 195z</p>

<p>And the constraint inequalities are:</p>

<p align="center">
120x + 210y + 150.75z &lt;= 15000<br>
110x + 30y + 125z &lt;= 4000<br>
x + y + z &lt;= 75<br>
x &gt;= 0, y &gt;= 0, z &gt;= 0
</p>

<p>The problem is solved with lp_solve as follows:</p>

<pre>
<i>O&gt;</i> f = [143, 60, 195];
<i>O&gt;</i> A = {[120, 210, 150.75], [110, 30, 125], [1, 1, 1]};
<i>O&gt;</i> b = {15000, 4000, 75};
<i>O&gt;</i> lp = lp_maker(f, A, b, [-1, -1, -1], [], [], [], 1, 0);
<i>O&gt;</i> solvestat = omlpsolve("solve", lp)
<i>O&gt;</i> omlpsolve("get_objective", lp)
6986.84
<i>O&gt;</i> omlpsolve("get_variables", lp)
{
0
56.5789
18.4211
}
<i>O&gt;</i> omlpsolve("delete_lp", lp);
</pre>

<p>Note that these command are in script example5.oms</p>

<p>So the farmer should ditch the wheat and plant 56.5789 acres of barley and 18.4211 acres of corn.</p>

<p>There is no practical limit on the number of variables and constraints that O-Matrix can handle.
Certainly none that the relatively unsophisticated user will encounter. Indeed, in
many true applications of the technique of linear programming, one needs
to deal with many variables and constraints. The solution of such
a problem by hand is not feasible, and software like O-Matrix is crucial
to success. For example, in the farming problem with which we
have been working, one could have more crops than two or three. Think
agribusiness instead of family farmer. And one could have constraints
that arise from other things beside expenses, storage and acreage limitations. For example:</p>
<ul>
  <li>Availability of seed. This might lead to constraint inequalities like xj &lt; k.</li>
  <li>Personal preferences. Thus the farmer's spouse might have a preference
  for one variety over another and insist on a corresponding planting,
  or something similar with a collection of crops; thus constraint inequalities
  like xi &lt; xj or x1 + x2 &gt; x3.</li>
  <li>Government subsidies. It may take a moment's reflection on the reader's part,
  but this could lead to inequalities like xj &gt; k.</li>
</ul>

<p>Below is a sequence of commands that solves exactly such a problem.
You should be able to recognize the objective expression and the constraints from the data that is entered. 
But as an aid, you might answer the following questions:
</p>

<ul>
  <li>How many crops are under consideration?</li>
  <li>What are the corresponding expenses? How much is available for expenses?</li>
  <li>What are the yields in each case? What is the storage capacity?</li>
  <li>How many acres are available?</li>
  <li>What crops are constrained by seed limitations? To what extent?</li>
  <li>What about preferences?</li>
  <li>What are the minimum acreages for each crop?</li>
</ul>

<pre>
<i>O&gt;</i> f = [110*1.3, 30*2.0, 125*1.56, 75*1.8, 95*.95, 100*2.25, 50*1.35];
<i>O&gt;</i> A = {[120,210,150.75,115,186,140,85],[110,30,125,75,95,100,50],[1,1,1,1,1,1,1],
                  [1,-1,0,0,0,0,0],[0,0,1,0,-2,0,0],[0,0,0,-1,0,-1,1]};
<i>O&gt;</i> b = {55000, 40000, 400, 0, 0, 0};
<i>O&gt;</i> lp = lp_maker(f, A, b, [-1,-1,-1,-1,-1,-1],[10,10,10,10,20,20,20],[100,INF,50,INF,INF,250,INF],[],1,0);
<i>O&gt;</i> solvestat = omlpsolve("solve", lp)
<i>O&gt;</i> omlpsolve("get_objective", lp)
75398
<i>O&gt;</i> omlpsolve("get_variables", lp)
{
10
10
40
45.6522
20
250
20
}
<i>O&gt;</i> omlpsolve("delete_lp", lp);
</pre>

<p>Note that these command are in script example6.oms</p>

<p>Note that we have used in this formulation the vlb and vub arguments of lp_maker. This to set lower and upper bounds
on variables. This could have been done via extra constraints, but it is more performant to set bounds on variables.
Also note that Inf is used for variables that have no upper limit. This stands for Infinity.
</p>

<p>Note that despite the complexity of the problem, lp_solve solves it almost instantaneously. It seems the
farmer should bet the farm on crop number 6. We strongly suggest
you alter the expense and/or the storage limit in the problem and see
what effect that has on the answer.</p>

<a name="Another,_more_theoretical,_example"></a>
<h3>Another, more theoretical, example</h3>

<p>Suppose we want to solve the following linear program using O-Matrix:</p>
<p align="center">
max 4x1 + 2x2 + x3<br>
s. t. 2x1 + x2 &lt;= 1<br>
x1 + 2x3 &lt;= 2<br>
x1 + x2 + x3 = 1<br>
x1 &gt;= 0<br>
x1 &lt;= 1<br>
x2 &gt;= 0<br>
x2 &lt;= 1<br>
x3 &gt;= 0<br>
x3 &lt;= 2<br>
</p>

<p>Convert the LP into O-Matrix format we get:</p>

<p align="center">
f = [4, 2, 1]<br>
A = {[2, 1, 0], [1, 0, 2], [1, 1, 1]}<br>
b = {1, 2, 1}
</p>

<p>Note that constraints on single variables are not put in the constraint matrix.
lp_solve can set bounds on individual variables and this is more performant than creating
additional constraints. These bounds are:
</p>

<p align="center">
l = [ 0, 0, 0]<br>
u = [ 1, 1, 2]
</p>

<p>Now lets enter this in O-Matrix:</p>

<pre>
<i>O&gt;</i> f = [4, 2, 1];
<i>O&gt;</i> A = {[2, 1, 0], [1, 0, 2], [1, 1, 1]};
<i>O&gt;</i> b = {1, 2, 1};
<i>O&gt;</i> l = [ 0, 0, 0];
<i>O&gt;</i> u = [ 1, 1, 2];
</pre>

<p>Now solve the linear program using O-Matrix: Type the commands</p>

<pre>
<i>O&gt;</i> lp = lp_maker(f, A, b, [-1, -1, -1], l, u, [], 1, 0);
<i>O&gt;</i> solvestat = omlpsolve("solve", lp)
<i>O&gt;</i> omlpsolve("get_objective", lp)
2.5
<i>O&gt;</i> omlpsolve("get_variables", lp)
{
0.5
0
0.5
}
<i>O&gt;</i> omlpsolve("delete_lp", lp)
</pre>

<p>What to do when some of the variables are missing ?<br>
For example, suppose there are no lower bounds on the variables. In this case define l to be the empty set using the O-Matrix command:
</p>

<pre>
<i>O&gt;</i> l = [];
</pre>

<p>This has the same effect as before, because lp_solve has as default lower bound for variables 0.</p>

<p>But what if you want that variables may also become negative?<br>
Then you can use -INF as lower bounds:</p>

<pre>
<i>O&gt;</i> l = [-INF, -INF, -INF];
</pre>

<p>Solve this and you get a different result:</p>

<pre>
<i>O&gt;</i> lp = lp_maker(f, A, b, [-1, -1, -1], l, u, [], 1, 0);
<i>O&gt;</i> solvestat = omlpsolve("solve", lp)
<i>O&gt;</i> omlpsolve("get_objective", lp)
2.66667
<i>O&gt;</i> omlpsolve("get_variables", lp)
{
0.666667
-0.333333
0.666667
}
<i>O&gt;</i> omlpsolve("delete_lp", lp)
</pre>

<a name="Overview_of_API_routines"></a>
<h3>Overview of API routines</h3>

<p>Note that everwhere where lp is used as argument that this can be a handle (lp_handle) or the models name.</p>

<ul>
	<li>
		<a href="add_column.htm">add_column, add_columnex</a>
		<ul>
			<li>return = omlpsolve("add_column", lp,
    [column])

			<li>return = omlpsolve("add_columnex", lp,
    [column])

			<li>Both have the same interface from <a href="add_column.htm">add_column</a> but act as <a href="add_column.htm">add_columnex</a></li>
		</ul>
    <li>
        <a href="add_constraint.htm">add_constraint, add_constraintex</a>
        <ul>
            <li>return = omlpsolve("add_constraint", lp,
    [row], constr_type, rh)
            <li>return = omlpsolve("add_constraintex", lp,
    [row], constr_type, rh)
            <li>Both have the same interface from <a href="add_constraint.htm">add_constraint</a> but act as <a href="add_constraint.htm">add_constraintex</a></li>
        </ul>
    <li>
        <a href="add_SOS.htm">add_SOS</a>
        <ul>
            <li>return = omlpsolve("add_SOS", lp, name,
    sostype, priority, [sosvars], [weights])
            <li>The <i>count</i> argument in the API documentation is not needed in O-Matrix since the number of elements is derived from the size of the sosvars and weights matrices. These must have the same size.</li>
        </ul>
    <li>
        <a href="column_in_lp.htm">column_in_lp</a>
        <ul>
            <li>return = omlpsolve("column_in_lp", lp,
    [column])
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="copy_lp.htm">copy_lp</a>
        <ul>
            <li>lp_handle = omlpsolve("copy_lp", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="default_basis.htm">default_basis</a>
        <ul>
            <li>omlpsolve("default_basis", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="del_column.htm">del_column</a>
        <ul>
            <li>return = omlpsolve("del_column", lp, column)

            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="del_constraint.htm">del_constraint</a>
        <ul>
            <li>return = omlpsolve("del_constraint", lp,
    del_row)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="delete_lp.htm">delete_lp</a>
        <ul>
            <li>omlpsolve("delete_lp", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="free_lp.htm">free_lp</a>
        <ul>
            <li>omlpsolve("free_lp", lp)
            <li>lp is not changed as in the lpsolve API since it is a read_only input parameter. So it acts the same as delete_lp.</li>
        </ul>
    <li>
        <a href="get_anti_degen.htm">get_anti_degen</a>
        <ul>
            <li>return = omlpsolve("get_anti_degen", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_basis.htm">get_basis</a>
        <ul>
            <li>[bascolumn] = omlpsolve("get_basis", lp {,
    nonbasic})
            <li>The <i>bascolumn</i> argument in the API documentation is here the return value. The <i>nonbasic</i> argument is optional in O-Matrix. If not provided, then 0 is used.</li>
        </ul>
    <li>
        <a href="get_basiscrash.htm">get_basiscrash</a>
        <ul>
            <li>return = omlpsolve("get_basiscrash", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_bb_depthlimit.htm">get_bb_depthlimit</a>
        <ul>
            <li>return = omlpsolve("get_bb_depthlimit", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_bb_floorfirst.htm">get_bb_floorfirst</a>
        <ul>
            <li>return = omlpsolve("get_bb_floorfirst", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_bb_rule.htm">get_bb_rule</a>
        <ul>
            <li>return = omlpsolve("get_bb_rule", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_bounds_tighter.htm">get_bounds_tighter</a>
        <ul>
            <li>return = omlpsolve("get_bounds_tighter", lp)

            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_break_at_value.htm">get_break_at_value</a>
        <ul>
            <li>return = omlpsolve("get_break_at_value", lp)

            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_col_name.htm">get_col_name</a>
        <ul>
            <li>name = omlpsolve("get_col_name", lp, column)

            <li>[names] = omlpsolve("get_col_name", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="get_column.htm">get_column</a>
        <a href="get_column.htm">get_columnex</a>
        <ul>
            <li>[column, return] = omlpsolve("get_column", lp, col_nr)
            <li>[column, return] = omlpsolve("get_columnex", lp, col_nr)
            <li>The <i>column</i> argument in
    the API documentation is here the first return value.
            <li>The return code of the call is the second return value.</li>
        </ul>
    <li>
        <a href="get_constr_type.htm">get_constr_type</a>
        <ul>
            <li>return = omlpsolve("get_constr_type", lp,
    row)
            <li>[constr_type] = omlpsolve("get_constr_type",
    lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="get_constr_value.htm">get_constr_value</a>
        <ul>
            <li>return = omlpsolve("get_constr_value", lp, row {, primsolution})
            <li>The primsolution argument is optional. If not provided, then the solution of last solve is used.</li>
        </ul>
    <li>
        <a href="get_constraints.htm">get_constraints</a>
        <ul>
            <li>[constr, return] = omlpsolve("get_constraints",
    lp)
            <li>The <i>constr</i> argument in
    the API documentation is here the first return value.
            <li>The return code of the call is the second return value.</li>
        </ul>
    <li>
        <a href="get_sensitivity_rhs.htm">get_dual_solution</a>
        <ul>
            <li>[duals, return] = omlpsolve("get_dual_solution",
    lp)
            <li>The <i>duals</i> argument in
    the API documentation is here the first return value.
            <li>In the API, element 0 is not used and values start
    from element 1. In O-Matrix, there is no unused element in the matrix.
            <li>The return code of the call is the second return value.</li>
        </ul>
    <li>
        <a href="get_epsb.htm">get_epsb</a>
        <ul>
            <li>return = omlpsolve("get_epsb", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_epsd.htm">get_epsd</a>
        <ul>
            <li>return = omlpsolve("get_epsd", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_epsel.htm">get_epsel</a>
        <ul>
            <li>return = omlpsolve("get_epsel", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_epsint.htm">get_epsint</a>
        <ul>
            <li>return = omlpsolve("get_epsint", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_epsperturb.htm">get_epsperturb</a>
        <ul>
            <li>return = omlpsolve("get_epsperturb", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_epspivot.htm">get_epspivot</a>
        <ul>
            <li>return = omlpsolve("get_epspivot", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_improve.htm">get_improve</a>
        <ul>
            <li>return = omlpsolve("get_improve", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_infinite.htm">get_infinite</a>
        <ul>
            <li>return = omlpsolve("get_infinite", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_lowbo.htm">get_lowbo</a>
        <ul>
            <li>return = omlpsolve("get_lowbo", lp, column)
            <li>[return] = omlpsolve("get_lowbo", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="get_lp_index.htm">get_lp_index</a>
        <ul>
            <li>return = omlpsolve("get_lp_index", lp,
    orig_index)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_lp_name.htm">get_lp_name</a>
        <ul>
            <li>name = omlpsolve("get_lp_name", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_mat.htm">get_mat</a>
        <ul>
            <li>value = omlpsolve("get_mat", lp, row, col)
            <li>[matrix, return] = omlpsolve("get_mat", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix in the first return value.
                The return code of the call is the second return value.</li>
        </ul>
    <li>
        <a href="get_max_level.htm">get_max_level</a>
        <ul>
            <li>return = omlpsolve("get_max_level", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_maxpivot.htm">get_maxpivot</a>
        <ul>
            <li>return = omlpsolve("get_maxpivot", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_mip_gap.htm">get_mip_gap</a>
        <ul>
            <li>return = omlpsolve("get_mip_gap", lp,
    absolute)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_nameindex.htm">get_nameindex</a>
        <ul>
            <li>return = omlpsolve("get_nameindex", lp, name, isrow)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_Ncolumns.htm">get_Ncolumns</a>
        <ul>
            <li>return = omlpsolve("get_Ncolumns", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_negrange.htm">get_negrange</a>
        <ul>
            <li>return = omlpsolve("get_negrange", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_nonzeros.htm">get_nonzeros</a>
        <ul>
            <li>return = omlpsolve("get_nonzeros", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_Norig_columns.htm">get_Norig_columns</a>
        <ul>
            <li>return = omlpsolve("get_Norig_columns", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_Norig_rows.htm">get_Norig_rows</a>
        <ul>
            <li>return = omlpsolve("get_Norig_rows", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_Nrows.htm">get_Nrows</a>
        <ul>
            <li>return = omlpsolve("get_Nrows", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_obj_bound.htm">get_obj_bound</a>
        <ul>
            <li>return = omlpsolve("get_obj_bound", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_objective.htm">get_objective</a>
        <ul>
            <li>return = omlpsolve("get_objective", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_orig_index.htm">get_orig_index</a>
        <ul>
            <li>return = omlpsolve("get_orig_index", lp,
    lp_index)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_col_name.htm">get_origcol_name</a>
        <ul>
            <li>name = omlpsolve("get_origcol_name", lp,
    column)
            <li>[names] = omlpsolve("get_origcol_name", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="get_row_name.htm">get_origrow_name</a>
        <ul>
            <li>name = omlpsolve("get_origrow_name", lp,
    row)
            <li>[names] = omlpsolve("get_origrow_name", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="get_pivoting.htm">get_pivoting</a>
        <ul>
            <li>return = omlpsolve("get_pivoting", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_presolve.htm">get_presolve</a>
        <ul>
            <li>return = omlpsolve("get_presolve", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_presolveloops.htm">get_presolveloops</a>
        <ul>
            <li>return = omlpsolve("get_presolveloops", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_primal_solution.htm">get_primal_solution</a>
        <ul>
            <li>[pv, return] = omlpsolve("get_primal_solution",
    lp)
            <li>The <i>pv</i> argument in the
    API documentation is here the first return value.
            <li>The return code of the call is the second return value.</li>
        </ul>
    <li>
        <a href="get_print_sol.htm">get_print_sol</a>
        <ul>
            <li>return = omlpsolve("get_print_sol", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_constraints.htm">get_ptr_constraints</a>
        <ul>
            <li>Not implemented.</li>
        </ul>
    <li>
        <a href="get_sensitivity_rhs.htm">get_ptr_dualsolution</a>
        <ul>
            <li>Not implemented.</li>
        </ul>
    <li>
        <a href="get_primal_solution.htm">get_ptr_primal_solution</a>
        <ul>
            <li>Not implemented.</li>
        </ul>
    <li>
        <a href="get_sensitivity_obj.htm">get_ptr_sensitivity_obj, get_ptr_sensitivity_objex</a>
        <ul>
            <li>Not implemented.</li>
        </ul>
    <li>
        <a href="get_sensitivity_rhs.htm">get_ptr_sensitivity_rhs</a>
        <ul>
            <li>Not implemented.</li>
        </ul>
    <li>
        <a href="get_variables.htm">get_ptr_variables</a>
        <ul>
            <li>Not implemented.</li>
        </ul>
    <li>
        <a href="get_rh.htm">get_rh</a>
        <ul>
            <li>return = omlpsolve("get_rh", lp, row)
            <li>[rh] = omlpsolve("get_rh", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="get_rh_range.htm">get_rh_range</a>
        <ul>
            <li>return = omlpsolve("get_rh_range", lp, row)
            <li>[rh_ranges] = omlpsolve("get_rh_range", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="get_row.htm">get_row</a>
        <a href="get_row.htm">get_rowex</a>
        <ul>
            <li>[row, return] = omlpsolve("get_row", lp, row_nr)
            <li>[row, return] = omlpsolve("get_rowex", lp, row_nr)
            <li>The <i>row</i> argument in the
    API documentation is here the first return value.
            <li>In the API, element 0 is not used and values start
    from element 1. In O-Matrix, there is no unused element in the matrix.
            <li>The return code of the call is the second return value.</li>
        </ul>
    <li>
        <a href="get_row_name.htm">get_row_name</a>
        <ul>
            <li>name = omlpsolve("get_row_name", lp, row)
            <li>[names] = omlpsolve("get_row_name", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="get_scalelimit.htm">get_scalelimit</a>
        <ul>
            <li>return = omlpsolve("get_scalelimit", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_scaling.htm">get_scaling</a>
        <ul>
            <li>return = omlpsolve("get_scaling", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_sensitivity_obj.htm">get_sensitivity_obj, get_sensitivity_objex</a>
        <ul>
            <li>[objfrom, objtill, objfromvalue, objtillvalue,
    return] = omlpsolve("get_sensitivity_obj", lp)
            <li>[objfrom, objtill, objfromvalue, objtillvalue,
    return] = omlpsolve("get_sensitivity_objex", lp)
            <li>The <i>objfrom</i>, <i>objtill</i>, <i>objfromvalue</i>, <i>objtillvalue</i> arguments in the API documentation
    are here the return values. Note that O-Matrix allows the return of fewer
    variables. For example if only objfrom and objtill are needed then the
    call can be [objfrom, objtill] = omlpsolve("get_sensitivity_obj",
    lp). The unrequested values are even not calculated.
            <li>Since the API routine doesn't calculate the <i>objtillvalue</i> value at this time, O-Matrix always
    returns a zero vector for this.
            <li>The return code of the call is the last value.
            <li>get_sensitivity_obj and get_sensitivity_objex are both implemented, but have the same functionality.</li>
        </ul>
    <li>
        <a href="get_sensitivity_rhs.htm">get_sensitivity_rhs, get_sensitivity_rhsex</a>
        <ul>
            <li>[duals, dualsfrom, dualstill, return] =
    omlpsolve("get_sensitivity_rhs", lp)
            <li>[duals, dualsfrom, dualstill, return] =
    omlpsolve("get_sensitivity_rhsex", lp)
            <li>The <i>duals</i>, <i>dualsfrom</i>, <i>dualstill</i>
    arguments in the API documentation are here the return values. Note that
    O-Matrix allows the return of fewer variables. For example if only duals is
    needed then the call can be [duals] = omlpsolve("get_sensitivity_rhs",
    lp). The unrequested values are even not calculated.
            <li>The return code of the call is the last value.
            <li>get_sensitivity_rhs and get_sensitivity_rhsex are both implemented, but have the same functionality.</li>
        </ul>
    <li>
        <a href="get_simplextype.htm">get_simplextype</a>
        <ul>
            <li>return = omlpsolve("get_simplextype", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_solutioncount.htm">get_solutioncount</a>
        <ul>
            <li>return = omlpsolve("get_solutioncount", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_solutionlimit.htm">get_solutionlimit</a>
        <ul>
            <li>return = omlpsolve("get_solutionlimit", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_status.htm">get_status</a>
        <ul>
            <li>return = omlpsolve("get_status", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_statustext.htm">get_statustext</a>
        <ul>
            <li>return = omlpsolve("get_statustext", lp,
    statuscode)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_timeout.htm">get_timeout</a>
        <ul>
            <li>return = omlpsolve("get_timeout", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_total_iter.htm">get_total_iter</a>
        <ul>
            <li>return = omlpsolve("get_total_iter", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_total_nodes.htm">get_total_nodes</a>
        <ul>
            <li>return = omlpsolve("get_total_nodes", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_upbo.htm">get_upbo</a>
        <ul>
            <li>return = omlpsolve("get_upbo", lp, column)
            <li>[upbo] = omlpsolve("get_upbo", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="get_var_branch.htm">get_var_branch</a>
        <ul>
            <li>return = omlpsolve("get_var_branch", lp,
    column)
            <li>[var_branch] = omlpsolve("get_var_branch",
    lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="get_sensitivity_rhs.htm">get_var_dualresult</a>
        <ul>
            <li>return = omlpsolve("get_var_dualresult", lp,
    index)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_primal_solution.htm">get_var_primalresult</a>
        <ul>
            <li>return = omlpsolve("get_var_primalresult",
    lp, index)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_var_priority.htm">get_var_priority</a>
        <ul>
            <li>return = omlpsolve("get_var_priority", lp,
    column)
            <li>[var_priority] = omlpsolve("get_var_priority",
    lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="get_variables.htm">get_variables</a>
        <ul>
            <li>[var, return] = omlpsolve("get_variables",
    lp)
            <li>The <i>var</i> argument in the
    API documentation is here the first return value.
            <li>The return code of the call is the second return value.</li>
        </ul>
    <li>
        <a href="get_verbose.htm">get_verbose</a>
        <ul>
            <li>return = omlpsolve("get_verbose", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="get_working_objective.htm">get_working_objective</a>
        <ul>
            <li>return = omlpsolve("get_working_objective",
    lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="guess_basis.htm">guess_basis</a>
        <ul>
            <li>[basisvector, return] = omlpsolve("guess_basis", lp, [guessvector])
            <li>In the API, element 0 of <i>guessvector</i> is not used and values start from element 1. In O-Matrix, there is no unused element in the matrix.</li>
            <li>In the API, element 0 of <i>basisvector</i> is not used and values start from element 1. In O-Matrix, there is no unused element in the matrix.</li>
        </ul>
    <li>
        <a href="has_BFP.htm">has_BFP</a>
        <ul>
            <li>return = omlpsolve("has_BFP", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="has_XLI.htm">has_XLI</a>
        <ul>
            <li>return = omlpsolve("has_XLI", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_add_rowmode.htm">is_add_rowmode</a>
        <ul>
            <li>return = omlpsolve("is_add_rowmode", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_anti_degen.htm">is_anti_degen</a>
        <ul>
            <li>return = omlpsolve("is_anti_degen", lp,
    testmask)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_binary.htm">is_binary</a>
        <ul>
            <li>return = omlpsolve("is_binary", lp, column)
            <li>[binary] = omlpsolve("is_binary", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="is_break_at_first.htm">is_break_at_first</a>
        <ul>
            <li>return = omlpsolve("is_break_at_first", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_constr_type.htm">is_constr_type</a>
        <ul>
            <li>return = omlpsolve("is_constr_type", lp,
    row, mask)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_debug.htm">is_debug</a>
        <ul>
            <li>return = omlpsolve("is_debug", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_feasible.htm">is_feasible</a>
        <ul>
            <li>return = omlpsolve("is_feasible", lp,
    [values] {, threshold})
            <li>The threshold argument is optional.
                When not provided, the value of <A href="get_epsint.htm">get_epsint</A> will be taken.</li>
        </ul>
    <li>
        <a href="is_unbounded.htm">is_free</a>
        <a href="is_unbounded.htm">is_unbounded</a>
        <ul>
            <li>return = omlpsolve("is_free", lp, column)
            <li>return = omlpsolve("is_unbounded", lp, column)
            <li>[free] = omlpsolve("is_free", lp)
            <li>[free] = omlpsolve("is_unbounded", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="is_infinite.htm">is_infinite</a>
        <ul>
            <li>return = omlpsolve("is_infinite", lp, value)

            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_int.htm">is_int</a>
        <ul>
            <li>return = omlpsolve("is_int", lp, column)
            <li>[int] = omlpsolve("is_int", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="is_integerscaling.htm">is_integerscaling</a>
        <ul>
            <li>return = omlpsolve("is_integerscaling", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_maxim.htm">is_maxim</a>
        <ul>
            <li>return = omlpsolve("is_maxim", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_nativeBFP.htm">is_nativeBFP</a>
        <ul>
            <li>return = omlpsolve("is_nativeBFP", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_nativeXLI.htm">is_nativeXLI</a>
        <ul>
            <li>return = omlpsolve("is_nativeXLI", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_negative.htm">is_negative</a>
        <ul>
            <li>return = omlpsolve("is_negative", lp,
    column)
            <li>[negative] = omlpsolve("is_negative", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="is_piv_mode.htm">is_piv_mode</a>
        <ul>
            <li>return = omlpsolve("is_piv_mode", lp,
    testmask)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_piv_rule.htm">is_piv_rule</a>
        <ul>
            <li>return = omlpsolve("is_piv_rule", lp, rule)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_presolve.htm">is_presolve</a>
        <ul>
            <li>return = omlpsolve("is_presolve", lp,
    testmask)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_scalemode.htm">is_scalemode</a>
        <ul>
            <li>return = omlpsolve("is_scalemode", lp,
    testmask)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_scaletype.htm">is_scaletype</a>
        <ul>
            <li>return = omlpsolve("is_scaletype", lp,
    scaletype)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_semicont.htm">is_semicont</a>
        <ul>
            <li>return = omlpsolve("is_semicont", lp,
    column)
            <li>[semicont] = omlpsolve("is_semicont", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="is_SOS_var.htm">is_SOS_var</a>
        <ul>
            <li>return = omlpsolve("is_SOS_var", lp, column)

            <li>[SOS_var] = omlpsolve("is_SOS_var", lp)
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows retrieving the values into a O-Matrix matrix.</li>
        </ul>
    <li>
        <a href="is_trace.htm">is_trace</a>
        <ul>
            <li>return = omlpsolve("is_trace", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="is_use_names.htm">is_use_names</a>
        <ul>
            <li>return = omlpsolve("is_use_names", lp, isrow)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="lp_solve_version.htm">lp_solve_version</a>
        <ul>
            <li>versionstring = omlpsolve("lp_solve_version")
            <li>The omlpsolve API routine returns the version information in 4 provided argument variables while the O-Matrix version returns the information as a string in the format major.minor.release.build</li>
        </ul>
    <li>
        <a href="make_lp.htm">make_lp</a>
        <ul>
            <li>lp_handle = omlpsolve("make_lp", rows, columns)
            <li>lp_handle is not a pointer to an lprec structure as in the API, but an incrementing handle number starting from 0.</li>
        </ul>
    <li>
        <a href="print_constraints.htm">print_constraints</a>
        <ul>
			<li>omlpsolve("print_constraints", lp {,
    columns})

			<li>columns is optional. If not specified, then 1 is
    used.

			<li>First call set_outputfile to specify where the
    information is written to. In the API documentation it is written that by
    default, the output goes to stdout, but under O-Matrix (Windows) this means
    that the output is not shown.
            <li>The same information can also be obtained via omlpsolve("get_constraints", lp). This shows the result on screen.</li>
        </ul>
    <li>
        <a href="print_debugdump.htm">print_debugdump</a>
        <ul>
            <li>return = omlpsolve("print_debugdump", lp,
    filename)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="print_duals.htm">print_duals</a>
        <ul>
			<li>omlpsolve("print_duals", lp)

			<li>First call set_outputfile to specify where the
    information is written to. In the API documentation it is written that by
    default, the output goes to stdout, but under O-Matrix (Windows) this means
    that the output is not shown.
            <li>The same information can be obtained via omlpsolve("get_dual_solution", lp). This shows the result on screen.</li>
        </ul>
    <li>
        <a href="print_lp.htm">print_lp</a>
        <ul>
			<li>omlpsolve("print_lp", lp)

			<li>First call set_outputfile to specify where the information is written to.
			    In the API documentation it is written that by default, the output goes to stdout, but under O-Matrix (Windows) this means that the output is not shown.</li>
        </ul>
    <li>
        <a href="print_objective.htm">print_objective</a>
        <ul>
			<li>omlpsolve("print_objective", lp)

			<li>First call set_outputfile to specify where the
    information is written to. In the API documentation it is written that by
    default, the output goes to stdout, but under O-Matrix (Windows) this means
    that the output is not shown.
            <li>The same information can be obtained via omlpsolve("get_objective", lp). This shows the result on screen.</li>
        </ul>
    <li>
        <a href="print_scales.htm">print_scales</a>
        <ul>
			<li>omlpsolve("print_scales", lp)

			<li>First call set_outputfile to specify where the information is written to.
			    In the API documentation it is written that by default, the output goes to stdout, but under O-Matrix (Windows) this means that the output is not shown.</li>
        </ul>
    <li>
        <a href="print_solution.htm">print_solution</a>
        <ul>
			<li>omlpsolve("print_solution", lp {, columns})

			<li>columns is optional. If not specified, then 1 is
    used.

			<li>First call set_outputfile to specify where the
    information is written to. In the API documentation it is written that by
    default, the output goes to stdout, but under O-Matrix (Windows) this means
    that the output is not shown.
            <li>The same information can also be obtained via omlpsolve("get_variables", lp). This shows the result on screen.</li>
        </ul>
    <li>
        <a href="print_str.htm">print_str</a>
        <ul>
			<li>omlpsolve("print_str", lp, str)

			<li>First call set_outputfile to specify where the information is written to.
			    In the API documentation it is written that by default, the output goes to stdout, but under O-Matrix (Windows) this means that the output is not shown.</li>
        </ul>
    <li>
        <a href="print_tableau.htm">print_tableau</a>
        <ul>
			<li>omlpsolve("print_tableau", lp)

			<li>First call set_outputfile to specify where the information is written to.
			    In the API documentation it is written that by default, the output goes to stdout, but under O-Matrix (Windows) this means that the output is not shown.</li>
        </ul>
    <li>
        <a href="put_abortfunc.htm">put_abortfunc</a>
        <ul>
            <li>Not implemented.</li>
        </ul>
    <li>
        <a href="put_logfunc.htm">put_logfunc</a>
        <ul>
            <li>Not implemented.
            <li>However, the omlpsolve driver sets a log function to redirect the output of lpsolve from stdout (which is not visible in Windows O-Matrix) to the command window of O-Matrix.
                As such, all reported output can be seen in O-Matrix. How much output is seen is controlled by the verbose level that can be defined by set_verbose or can be specified in the read_ routines.
                Note that at least O-Matrix version 5.8 is needed to see this information on the command window. Older versions will not print information on the command window.</li>
        </ul>
    <li>
        <a href="put_msgfunc.htm">put_msgfunc</a>
        <ul>
            <li>Not implemented.</li>
        </ul>
    <li>
        <a href="read_basis.htm">read_basis</a>
        <ul>
            <li>[ret, info] = omlpsolve("read_basis", lp, filename)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="read_mps.htm">read_freemps, read_freeMPS</a>
        <ul>
            <li>lp_handle = omlpsolve("read_freemps", filename {,
    options})
            <li>lp_handle = omlpsolve("read_freeMPS", filename {,
    options})
            <li>In the lpsolve API, read_freemps needs a FILE
    handle. In O-Matrix it needs the filename and thus acts the same as
    read_freeMPS.
            <li>lp_handle is not a pointer to an lprec structure as
    in the API, but an incrementing handle number starting from 0.
            <li>options is optional. If not specified, then NORMAL is used.</li>
        </ul>
    <li>
        <a name="read_lp"></a>
        <a href="read_lp.htm">read_lp, read_LP</a>
        <ul>
			<li>lp_handle = omlpsolve("read_lp", filename {,
    verbose {, lp_name}})
            <li>lp = omlpsolve("read_LP", filename {,
    verbose {, lp_name}})
            <li>In the lpsolve API, read_lp needs a FILE handle. In
    O-Matrix it needs the filename and thus acts the same as read_LP.
            <li>lp_handle is not a pointer to an lprec structure as
    in the API, but an incrementing handle number starting from 0.
            <li>verbose is optional. If not provided then NORMAL is
    used.
            <li>lp_name is optional. If not provided then no name is given to the model ("").</li>
        </ul>
    <li>
        <a href="read_MPS.htm">read_mps, read_MPS</a>
        <ul>
			<li>lp_handle = omlpsolve("read_mps", filename {,
    options})
            <li>lp_handle = omlpsolve("read_MPS", filename {,
    options})
            <li>In the lpsolve API, read_mps needs a FILE handle.
    In O-Matrix it needs the filename and thus acts the same as read_MPS.
            <li>lp_handle is not a pointer to an lprec structure as
    in the API, but an incrementing handle number starting from 0.
            <li>options is optional. If not specified, then NORMAL is used.</li>
        </ul>
    <li>
        <a href="read_params.htm">read_params</a>
        <ul>
            <li>return = omlpsolve("read_params", lp, filename {, options })
            <li>options is optional.</li>
        </ul>
    <li>
        <a href="read_XLI.htm">read_XLI</a>
        <ul>
            <li>lp_handle = omlpsolve("read_XLI", xliname,
    modelname {, dataname {, options {, verbose}}}
            <li>lp_handle is not a pointer to an lprec structure as
    in the API, but an incrementing handle number starting from 0.
            <li>dataname is optional. When not provided, "" (NULL)
    is taken. "" is taken as NULL.
            <li>options is optional. When not provided, "" is
    taken.
            <li>verbose is optional. If not specified, then NORMAL is used.</li>
        </ul>
    <li>
        <a href="reset_basis.htm">reset_basis</a>
        <ul>
            <li>Not implemented.
            <li>Use <A href="default_basis.htm">default_basis</A></li>
        </ul>
    <li>
        <a href="set_basisvar.htm">set_basisvar</a>
        <ul>
            <li>omlpsolve("set_basisvar", lp, basisPos, enteringCol)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_add_rowmode.htm">set_add_rowmode</a>
        <ul>
            <li>return = omlpsolve("set_add_rowmode", lp,
    turnon)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_anti_degen.htm">set_anti_degen</a>
        <ul>
            <li>omlpsolve("set_anti_degen", lp, anti_degen)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_basis.htm">set_basis</a>
        <ul>
            <li>return = omlpsolve("set_basis", lp,
    [bascolumn], nonbasic)
            <li>In the API, element 0 of <i>bascolumn</i> is not used and values start from element 1. In O-Matrix, there is no unused element in the matrix.</li>
        </ul>
    <li>
        <a href="set_basiscrash.htm">set_basiscrash</a>
        <ul>
            <li>omlpsolve("set_basiscrash", lp, mode)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_bb_depthlimit.htm">set_bb_depthlimit</a>
        <ul>
            <li>omlpsolve("set_bb_depthlimit", lp,
    bb_maxlevel)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_bb_floorfirst.htm">set_bb_floorfirst</a>
        <ul>
            <li>omlpsolve("set_bb_floorfirst", lp,
    bb_floorfirst)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_bb_rule.htm">set_bb_rule</a>
        <ul>
            <li>omlpsolve("set_bb_rule", lp, bb_rule)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_BFP.htm">set_BFP</a>
        <ul>
            <li>return = omlpsolve("set_BFP", lp, filename)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_binary.htm">set_binary</a>
        <ul>
            <li>return = omlpsolve("set_binary", lp, column,
    must_be_bin)
            <li>return = omlpsolve("set_binary", lp,
    [must_be_bin])
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows setting a matrix of all variables.</li>
        </ul>
    <li>
        <a href="set_bounds.htm">set_bounds</a>
        <ul>
            <li>return = omlpsolve("set_bounds", lp, column,
    lower, upper)
            <li>return = omlpsolve("set_bounds", lp,
    [lower], [upper])
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows setting a matrix of all variables.</li>
        </ul>
    <li>
        <a href="set_bounds_tighter.htm">set_bounds_tighter</a>
        <ul>
            <li>omlpsolve("set_bounds_tighter", lp, tighten)

            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_break_at_first.htm">set_break_at_first</a>
        <ul>
            <li>omlpsolve("set_break_at_first", lp,
    break_at_first)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_break_at_value.htm">set_break_at_value</a>
        <ul>
            <li>omlpsolve("set_break_at_value", lp,
    break_at_value)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_col_name.htm">set_col_name</a>
        <ul>
            <li>return = omlpsolve("set_col_name", lp,
    column, name)
            <li>return = omlpsolve("set_col_name", lp,
    [names])
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows setting a matrix of all variables.</li>
        </ul>
    <li>
        <a href="set_column.htm">set_column, set_columnex</a>
        <ul>
            <li>return = omlpsolve("set_column", lp, col_no,
    [column])
            <li>return = omlpsolve("set_columnex", lp,
    col_no, [column])
            <li>Both have the same interface from <a href="set_column.htm">set_column</a> but act as <a href="set_column.htm">set_columnex</a></li>
        </ul>
    <li>
        <a href="set_constr_type.htm">set_constr_type</a>
        <ul>
            <li>return = omlpsolve("set_constr_type", lp,
    row, con_type)
            <li>return = omlpsolve("set_constr_type", lp,
    [con_type])
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows setting a matrix of all rows.</li>
        </ul>
    <li>
        <a href="set_debug.htm">set_debug</a>
        <ul>
            <li>omlpsolve("set_debug", lp, debug)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_epsb.htm">set_epsb</a>
        <ul>
            <li>omlpsolve("set_epsb", lp, epsb)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_epsd.htm">set_epsd</a>
        <ul>
            <li>omlpsolve("set_epsd", lp, epsd)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_epsel.htm">set_epsel</a>
        <ul>
            <li>omlpsolve("set_epsel", lp, epsel)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_epsint.htm">set_epsint</a>
        <ul>
            <li>omlpsolve("set_epsint", lp, epsint)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_epslevel.htm">set_epslevel</a>
        <ul>
            <li>omlpsolve("set_epslevel", lp, epslevel)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_epsperturb.htm">set_epsperturb</a>
        <ul>
            <li>omlpsolve("set_epsperturb", lp, epsperturb)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_epspivot.htm">set_epspivot</a>
        <ul>
            <li>omlpsolve("set_epspivot", lp, epspivot)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_unbounded.htm">set_free</a>
        <a href="set_unbounded.htm">set_unbounded</a>
        <ul>
            <li>return = omlpsolve("set_free", lp, column)
            <li>return = omlpsolve("set_unbounded", lp, column)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_improve.htm">set_improve</a>
        <ul>
            <li>omlpsolve("set_improve", lp, improve)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_infinite.htm">set_infinite</a>
        <ul>
            <li>omlpsolve("set_infinite", lp, infinite)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_int.htm">set_int</a>
        <ul>
            <li>return = omlpsolve("set_int", lp, column,
    must_be_int)
            <li>return = omlpsolve("set_int", lp,
    [must_be_int])
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows setting a matrix of all variables.</li>
        </ul>
    <li>
        <a href="set_lowbo.htm">set_lowbo</a>
        <ul>
            <li>return = omlpsolve("set_lowbo", lp, column,
    value)
            <li>return = omlpsolve("set_lowbo", lp,
    [values])
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows setting a matrix of all variables.</li>
        </ul>
    <li>
        <a name="set_lp_name"></a>
        <a href="set_lp_name.htm">set_lp_name</a>
        <ul>
            <li>return = omlpsolve("set_lp_name", lp, name)
            <li>In O-Matrix, when you name a model, this name can be used everywhere where lp is specified.
                This to access the model via the name instead of via a handle.</li>
        </ul>
    <li>
        <a href="set_mat.htm">set_mat</a>
        <ul>
            <li>return = omlpsolve("set_mat", lp, row,
    column, value)
            <li>return = omlpsolve("set_mat", lp, [matrix])
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows to set the whole matrix (all rows/columns) at once.
                This is the most performant way to provide the constraint matrix.
                The matrix must be two-dimentional.</li>
        </ul>
    <li>
        <a href="set_maxim.htm">set_maxim</a>
        <ul>
            <li>omlpsolve("set_maxim", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_maxpivot.htm">set_maxpivot</a>
        <ul>
            <li>omlpsolve("set_maxpivot", max_num_inv)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_minim.htm">set_minim</a>
        <ul>
            <li>omlpsolve("set_minim", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_mip_gap.htm">set_mip_gap</a>
        <ul>
            <li>omlpsolve("set_mip_gap", lp, absolute,
    mip_gap)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_negrange.htm">set_negrange</a>
        <ul>
            <li>omlpsolve("set_negrange", negrange)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_obj_fn.htm">set_obj</a>
        <ul>
            <li>return = omlpsolve("set_obj", lp, column,
    value)
            <li>return = omlpsolve("set_obj", lp, [values])
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows setting a matrix of all variables. It is then the same as set_obj_fn</li>
        </ul>
    <li>
        <a href="set_obj_bound.htm">set_obj_bound</a>
        <ul>
            <li>omlpsolve("set_obj_bound", lp, obj_bound)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_obj_fn.htm">set_obj_fn, set_obj_fnex</a>
        <ul>
            <li>return = omlpsolve("set_obj_fn", lp, [row])
            <li>return = omlpsolve("set_obj_fnex", lp,
    [row])
            <li>Both have the same interface from <a href="set_obj_fn.htm">set_obj_fn</a> but act as <a href="set_obj_fn.htm">set_obj_fnex</a>
            <li>In the API, element 0 is not used and values start from element 1. In O-Matrix, there is no unused element in the matrix.</li>
        </ul>
    <li>
        <a href="set_output.htm">set_outputfile</a>
        <ul>
            <li>return = omlpsolve("set_outputfile", lp,
    filename)
            <li>In the API description it says that setting filename to NULL results in writing output back to stdout.
                In O-Matrix under Windows, output to stdout it not shown. However it results in closing the file.
                Use "" to have the effect of NULL.</li>
        </ul>
    <li>
        <a href="set_output.htm">set_outputstream</a>
        <ul>
            <li>Not implemented.</li>
        </ul>
    <li>
        <a href="set_pivoting.htm">set_pivoting</a>
        <ul>
            <li>omlpsolve("set_pivoting", lp, pivoting)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_preferdual.htm">set_preferdual</a>
        <ul>
            <li>omlpsolve("set_preferdual", lp, dodual)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_presolve.htm">set_presolve</a>
        <ul>
            <li>omlpsolve("set_presolve", lp, do_presolve {, maxloops})
            <li>The <i>maxloops</i> argument is optional in O-Matrix. If not provided, then infinite is used.</li>
        </ul>
    <li>
        <a href="set_print_sol.htm">set_print_sol</a>
        <ul>
            <li>omlpsolve("set_print_sol", lp, print_sol)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_rh.htm">set_rh</a>
        <ul>
            <li>return = omlpsolve("set_rh", lp, row, value)

            <li>return = omlpsolve("set_rh", lp, [values])
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows setting a matrix of all rows. Note that in this case, the value of row 0 is not specified in the matrix.</li>
        </ul>
    <li>
        <a href="set_rh_range.htm">set_rh_range</a>
        <ul>
            <li>return = omlpsolve("set_rh_range", lp, row,
    deltavalue)
            <li>return = omlpsolve("set_rh_range", lp,
    [deltavalues])
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows setting a matrix of all rows.</li>
        </ul>
    <li>
        <a href="set_rh_vec.htm">set_rh_vec</a>
        <ul>
            <li>omlpsolve("set_rh_vec", lp, [rh])
            <li>In the API, element 0 is not used and values start from element 1. In O-Matrix, there is no unused element in the matrix.</li>
        </ul>
    <li>
        <a href="set_row.htm">set_row, set_rowex</a>
        <ul>
            <li>return = omlpsolve("set_row", lp, row_no,
    [row])
            <li>return = omlpsolve("set_rowex", lp, row_no,
    [row])
            <li>Both have the same interface from <a href="set_row.htm">set_row</a> but act as <a href="set_row.htm">set_rowex</a>
            <li>In the API, element 0 is not used and values start from element 1. In O-Matrix, there is no unused element in the matrix.</li>
        </ul>
    <li>
        <a href="set_row_name.htm">set_row_name</a>
        <ul>
            <li>return = omlpsolve("set_row_name", lp, row,
    name)
            <li>return = omlpsolve("set_row_name", lp,
    [names])
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows setting a matrix of all rows.</li>
        </ul>
    <li>
        <a href="set_scalelimit.htm">set_scalelimit</a>
        <ul>
            <li>omlpsolve("set_scalelimit", lp, scalelimit)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_scaling.htm">set_scaling</a>
        <ul>
            <li>omlpsolve("set_scaling", lp, scalemode)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_semicont.htm">set_semicont</a>
        <ul>
            <li>return = omlpsolve("set_semicont", lp,
    column, must_be_sc)
            <li>return = omlpsolve("set_semicont", lp,
    [must_be_sc])
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows setting a matrix of all variables.</li>
        </ul>
    <li>
        <a href="set_sense.htm">set_sense</a>
        <ul>
            <li>omlpsolve("set_sense", lp, maximize)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_simplextype.htm">set_simplextype</a>
        <ul>
            <li>omlpsolve("set_simplextype", lp,
    simplextype)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_solutionlimit.htm">set_solutionlimit</a>
        <ul>
            <li>omlpsolve("set_solutionlimit", lp,
    simplextype)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_timeout.htm">set_timeout</a>
        <ul>
            <li>omlpsolve("set_timeout", lp, sectimeout)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_trace.htm">set_trace</a>
        <ul>
            <li>omlpsolve("set_trace", lp, trace)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_upbo.htm">set_upbo</a>
        <ul>
            <li>return = omlpsolve("set_upbo", lp, column,
    value)
            <li>return = omlpsolve("set_upbo", lp, [values])

            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows setting a matrix of all variables.</li>
        </ul>
    <li>
        <a href="set_use_names.htm">set_use_names</a>
        <ul>
            <li>omlpsolve("set_use_names", lp, isrow, use_names)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_var_branch.htm">set_var_branch</a>
        <ul>
            <li>return = omlpsolve("set_var_branch", lp,
    column, branch_mode)
            <li>return = omlpsolve("set_var_branch", lp,
    [branch_mode])
            <li>In O-Matrix, this routine has two formats. The first format is identical to the API.
                The second format allows setting a matrix of all variables.</li>
        </ul>
    <li>
        <a href="set_var_weights.htm">set_var_weights</a>
        <ul>
            <li>return = omlpsolve("set_var_weights", lp,
    [weights])
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_verbose.htm">set_verbose</a>
        <ul>
            <li>omlpsolve("set_verbose", lp, verbose)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="set_XLI.htm">set_XLI</a>
        <ul>
            <li>return = omlpsolve("set_XLI", lp, filename)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="solve.htm">solve</a>
        <ul>
            <li>result = omlpsolve("solve", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="add_column.htm">str_add_column</a>
        <ul>
            <li>Not implemented.</li>
        </ul>
    <li>
        <a href="add_constraint.htm">str_add_constraint</a>
        <ul>
            <li>Not implemented.</li>
        </ul>
    <li>
        <a href="set_obj_fn.htm">str_set_obj_fn</a>
        <ul>
            <li>Not implemented.</li>
        </ul>
    <li>
        <a href="set_rh_vec.htm">str_set_rh_vec</a>
        <ul>
            <li>Not implemented.</li>
        </ul>
    <li>
        <a href="time_elapsed.htm">time_elapsed</a>
        <ul>
            <li>return = omlpsolve("time_elapsed", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="unscale.htm">unscale</a>
        <ul>
            <li>omlpsolve("unscale", lp)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="write_basis.htm">write_basis</a>
        <ul>
            <li>omlpsolve("write_basis", lp, filename)
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="write_mps.htm">write_freemps, write_freeMPS</a>
        <ul>
            <li>return = omlpsolve("write_freemps", lp,
    filename)
            <li>return = omlpsolve("write_freeMPS", lp,
    filename)
            <li>In the lpsolve API, write_freeMPS needs a FILE handle. In O-Matrix it needs the filename and thus acts the same as write_freemps.</li>
        </ul>
    <li>
        <a href="write_lp.htm">write_lp, write_LP</a>
        <ul>
            <li>return = omlpsolve("write_lp", lp, filename)

            <li>return = omlpsolve("write_LP", lp, filename)

            <li>In the lpsolve API, write_LP needs a FILE handle. In O-Matrix it needs the filename and thus acts the same as write_lp.</li>
        </ul>
    <li>
        <a href="write_mps.htm">write_mps, write_MPS</a>
        <ul>
            <li>return = omlpsolve("write_mps", lp,
    filename)
            <li>return = omlpsolve("write_MPS", lp,
    filename)
            <li>In the lpsolve API, write_MPS needs a FILE handle.
    In O-Matrix it needs the filename and thus acts the same as write_mps.
            <li>No special considerations.</li>
        </ul>
    <li>
        <a href="write_XLI.htm">write_XLI</a>
        <ul>
            <li>return = omlpsolve("write_XLI", lp, filename
    {, options {, results}})
            <li>No special considerations.</li>
        </ul>
    </li>
</ul>

<a name="Extra_O-Matrix_routines"></a>
<h3>Extra O-Matrix routines</h3>

<p>These routines are not part of the lpsolve API, but are added for backwards compatibility.
Most of them exist in the lpsolve API with another name.</p>

<ul>
	<li>[names] = omlpsolve("get_col_names", lp)
        <ul>
            <li>The same as get_col_name. Implemented for backwards compatibility.</li>
        </ul>
	<li>[constr_type] = omlpsolve("get_constr_types", lp)
        <ul>
            <li>The same as get_constr_type. Implemented for backwards compatibility.</li>
        </ul>
    <li>[int] = omlpsolve("get_int", lp)
        <ul>
            <li>The same as is_int. Implemented for backwards compatibility.</li>
        </ul>
    <li>return = omlpsolve("get_no_cols", lp)
        <ul>
            <li>The same as get_Ncolumns. Implemented for backwards compatibility.</li>
        </ul>
    <li>return = omlpsolve("get_no_rows", lp)
        <ul>
            <li>The same as get_Nrows. Implemented for backwards compatibility.</li>
        </ul>
    <li>name = omlpsolve("get_objective_name", lp)
        <ul>
            <li>The same as get_row_name with row=0. Implemented for backwards compatibility.</li>
        </ul>
    <li>[row_vec, return] = omlpsolve("get_obj_fn", lp)<br>
        [row_vec, return] =
           omlpsolve("get_obj_fun", lp)
        <ul>
            <li>The same as get_row with row 0. Implemented for backwards compatibility.</li>
        </ul>
    <li>name = omlpsolve("get_problem_name", lp)
        <ul>
            <li>The same as get_lp_name. Implemented for backwards compatibility.</li>
        </ul>
    <li>[costs] = omlpsolve("get_reduced_costs", lp)
        <ul>
            <li>The same as get_dual_solution. Implemented for backwards compatibility.</li>
        </ul>
	<li>[names] = omlpsolve("get_row_names", lp)
        <ul>
            <li>The same as get_row_name. Implemented for backwards compatibility.</li>
        </ul>
    <li>[obj, x, duals, return] = omlpsolve("get_solution", lp)
        <ul>
            <li>Returns the value of the objective function, the
    values of the variables and the duals. Implemented for backwards
    compatibility.
            <li>The return code of the call is the last value.</li>
        </ul>
    <li>value = omlpsolve("mat_elm", lp)
        <ul>
            <li>The same as get_mat. Implemented for backwards compatibility.</li>
        </ul>
    <li>[handle_vec] = omlpsolve("print_handle")
        <ul>
            <li>Returns a vector with open handles.
                Can be handy to see which handles aren't closed yet with delete_lp or free_lp.</li>
        </ul>
    <li>lp_handle = omlpsolve("read_lp_file", filename {, verbose {, lp_name}})
        <ul>
            <li>The same as read_LP. Implemented for backwards compatibility.</li>
        </ul>
    </li>
    <li><a name="get_handle"></a>lp_handle = omlpsolve("get_handle", lp_name)
        <ul>
            <li>Get the handle for this model from the models name.
                If an unknown model name is given (or already deleted), -1 is returned.
            </li>
       </ul>
    </li>
    <li><a name="return_constants"></a>return_constants = omlpsolve("return_constants"[, return_constants])
        <ul>
            <li>Returns the setting of return_constants and optionally sets its value.
            </li>
       </ul>
    </li>
</ul>

<a name="Compile_the_omlpsolve_driver"></a>
<h3>Compile the omlpsolve driver</h3>
<h4>Windows</h4>

<p>Under Windows, the omlpsolve O-Matrix driver is a dll: omlpsolve.dll<br>
This dll is an interface to the lpsolve55.dll lpsolve dll that contains the implementation of lp_solve.
lpsolve55.dll is distributed with the lp_solve package (archive lp_solve_5.5.0.15_dev.zip). The omlpsolve O-Matrix driver dll (omlpsolve.dll) is just
a wrapper between O-Matrix and lp_solve to translate the input/output to/from O-Matrix and the lp_solve library.
</p>

<p>The omlpsolve O-Matrix driver is written in C. To compile this code, Microsoft compiler is needed.
Other compilers might also work, but this is untested.
To make the compilation process easier, a batch file can be used: cvc.bat<br>
It may be necessary to edit this file first to change the path where lp_solve and the O-Matrix dll sources are installed.
Change at the beginning lpsolvepath and dllsrcpath. dllsrcpath must point to the folder where dll.h is located.<br>
To make for release, just enter cvc and everything is build.<br>
This compiles three source files: lpsolve.c, omatrix.c and hash.c<br>
Then these are linked with the library lpsolve55.lib to generate the omlpsolve.dll file.<br>
The optional arguments to cvc are used for development. Source files can be provided and then only these are compiled.
For example hash.c should only be compiled once while developing. So specifying
lpsolve.c as first argument will only compile this file and then link everything. This makes the build process a bit faster.
Also the option -DDEMO can be added to add the demo command to test some functionality of lpsolve. This is also only for debugging.
Also the option -DDEBUG can be added. This to print some debug information while executing omlpsolve.
Should only be used for debugging purposes.
</p>

<p>Note that the omlpsolve.dll file can be locked by O-Matrix. Then the build process will fail because the dll
can not be overwritten. This can be solved by giving the clear command in O-Matrix. This will free the dll.</p>

<h4>Unix/Linux</h4>

<p>At this moment, there is no O-Matrix version for this platform.</p>

<p>See also <a href="MATLAB.htm">Using lpsolve from MATLAB</a>,
            <a href="Sysquake.htm">Using lpsolve from Sysquake</a>,
            <a href="Scilab.htm">Using lpsolve from Scilab</a>,
            <a href="Octave.htm">Using lpsolve from Octave</a>,
            <a href="FreeMat.htm">Using lpsolve from FreeMat</a>,
            <a href="Euler.htm">Using lpsolve from Euler</a>,
            <a href="Python.htm">Using lpsolve from Python</a>,
            <a href="Sage.htm">Using lpsolve from Sage</a>,
            <a href="PHP.htm">Using lpsolve from PHP</a>,
            <a href="R.htm">Using lpsolve from R</a>
</p>
	</BODY>
</html>