di-huang / Amazon-Warehouse-System

Simplified version of the Amazon Warehouse System.
1 stars 1 forks source link

This is a runnable warehouse simulation program. #7

Closed di-huang closed 7 years ago

di-huang commented 7 years ago

There's only one bug found in getRoute method of Floor since entity(such as shelf) can't be passed through by other entity. WarehouseSimulation.zip

josephLeiferman commented 7 years ago

I'll get it fixed by this afternoon!

josephLeiferman commented 7 years ago

I just wanted to make sure I know the problem we don't want shelves to go through other shelves correct? Because if this is the case then the robot will have to make some changes as well. I can make it so that the robot gets a clear path at the moment the call getRoute(), but they will also need to be able to detect if something is in their path and to get a new getRoute(), because floor does not keep track of objects while they move only when they are placed. Does this make sense?

weigui commented 7 years ago

Correct, Before making any movements for the Robot, It will check the next Point(x,y) to make sure that there is nothing on its way, otherwise it will wait for one tick if there is a Robot there, or update its Route by calling getRoute() again.

josephLeiferman commented 7 years ago

Okay, great shouldn't be a hard to fix then!

di-huang commented 7 years ago

I provided an interface called entity, which can be implemented by shelf. So, when one shelf is blocked by another shelf, Floor just re-caculate the route automatically.

josephLeiferman commented 7 years ago

Why were my test cases deleted from this project?

josephLeiferman commented 7 years ago

Here is the deal with the getRoute() method if I change the method so that it robots can not move through shelves. They will never be able to get to shelves to pick them up. So as to fix this problem I will create a special get route that will basically only be called when robots have picked up shelves, so that they do not move through objects with said shelves.

Another thing, I just cloned a new copy for this 'working' version, and it does not run on my machine now. I don't know if other people are experiencing this problem but it throws the error "Launch configuration Production references non-existing project CS2820."

weigui commented 7 years ago

You may want to just copy all those source .java files and put them into a new java project. (this is For Eclipse, no idea if you are using a different IDE)

josephLeiferman commented 7 years ago

I am using eclipse like everyone else, and it should work if it is cloned. If I can't get it to work how do we expect the professor to get it work when he is grading?

weigui commented 7 years ago

See 'Project Evaluation' 'Final Reprot' and 'Demo Day' Professor/TAs are not gonna run it, we are.

josephLeiferman commented 7 years ago

Can you get it run on your machine? How am I supposed to test code if I cannot get a single thing to run. I shouldn't have to copy everything over to another different project to get things to run. It was working fine before everything was deleted and re-uploaded.

weigui commented 7 years ago

You have the git repo directory right? It should looks like C:\Users\Administrator\git\CS2820

Create a new java Project in Eclipse, uncheck the "use default location", and then use the git repo directory, finish. Finally I open the production.java in package Production, then everything works.