Closed PanPalitta closed 8 years ago
How are we doing with this?
The criteria are now moved to Phase class (as they are specific to the problem), and OptAlg class access these criteria through T_condition function and error_condition function from within check_success function through Problem class. The only part that I haven't done is generalizing the input to these function. I don't have a good idea for this at the moment.
I agree this is a bit messy at the moment. If I understand correctly, memory_fitarray is relevant only to Phase
, so perhaps we could delegate all related logic to that class. The main loop variable numvar
could be a variable in OptAlg
, and the while loop could terminate with a condition like while (opt->done())
which would in turn do a similar evaluation. This way you could also move the heuristic bits between lines 114 and 140, and then between 144 and 167 in main.cpp
to OptAlg
.
I have tried to further generalize the criteria. The error_condition I think is generalized enough to be used with other problems. However, I don't know how to generalize T_condition at the moment.
As for your suggestion, I would suggest that we defer the change for now as memory_fitarray
stores results from many numvar
whereas Phase
and OptAlg
are instantiated and deleted for every numvar. So as it stands, I think memory_fitarray
would belong to a bigger structure (the main
function) at the moment.
Okay, that is fair enough. I reckon this is clean enough. As far as I am concerned, we can close this issue.
The accept-reject criteria should be dealt with, in terms of how data are transferred between classes at least, as one of the objective functions in a multiple objective setting. Accept-reject criteria are patched in at the moment.