Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stearing Optimization #65

Open
MaxOstrowski opened this issue May 11, 2021 · 2 comments
Open

Stearing Optimization #65

MaxOstrowski opened this issue May 11, 2021 · 2 comments

Comments

@MaxOstrowski
Copy link
Member

Why do I need a linear amount of steps instead of logarithmic.

&dom{-100..100} = x.
&minimize{x}.

@MaxOstrowski
Copy link
Member Author

MaxOstrowski commented May 11, 2021

Option --sign-value=0 makes 0 the focus point for which direction to chose. So creating order literals x<=
[0,-50,-25,-12,-6,-3,-1].
x=0 beeing the first answer, all other order literals persist, but choice heuristic again searches towards 0.
So maybe a new value is needed like --sign-value=opt to make the literal go into the direction of the optimize statement.
Edit: What about variables not in the optimize statement, maybe --sign-value=0,opt.
Search annotations like in minizinc
https://www.minizinc.org/doc-2.5.5/en/mzn_search.html
could also be a possibility. Defining a split/direction strategy for a set of variables. (Which variable to take first, how to split the domain, etc...)

@MaxOstrowski
Copy link
Member Author

MaxOstrowski commented May 11, 2021

Possible search annotation syntax (names inspired by minizinc search annotations):
&heuristic(Level,VarSelection,ValueSelection) {variables}. %only in heads, could be dynamic
where VarSelection describes a selection strategy for the given variables,
e.g.

  • first_fail choses variable with the smallest domain
  • smalltest choses variable with smallest value in domain
    ValueSelection describes a selection strategy which value/split to take for a selected variable,
    e.g.
  • indomain_split bisect the domain, excluding the upper half
  • indomain_reverse_split bisect the domain, excluding the lower half
    The Level is used to chain different selection strategies.
    We can have several statements on the same level as long as they have the same VarSelection strategy, e.g.
&heuristic(1,first_fail,indomain_split) { start(V) : node(V) }.
&heuristic(1,first_fail,indomain_reverse_split) { end(V) : node(V) }.
&heuristic(2,smallest,indomain_split) { x; y; opt }.

First, chose always the variable with the smallest domain from x, y and opt.
If they are completely assigned, chose from start(V) and end(V) the variable with smallest domain.

What does this mean, which literals to select, where to split:

  • In the case that we have a complete assignment of all literals, a new order literal needs to be introduced.
    Take heuristics as given and create a new literal at the splitting point (split or reverse_split should not make a difference).
  • In case of decide, select the variable according to the VarSelection and take the literal closest to the splitting point, deciding in the same direction the split would decide.

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

No branches or pull requests

1 participant