or-tools documentation and help

963 views
Skip to first unread message

Rafael Andrade

unread,
Jan 21, 2017, 5:12:14 PM1/21/17
to or-tools-discuss
Guys,
I am studying a little bit more of constraint programming. I am using or-tools in python.
I am reading some examples to understand the global variables and other things but I'm a little bit lost in some cases.
Where can I find the definition of the methods and algorithms. I know a lot of them is available through swig but even in C++ documentation I could not find them.
For example in solver.Phase they used solver.INT_VAR_DEFAULT but i do not know where could I get the definition of INT_VAR_DEFAULT and all the others that I could use.
Is there anywhere I could get it ?

Sorry for the new topic and thanks!


Dmitry Savransky

unread,
Jan 23, 2017, 9:36:54 AM1/23/17
to or-tools-discuss
Can't be of much help in terms of documentation - what you've found so far is probably all that exists, but you can always read the source for more insights.  

On your specific question:  INT_VAR_DEFAULT is a defined attribute of the Solver class.  So, just:

from ortools.constraint_solver import pywrapcp
pywrapcp.Solver.INT_VAR_DEFAULT

I suspect the rest of the ones you're looking for are attributes as well.  Try:

dir(pywrapcp.Solver)

Driss Lahlou

unread,
Jan 23, 2017, 9:46:37 AM1/23/17
to or-tools...@googlegroups.com
Hello Rafael,

Please refer to the official website for more information about using or-tools.

Regards,

--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

driss
Message has been deleted

Tomas Juočepis

unread,
Jan 29, 2017, 3:03:14 AM1/29/17
to or-tools-discuss
I was looking for the same thing and ended up looking at the source code and found the answers.
I'll post them here for reference in case it might help you and/or others:


information is accurate as of 2017-01-27

enum SequenceStrategy
SEQUENCE_DEFAULT == SEQUENCE_SIMPLE == CHOOSE_MIN_SLACK_RANK_FORWARD
CHOOSE_RANDOM_RANK_FORWARD

enum IntervalStrategy
INTERVAL_DEFAULT == INTERVAL_SIMPLE == INTERVAL_SET_TIMES_FORWARD
INTERVAL_SET_TIMES_BACKWARD

enum EvaluatorStrategy
- CHOOSE_STATIC_GLOBAL_BEST
- CHOOSE_DYNAMIC_GLOBAL_BEST

enum IntVarStrategy
INT_VAR_DEFAULT == INT_VAR_SIMPLE == CHOOSE_FIRST_UNBOUND
CHOOSE_RANDOM
CHOOSE_MIN_SIZE_LOWEST_MIN
CHOOSE_MIN_SIZE_HIGHEST_MIN
CHOOSE_MIN_SIZE_LOWEST_MAX
CHOOSE_MIN_SIZE_HIGHEST_MAX
CHOOSE_LOWEST_MIN
CHOOSE_HIGHEST_MAX
CHOOSE_MIN_SIZE
CHOOSE_MAX_SIZE
CHOOSE_MAX_REGRET_ON_MIN
CHOOSE_PATH

enum IntValueStrategy
INT_VALUE_DEFAULT == INT_VALUE_SIMPLE == ASSIGN_MIN_VALUE
ASSIGN_MAX_VALUE
ASSIGN_RANDOM_VALUE
ASSIGN_CENTER_VALUE
SPLIT_LOWER_HALF
SPLIT_UPPER_HALF
Message has been deleted
Message has been deleted
Message has been deleted

Paul Trow

unread,
Jan 29, 2017, 12:21:59 PM1/29/17
to or-tools-discuss
Hi Rafael,

You can find some documentation on this at


INT_VAR_DEFAULT is the default value for Phase.IntVarStrategey, which is CHOOSE_FIRST_UNBOUND. See the doc page for a description.

Hope this helps.

On Saturday, January 21, 2017 at 5:12:14 PM UTC-5, Rafael Andrade wrote:
Message has been deleted

Paul Trow

unread,
Jan 29, 2017, 1:48:19 PM1/29/17
to or-tools-discuss
Hi,

You can also find the constraint solver reference page, in more readable form, at

Reply all
Reply to author
Forward
0 new messages