Skip to main content
Solved

root set issue while adding element to set using setelementadd

  • December 7, 2023
  • 4 replies
  • 73 views

Forum|alt.badge.img+4

SetElementAdd(Li_available_section,LE_add_section,Li_required_section);

 

need add to add elements (Li_required_section-user defined string) to Li_available_section  subset of allsections using element parameter using LE_add_section-subset of allsections. 

 

i am getting below errors. 

 

Domain mismatch in argument 2: the set "LS_required_sections" does not share the same root set as "LS_available_sections" on argument 1.

 

 

it will be helpful if you can provide solution

Best answer by gdiepen

The second argument you provide to the SetElementAdd function (LE_add_section) in your case should be an element parameter that shares the same rootset  as the set of the first Li_Available_section argument.

 

You cannot have a call like SetElementAdd(setCities, elementParameterNewPerson, “Haarlem”)

if the subset of attribute of elementParameterNewPerson is not the same as the rootset of the set setCities

4 replies

gdiepen
AIMMS Champ
Forum|alt.badge.img+7
  • AIMMS Champ
  • 155 replies
  • Answer
  • December 7, 2023

The second argument you provide to the SetElementAdd function (LE_add_section) in your case should be an element parameter that shares the same rootset  as the set of the first Li_Available_section argument.

 

You cannot have a call like SetElementAdd(setCities, elementParameterNewPerson, “Haarlem”)

if the subset of attribute of elementParameterNewPerson is not the same as the rootset of the set setCities


Forum|alt.badge.img+4
  • Author
  • Ace
  • 12 replies
  • December 8, 2023

Li_available_section is subset of set of index Li_required_section. Ithink it shares same root


gdiepen
AIMMS Champ
Forum|alt.badge.img+7
  • AIMMS Champ
  • 155 replies
  • December 8, 2023

Can you maybe share screenshots of the attributes of the identifiers involved? So the different sets, the element parameter and the procedure?


Forum|alt.badge.img+4
  • Author
  • Ace
  • 12 replies
  • December 14, 2023

i solved this issue. thanks for your time



Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator