当前位置:网站首页>Elevator dispatching (pairing project) ①
Elevator dispatching (pairing project) ①
2022-07-04 10:52:00 【Painting and living~】
List of articles
Preface
In this project , Cuiwenguang and I choose to use Java Programming language to realize the simulation of elevator scheduling problem , And use JavaFX To make the graphical interface of the application .
One 、PSP form
| PSP2.1 | Personal Software Process Stages | Estimated time ( minute ) | The actual time consuming ( minute ) |
|---|---|---|---|
| Planning | plan | ||
| ·Estimate | Estimated task time | 20d | 20d |
| Development | Development | ||
| ·Design Spec | Generate design documents | 120 | 120 |
| ·Design Review | Design review | 60 | 80 |
| ·Coding Standard | Code specification | 30 | 30 |
| ·Design | Concrete design | 60 | 60 |
| ·Coding | Specific code | 1000 | 1200 |
| ·Code Review | Code review | 30 | 60 |
| ·Test | Code testing | 60 | 60 |
| Reporting | The report | ||
| ·Test Report | Test report | 60 | 90 |
| ·Size Measurement | Calculate the workload | 30 | 30 |
| ·Postmortem & Process Improvement Plan | Post event summary , And propose process improvement plan | 30 | 30 |
| · | total |
Two 、 utilize Information Hiding, Interface Design, Loose Coupling Knowledge design interface
“Information Hiding” For information hiding ,“Interface Design” Design for interface ,“Loose Coupling” Low coupling . This project adopts object-oriented design ideas , Lift 、 Entities such as passengers are abstracted into classes for encapsulation , And leave an interface for developers to call . At the same time, keep the modules of the project independent of each other , Reduce the connection between modules .
3、 ... and 、 Design and implementation of module interface
3.1 Passenger class
Passenger Class is used to abstract passengers , Including passenger weight 、 Starting floor 、 End floor and other attributes .
3.2 Elevator class
Elevator Class is used to abstract elevator , Including the maximum load of the elevator 、 The maximum number of people in the elevator 、 Elevator service floor 、 Opening and closing time 、 Upper and lower level running time and other attributes , At the same time, it defines how to make passengers enter GetPeopleIn()、 Make the passengers leave GetPeopleOut()、 The upside goUp()、 The downside goDown() Such as function .
3.3 EleController class
EleController Class is elevator group dispatcher , Four elevator objects in the problem are stored , And the request list of passengers who want to take the elevator , At the same time, it defines the request to add an elevator AddRequest()、 Find the nearest passenger in an elevator GetNearestPsg() Such as function , So that subsequent algorithm calls .
3.4 MainWindowController class
MainWindowController Class is the main interface controller . Because the three algorithms to be implemented in the future should provide services in the main interface , Therefore, this class contains functions that implement three scheduling algorithms respectively .
Four 、 Code specification and design specification
Before the project starts , Cuiwenguang and I have agreed on the code specification and design specification of the program , Such as the naming rules of member variables and member functions 、ui Interface control parent-child relationship rules 、 Which classes or variables must be mutually exclusive in multithreading , In order to improve the efficiency of subsequent development .
边栏推荐
- Introduction to tree and binary tree
- Regular expression
- Occasional pit compiled by idea
- The most ideal automated testing model, how to achieve layering of automated testing
- Performance test process
- Collection of practical string functions
- Canoe - the second simulation engineering - xvehicle - 2panel design (principle, idea)
- Application and Optimization Practice of redis in vivo push platform
- Advanced order of function
- Common system modules and file operations
猜你喜欢
![[machine] [server] Taishan 200](/img/e5/69a1a4ca04814a033a77d3cb4601b3.jpg)
[machine] [server] Taishan 200

Hidden C2 tunnel -- use of icmpsh of ICMP

C language - stack

OSPF comprehensive experiment
![[Galaxy Kirin V10] [server] iSCSI deployment](/img/60/13f43dc584c0768965d60811768948.jpg)
[Galaxy Kirin V10] [server] iSCSI deployment

DCL statement of MySQL Foundation

Using Lua to realize 99 multiplication table

When I forget how to write SQL, I

Canoe - the second simulation engineering - xvehicle - 2 panel design (operation)

How do microservices aggregate API documents? This wave of show~
随机推荐
Canoe - the third simulation project - bus simulation-1 overview
[Galaxy Kirin V10] [server] system partition expansion
Canoe - the second simulation project -xvihicle1 bus database design (operation)
[Galaxy Kirin V10] [server] soft RAID configuration
Discussion | has large AI become autonomous? Lecun, chief scientist of openai
Remove linked list elements
Leetcode48. Rotate image
Error C4996 ‘WSAAsyncSelect‘: Use WSAEventSelect() instead or define _ WINSOCK_ DEPRECATED_ NO_ WARN
Open the neural network "black box"! Unveil the mystery of machine learning system with natural language
JMeter common configuration components and parameterization
[Galaxy Kirin V10] [server] set time synchronization of intranet server
Using Lua to realize 99 multiplication table
Write a program that uses pointers to set all elements of an int array to 4.18: 0.
1. Circular nesting and understanding of lists
First article
How do microservices aggregate API documents? This wave of show~
Rhcsa day 9
51 data analysis post
Quick sort (C language)
2022 AAAI fellow release! Yan Shuicheng, chief scientist of sail, and Feng Yan, Professor of Hong Kong University of science and technology, were selected