Precise process event timeline diagrams (e.g. in Excel) - excel

I need to prepare such diagrams:
I think it's quite intuitive how to read this diagram and this is why I want to create a few of them for my project.
I am quite confused how to create them efficiently; I've painted the one above in Paint just to quickly visualize my idea and it took too long imo. Moreover the time axis is not accurate.
I have precise data with event times (eg. loading start in process 1, loading end in process 1, algorithm start in process 2 etc.) e.g.
Process 1:
00.0 - 40.0 - Loading
40.0 - 45.0 - Preparing and launching process 2
45.0 - 50.0 - Preparing and launching process 3
50.0 - 90.0 - Sleep
90.0 - 95.0 - Joining process 2
...
Process 2:
45.0 - 90.0 - Algorithm execution
...
How to generate such timeline diagrams?
I am using MS Windows 7 and have Office 2010 installed, but am willing to use anything that gets the job done..

Efficiently? Can't be done. But once you get it setup, it's not too bad. They key is laying out your data appropriately. And it won't be just your data. Every red bar is a piece of data, obviously. But the blank spaces aren't really blank, they're invisible bars against a white background.
The base chart will be a stacked bar chart. Process 1 might have data that looks like
39 1 5 1 5 40 2 135 10 1 10
And those would alternate red and white. What will probably be better is to get rid of the "1" data points and use white gridlines that cross through the data (or error bars or something like that).
See http://dailydoseofexcel.com/archives/2012/02/10/income-statement-waterfall-chart/ for an example of a waterfall chart. It's not identical to your situation, but it uses a lot of the same techniques.
Also, Peltiertech has some waterfall tutorials, like http://peltiertech.com/WordPress/excel-waterfall-charts-bridge-charts/

Basically, use a stacked bar chart:
To explain all the steps in detail would be a nightmare but in outline, the data is roughly as shown A1:H4. Format the data series white where required to blend into the background. Add data labels and change their text as required ('merge 1' etc).
I cheated and drew lines (eg within 'Loading') and formatted them white but extra 'connectors' of 1 ms should serve (and would then scale, unlike the drawn lines). Adjust the separation and height of the bars with Series Options.
Edit:
The column labels more-or-less match up with #Jon Peltier but are not important here. They can be taken as merely increments in order. Based on the more specific values provided by comment:

Related

Object tracking for velocity measurement

I am looking for a real time image processing to measure the velocity and output it to another control system.
I have attached an image of a yellow stripe. This has markings on the surface that I would like to automatically detect and use for calculation. In the first step the material moves only in one direction. Here for example to the right. For me only the horizontal part of the movement is of interest, so quasi only the velocity along an x-axis. But the material moves relatively fast. At maximum speed in 28 ms the current mark (spike) is at the position of the one in front of it.
The idea is to use a Raspberry Pi 4 with a camera at the maximum of 120 fps. So every 8.3 ms a picture is generated and should make it possible to clearly detect the movement of the marks.
My questions are:
Is it possible to process the images and detaction that fast to get the velocity in nearly real time? And which algorithem should I use for this configuration? Because it would be best if I could use two or three markers per image and average the velocity of them.
And I would like to use the velocity as an input signal for another system. What is the easiest and fastest way to send the information directly to another control system?

How to combine the results of multiple OCR tools to get better text recognition

Imagine, you have different OCR tools to read text from images but none of them gives you a 100% accurate output. Combined however, the result could come very close to the ground truth - What would be the best technique to "fuse" the text together to get good results?
Example:
Actual text
§ 5.1: The contractor is obliged to announce the delay by 01.01.2019 at the latest. The identification-number to be used is OZ-771LS.
OCR tool 1
5 5.1 The contractor is obliged to announce the delay by O1.O1.2019 at the latest. The identification-number to be used is OZ77lLS.
OCR tool 2
§5.1: The contract or is obliged to announce theedelay by 01.O1. 2O19 at the latest. The identification number to be used is O7-771LS
OCR tool 3
§ 5.1: The contractor is oblige to do announced he delay by 01.01.2019 at the latest. T he identification-number ti be used is OZ-771LS.
What could be a promising algorithm to fuse OCR 1, 2 and 3 to get the actual text?
My first idea was creating a "tumbling window" of an arbitrary length, compare the words in the window and take the words 2 out of 3 tools predict for every position.
For example with window size 3:
[5 5.1 The]
[§5.1: The contract]
[§ 5.1: The]
As you see, the algorithm doesn't work as all three tools have different candidates for position one (5, §5.1: and §).
Of course it would be possible to add some tricks like Levenshtein distance to allow some deviations but I fear this will not really be robust enough.

Userforms resize snaps to arbitrary grid size

I'm trying to design a Userform in Excel 2010, and I'm coming across a very annoying stumbling block where as I'm trying to move things around, resize them and align them so the form looks appealing.
Unfortunately, different mechanisms are snapping to differently sized grids. For example, drawing a box onto the grid snaps it to multiples of 6, which is the default option found in the Tools> Options> General> Grid units. Resizing these objects snaps it to a seemingly arbitrary grid size that seems to be approximately 7.2 units.
I need these units to match up so I'm not constantly fighting myself getting these grids to function. I don't care what the actual number ends up being, I just need them to be the same. While I'm able to change the grid size, it must be a whole number, which the arbitrary grid is not.
Problem us your units Points <-> Pixels
6 Points * 4/3 points per pixel =>> 8 Pixels .. all good
A nice integer of pixels
Your approx 7.2 I suspect was 7.3333333
Maybe say 11 Points Set gets changed as
* 4/3 => 14.6666 pix Rounded to 15 pix
by 3/4 Pts/pix +> 11.33333
Points as single .. Pixels as integer may be the problem in the math

AI search - build a rectangle from 12 tetris shapes how many states are possible?

You have 12 shapes:
which you can make each out of five identical squares.
You need to combine the 12 pieces to one rectangle.
You can form four different rectangles:
2339 solutions (6x10), 2 solutions (3x20), 368 solutions (4x15), 1010 solutions (5x12).
I need to build the 3X20 rectangle:
My question what is the maximum number of states (i.e., the branching factor) that is possible?
My half way calculation:
The way I see it, there are 4 operations on each shape: turn 90/180/270 degrees and mirroring (turning it upside down).
Then, you have to put the shape on the board, somewhere on the 3X20 board.
Illegal states will be one that the shape doesn't fit in the board, but they are still states.
For the first move, you can chose each shape in 4 ways which is 4X12 ways, and then you need to multiply in the number of positions the shape can be in, and that is the number of states you have. But how can I calculate the number of positions?
Please help me with this calculation it is very important, it is not some kind of homework which I'm trying to avoid.
I think there is no easy & 'intelligent' way to list solutions (or states) to pentomino puzzles. You have to try all possibilities. Recursive programming or backtracking is the way to do it. You should check this solution that also has java source code available. Hopefully that points you to the right direction.
There is also a python solution that is perhaps more readable.

Bipartite Graph (undirected)

I am taking an input, e.g.
4
1 3
1 2
2 4
First line is number of nodes, lines after that are the edges. I have to attempt to color the graph, and if I can't, I need to list a cycle in the graph that is causing the error.
This is fine so far, except one of the graphs contains 1,000,000 nodes. Everytime I try to use it I get a Stack Overflow error, even though I streamlined it more, and raised the max heap size of eclipse to 1024m.
I'm not asking for code, just asking if I am doing something blatantly wrong to keep getting errors.
Maybe you could optimize your cycle detection algorithm.
This might help you: http://en.wikipedia.org/wiki/Cycle_detection
Other than that, a million nodes plus adjacency matrix might as well be too much to handle at once, so perhaps there's a way to just load parts of the graph at a time.
If it's a bipartite graph you can always colour it with only two colours (e.g. colour the first partition white, and the second partition black).
Usually when one thinks of colouring a graph he should specify the number of colours. You can always colour a graph by assigning to each node a different colour. Another example: for planar graphs only four colour are required. However, for most graphs the [chromatic number] of a graph is [NP].
[NP] http://en.wikipedia.org/wiki/Karp%27s_21_NP-complete_problems
[chromatic number] http://en.wikipedia.org/wiki/Graph_coloring
Well, this IS an NP complete problem (longest cycle), so this sort of thing IS likely to happen.
I'd probably just bump the heap again, and let it run...
EDIT: Never mind. got my reduction backwards.

Resources