@@ -495,7 +495,7 @@ Rcpp::List RAMPL::getVariables() const {
495495 ampl::EntityMap<ampl::Variable>::iterator begin = map.begin ();
496496 ampl::EntityMap<ampl::Variable>::iterator end = map.end ();
497497 for (ampl::EntityMap<ampl::Variable>::iterator itr = begin; itr != end; itr++){
498- list[itr->name () ] = RVariableEntity (*itr);
498+ list[itr->first ] = RVariableEntity (*itr);
499499 }
500500 return list;
501501}
@@ -512,7 +512,7 @@ Rcpp::List RAMPL::getConstraints() const {
512512 ampl::EntityMap<ampl::Constraint>::iterator begin = map.begin ();
513513 ampl::EntityMap<ampl::Constraint>::iterator end = map.end ();
514514 for (ampl::EntityMap<ampl::Constraint>::iterator itr = begin; itr != end; itr++){
515- list[itr->name () ] = RConstraintEntity (*itr);
515+ list[itr->first ] = RConstraintEntity (*itr);
516516 }
517517 return list;
518518}
@@ -529,7 +529,7 @@ Rcpp::List RAMPL::getObjectives() const {
529529 ampl::EntityMap<ampl::Objective>::iterator begin = map.begin ();
530530 ampl::EntityMap<ampl::Objective>::iterator end = map.end ();
531531 for (ampl::EntityMap<ampl::Objective>::iterator itr = begin; itr != end; itr++){
532- list[itr->name () ] = RObjectiveEntity (*itr);
532+ list[itr->first ] = RObjectiveEntity (*itr);
533533 }
534534 return list;
535535}
@@ -546,7 +546,7 @@ Rcpp::List RAMPL::getSets() const {
546546 ampl::EntityMap<ampl::Set>::iterator begin = map.begin ();
547547 ampl::EntityMap<ampl::Set>::iterator end = map.end ();
548548 for (ampl::EntityMap<ampl::Set>::iterator itr = begin; itr != end; itr++){
549- list[itr->name () ] = RSetEntity (*itr);
549+ list[itr->first ] = RSetEntity (*itr);
550550 }
551551 return list;
552552}
@@ -563,7 +563,7 @@ Rcpp::List RAMPL::getParameters() const {
563563 ampl::EntityMap<ampl::Parameter>::iterator begin = map.begin ();
564564 ampl::EntityMap<ampl::Parameter>::iterator end = map.end ();
565565 for (ampl::EntityMap<ampl::Parameter>::iterator itr = begin; itr != end; itr++){
566- list[itr->name () ] = RParameterEntity (*itr);
566+ list[itr->first ] = RParameterEntity (*itr);
567567 }
568568 return list;
569569}
0 commit comments