Is there any method of propagation in constraint programming- GoogleORTools like CPLEX-CP solver? - cp

I want to only propagate connection in Constraint Programming-Google OR Tools and not looking for final solution from Constraint programming but I am unable to find such method in Google OR Tools. Please guide me. Thanks

Also asked and answered here: https://groups.google.com/forum/#!topic/or-tools-discuss/BIFYQGH3XZo
There is a somewhat weaker version.
See: https://github.com/google/or-tools/blob/858fa626959f7e386153af82756384b79f983b5a/ortools/sat/cp_model.proto#L575
Set the right parameters, and collect reduced bounds from the response proto.

Related

Is the path loss formula correct?

I have been doing some tests with the path loss formula and it gives me some pretty good results so far. However, I looked at the original code and saw that the formula used is
distance = Math.pow(10.0, ((-adjustedRssi+txPower)/10*0.35))
where adjustedRssi is RSSI - adjustment. This was giving me very small values for distance so I thought that I must have modified it at some point by accident. After doing the maths and playing around a bit I found that using txPower-adjustment instead of txPower-adjustedRSSI gives me correct distances.
I figured that the error must have been my fault but looking back at an original copy of the library I am seeing that the formula was actually this way all along.
Is this a mistake or am I missing something obvious? Using the formla as is right now gives me wrong results while modifying it the way I did gives right results.
Also, why is the formula only used if the ratio<1. Shouldn't it work in either case?
Yes, you are absolutely right! Reviewing this now, I can see that this was a simple coding error I made when I originally wrote this. I paused work on the path loss formula because I was getting poor results, probably because of this error.
Since this is a development branch of an open source library hosted on Github, it is probably most appropriate to discuss this in that forum. Please feel free to comment directly on the pull request thread here: https://github.com/AltBeacon/android-beacon-library/pull/251. As the lead developer on that project, I would also welcome a pull request with the changes you are making.

F# Priority Queue

I have tried to use this snippet of code
https://code.msdn.microsoft.com/windowsdesktop/Net-Implementation-of-a-d3ac7b9d
to implement a heap-based implementation of Prim's algorithm to solve the Minimum Spanning Tree (MST) problem in a non-directed connected graph.
after a few iterations, i find that the heap/priority queue is not well maintained anymore.
that is the head of the PriorityQueue doesn't have the lowest Key in the Heap.
PQ 0 [-7230, 309]
...
PQ 146 [-7277, 308]
Has anyone use this code and experienced similar problems ?
I can post a link on GitHub if anyone would be looking at it
My needs are for a heap datastructure which supports deletion of an element in the middle. It looks like Fsharpx.collections doesnt have such a data structure.
does anybody know a good implementation available somewhere ?
thanks
Recently, I ported a MaxHeap from PLINQ to F# here and made it MinHeap. It is array-based and performs much better than any "pure functional" alternative.
However, after a lot of benchmarking, I found that SortedDeque based on just a simple sorted circular buffer performs significantly better on most use cases even when I need to add or delete in the middle.
My answer is inspired by V.B. but here it is in full
I have used another library than FSharpx.collections, it is called
Spreads
read that page for details and instructions.
SortedDeque is the data structure i need for this problem.
I used the same code, just changing from the microsoft blog page code to the library functions and found the good result, so it is indeed some bug in the microsoft blog page code
PS. this spreads library has been designed to format financial data for quantitative analysis and i'm happy i found it !!! IT looks like this library is rather recent and thats why its not on top of Google's search or referenced in any other SO question (or if it is i didn't see it)
FSharpx.Collections is of no use for that problem as you can see from that discussion heap issue in FSharpx.Collections

Google Cloud Vision TEXT_DETECTION only on digits

Is there any way to constrain google cloud vision, especially for type TEXT_DETECTION to only recognize digits? I think it will greatly improve my result.
I cannot find any result or hint on the internet at all. Any help is appreciated.
Currently we are unable to constrain by numbers alone. HAve you tried the updated response stream with granular polyboxes to see if this is still an issue?

Are there issues with building constraints inside willRotateToInterfaceOrientation?

When I get a rotation notice via willRotateToInterfaceOrientation, I remove my current constraints and build new ones right there in the willRotateToInterfaceOrientation routine .
Everything seems to work just fine. But I have a niggling memory that I'd read that this is a bad practice.
Can anyone cite specific issues or concerns?
I guess, since there have been no answers or suggestions, that the answer is no one knows of any issues. So, let's accept that a move on.

How do I use custom fields in Mantis' Roadmap?

I'd like to have an effort estimate for upcoming versions of my software in its Roadmap in Mantis Bug Tracker.
I could figure out easily how to add a custom fields (integer type, called "days to complete") to issues, and how to show it on the "view issues" page. But I couldn't find out how to add something to the roadmap showing the sum of days to complete for non-resolved issues.
Is there a built-in way to do this?
My guess is no, that would take some php coding inside Mantis. But maybe someone did that already?
Edit: I had a look at the Time Tracking feature. It doesn't look like what I want.
The display of the Roadmap is driven by a Custom Function, which you can override in any way you see fit (and yes that means writing some PHP code, but without altering the MantisBT core).
To achieve what you want, you should override custom_function_default_roadmap_print_issue().
Please refer to the MantisBT documentation for further details.

Resources