|
From: Laurent C. <cai...@de...> - 2002-09-06 12:02:41
|
Engine uses Constraints to evalutate Vars' overall error
on a given Configuration, then calls worst Var's Explorer
to attempt to find a better value. If Engine (in fact, the
wrapped Algorithm instance) detected that there was no
improvement, it calls the RandomConfigurator to shake
the Buisness Objects state.
In other words, Engine chooses the Var instance for you.
The Var instance knows its Explorer instance, so the Engine
knows which Explorer to call.
You shouldn't care about what is the worst var for each
explorer : the selected Explorer in each step must be the
one corresponding to the worst problem var. So, for this
selected Explorer, "the worst domain var" and "the worst
problem var" are the same thing.
As in each step you only use one explorer (the worst problem
var Explorer), nothing happens in others : you don't need
to know what is the worst var for those other Explorers /
domains.
I guess the getVar() method you talk about is :
protected final Explorer.getVar()
and you've set a trace or a breakpoint in your own
Explorer's explore() method. But this method can be called
by Engine or Algorithm or Configuration objects whenever
they need it. We'd better talk about hasNeighbours() and
explore() methods that you've defined in your own
Explorers. When in hasNeighbours() or explore(), the
getVar() method should return the correct Var instance.
So, only use getVar() in those two methods.
When you say "I expect (...) the currently worst variable
would be called from it's corresponding explorer" you're
right, and it *should* work like this. The explore()
method is a callback that Engine (in fact : Algorithm)
calls when it detects it is useful.
I don't understand what your problem is. Do you mean
that :
(1) getVar() called from hasNeighbours() or explore()
returns an unexpected Var instance.
(2) one of your Explorers is never called.
Quick answers :
(1) Check how you created your Vars, since they're bound
to an Explorer in their constructor.
(2) check your Constraints. Do they affect the right Var
instance ?
Hope this will help.
The WASA Team
>
> Ok, very good. Then I'm still on the right track I guess. I do exactly
> what you describe, just that explorer "2" doesn't ever get called.
>
> My problem then is that getVar() reports the currently worst variable in
> the "wrong" explorer. I expect that the currently worst variable would
> be called from it's corrensponding explorer, ie; the getVar() would
> report the worst variable in the current (domain) explorer, not for all
> of them. I would also expect that the explorer "called" would be the one
> that contains the currently worst var. Somewhat confused, but I guess
> that's a good thing :-)
>
> /Niclas
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone? Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> Wasa-users mailing list
> Was...@li...
> https://lists.sourceforge.net/lists/listinfo/wasa-users
>
>
|