question

flexsimuser avatar image
0 Likes"
flexsimuser asked Felix Möhlmann answered

Set Process Time using global look up table and item label

I am trying to set the processing time of the processor by:

  1. Looking at a global table and finding the process time for the current step
  2. Multiply that time by the "subcomponent" label value on the item IF that step is "Single" step_type which is given in the same global table from part 1.

So far, I've gotten the 1st part but having trouble implementing the 2nd part. Any guidance?

FlexSim 24.0.3
labelsglobaltableprocessortime
5 |100000

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

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

You can use something like the following:

  1. Table table = Table(tableName);
  2. double processTime = table[item.Step][timeColumn];
  3. string stepType = table[item.Step][stepTypeColumn];
  4. if(stepType == "Single")
  5. {
  6.     processTime = processTime * item.subcomponent;
  7. }
  8. return processTime;
5 |100000

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