@@ -441,12 +441,12 @@ void IlpSolverExt::initVariables()
441
441
_x[i] = VarArray (nrAnatomicalSites + 1 );
442
442
for (int s = 0 ; s < nrAnatomicalSites; ++s)
443
443
{
444
- snprintf (buf, 1024 , " x_%s_%s" ,
444
+ snprintf (buf, 255 , " x_%s_%s" ,
445
445
label (_indexToNode[i]).c_str (),
446
446
_indexToAnatomicalSite[s].c_str ());
447
447
_x[i][s] = _model.addVar (0 , 1 , 0 , GRB_BINARY, buf);
448
448
}
449
- snprintf (buf, 1024 , " x_%s_DUMMY" , label (_indexToNode[i]).c_str ());
449
+ snprintf (buf, 255 , " x_%s_DUMMY" , label (_indexToNode[i]).c_str ());
450
450
_x[i][nrAnatomicalSites] = _model.addVar (0 , 1 , 0 , GRB_BINARY, buf);
451
451
}
452
452
@@ -458,7 +458,7 @@ void IlpSolverExt::initVariables()
458
458
Node v_i = _G.source (a_ij);
459
459
Node v_j = _G.target (a_ij);
460
460
461
- snprintf (buf, 1024 , " y_%s_%s" ,
461
+ snprintf (buf, 255 , " y_%s_%s" ,
462
462
label (v_i).c_str (),
463
463
label (v_j).c_str ());
464
464
_y[ij] = _model.addVar (0 , 1 , 0 , GRB_CONTINUOUS, buf);
@@ -475,14 +475,14 @@ void IlpSolverExt::initVariables()
475
475
_z[ij] = VarArray (nrAnatomicalSites+1 );
476
476
for (int s = 0 ; s < nrAnatomicalSites; ++s)
477
477
{
478
- snprintf (buf, 1024 , " z_%s_%s_%s" ,
478
+ snprintf (buf, 255 , " z_%s_%s_%s" ,
479
479
label (v_i).c_str (),
480
480
label (v_j).c_str (),
481
481
_indexToAnatomicalSite[s].c_str ());
482
482
483
483
_z[ij][s] = _model.addVar (0 , 1 , 0 , GRB_BINARY, buf);
484
484
}
485
- snprintf (buf, 1024 , " z_%s_%s_DUMMY" ,
485
+ snprintf (buf, 255 , " z_%s_%s_DUMMY" ,
486
486
label (v_i).c_str (),
487
487
label (v_j).c_str ());
488
488
_z[ij][nrAnatomicalSites] = _model.addVar (0 , 1 , 0 , GRB_BINARY, buf);
@@ -495,7 +495,7 @@ void IlpSolverExt::initVariables()
495
495
_c[s] = VarArray (nrAnatomicalSites);
496
496
for (int t = 0 ; t < nrAnatomicalSites; ++t)
497
497
{
498
- snprintf (buf, 1024 , " c_%s_%s" ,
498
+ snprintf (buf, 255 , " c_%s_%s" ,
499
499
_indexToAnatomicalSite[s].c_str (),
500
500
_indexToAnatomicalSite[t].c_str ());
501
501
_c[s][t] = _model.addVar (0 , 1 , 0 , GRB_CONTINUOUS, buf);
@@ -506,7 +506,7 @@ void IlpSolverExt::initVariables()
506
506
_d = VarArray (nrAnatomicalSites);
507
507
for (int s = 0 ; s < nrAnatomicalSites; ++s)
508
508
{
509
- snprintf (buf, 1024 , " d_%s" ,
509
+ snprintf (buf, 255 , " d_%s" ,
510
510
_indexToAnatomicalSite[s].c_str ());
511
511
_d[s] = _model.addVar (0 , 1 , 0 , GRB_CONTINUOUS, buf);
512
512
}
@@ -518,7 +518,7 @@ void IlpSolverExt::initVariables()
518
518
_f[p] = VarArray (nrCharacters);
519
519
for (int c = 0 ; c < nrCharacters; ++c)
520
520
{
521
- snprintf (buf, 1024 , " f_%s_%s" ,
521
+ snprintf (buf, 255 , " f_%s_%s" ,
522
522
_indexToSample[p].c_str (),
523
523
_F.indexToCharacter (c).c_str ());
524
524
_f[p][c] = _model.addVar (0 , 1 , 0 , GRB_CONTINUOUS, buf);
@@ -532,7 +532,7 @@ void IlpSolverExt::initVariables()
532
532
_u[p] = VarArray (nrCharacters);
533
533
for (int c = 0 ; c < nrCharacters; ++c)
534
534
{
535
- snprintf (buf, 1024 , " u_%s_%s" ,
535
+ snprintf (buf, 255 , " u_%s_%s" ,
536
536
_indexToSample[p].c_str (),
537
537
_F.indexToCharacter (c).c_str ());
538
538
_u[p][c] = _model.addVar (0 , 1 , 0 , GRB_CONTINUOUS, buf);
@@ -547,7 +547,7 @@ void IlpSolverExt::initVariables()
547
547
Node v_i = _G.source (a_ij);
548
548
Node v_j = _G.target (a_ij);
549
549
550
- snprintf (buf, 1024 , " w_%s_%s" ,
550
+ snprintf (buf, 255 , " w_%s_%s" ,
551
551
label (v_i).c_str (),
552
552
label (v_j).c_str ());
553
553
_w[ij] = _model.addVar (0 , 1 , 0 , GRB_BINARY, buf);
0 commit comments