I’m trying something like this, but compound sets does not exists anymore. Someone could please help me?
I’m trying something like this, but compound sets does not exists anymore. Someone could please help me?
For every i,j in the sql procedure result, you want to obtain the distance and such route exists, right? If so, a parameter with following definition should work.
routeexists(i,j):= (distance(i,j) > 0)
so you do not need the last row in the mapping, but calculate the parameter after reading from DB.
Thanks deannezhang, but the problems are:
1 - I have a stored procedure instead of a table
2 - My stored procedure only provide me the columns i and j. What means that if the combination (i, j) exists the route also exists.
That’s why I was asking about the compound set way to achieve this information.
I’m facing the same problem where I need to read from and write to a database table, which consists of only two columns, which form a relation (like the cities “from” and “to” in the above example). I tried using a relation (not a compound set), but when reading from the database table, the relation remains empty.
Is something like the following still supported in AIMMS?
"from" --> i_City,
"to" --> j_City,
("from","to") --> S_CityToCityRelation
Hi,
select from,to,1 as relation from table
from → i_City
to → j_City
relation → P_YourParameter(i_City,j_City)
Then you can use this parameter to create your query and write to database.
I don’t quite remember if there is a better approach to this, maybe AIMMS team can help us further.
Thank you,
Already have an account? Login
Please use your business or academic e-mail address to register
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Didn't find what you were looking for? Try searching on our documentation pages: