Queuing up materials based on their configuration - anylogic

this is a follow up question regarding my previous question
"I am trying to figure out how to queue 3 material items which would then enter 3 different stations. Lets say the material items are named as (1,2,3). For the first station, it will accept 1 and then 2 and then 3. For the next station, it will accept 2 and then 3 and then 1. And for the final station, it will accept 3 first, and then 1 and finally 2.
So there will be a starting conveyor in which all three material items would be randomly generated, and the conveyor will branch out into 3 other conveyors containing the stations.
I am quite new to anylogic so any help would be much appreciated"
enter image description here
The following are the images of my main page and the blocks involved. I am not familiar with java coding, and i am still racking my brain trying to figure out how to accomplish it
enter image description here

Related

How to add the values of a binary dimension type column in a bar chart in SAP Analytics Cloud

I'm trying to put together a story and I'm starting to create the first pages with graphics. The graphs are based on tables that are in S4/HANA and have the format as shown in the first image but with more fields, in each line there are weeks (repeated, although they do not appear like that in the photo) and that week will have a condition; "SI" or "no".
When creating a graph I can represent the amount (y-axis) against the condition and the week (x-axis) and it would look like this (2nd photo). In addition to this, I would like to add another bar per week that represents the TOTAL, the sum of condition = "SI" and condition = "NO". Is it possible to do this from SAP Analytics Cloud or do I have to rack my brain changing the lines of the source table adding a total there?
As a clarification, I do not need to add 2 different numerical fields or anything, I would simply like to add the SIand NO of the condition column, if on the y-axis I put volume that represents volume and if I put amount that represents amount, but I am looking for a third bar With the total, I don't know if I explained myself well.
Thank you very much in advance, if you help me solve this I would be very grateful, greetings
https://ibb.co/dcCKKzF
https://ibb.co/kDN3ZXp

How to train a CNN to differentiate between HTML objects(foreground) and the background in a screenshot of a webpage using caffe?

I am working on a problem wherein I am trying to train a neural network to detect various html objects like textbox, radiobutton, button and dropdown list in a given snapshot of a webpage. I am supplying patches generated out of sliding window operation on the 1500 images (Training set) to my CNN for training.The label set is a 5 channel matrix for 5 classes of objects (including the background i.e. labelled as class 0, other object regions are labelled as class 1,2,..4).
I tried applying Con-Decon Architecture on this training data set using Caffe. But the problem that is happening IMHO is that there is a strong bias towards class 0 in the actual output as most of the region in my sliding window training is the background. Hence, it is classifying all the pixels in the actual output as Class 0 that is background and is unable to detect other HTML objects of Class labels 1,2,..4 on the test images that I supply to the network.
Any idea how to work around this problem?
This problem is present in a lot of real world datasets as well.
One way of solving it would be to present your non-background data (classes 1,2,3...) to the neural network more times than you present the background data. This can be done by artificially duplicating the data of which you have fewer samples.
You could also set:
ignore_label: 0
That might help.

Tableau and modified Sankey diagram

I have been trying to recreate a modified Sankey based on Adam's work with the American Whiskey Viz and Beatles Analysis Viz that are found here:
https://public.tableau.com/s/gallery/beatles-analysis
https://public.tableau.com/s/gallery/american-whiskey-wheel
I am trying to create the same effect on my own data set. I am not sure how Adam was able to line up the sankey portion with the bar chart perfectly. I have tried many different ID2 field configurations and varying metric fields in the Curve calculated field options with no success. I haven't been able to get them to line up exactly. I would also like my bases to start in different locations along the sankey and not all originating from the left.
I realize that the examples are working with much smaller data sets but believe that this should still be possible with my data. I have tried Business ID in my curve formula and wondering if I need to have a more generic metric in my model. Andy uses Song ID which is a number between 1 and 45. My IDs range from 3-3000. You can see in the workbook attached how I am setting up these fields to get the curve of the Sankey. Is it possible to get them to line up with the barchart at the top of Dashboard 2?
UPDATE 3/22/16:
I was able to get the lines much closer to their bars by modifying the Curve-LoyaltyID2 field. I loaded it to Public for easier viewing. Some lines are still not aligning directly to their corresponding bars though.
Tableau Public
Thanks for any ideas you have!

Star-Rating Feature in GWT: how to implement partially-filled stars?

How would one implement a star-rating feature like this in GWT? Does a library exist?
Main scenario: display a decimal rating as partially filled stars.
A call to server returns a [0, 5] decimal rating/grade, say 3.4.
UI display 3.4/5 filled stars, something looking like this .
By default, the best approach I can think of would be to create a number of small pre-filled images in a client bundle with a given rating resolution, say 0.5 (~ 10 images) or 0.1 (~ 50) images. And then write the mapping logic to display the appropriate star-filled image.
Is is the most efficient way of going about it?
A perhaps optimized version of this approach would be to have images of one partially filled star and then the display logic would assembled the 5 stars as function of rating -- e.g., for 3.4, 3 fully filled stars, one partially filled star to 0.4 level, one empty star.
Complement scenario: enter an integer rating {0, 1, 2, 3, 4, 5} stars.
Display five void stars.
When user mouse over a star, the star and all stars to the left fill up.
When user click, integer rating is registered.
Using a similar approach as above, two-images would suffice: one with no background, one filled.
Again, is there a widget/library out there wrapping such a common web-app feature?
It does not seem difficult to implement but no need to re-invent the wheel! A good library of such a common web-app feature could have more embedded functions like managing the rating list by rating and their corresponding display, entering review panel, etc, all performance optimized.
Create three star images: complete, empty and half-full.
Create a custom widget. Use FlowPanel as a container with star images inside.
Create method showRating() in this widget:
(a) Clear stars if you already had them.
(b) Add complete star images for each round point.
(c) Add half-empty star image for half-point, if necessary.
(d) Add empty star images if necessary to make 5 stars in total.
It's a fairly simply widget. You don't need a library for that.

produce several maps in same figure window in matlab

I would like to generate a figure in matlab which looks like the attached .jpeg:
So, the figure should contain an outline of the world and then 3 other figures looking at the USA, UK, and New Zealand where I can then specify individual locations in each country. How would I achieve this?
Subplots to arrange things, images to create the maps, and lines to connect them to points. To create a complicated subplot structure like that I'd suggest you check out Ben Mitch's panel class. The relevant thing you're looking for is its ability to conveniently divide up and manage subplots. Something like this
p = panel('defer');
p.pack('v', [1/5 3/5 1/5]);
p(1).pack('h',[1/5 2/5 2/5]); % top level, US and New Zealand
p(2).pack('h',[1/5 2/5 2/5]); % mid level
p(3).pack('h',[1/5 3/5 1/5]); % bottom level
p(2,2).select();
image(world_image);
p(1,3).select();
image(new_zealand_image);
p(1,3).select();
image(usa_image);
p(1,1).select();
image(uk_iamge);
Then add a few line commands to show where the submaps link to. Note that I haven't gotten a chance to test the above code yet, but will when I get to work. I can't remember offhand if it likes the 'h' argument within the child panels.