question

mark zhen avatar image
0 Likes"
mark zhen asked Jeanette F commented

I need to merge three values how can I do it.

As the title says, I now need to sum the three q individual reward values togetherrltest.fsm

FlexSim 22.0.0
modellingvalue
rltest.fsm (393.0 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @mark zhen , was Joerg Vogel'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 0 ·

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel edited

initialize

a = -100;
b = -200;
c = -400;

merge

xyz = a+b+c;
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

mark zhen avatar image mark zhen commented ·

I don't quite understand what you mean. Should I do this?rltest.fsm

Also I don't know why I get the error message

0 Likes 0 ·
rltest.fsm (429.7 KiB)
Joerg Vogel avatar image Joerg Vogel mark zhen commented ·
Initialize a variable by values out of their range indicates, if they are changed later on by valid values.

Ever heard of binary flags, 0001, 0010, 0100, 1000?
1,2,4,8

initialize values of different values makes it easier to identify which merged value is still invalid.

Before or while you merge values by sum, mean or density you can check if your operation is valid.

0 Likes 0 ·