Skip to main content

I am trying to do some dataframe operation through AIMMS. 

I am giving some sample example. Say, only one row is there in a dataframe. The values are TC130 and SF520. Say the parameter name is ```pMap(tdc1, tdc2)```.  I would like to run a for loop on the second column value, i.e. on tdc2. Here it is SF520, I'll extract the corresponding value of SF520, which is TC130. Now I'll check in another dataframe, where quantity has been given for TC130. The parameter is ```p(tdc1)```.  If TC130 belongs to that dataframe, i.e. if p(tdc1) > 0 then I'll create a parameter on tdc2, say p(tdc2) and assign value 1 to that else 0.

How to write this types of procudure in AIMMS. 

In a nutshell. I have two parameters p(tdc1, tdc2):= {(tdc1, tdc2) : 1} and p(tdc1):= {tdc1: quantity}. This is simple case.  

 

I guess you want to express:

p2(tdc2 | Exists(tdc1 | pMap(pdc1,pdc2) and p(tdc1) > 0)) := 1;

 


@MarcelRoelofs:

 

No! This is already I have tried. This is not working. 


Well, it's doing exactly what you asked for, and I can't formulate what you didn't ask for.

So, maybe can you elaborate a bit why it doesn't work, or provide an example project that makes clear what you actually are trying to accomplish?


Reply


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

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