--
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-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/65283ddd-c761-4135-81fc-9fc02f9d8689%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "or-tools-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/or-tools-discuss/GgZq5ec9tzA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to or-tools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/CAPyyUTukaeX9RG9Vbqogc-2JBGzNDmp4LV1nmmHP1vY9U%2BsQ%2BQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/CACpmokEdni%3D6OUxod4H35-rHzh_4cz6-gXF6PcOUNM-eFapkFQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/CANuGQjzKcWeuusaQzfquOsOh2ufNjM0TfFMt8iHA-rSejc-M8Q%40mail.gmail.com.
--
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-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/232be97c-8bd6-427c-bd51-3f27aacc849b%40googlegroups.com.
ind can also be a Intvar
On Sun, 1 Dec 2019 at 21:10, Jess TKD <jss...@gmail.com> wrote:
Tell me if I'm wrong : AddElement takes an array values, an index ind that is an Int and an IntVar target, and constrains so that values[ind] == target right?
But in that case ind is "just" an Int, so it cannot do what I want...
Le dim. 1 déc. 2019 à 18:39, Laurent Perron <lauren...@gmail.com> a écrit :
Add element takes an array of variables
Le dim. 1 déc. 2019 à 18:08, Jess TKD <jss...@gmail.com> a écrit :
Unfortunately it doesn't, AddElement is about giving to an IntVar the value of a given data in a table, using an index that is an Int. I'm looking to find a value using an IntVar--
Le dimanche 1 décembre 2019 17:03:13 UTC+1, Xiang Chen a écrit :Does AddElement achieve what you want?https://github.com/google/or-tools/blob/master/ortools/sat/doc/reference.md#addelement
On Sunday, 1 December 2019 15:54:52 UTC+1, Jess TKD wrote:Hi everyone!I have stumbled across an issue that I have not been able to solve. I am using the CP-SAT Solver for Python, and trying to access data stored in a Python array. However, the index of the data I am trying to get depends on an IntVar variable.The C++ version of the solver seem to have the right function (MakeElement), as well as the routing solver (with var.IndexOf(array) ).MakeElement :IndexOf(array) :So if I am not mistaken, both take a list values and and IntVar index as argument, and return values[index].Is there any way to get the same with the CP Sat solver? I have looked at every function but none of these seem to do the right job.If you want more information about the problem or the Data Structure I can give more detail.Thank you for reading, and for your answers!
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/65283ddd-c761-4135-81fc-9fc02f9d8689%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "or-tools-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/or-tools-discuss/GgZq5ec9tzA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to or-tools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/CAPyyUTukaeX9RG9Vbqogc-2JBGzNDmp4LV1nmmHP1vY9U%2BsQ%2BQ%40mail.gmail.com.
--
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...@googlegroups.com.