question

Gabriel illescas Cavazos avatar image
0 Likes"
Gabriel illescas Cavazos asked Adrian Haws answered

Write a massive tasks(Delay) in process flow I want to avoid Copy-Paste Process?

FlexSim 16.2.1
process flow
· 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.

Adrian Haws avatar image Adrian Haws commented ·

@Gabriel illescas Cavazos Could you be a little more specific with what you're trying to model?

0 Likes 0 ·
Gabriel illescas Cavazos avatar image Gabriel illescas Cavazos commented ·

Example: I have around 100 delays per stations and I need simulate with process flow I have the task and times per model that information a I set in a global table and a I use the values that I upload in the global table but I need to use process flow the form that I use to simulate is use a delay for represent task by task but I want to overwrite the word Delay(Default Name) for Task 1, and the Task 2 and Etc How can I avoid the copy-paste

0 Likes 0 ·

1 Answer

Adrian Haws avatar image
2 Likes"
Adrian Haws answered

It depends on how your model functions, but you shouldn't need to use 100 delay activities for the same part of a process. As a general solution based on how you've explained it, you could execute a for loop to add the delay times for each of the tasks from your global table, then set that as your delay time.

If you do have, say, 5 delay activities and want to change their names incrementally you could do something like this:

var processFlow = "Tools/ProcessFlow/ProcessFlow/Delay";
var numberOfActivities = 5;
for(int i = numberOfActivities; i > 0; i--) {
	var currentActivity = concat(processFlow, "~", numtostring(i));
	var activityName = concat("Name", numtostring(i));
	setname(model().find(currentActivity), activityName);
}
5 |100000

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