I have an assembly containing a workflow of several components. I am iterating on the components in an optimization. If one of the components has inputs that have not changed, the outputs have not changed either, and I would rather not execute the component. Is there an option that would do this for me?

asked 12 Aug '15, 18:41

berton's gravatar image

berton
124


The way to handle this is to build a cache into the component. You can use the a tuple of the input values as the key to a dictionary, and a tuple of the outputs as their value. Then before running the code, you first check if the key exists. If it does, pull out the values and use them. If it doesn't then you run.

This method has the added advantage of preventing execution if you have EVER seen those inputs before (even if you've run other cases in between). If you're using any kind of genetic or particle swarm algorithm, this is very likely to occur.

link

answered 12 Aug '15, 18:47

justingray's gravatar image

justingray ♦♦
1.8k113

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×8
×7

Asked: 12 Aug '15, 18:41

Seen: 1,646 times

Last updated: 12 Aug '15, 21:18

powered by OSQA