-
In my application, after the problem file is read in, and before anything else is done, there are some things that need to be pre-computed by tasks implemented by internal (!!) operators. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I'm afraid I don't fully follow the question. First of all, you talk about the method for As for getting a task to be done before anything else, one common trick is to encode the tasks in the state, and then have a single top level method that does any necessary set-up and then reads the tasks from the state. For example, see the method for Alternatively, since problems take task networks, not just singleton tasks, as argument, you could just make sure every problem has a task something like Feel free to ask follow-up questions or close this as answered if that's all you need. |
Beta Was this translation helpful? Give feedback.
-
I don't know enough to say whether it's good or bad practice. I would say it is good practice if it helps you understand your domain better (especially after you have been away for a while!). I wouldn't say it's bad practice. To be honest, I don't love the use of the |
Beta Was this translation helpful? Give feedback.
-
That is true, but as I said, I find that for any real applications (as opposed to test cases in files) I always end up writing one or more special-purpose functions that invoke |
Beta Was this translation helpful? Give feedback.
That is true, but as I said, I find that for any real applications (as opposed to test cases in files) I always end up writing one or more special-purpose functions that invoke
make-problem
, in which case all I have to do is put this pattern into the problem-creating function. In practice, I generally find that real problems require that the initial state be programmatically generated, typically because it's a combination of boilerplate contents (e.g., propositions that capture a fixed graph of connections) and additional …