genmodel 0.0.36 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/Genmodel/GenModel.h +4 -0
- data/ext/Genmodel/GenModelBase.cpp +59 -12
- data/ext/Genmodel/Genmodel.cpp +263 -0
- data/ext/Genmodel/extconf.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84d9601740ce13fc656d10b5d70b605e87b59cb9
|
4
|
+
data.tar.gz: 785cda2fc57b09eb60ac2e7d0767b491faf0a867
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ebbbf916861c7dc86192e118ae27c68b61dc5cea8d1e1a4f44f5c8199e9fc19e8034daaae17b4d90f10aacd3947d1f55d4ca1a41d3bac267ccba6b746e09135
|
7
|
+
data.tar.gz: 5807e643a00e8baf4793af7c650817030d1703c23542956142940dadfa7450dd4418a2582b0f5ed768870d35e447a331d7af7f8ad493aefd56b81cd331f05f41
|
data/ext/Genmodel/GenModel.h
CHANGED
@@ -127,8 +127,11 @@ public:
|
|
127
127
|
virtual long DeleteMipStarts();
|
128
128
|
virtual double GetMIPRelativeGap();
|
129
129
|
virtual double FindConstraintMaxLhs(long row);
|
130
|
+
virtual long UpdateVariableBoundsMax(long row);
|
130
131
|
virtual double FindConstraintMinLhs(long row);
|
132
|
+
virtual long UpdateVariableBoundsMin(long row);
|
131
133
|
virtual long MakeConstraintFeasible(long row);
|
134
|
+
virtual long MakeAllConstraintFeasible(long max_iter = -1);
|
132
135
|
virtual long PrintRowInfo(long row);
|
133
136
|
bool binit;
|
134
137
|
bool bcreated;
|
@@ -147,6 +150,7 @@ public:
|
|
147
150
|
bool feasible;
|
148
151
|
bool dualfeasible;
|
149
152
|
bool hassolution;
|
153
|
+
bool hasinfeasibilities;
|
150
154
|
void* solverdata;
|
151
155
|
map<string, long> longParam;
|
152
156
|
map<string, double> dblParam;
|
@@ -31,6 +31,20 @@ double GenModel::FindConstraintMaxLhs(long row)
|
|
31
31
|
return total;
|
32
32
|
}
|
33
33
|
|
34
|
+
long GenModel::UpdateVariableBoundsMax(long row)
|
35
|
+
{
|
36
|
+
for(int i = 0; i < int(consts[row].cols.size()); i++)
|
37
|
+
{
|
38
|
+
if(fabs(vars.lb[consts[row].cols[i]] - vars.ub[consts[row].cols[i]]) > 1e-7)
|
39
|
+
hasinfeasibilities = true;
|
40
|
+
if(consts[row].coefs[i] >= 0)
|
41
|
+
vars.lb[consts[row].cols[i]] = vars.ub[consts[row].cols[i]];
|
42
|
+
else
|
43
|
+
vars.ub[consts[row].cols[i]] = vars.lb[consts[row].cols[i]];
|
44
|
+
}
|
45
|
+
return 0;
|
46
|
+
}
|
47
|
+
|
34
48
|
double GenModel::FindConstraintMinLhs(long row)
|
35
49
|
{
|
36
50
|
double total = 0.0;
|
@@ -39,6 +53,20 @@ double GenModel::FindConstraintMinLhs(long row)
|
|
39
53
|
return total;
|
40
54
|
}
|
41
55
|
|
56
|
+
long GenModel::UpdateVariableBoundsMin(long row)
|
57
|
+
{
|
58
|
+
for(int i = 0; i < int(consts[row].cols.size()); i++)
|
59
|
+
{
|
60
|
+
if(fabs(vars.lb[consts[row].cols[i]] - vars.ub[consts[row].cols[i]]) > 1e-7)
|
61
|
+
hasinfeasibilities = true;
|
62
|
+
if(consts[row].coefs[i] >= 0)
|
63
|
+
vars.ub[consts[row].cols[i]] = vars.lb[consts[row].cols[i]];
|
64
|
+
else
|
65
|
+
vars.lb[consts[row].cols[i]] = vars.ub[consts[row].cols[i]];
|
66
|
+
}
|
67
|
+
return 0;
|
68
|
+
}
|
69
|
+
|
42
70
|
long GenModel::PrintRowInfo(long row)
|
43
71
|
{
|
44
72
|
printf(GM_GREEN "%s : " GM_RESET, consts[row].name.c_str());
|
@@ -72,43 +100,62 @@ long GenModel::PrintRowInfo(long row)
|
|
72
100
|
return 0;
|
73
101
|
}
|
74
102
|
|
103
|
+
long GenModel::MakeAllConstraintFeasible(long max_iter)
|
104
|
+
{
|
105
|
+
if(max_iter < 0)
|
106
|
+
max_iter = long(consts.size());
|
107
|
+
hasinfeasibilities = true;
|
108
|
+
long feas_iter = 0;
|
109
|
+
while(hasinfeasibilities && feas_iter++ < max_iter)
|
110
|
+
{
|
111
|
+
hasinfeasibilities = false;
|
112
|
+
for(size_t i = 0; i < consts.size(); i++)
|
113
|
+
MakeConstraintFeasible(i);
|
114
|
+
}
|
115
|
+
return 0;
|
116
|
+
}
|
117
|
+
|
75
118
|
long GenModel::MakeConstraintFeasible(long row)
|
76
119
|
{
|
77
120
|
if(consts[row].sense == 'L')
|
78
121
|
{
|
79
122
|
double min = FindConstraintMinLhs(row);
|
80
|
-
if(min
|
123
|
+
if(min >= consts[row].lrhs - 1e-7)
|
81
124
|
{
|
82
|
-
consts[row].lrhs
|
83
|
-
if(boolParam.count("log_output_stdout") > 0 && boolParam["log_output_stdout"])
|
125
|
+
if(min > consts[row].lrhs+1e-7 && boolParam.count("log_output_stdout") > 0 && boolParam["log_output_stdout"])
|
84
126
|
PrintRowInfo(row);
|
127
|
+
consts[row].lrhs = min;
|
128
|
+
UpdateVariableBoundsMin(row);
|
85
129
|
}
|
86
130
|
}
|
87
131
|
else if(consts[row].sense == 'G')
|
88
132
|
{
|
89
133
|
double max = FindConstraintMaxLhs(row);
|
90
|
-
if(max
|
134
|
+
if(max <= consts[row].lrhs + 1e-7)
|
91
135
|
{
|
92
|
-
consts[row].lrhs
|
93
|
-
if(boolParam.count("log_output_stdout") > 0 && boolParam["log_output_stdout"])
|
136
|
+
if(max < consts[row].lrhs-1e-7 && boolParam.count("log_output_stdout") > 0 && boolParam["log_output_stdout"])
|
94
137
|
PrintRowInfo(row);
|
138
|
+
consts[row].lrhs = max;
|
139
|
+
UpdateVariableBoundsMax(row);
|
95
140
|
}
|
96
141
|
}
|
97
142
|
else if(consts[row].sense == 'R')
|
98
143
|
{
|
99
144
|
double min = FindConstraintMinLhs(row);
|
100
145
|
double max = FindConstraintMaxLhs(row);
|
101
|
-
if(max
|
146
|
+
if(max <= consts[row].lrhs + 1e-7)
|
102
147
|
{
|
103
|
-
consts[row].lrhs
|
104
|
-
if(boolParam.count("log_output_stdout") > 0 && boolParam["log_output_stdout"])
|
148
|
+
if(max < consts[row].lrhs-1e-7 && boolParam.count("log_output_stdout") > 0 && boolParam["log_output_stdout"])
|
105
149
|
PrintRowInfo(row);
|
150
|
+
consts[row].lrhs = max;
|
151
|
+
UpdateVariableBoundsMax(row);
|
106
152
|
}
|
107
|
-
else if(min
|
153
|
+
else if(min >= consts[row].urhs - 1e-7)
|
108
154
|
{
|
109
|
-
consts[row].urhs
|
110
|
-
if(boolParam.count("log_output_stdout") > 0 && boolParam["log_output_stdout"])
|
155
|
+
if(min > consts[row].urhs+1e-7 &&boolParam.count("log_output_stdout") > 0 && boolParam["log_output_stdout"])
|
111
156
|
PrintRowInfo(row);
|
157
|
+
consts[row].urhs = min;
|
158
|
+
UpdateVariableBoundsMin(row);
|
112
159
|
}
|
113
160
|
}
|
114
161
|
|
data/ext/Genmodel/Genmodel.cpp
CHANGED
@@ -31111,6 +31111,48 @@ fail:
|
|
31111
31111
|
}
|
31112
31112
|
|
31113
31113
|
|
31114
|
+
SWIGINTERN VALUE
|
31115
|
+
_wrap_GenModel_UpdateVariableBoundsMax(int argc, VALUE *argv, VALUE self) {
|
31116
|
+
GenModel *arg1 = (GenModel *) 0 ;
|
31117
|
+
long arg2 ;
|
31118
|
+
void *argp1 = 0 ;
|
31119
|
+
int res1 = 0 ;
|
31120
|
+
long val2 ;
|
31121
|
+
int ecode2 = 0 ;
|
31122
|
+
long result;
|
31123
|
+
VALUE vresult = Qnil;
|
31124
|
+
|
31125
|
+
if ((argc < 1) || (argc > 1)) {
|
31126
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
31127
|
+
}
|
31128
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GenModel, 0 | 0 );
|
31129
|
+
if (!SWIG_IsOK(res1)) {
|
31130
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GenModel *","UpdateVariableBoundsMax", 1, self ));
|
31131
|
+
}
|
31132
|
+
arg1 = reinterpret_cast< GenModel * >(argp1);
|
31133
|
+
ecode2 = SWIG_AsVal_long(argv[0], &val2);
|
31134
|
+
if (!SWIG_IsOK(ecode2)) {
|
31135
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","UpdateVariableBoundsMax", 2, argv[0] ));
|
31136
|
+
}
|
31137
|
+
arg2 = static_cast< long >(val2);
|
31138
|
+
{
|
31139
|
+
try {
|
31140
|
+
result = (long)(arg1)->UpdateVariableBoundsMax(arg2);
|
31141
|
+
}
|
31142
|
+
catch(string str) {
|
31143
|
+
SWIG_exception(SWIG_RuntimeError,str.c_str());
|
31144
|
+
}
|
31145
|
+
catch(...) {
|
31146
|
+
SWIG_exception(SWIG_RuntimeError,"Unknown exception");
|
31147
|
+
}
|
31148
|
+
}
|
31149
|
+
vresult = SWIG_From_long(static_cast< long >(result));
|
31150
|
+
return vresult;
|
31151
|
+
fail:
|
31152
|
+
return Qnil;
|
31153
|
+
}
|
31154
|
+
|
31155
|
+
|
31114
31156
|
SWIGINTERN VALUE
|
31115
31157
|
_wrap_GenModel_FindConstraintMinLhs(int argc, VALUE *argv, VALUE self) {
|
31116
31158
|
GenModel *arg1 = (GenModel *) 0 ;
|
@@ -31153,6 +31195,48 @@ fail:
|
|
31153
31195
|
}
|
31154
31196
|
|
31155
31197
|
|
31198
|
+
SWIGINTERN VALUE
|
31199
|
+
_wrap_GenModel_UpdateVariableBoundsMin(int argc, VALUE *argv, VALUE self) {
|
31200
|
+
GenModel *arg1 = (GenModel *) 0 ;
|
31201
|
+
long arg2 ;
|
31202
|
+
void *argp1 = 0 ;
|
31203
|
+
int res1 = 0 ;
|
31204
|
+
long val2 ;
|
31205
|
+
int ecode2 = 0 ;
|
31206
|
+
long result;
|
31207
|
+
VALUE vresult = Qnil;
|
31208
|
+
|
31209
|
+
if ((argc < 1) || (argc > 1)) {
|
31210
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
31211
|
+
}
|
31212
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GenModel, 0 | 0 );
|
31213
|
+
if (!SWIG_IsOK(res1)) {
|
31214
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GenModel *","UpdateVariableBoundsMin", 1, self ));
|
31215
|
+
}
|
31216
|
+
arg1 = reinterpret_cast< GenModel * >(argp1);
|
31217
|
+
ecode2 = SWIG_AsVal_long(argv[0], &val2);
|
31218
|
+
if (!SWIG_IsOK(ecode2)) {
|
31219
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","UpdateVariableBoundsMin", 2, argv[0] ));
|
31220
|
+
}
|
31221
|
+
arg2 = static_cast< long >(val2);
|
31222
|
+
{
|
31223
|
+
try {
|
31224
|
+
result = (long)(arg1)->UpdateVariableBoundsMin(arg2);
|
31225
|
+
}
|
31226
|
+
catch(string str) {
|
31227
|
+
SWIG_exception(SWIG_RuntimeError,str.c_str());
|
31228
|
+
}
|
31229
|
+
catch(...) {
|
31230
|
+
SWIG_exception(SWIG_RuntimeError,"Unknown exception");
|
31231
|
+
}
|
31232
|
+
}
|
31233
|
+
vresult = SWIG_From_long(static_cast< long >(result));
|
31234
|
+
return vresult;
|
31235
|
+
fail:
|
31236
|
+
return Qnil;
|
31237
|
+
}
|
31238
|
+
|
31239
|
+
|
31156
31240
|
SWIGINTERN VALUE
|
31157
31241
|
_wrap_GenModel_MakeConstraintFeasible(int argc, VALUE *argv, VALUE self) {
|
31158
31242
|
GenModel *arg1 = (GenModel *) 0 ;
|
@@ -31195,6 +31279,127 @@ fail:
|
|
31195
31279
|
}
|
31196
31280
|
|
31197
31281
|
|
31282
|
+
SWIGINTERN VALUE
|
31283
|
+
_wrap_GenModel_MakeAllConstraintFeasible__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
31284
|
+
GenModel *arg1 = (GenModel *) 0 ;
|
31285
|
+
long arg2 ;
|
31286
|
+
void *argp1 = 0 ;
|
31287
|
+
int res1 = 0 ;
|
31288
|
+
long val2 ;
|
31289
|
+
int ecode2 = 0 ;
|
31290
|
+
long result;
|
31291
|
+
VALUE vresult = Qnil;
|
31292
|
+
|
31293
|
+
if ((argc < 1) || (argc > 1)) {
|
31294
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
31295
|
+
}
|
31296
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GenModel, 0 | 0 );
|
31297
|
+
if (!SWIG_IsOK(res1)) {
|
31298
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GenModel *","MakeAllConstraintFeasible", 1, self ));
|
31299
|
+
}
|
31300
|
+
arg1 = reinterpret_cast< GenModel * >(argp1);
|
31301
|
+
ecode2 = SWIG_AsVal_long(argv[0], &val2);
|
31302
|
+
if (!SWIG_IsOK(ecode2)) {
|
31303
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "long","MakeAllConstraintFeasible", 2, argv[0] ));
|
31304
|
+
}
|
31305
|
+
arg2 = static_cast< long >(val2);
|
31306
|
+
{
|
31307
|
+
try {
|
31308
|
+
result = (long)(arg1)->MakeAllConstraintFeasible(arg2);
|
31309
|
+
}
|
31310
|
+
catch(string str) {
|
31311
|
+
SWIG_exception(SWIG_RuntimeError,str.c_str());
|
31312
|
+
}
|
31313
|
+
catch(...) {
|
31314
|
+
SWIG_exception(SWIG_RuntimeError,"Unknown exception");
|
31315
|
+
}
|
31316
|
+
}
|
31317
|
+
vresult = SWIG_From_long(static_cast< long >(result));
|
31318
|
+
return vresult;
|
31319
|
+
fail:
|
31320
|
+
return Qnil;
|
31321
|
+
}
|
31322
|
+
|
31323
|
+
|
31324
|
+
SWIGINTERN VALUE
|
31325
|
+
_wrap_GenModel_MakeAllConstraintFeasible__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
31326
|
+
GenModel *arg1 = (GenModel *) 0 ;
|
31327
|
+
void *argp1 = 0 ;
|
31328
|
+
int res1 = 0 ;
|
31329
|
+
long result;
|
31330
|
+
VALUE vresult = Qnil;
|
31331
|
+
|
31332
|
+
if ((argc < 0) || (argc > 0)) {
|
31333
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
31334
|
+
}
|
31335
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GenModel, 0 | 0 );
|
31336
|
+
if (!SWIG_IsOK(res1)) {
|
31337
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GenModel *","MakeAllConstraintFeasible", 1, self ));
|
31338
|
+
}
|
31339
|
+
arg1 = reinterpret_cast< GenModel * >(argp1);
|
31340
|
+
{
|
31341
|
+
try {
|
31342
|
+
result = (long)(arg1)->MakeAllConstraintFeasible();
|
31343
|
+
}
|
31344
|
+
catch(string str) {
|
31345
|
+
SWIG_exception(SWIG_RuntimeError,str.c_str());
|
31346
|
+
}
|
31347
|
+
catch(...) {
|
31348
|
+
SWIG_exception(SWIG_RuntimeError,"Unknown exception");
|
31349
|
+
}
|
31350
|
+
}
|
31351
|
+
vresult = SWIG_From_long(static_cast< long >(result));
|
31352
|
+
return vresult;
|
31353
|
+
fail:
|
31354
|
+
return Qnil;
|
31355
|
+
}
|
31356
|
+
|
31357
|
+
|
31358
|
+
SWIGINTERN VALUE _wrap_GenModel_MakeAllConstraintFeasible(int nargs, VALUE *args, VALUE self) {
|
31359
|
+
int argc;
|
31360
|
+
VALUE argv[3];
|
31361
|
+
int ii;
|
31362
|
+
|
31363
|
+
argc = nargs + 1;
|
31364
|
+
argv[0] = self;
|
31365
|
+
if (argc > 3) SWIG_fail;
|
31366
|
+
for (ii = 1; (ii < argc); ++ii) {
|
31367
|
+
argv[ii] = args[ii-1];
|
31368
|
+
}
|
31369
|
+
if (argc == 1) {
|
31370
|
+
int _v;
|
31371
|
+
void *vptr = 0;
|
31372
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GenModel, 0);
|
31373
|
+
_v = SWIG_CheckState(res);
|
31374
|
+
if (_v) {
|
31375
|
+
return _wrap_GenModel_MakeAllConstraintFeasible__SWIG_1(nargs, args, self);
|
31376
|
+
}
|
31377
|
+
}
|
31378
|
+
if (argc == 2) {
|
31379
|
+
int _v;
|
31380
|
+
void *vptr = 0;
|
31381
|
+
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GenModel, 0);
|
31382
|
+
_v = SWIG_CheckState(res);
|
31383
|
+
if (_v) {
|
31384
|
+
{
|
31385
|
+
int res = SWIG_AsVal_long(argv[1], NULL);
|
31386
|
+
_v = SWIG_CheckState(res);
|
31387
|
+
}
|
31388
|
+
if (_v) {
|
31389
|
+
return _wrap_GenModel_MakeAllConstraintFeasible__SWIG_0(nargs, args, self);
|
31390
|
+
}
|
31391
|
+
}
|
31392
|
+
}
|
31393
|
+
|
31394
|
+
fail:
|
31395
|
+
Ruby_Format_OverloadedError( argc, 3, "GenModel.MakeAllConstraintFeasible",
|
31396
|
+
" long GenModel.MakeAllConstraintFeasible(long max_iter)\n"
|
31397
|
+
" long GenModel.MakeAllConstraintFeasible()\n");
|
31398
|
+
|
31399
|
+
return Qnil;
|
31400
|
+
}
|
31401
|
+
|
31402
|
+
|
31198
31403
|
SWIGINTERN VALUE
|
31199
31404
|
_wrap_GenModel_PrintRowInfo(int argc, VALUE *argv, VALUE self) {
|
31200
31405
|
GenModel *arg1 = (GenModel *) 0 ;
|
@@ -32050,6 +32255,59 @@ fail:
|
|
32050
32255
|
}
|
32051
32256
|
|
32052
32257
|
|
32258
|
+
SWIGINTERN VALUE
|
32259
|
+
_wrap_GenModel_hasinfeasibilities_set(int argc, VALUE *argv, VALUE self) {
|
32260
|
+
GenModel *arg1 = (GenModel *) 0 ;
|
32261
|
+
bool arg2 ;
|
32262
|
+
void *argp1 = 0 ;
|
32263
|
+
int res1 = 0 ;
|
32264
|
+
bool val2 ;
|
32265
|
+
int ecode2 = 0 ;
|
32266
|
+
|
32267
|
+
if ((argc < 1) || (argc > 1)) {
|
32268
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
32269
|
+
}
|
32270
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GenModel, 0 | 0 );
|
32271
|
+
if (!SWIG_IsOK(res1)) {
|
32272
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GenModel *","hasinfeasibilities", 1, self ));
|
32273
|
+
}
|
32274
|
+
arg1 = reinterpret_cast< GenModel * >(argp1);
|
32275
|
+
ecode2 = SWIG_AsVal_bool(argv[0], &val2);
|
32276
|
+
if (!SWIG_IsOK(ecode2)) {
|
32277
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","hasinfeasibilities", 2, argv[0] ));
|
32278
|
+
}
|
32279
|
+
arg2 = static_cast< bool >(val2);
|
32280
|
+
if (arg1) (arg1)->hasinfeasibilities = arg2;
|
32281
|
+
return Qnil;
|
32282
|
+
fail:
|
32283
|
+
return Qnil;
|
32284
|
+
}
|
32285
|
+
|
32286
|
+
|
32287
|
+
SWIGINTERN VALUE
|
32288
|
+
_wrap_GenModel_hasinfeasibilities_get(int argc, VALUE *argv, VALUE self) {
|
32289
|
+
GenModel *arg1 = (GenModel *) 0 ;
|
32290
|
+
void *argp1 = 0 ;
|
32291
|
+
int res1 = 0 ;
|
32292
|
+
bool result;
|
32293
|
+
VALUE vresult = Qnil;
|
32294
|
+
|
32295
|
+
if ((argc < 0) || (argc > 0)) {
|
32296
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
32297
|
+
}
|
32298
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GenModel, 0 | 0 );
|
32299
|
+
if (!SWIG_IsOK(res1)) {
|
32300
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GenModel *","hasinfeasibilities", 1, self ));
|
32301
|
+
}
|
32302
|
+
arg1 = reinterpret_cast< GenModel * >(argp1);
|
32303
|
+
result = (bool) ((arg1)->hasinfeasibilities);
|
32304
|
+
vresult = SWIG_From_bool(static_cast< bool >(result));
|
32305
|
+
return vresult;
|
32306
|
+
fail:
|
32307
|
+
return Qnil;
|
32308
|
+
}
|
32309
|
+
|
32310
|
+
|
32053
32311
|
SWIGINTERN VALUE
|
32054
32312
|
_wrap_GenModel_solverdata_set(int argc, VALUE *argv, VALUE self) {
|
32055
32313
|
GenModel *arg1 = (GenModel *) 0 ;
|
@@ -42655,8 +42913,11 @@ SWIGEXPORT void Init_Genmodel(void) {
|
|
42655
42913
|
rb_define_method(SwigClassGenModel.klass, "DeleteMipStarts", VALUEFUNC(_wrap_GenModel_DeleteMipStarts), -1);
|
42656
42914
|
rb_define_method(SwigClassGenModel.klass, "GetMIPRelativeGap", VALUEFUNC(_wrap_GenModel_GetMIPRelativeGap), -1);
|
42657
42915
|
rb_define_method(SwigClassGenModel.klass, "FindConstraintMaxLhs", VALUEFUNC(_wrap_GenModel_FindConstraintMaxLhs), -1);
|
42916
|
+
rb_define_method(SwigClassGenModel.klass, "UpdateVariableBoundsMax", VALUEFUNC(_wrap_GenModel_UpdateVariableBoundsMax), -1);
|
42658
42917
|
rb_define_method(SwigClassGenModel.klass, "FindConstraintMinLhs", VALUEFUNC(_wrap_GenModel_FindConstraintMinLhs), -1);
|
42918
|
+
rb_define_method(SwigClassGenModel.klass, "UpdateVariableBoundsMin", VALUEFUNC(_wrap_GenModel_UpdateVariableBoundsMin), -1);
|
42659
42919
|
rb_define_method(SwigClassGenModel.klass, "MakeConstraintFeasible", VALUEFUNC(_wrap_GenModel_MakeConstraintFeasible), -1);
|
42920
|
+
rb_define_method(SwigClassGenModel.klass, "MakeAllConstraintFeasible", VALUEFUNC(_wrap_GenModel_MakeAllConstraintFeasible), -1);
|
42660
42921
|
rb_define_method(SwigClassGenModel.klass, "PrintRowInfo", VALUEFUNC(_wrap_GenModel_PrintRowInfo), -1);
|
42661
42922
|
rb_define_method(SwigClassGenModel.klass, "binit=", VALUEFUNC(_wrap_GenModel_binit_set), -1);
|
42662
42923
|
rb_define_method(SwigClassGenModel.klass, "binit", VALUEFUNC(_wrap_GenModel_binit_get), -1);
|
@@ -42688,6 +42949,8 @@ SWIGEXPORT void Init_Genmodel(void) {
|
|
42688
42949
|
rb_define_method(SwigClassGenModel.klass, "dualfeasible", VALUEFUNC(_wrap_GenModel_dualfeasible_get), -1);
|
42689
42950
|
rb_define_method(SwigClassGenModel.klass, "hassolution=", VALUEFUNC(_wrap_GenModel_hassolution_set), -1);
|
42690
42951
|
rb_define_method(SwigClassGenModel.klass, "hassolution", VALUEFUNC(_wrap_GenModel_hassolution_get), -1);
|
42952
|
+
rb_define_method(SwigClassGenModel.klass, "hasinfeasibilities=", VALUEFUNC(_wrap_GenModel_hasinfeasibilities_set), -1);
|
42953
|
+
rb_define_method(SwigClassGenModel.klass, "hasinfeasibilities", VALUEFUNC(_wrap_GenModel_hasinfeasibilities_get), -1);
|
42691
42954
|
rb_define_method(SwigClassGenModel.klass, "solverdata=", VALUEFUNC(_wrap_GenModel_solverdata_set), -1);
|
42692
42955
|
rb_define_method(SwigClassGenModel.klass, "solverdata", VALUEFUNC(_wrap_GenModel_solverdata_get), -1);
|
42693
42956
|
rb_define_method(SwigClassGenModel.klass, "longParam=", VALUEFUNC(_wrap_GenModel_longParam_set), -1);
|
data/ext/Genmodel/extconf.rb
CHANGED