Is it expected to affect the result by assigning different value to solver.parameters.random_seed? #2474
Replies: 3 comments 3 replies
-
|
In case of models without objective, OPTIMAL means a solution was found. The random seed has some impact on the search. But in your case, it is likely that the hint overrides any randomization. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
You can try hinting different random values.
Laurent Perron | Operations Research | ***@***.*** | (33) 1 42 68 53
00
Le lun. 5 avr. 2021 à 21:55, maverick_xinwei ***@***.***> a
écrit :
… Thanks for the reply.
The hints were actually commented out.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2474 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUPL3IV2GFQ5TBYFR5PCELTHIIRLANCNFSM42NI6XTQ>
.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
|
1) in sequential mode, yes with the same seed.
2) it affects tie breaking of variables. It does not have a huge effect on
the branching schema of the search tree.
Laurent Perron | Operations Research | ***@***.*** | (33) 1 42 68 53
00
Le mar. 6 avr. 2021 à 11:02, maverick_xinwei ***@***.***> a
écrit :
… Is it guaranteed that cp-sat will always produce the same results with
same hint values ?
In what case does parameters.random_seed affect the randomization ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2474 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUPL3JISQY64ZJBC3ZVSALTHLEZJANCNFSM42NI6XTQ>
.
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
maverick-xinwei
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I did the experiment below but got the same results from running the script multiple times. Is there something else I should modify to make the solver produce different results when different seeds are given ?
Another thing is , I always get OPTIMAL as the solver's status at the end of the code . I thought the model I specified here is not really a optimization problem, i.e. there's no definition of which solution is more optimized than another. So, what does OPTIMAL really mean in this case ? Or, is it so that it always return OPTIMAL when running a non-optimization problem because it thought every solution is equally optimized ?
Many thanks !
Beta Was this translation helpful? Give feedback.
All reactions