Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D visualization not occurring after using tutorial #3

Open
coderbro7642 opened this issue Jul 27, 2020 · 1 comment
Open

3D visualization not occurring after using tutorial #3

coderbro7642 opened this issue Jul 27, 2020 · 1 comment

Comments

@coderbro7642
Copy link

Hello, In using both of the tutorials that are provided as examples and executing the boxpacker with plotSolution set to true, no 3D visualizations are appearing in the plot field or anywhere else. I'm currently using R 4.02 and running it on the Rcloud studio web app, thanks in advance.
Not working on the code below
'''

create containers

c1 <- Container(length = 2, height = 2, width = 2)
c2 <- Container(length = 2, height = 2, width = 2)

create boxes

b1 <- Box(length = 0.5, height = 0.5, width = 0.5)
b2 <- Box(length = 1, height = 0.5, width = 0.5)
b3 <- Box(length = 0.5, height = 0.5, width = 0.5)
b4 <- Box(length = 0.5, height = 0.5, width = 0.5)
b5 <- Box(length = 0.5, height = 0.5, width = 0.5)
b6 <- Box(length = 2, height = 0.5, width = 0.5)
b7 <- Box(length = 1, height = 0.5, width = 0.5)
b8 <- Box(length = 1, height = 0.5, width = 0.5)
b9 <- Box(length = 0.5, height = 0.5, width = 0.5)
b10 <- Box(length = 0.5, height = 0.5, width = 0.5)
b11 <- Box(length = 1.5, height = 1.5, width = 1.5)
b12 <- Box(length = 1.5, height = 0.5, width = 0.5)
b13 <- Box(length = 1, height = 1, width = 1)
b14 <- Box(length = 1, height = 1, width = 1)

boxes <- list(b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14)
containers <- list(c1, c2)

Box Packing

solution <-
PerformBoxPacking(containers = containers,
boxes = boxes,
n_iter = 4,
population_size = 30,
elitism_size = 5,
crossover_prob = 0.5,
mutation_prob = 0.5,
verbose = TRUE,
plotSolution = TRUE
)
'''

@PavoDive
Copy link

PavoDive commented Apr 1, 2021

I forked the code and did some modifications (for instance, I increased the number of colors used to plot the packing solution, among other minor things).

Try typing into the console rgl::rglwidget() just after the PerformBoxPacking function finishes running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants