Solved

root set issue while adding element to set using setelementadd

  • 7 December 2023
  • 4 replies
  • 34 views

Badge +3

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

icon

Best answer by gdiepen 7 December 2023, 22:32

View original

4 replies

Userlevel 5
Badge +7

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

Badge +3

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

Userlevel 5
Badge +7

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

Badge +3

i solved this issue. thanks for your time

Reply


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

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