Avoid edge-node overlapping in cytoscape.js - cytoscape.js

Created graph using cytoscape.js. I have set the layout to 'grid'. Need to resolve following problem: original graph-
There is edge from Host3 to Host1 as well as from Host5 to host1,Edge from Host 5 to Host 1 overlapping the edge from Host3 to Host1.
Overlapping edge should appear like:
How to do it?
Thanks !

That's a research problem in graph theory. You can
(1) use a different layout or parameters, or
(2) develop a layout with less overlap for your specific usecase, or
(3) invent and/or implement novel edge overlap avoidance algorithms.

Related

Undesired very fine at local mesh when using detect_features

Dear users and developers,
Is there a way to avoid the mesh from becoming extremely fine at certain locations (see attached Fig. 1) when using "CGAL::make_mesh_3" to mesh an object for which "detect_features" is used to automatically detect edges?
I have tried by varying the protection angles but given that the angle of the edge to be detected varies significantly there are always locations with the issue mentioned. With another mesher I managed to keep this from happening by setting a lower bound on the size of the triangles and tetrahedra conforming the mesh, but in CGAL from what I can tell I can only specify upper bounds.
Regards,
Tim
Fig. 1: Undesired mesh refinement

How to sculpt with odd linear artefacts

I am currently learning how to sculpt in Blender; working on my own projects after completing BlenderGuru's Beginner & Intermediate classes, and some of Grant Abbitts videos with pleasing results. I am trying to sculpt a plasmapistol with a skull on it, which can be seen in the reference photo that I have provided.
However, when I sculpt, I get these really odd linear artefacts (See picture below, circled in black). I added a Subsurf Modifier to the primitive UV Sphere, with the Viewport and Render Values set to 4, so it is a fairly fine mesh. However, these still artefacts occur.
I assume it is due to the stretching of the polygons when I grab the sphere with the Snake Hook tool and deform it to encompass the frontal part of the skull.
EDIT: Whilst writing this comment I went back, and switched on Dynamic Topology with Relative Detail selected.
It appears that I am no longer getting the issues that I was getting last night with the linear artefacts.
Can I confirm that these problems are a result of having the incorrect Dynamic Topology settings for using the Snake Hook Tool; I was using Constant Detail instead of Relative Detail, or is this being caused by another issue?
Also, any advice on avoiding common pitfalls when choosing the settings in sculpting would be most appreciated.
I will continue to ask this question incase anyone has a similar problem and it can be resolved by reading this.
Sculpt, showing lineations
Experimenting with Dynamic Topology
In Object Mode, does the object have uniform X, Y, & Z scaling? If not, you can apply the scale from the object menu.
Object ‣ Apply ‣ Scale / Rotation & Scale

How to define routes for a large grid network in sumo?

When using SUMO to create a grid network, it seems we have to define route for different types of vehicles. But for a large grid network such as 10*10, it would be impossible to manually input the routes for different flow, especially when considering turning at intersections.
My goal is to have a large network, let flow run throught it with certain turning probabilities at intersections. Then I wish I could use traCI to control the signal lights.
There are a few ways as to how you could manage multiple routes:
Define trip and/or flow with to edge and from edge attributes. The DUAROUTER application will find the shortest route possible or the best route possible (if edge-weights are provided)
The above (point 1) can also be achieved if fromTaz/toTaz (Traffic Assignment Zones) are assigned
NOTE - For both point 1 and 2, the via attribute can force the vehicles to travel through a given edge or a given set of edges.
Another way to generate multiple routes is to generate the 10*10 network and to note down (in the program) all the connections (this is done so that SUMO does not throw any no connection errors). A simple program can be written in conjunction with TraCI, that turns the vehicle from a given edge to a different edge on any junction. Given that this will be time consuming, but if your focus is not on the overall simulation time, this approach will be the most apt for you.
Another way is to add rerouter devices on all edges leading to a junction. You can define new destinations and routes here. This will be the easiest solution for a large network.

M-ary simulation in labview

I am totally new to LabVIEW .I am having the block diagram of M-ary communication system:
How can I create the same project by myself?
Where can i find these components?.A step by step approach is welcomed.
I am getting an error in the above simulation
You have two or more cluster data types wired together, but the clusters have different kinds or numbers of elements.
Cluster FSK system parameters, a cluster of 3 elements,
conflicts with cluster ASK system parameters, a cluster of 2 elements.
please help
In your example the broken wire (black dashed wire with the red cross) is caused by connecting two different (incompatible) data types. The vi to the left is passing out the datatype and the two to the right expect .
I think what has happened here is the RF tookit allows you to use both FSK and ASK as modulation types and the wrong one has been selected. The left vi has a polymorphic selector under the icon which can be used to select different operations. If you can change this from FSK(M) to ASK(M) then this should remove the broken wire.
There is an example on the NI website that my be of use to you. This includes steps to create a working vi: RF Simulation Demo: Amplitude Shift Keying

Optimize pattern of rotating holes for all combinations

Sort of a programming question, sort of a general logic question. Imagine a circular base with a pattern of circles:
And another circle, mounted above and able to rotate, with holes that expose the colored circles below:
There must be an optimal pattern of either the colored circles or the openings (or both) that will allow for all N possible combinations of colors... but I have no idea how to attack the problem! At this point, combinations of 2 seem probably the easiest and would be fine as a starting point (red/blue, red/green, red/white, etc).
I would imagine there will need to be gaps in the colors, unlike the example above. Any suggestions welcome!
Edit: clarified the question (hopefully!) thanks to feedback from Robert Harvey
For two holes, you could look for a perfect matching in a bipartite graph, each permutation described by two nodes, one in each partition. Nodes would be connected if they share one element, i.e. the (blue,red) node from the first partition connected to the (red,green) node of the second. The circles arranged in the same distance would allow for both of these patterns. A perfect matching in that graph would correspond to chains or cycles of permutations where two of them always share a single color. A bit like dominoes. If you had a set of cycles of the same length, you could interleave them to form the pattern on the lower disk. I'm not sure how easy it will be to obtain these same length cycles, though, and I also don't know how to generalize this to more than two elements in each permutation.