Adding logs to a WellSectionWindow - ocean

How would one add logs to a well-section window programatically? For the following well-logs within my Petrel input tree and using the code below only "Sonic" log is displayed on the WellSectionWindow
Well
->WellLogs
- Density
- Sonic
- Gamma ray
Borehole borehole = arguments.object as Borehole;
WellSectionWindow wsw = WellSectionWindow.CreateWindow();
wsw.ShowObject(borehole);
Within Petrel(2013.1), I can navigate to the Log element->(right-click)->"Add to template"->"Vertical"->"In new track". I would like to know if something similar could be achieved using Ocean APIs and guide me towards relevant documentation. Also, I'd like to know why "Sonic" log was displayed within the WellSectionWindow in Petrel and how did it get prioritized over Density or Gamma ray log.

The WellLogVersion of a WellLog corresponds to the global well log in the input tree.
If you want to display the log, you can call wsw.ShowObject(wellLogVersion) and it will be displayed.
If you want to control the order of the logs being displayed, you'll need to deal with the format template nodes of the well section templates. The details can be found in the Ocean dev guide, Volume 9, Chapter 3.

Related

cytoscape show traffic between nodes along an animated path

I need to show things moving between nodes along their connection paths similar to this project. I haven't been able to find any examples of it in cytoscape, but I have used cytoscape in the past and prefer to keep using it for this as well. I would appreciate recommendations on how to approach this problem.
You've got a few options...
The easiest is the Marquee visual style. It produces a "marching ants" illusion in the direction of directed edges. Simply to the Styles tab in the Control Panel and select the "Marquee" style. In the EDGE tab, you can choose from 3 different Marquee Line Types. You could imagine mapping these 3 line types to 3 categories (or bins) of traffic density, for example. Or you could use color, thickness and/or transparency in combination with a marquee style to represent traffic density. You can see an example here:
https://youtu.be/MF0zsxEPoPc?t=44
There's also an app for animation! This takes the approach of interpolating any visual style (including position and existence) between any set of key frames you provide. So, for example, you would have a start and finish frame and then CyAnimator would make a movie file for you:
http://apps.cytoscape.org/apps/cyanimator
And yet another completely different approach: with the scripting capabilities of Cytoscape, you can pretty much do whatever you want. The Unit tests for the RCy3 package, for example, ends up being an almost psychedelic display of data vis potential (and the unit tests aren't even at full coverage, shame). So you could direct your own animations in real time with a bit of scripting in R or Python. Here's the RCy3 unit test demo and links to the scripting libs:
https://www.youtube.com/watch?v=IXqbdlUnzUE&t=1s (caution: flashing graphics)
https://bioconductor.org/packages/release/bioc/html/RCy3.html
https://py2cytoscape.readthedocs.io/en/latest/
I'm using cytoscape.js with meteor.js. My elements, stylesheet and vehicles (shown as red dots) are stored in mongo, and can be updated via an external process or edited on-screen. The graph can be restructured or reshaped on the fly, and the vehicles will discover the new least-cost route to reach their target. Moves are queued with eles.animate() Routing is handled by eles.floydWarshall().path(). This might be similar to what you had in mind.

Optaplanner; Why the Memory use tag in the html page does not work?

Using the benchmark statistics I obtain the memory use tag in the html page but it does not give me any related graph, the part of my benchmark xml file is:
<problemBenchmarks>
<xStreamAnnotatedClass>org.optaplanner.examples.myproblem.domain.MySchedule</xStreamAnnotatedClass>
<inputSolutionFile>data/myproblem/unsolved/[26]Day(16.01.15-10.02.15).xml</inputSolutionFile>
<inputSolutionFile>data/myproblem/unsolved/[25]Day(16.01.15-9.02.15).xml</inputSolutionFile>
<inputSolutionFile>data/myproblem/unsolved/[20]Day(16.01.15-4.02.15).xml</inputSolutionFile>
<inputSolutionFile>data/myproblem/unsolved/[15]Day(16-30.01.15).xml</inputSolutionFile>
<inputSolutionFile>data/myproblem/unsolved/[10]Day(16-25.01.15).xml</inputSolutionFile>
<inputSolutionFile>data/myproblem/unsolved/[5]Day(16-20.01.15).xml</inputSolutionFile>
<inputSolutionFile>data/myproblem/unsolved/[2]Day(16,17.01.15).xml</inputSolutionFile>
<inputSolutionFile>data/myproblem/unsolved/[1]Day(16.01.15).xml</inputSolutionFile>
<problemStatisticType>BEST_SCORE</problemStatisticType>
<problemStatisticType>STEP_SCORE</problemStatisticType>
<problemStatisticType>CALCULATE_COUNT_PER_SECOND</problemStatisticType>
<problemStatisticType>BEST_SOLUTION_MUTATION</problemStatisticType>
<problemStatisticType>MOVE_COUNT_PER_STEP</problemStatisticType>
<problemStatisticType>MEMORY_USE</problemStatisticType>
<singleStatisticType>CONSTRAINT_MATCH_TOTAL_BEST_SCORE</singleStatisticType>
<singleStatisticType>CONSTRAINT_MATCH_TOTAL_STEP_SCORE</singleStatisticType>
<singleStatisticType>PICKED_MOVE_TYPE_BEST_SCORE_DIFF</singleStatisticType>
<singleStatisticType>PICKED_MOVE_TYPE_STEP_SCORE_DIFF</singleStatisticType>
</problemBenchmarks>
Where is my wrong action?
A screen shot for the Memory_Use:
A Screen shot for the Best_Score, note that when I clicked the memory use tab no change from using the best score tab:
The behaviour looks similar as described in this jira: a bug in the generated anchor id's. But I can't reproduce it in 6.4.0.SNAPSHOT, so I suspect it was fixed a long time ago (that jira can't have fixed it).
You should upgrade from 6.2 to at least 6.3.

Event Goal Conversion

I wonder if someone can help me with getting my PDF download event to show up as a conversion? I have read other posts on here and also asked on the Google forum but so far I haven't managed to get it going. Please note, I am using the new, universal tracking code.
What I have done so far:
Set up in Google Tag Manager event tracking - this works perfectly and is recording in GA.
I have added the code to the PDF link that I am trying to track anchor text
Set up Goal in GA with event type set to Event with the fields set to 'equal to', except for value which is marked 'greater than'. Category - PDF, Action - Download, Label - Brochure, Value - 250.
What am I doing wrong? Nothing comes up when I verify this goal and nothing comes up in real time conversion tracking.
Thanks in advance.
Jack
You might have an error with your Google Analytics event configuration. Try this:
Remove the goal Value in the Goal Details (Event Conditions)
Change to NO "Use the Event value as the Goal value for the
conversion"
Set the value yourself (e.g. 5$)
Make your to remove the value from the GA javascript or Tag in GTM

What is the function to run simulation in MEL?

I would like to create a MEL script that creates a scene, setting up ncloth and passive collider objects and run the simulation up to a certain frame.
In the script editor, I can see the scene set-up but there is no function starting the simulation.
The technique that #Andreas suggests is sometimes called "command harvesting". It is a great way to learn what and how Maya is doing things. But to answer your specific question:
You can use cmds.play() to start playing back on Maya. See the docs for options.
You might want to set the start frame and end frame of the playback range using the cmds.playbackOptions() command. See the docs for options.
So you would do: (relevant explanatory comments added)
# egs. to play from frame 1 to 120
# also note that the playbackSpeed flag is used
# we need to set this to 0 to "play every frame".
# setting maxPlaybackSpeed to 0 will result in free playback, so the playback isn't clamped.
# At this point, playback wouldn't be realtime, but it will be accurate.
# Dynamics and simulations must be played back like this or the nucleus will not evaluate properly.
cmds.playbackOptions(animationStartTime=1, animationEndTime=120, playbackSpeed=0, maxPlaybackSpeed=0)
# now start playback
cmds.play(forward=True)
EDIT: I just noticed that you had asked for MEL commands. Just take the above commands and MEL-ify them, like so:
playbackOptions -e animationStartTime 1 animationEndTime 120 playbackSpeed 0;
play -f 1;
Suggestion: It is best to playblast this playback to watch it in proper fps and playback speed.
Hope that was useful.
In the Script Editor you can tell Maya to "Echo all commands". If you enable that, then do something in the UI, it will output all the MEL commands in the Script Editor.
I'd try using bakeSimulation to convert the sim to ordinary vertex animations. You can then advance time to the desired time and export your OBJ that way.
This will disable the simulation once executed - it's good for getting the results but not editing them.

Changing interactive mode Edge Shape in JUNG

I am aware of the ability using an EdgeShapeTransformer to change the look of edges:
vv.getRenderContext().setEdgeShapeTransformer(new EdgeShape.Line()); // for example
However I am looking for how to change the way the line looks while dragging from one node to another to create an edge interactively. By default the 'hovering' edge which is not yet linked to another node is a large curved line. See the example here for what I mean.
CubicCurveEdgeEffects is where it is done. There is an EdgeEffects interface that can be implemented to do other things instead. It is used by the SimpleEdgeSupport class via the EditingGraphMousePlugin.
(Credit to Tom Nelson, offline communication.)