Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Alteryx Optimization Tool: Slam Matrix Error/Error in inferA

rudrakshgarg
5 - Atom

I am trying to solve a network optimization problem. But am unable to use the optimization tool.

I can solve the same problem in manual mode, but when entered as a matrix, I receive an error in all input formats, i.e., Dense Matrix and Sparse (SLAM) matrix. 

Error received in both modes is as follows:

 

Error: Optimization (140): Tool #3: Error in inferA(inputs$A, config$constraintMode) :

or 

Error: Optimization (106): Tool #3: Error in slam::simple_triplet_matrix(i = df[, "i"], j = df[, "j"], v = df[, :

 

It is surprising that the matrix method works when matrices are read in from a text input tool, however, it doesn't work when read in from csv files. I have checked for the order of constraints, variables. Don't know where the mistake is. 

I have attached my flow with some test data (dense matrix format). Please place the matrices dump folder in the same location of the workflow to read in csv.

Your help is appreciated.

2 REPLIES 2
RolandSchubert
16 - Nebula
16 - Nebula

Hi @rudrakshgarg ,

 

all R tools (inculding Optimization tool) are very sensitive regarding data types. Importing from csv has a default data type "V_String", but need is a numeric data type. Change data types and it will work fine. I've attached the modified workflow.

 

Best,

 

Roland

 

 

rudrakshgarg
5 - Atom

Hi @RolandSchubert ,

Thank you for getting back so quickly. 

Yes, the solution suggested works. I will keep your advice in mind when working with R tools.

 

Best Regards,

Rudraksh

Labels