Is there a way to debug an expression field in a resource?

Is there a way to debug an expression field in a resource?

julio_r
Not applicable
20 Views
2 Replies
Message 1 of 3

Is there a way to debug an expression field in a resource?

julio_r
Not applicable

[ FlexSim 23.0.4 ]

I have a expression field that is not doing what I want. To find out what I am doing wrong I am trying to use a debug() to find how is reading the variables, but this does not execute any debugging.

Is this normal or how can I do this?

1678816647875.png

0 Likes
Accepted solutions (1)
21 Views
2 Replies
Replies (2)
Message 2 of 3

kavika_faleumu
Autodesk
Autodesk
Accepted solution

Hey @Julio R, debug() should work within a list's properties/expressions. Did you add the debug command as a line in your expression? I suggest breaking up that equation into different lines so you can see the values as they get evaluated.

debug();
double PosicionOrigen = puller.PosicionOrigen;
double PosicionActual = value.PosicionActual;
double MaxPosicion = Math.max(PosicionOrigen, PosicionActual);
double MinPosicion = Math.min(PosicionOrigen, PosicionActual);

double CantNodos = (MaxPosicion - MinPosicion + 1);
return CantNodos;

Make sure you hit Apply on the code editor AND on the List Properties.

1678828330085.png

Message 3 of 3

Jeanette_Fullmer
Community Manager
Community Manager

Hi @Julio R, was Kavika F's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes