Control Order of Nodes When Using "Re-Layout Page" in Visio 2010 - visio

Sorry, this probably isn't the most ideal venue for asking this question, but I couldn't find a better SE site.
When I use "Re-Layout Page", the nodes at the same level (hierarchically) are scrambled, and I can find no way to control them.
Fixing them all once via renaming the nodes didn't work. The order they're created in and the z-index of the object don't seem to matter either.
Any suggestions?

It's tedious, but you have to select each connector one at a time (note: not each shape), in the order you want and "bring it to front." My drawing is a top-down tree, and I started from the (what I wanted to be) the leftmost leaf, worked up to the root (top) and then down the other side, staying connected the whole way. After setting the order this way, deselct everything and do the re-layout.
In general, any shape you want to move to the right, select its connector and "bring to front." But unless you do them all systematically, it will be hard to set an overall order this way.
I also tried to speed up the process by multi-selecting the connectors in the desired order, and then doing just a single "bring to front." However, I couldn't figure out what orderings this was producing. And there's the danger that you miss when control-clicking on a connector and you figure you should start over because the "order" isn't being set any more.
Hope it helps.

Related

Use of collections to describe pedestrians location at PedSource

Benjamin, thanks for your reply. I really appreciate your answer because you know how desperate one gets when one has no idea what to try.
I did it using the suggestion to select the nodes and right-click, create collection. I must be forgetting something because it didn't work for me.
COLLECTION DEFINITION
Let's see if I'm understanding, in the Anylogic example, they use it to create pedestrians on the train platform, at the 32 doors.
I want to use that tool to avoid having to make a programming line for each room (cr) to evacuate pedestrians to a safe point.
I include the screenshot of the PedSource. I'm looking at what the light bulb has... so I should start with self or ped. But, the Anylogic model has no self and no ped. Any additional ideas?
New PedSource
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
I have been studying several of Anylogic's examples. In this case, the "Subway Platform".
SUBWAY PLATFORM LOGIC
Anylogic uses a collection of doors to simulate the train doors where pedestrians will appear, using target lines. In the PedSource, they describe it as Target Line: doors1.get(index)
SP PEDSOURCE
I want to achieve the same thing using nodes. My collection is called cr_Ele and I have written in the Ped Source > Node: cr_Ele.get(index).
My COLLECTION OF NODES
MY PEDSOURCE
Running it gives me the following error, "index cannot be resolved to a variable". Does anyone have any idea what might be causing the error?
This is my first question on this platform, I hope I did it right!
great question, well done :)
The problem is that your collection is defined as a group of Object elements, see your "Element class" entry. Compare to what AnyLogic did: Their element class is set to "Other" specifying the actual type:
You can do the same thing. Easiest is to select several of your nodes, right-click, select "Create collection". This will give you this collection:
Alternatively, you can use code-complete and learn the object types from the API.
Now, you can access individual PolygonalNode elements from your collection using `myCollection.get(0)ยด (or any other index)

Netlogo; Hiker-modell

I'm currently working on a Hiker model in Netlogo.
The hikers walk in a row and the first hiker is the slowest. Overtaking is not allowed. Is there a possibility to build in a function, with which the hikers, after reaching their foreman, take this new speed and stay behind him?
Sounds a like lot the Traffic models from NetLogo's Models Library. I'd suggest you take a look at Traffic Basic and Traffic 2 Lanes and try to adapt one of them to your problem.
The code from Traffic 2 Lanes is a bit more sophisticated, but might also be a more robust base to build on. (And it can be made to work for only one lane, thus preventing overtaking, by setting number-of-lanes to 1 in the code tab.)

removing all geometry from SceneKit, or modifying it on the fly

I have a simple SceneKit view that displays antenna designs, like a TV antenna, or this less common example, a biquad.
These designs consist of a number of SKCylinders that are rotated and positioned.
Connected with that view is a NSTableView that lists the endpoints of the cylinders and lets the user edit them. When they exit an editor, the 3D view updates.
The problem is that my code current always adds new SKCylinders to the view with every redraw. So as they make edits, multiple copies of the SKCylinders end up in the view. I'm looking at the docs trying to figure out the best way to fix this.
1) should I simply remove all the geometry nodes before every draw and then make it fresh? Is there an easy way to find all the nodes that are geometry, rather than cameras or lights (or whatever)?
2) is there some way I can identify nodes within the collection so I could say that since line 5 of the geometry changed, I need to adjust node-with-something=5? I though about using name but I don't see a way to find a node by name
3) (2) is not a complete solution because I allow inserts and deletes in the list, so it might be "everything after this changes". Does that bring me to (1) or is there a better solution here?
Thanks for any advice!
I haven't used SceneKit yet but, from the documentation, it would seem that you can find nodes by name by calling:
SCNScene.rootNode.childNodeWithName( name, recursively: true)
or just iterate through childNodes recursively yourself.
Depending on the complexity of the nodes hierarchy, it may be tricky to implement insertions and deletions but, once you found the nodes you're looking for, that's just plumbing (prune and graft tree manipulations and such).

OrientDB Lightweight Edges with Ridbags?

Recently I've come across a use case where it made a lot of sense to use lightweight edges. It made for much faster queries when checking whether two vertices are related as part of the select conditional.
That said, because I operate in a highly concurrent environment, I've run into some conflicts (OConcurrentModificationException). I got past this by setting the conflict strategy to auto-merge for that particular class.
In investigating further, I came across this article on concurrency when adding edges: http://orientdb.com/docs/2.1/Concurrency.html#concurrency-when-adding-edges
It recommends using RID Bags for situations where edges change very frequently, and has the neat advantage of not incrementing the version each time an edge is added/removed. Sounds great, but I can't get it to work.
I've tried adding the -DridBag.embeddedToSbtreeBonsaiThreshold=-1 to my client, with no effect. I then went into my code and added:
OGlobalConfiguration.RID_BAG_EMBEDDED_TO_SBTREEBONSAI_THRESHOLD.setValue(-1);
I finally also tried adding the -DridBag.embeddedToSbtreeBonsaiThreshold=-1 to my orientdb server (in server.sh).Still no effect. Each time the edges get updated, the version gets incremented (which is how I assume I can tell that its not working properly).
Does anybody have thoughts about how lightweight edges might work with ridbags (or not work for that matter)?
Thanks!

Are Operational Transformation Frameworks only meant for text?

Looking at all the examples of Operational Transformation Frameworks out there, they all seem to resolve around the transformation of changes to plain text documents. How would an OT framework be used for more complex objects?
I'm wanting to dev a real-time sticky notes style app, where people can co-create sticky notes, change their positon and text value. Would I be right in assuming that the position values wouldn't be transformed? (I mean, how would they, you can't merge them right?). However, I would want to use an OT framework to resolve conflicts with the posit-its value, correct?
I do not see any problem to use Operational Transformation to work with Complex Objects, what you need is to define what operations your OT system support and how concurrency is solved for them
For instance, if you receive two Sticky notes "coordinates move operation" from two different users from same 'client state', you need to make both states to converge, probably cancelling out second operation.
This is exactly the same behaviour with text when two users generate two updates to delete a text range that overlaps completely, (or maybe partially), the second update processed must be transformed against the previous and the resultant operation will only effectively delete a portion of the original one, (or completely cancelled with a 'no-op')
You can take a look on this nice explanation about how Google Wave Operational Transformation works and guess from this point how it should work your own implementation
See the following paper for an approach to using OT with trees if you want to go down that route:
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.100.74
However, in your particular case, I would use a separate plain text OT document for each stickynote and use an existing library, eg: etherPad, to do the heavy lifting. The positions of the notes could then be broadcast on a last-committer-wins basis.
Operation Transformation is a general technique, it works for any data type. The point is you need to define your transformation functions. Also, there are some atomic attributes that you cannot merge automatically like (position and background color) those will be mostly "last-update wins" or the user solves them manually when there is a conflict.
there are some nice libs and frameworks that provide OT for complex data already out there:
ShareJS : library for Node which provides all operations on JSON objects
DerbyJS: framework for NodeJS, it uses ShareJS for OT stuff.
Open Coweb framework : Dojo foundation project for cooperative web applications using OT