Jump to content
Vinivici

Populate a lookup table in Activate

Recommended Posts

Hello,

 

I'm a newbie with Activate (I'm still with the 2017 version) and I'm trying to translate an old model from Portunus in Activate.

My goal is really simple but I don't understand how to do it in Activate.

 

I have a 3D curve (map response) from Flux I'd like to use in Activate. I've always used a look up table in other softwares but here I really don't understand how to populate it here.

If I try to use a csv of my values, how can I use them with interpolations in my model ?

 

Hope someone can help me :o)

 

Thanks !

 

 

 

Share this post


Link to post
Share on other sites

Hi Vinivici,

 

The definition of inputs and output looks like this:

  Assuming n=2 (x-axis), m=2 (y-axis), k=2 (z-axis)

    Then output vector with size n*n*k: [f(x1,y1,z1), f(x2,y1,z1), f(x1,y2,z1), f(x2,y2,z1), f(x1,y1,z2), f(x2,y1,z2), f(x1,y2,z2), f(x2,y2,z2)]

 

Reading of csv and populating inputs and output have to be done as a script in 'Diagram Home Context' or 'Model initialization'.

 

Best Regards.

Share this post


Link to post
Share on other sites

Hello RoKet, thanks for the answers !

 

So you use the 3D look up table to build the n*n*k vector ?

 

I'll have a look concerning the script part, time to go deaper :o)

 

Thanks

Share this post


Link to post
Share on other sites

Yes, I forgot to mention. I check it with this simple model

 

image.png.866faf9601488d7373cca968bbe65161.png

 

The script part is sometimes a little bit tricky. Unfortunately I have no example, perhaps someone else can help with a code snippet?

Share this post


Link to post
Share on other sites

I'm a bit confused here because a lookup table should be populate before and then a given entry will by interpolation have a given result.

 

Shouldn't the look up table be populated by scripting like you suggested for the csv part ?

 

EDIT

 

I think I understand how it worked now :

image.png.82f296e1c7b50727c43fa7cc3bc7355e.png

 

Look up table is populated directly or through variables given in the Model/Initialization.

Will try to populated based on a csv and the rest should go smoothly (I hope :o) ) 

 

Thanks for the help and I hope it can help others.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×