@@ -420,7 +420,7 @@ ConstraintIndex COPTModel::add_second_order_cone_constraint(const Vector<Variabl
420420 const char *name, bool rotated)
421421{
422422 IndexT index = m_cone_constraint_index.add_index ();
423- ConstraintIndex constraint_index (ConstraintType::Cone , index);
423+ ConstraintIndex constraint_index (ConstraintType::SecondOrderCone , index);
424424
425425 int N = variables.size ();
426426 std::vector<int > ind_v (N);
@@ -452,7 +452,7 @@ ConstraintIndex COPTModel::add_exp_cone_constraint(const Vector<VariableIndex> &
452452 const char *name, bool dual)
453453{
454454 IndexT index = m_exp_cone_constraint_index.add_index ();
455- ConstraintIndex constraint_index (ConstraintType::COPT_ExpCone , index);
455+ ConstraintIndex constraint_index (ConstraintType::ExponentialCone , index);
456456
457457 int N = variables.size ();
458458 if (N != 3 )
@@ -704,7 +704,7 @@ ConstraintIndex COPTModel::add_single_nl_constraint(ExpressionGraph &graph,
704704
705705 IndexT constraint_index = m_nl_constraint_index.add_index ();
706706
707- ConstraintIndex constraint (ConstraintType::COPT_NL , constraint_index);
707+ ConstraintIndex constraint (ConstraintType::NL , constraint_index);
708708
709709 return constraint;
710710}
@@ -729,11 +729,11 @@ void COPTModel::delete_constraint(const ConstraintIndex &constraint)
729729 m_sos_constraint_index.delete_index (constraint.index );
730730 error = copt::COPT_DelSOSs (m_model.get (), 1 , &constraint_row);
731731 break ;
732- case ConstraintType::Cone :
732+ case ConstraintType::SecondOrderCone :
733733 m_cone_constraint_index.delete_index (constraint.index );
734734 error = copt::COPT_DelCones (m_model.get (), 1 , &constraint_row);
735735 break ;
736- case ConstraintType::COPT_ExpCone :
736+ case ConstraintType::ExponentialCone :
737737 m_exp_cone_constraint_index.delete_index (constraint.index );
738738 error = copt::COPT_DelExpCones (m_model.get (), 1 , &constraint_row);
739739 break ;
@@ -754,9 +754,9 @@ bool COPTModel::is_constraint_active(const ConstraintIndex &constraint)
754754 return m_quadratic_constraint_index.has_index (constraint.index );
755755 case ConstraintType::SOS:
756756 return m_sos_constraint_index.has_index (constraint.index );
757- case ConstraintType::Cone :
757+ case ConstraintType::SecondOrderCone :
758758 return m_cone_constraint_index.has_index (constraint.index );
759- case ConstraintType::COPT_ExpCone :
759+ case ConstraintType::ExponentialCone :
760760 return m_exp_cone_constraint_index.has_index (constraint.index );
761761 default :
762762 throw std::runtime_error (" Unknown constraint type" );
@@ -1036,7 +1036,7 @@ double COPTModel::get_constraint_info(const ConstraintIndex &constraint, const c
10361036 case ConstraintType::Quadratic:
10371037 error = copt::COPT_GetQConstrInfo (m_model.get (), info_name, num, &row, &retval);
10381038 break ;
1039- case ConstraintType::COPT_NL :
1039+ case ConstraintType::NL :
10401040 error = copt::COPT_GetNLConstrInfo (m_model.get (), info_name, num, &row, &retval);
10411041 break ;
10421042 default :
@@ -1059,7 +1059,7 @@ std::string COPTModel::get_constraint_name(const ConstraintIndex &constraint)
10591059 case ConstraintType::Quadratic:
10601060 error = copt::COPT_GetQConstrName (m_model.get (), row, NULL , 0 , &reqsize);
10611061 break ;
1062- case ConstraintType::COPT_NL :
1062+ case ConstraintType::NL :
10631063 error = copt::COPT_GetNLConstrName (m_model.get (), row, NULL , 0 , &reqsize);
10641064 break ;
10651065 default :
@@ -1093,7 +1093,7 @@ void COPTModel::set_constraint_name(const ConstraintIndex &constraint, const cha
10931093 case ConstraintType::Quadratic:
10941094 error = copt::COPT_SetQConstrNames (m_model.get (), 1 , &row, names);
10951095 break ;
1096- case ConstraintType::COPT_NL :
1096+ case ConstraintType::NL :
10971097 error = copt::COPT_SetNLConstrNames (m_model.get (), 1 , &row, names);
10981098 break ;
10991099 default :
@@ -1300,11 +1300,11 @@ int COPTModel::_constraint_index(const ConstraintIndex &constraint)
13001300 return m_quadratic_constraint_index.get_index (constraint.index );
13011301 case ConstraintType::SOS:
13021302 return m_sos_constraint_index.get_index (constraint.index );
1303- case ConstraintType::Cone :
1303+ case ConstraintType::SecondOrderCone :
13041304 return m_cone_constraint_index.get_index (constraint.index );
1305- case ConstraintType::COPT_ExpCone :
1305+ case ConstraintType::ExponentialCone :
13061306 return m_exp_cone_constraint_index.get_index (constraint.index );
1307- case ConstraintType::COPT_NL :
1307+ case ConstraintType::NL :
13081308 return m_nl_constraint_index.get_index (constraint.index );
13091309 default :
13101310 throw std::runtime_error (" Unknown constraint type" );
0 commit comments