Skip to content
This repository has been archived by the owner on Nov 23, 2018. It is now read-only.

Method does not need ProblemInfo #110

Closed
vladimir-ch opened this issue Jul 17, 2015 · 1 comment
Closed

Method does not need ProblemInfo #110

vladimir-ch opened this issue Jul 17, 2015 · 1 comment

Comments

@vladimir-ch
Copy link
Member

I have been giving it more thought and I am still not convinced that passing ProblemInfo to Method.Init() makes sense. Methods already announce what they need via Needs() and we allocate fields of Location exactly according to this information. Evaluation types issued by Method should/have to match this information. So ProblemInfo will convey what Needs() returned plus perhaps something more but Method cannot use that information anyway, it cannot issue evaluation types beyond Needs(). Comments, @btracey ?

@btracey
Copy link
Member

btracey commented Jul 25, 2015

My thought on having it was that hypothetically Methods could have different behavior depending on the ProblemInfo. I'm not sure I have a good example though. The one I had in mind was random restart global optimization. In this case though, the Restarter struct would have something like

type Restarter struct{
    Local Method   // The local optimization method for each restart
}

Here though, Restarter.Needs() would just return Local.Needs(), and so it doesn't need ProblemInfo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants