Question

Creating Subset probem

  • 17 April 2021
  • 2 replies
  • 23 views

Badge

Hi, 

I simply need to make a subset “test” of range from 0 to 10 of set “timehour” which the range is from 0 to 140 

But I don’t archieve to do it see picture.

When i range “test” from 0 to 100 or more It works but when I’m below 100 it doesn’t

Help me pls 

 


 


2 replies

Userlevel 6
Badge +2

Looks like this is because you are generating a set of elements that does not contain the first ‘0’. So apparently the superset is ‘000’ to ‘140’ while the subset is ‘01-99’; so there is a leading ‘0’ missing. 

Depending on what you want to achieve in the model (which is not quite clear to me), there are a number of ways that are in my opinion more efficient:

  1. use Calendars for your model (so you do not need sets as weeks and hours 
  2. define this subset of timehour using the definition {index_timehour | ord(index_timehour)<=100} 
  3. assure the timehour set is a subset of integers and then define this subset of timehour using the definition {index_timehour | index_timehour<=100}

Hi @jeromeee 

Did Gertjan’s answer help you with your question?

 

 

Reply


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

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