当前位置:网站首页>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 .
边栏推荐
- Collection of practical string functions
- [test theory] test the dimension of professional ability
- [Galaxy Kirin V10] [server] iSCSI deployment
- [Galaxy Kirin V10] [server] NUMA Technology
- Const's constant member function after the function; Form, characteristics and use of inline function
- [test theory] test phase analysis (unit, integration, system test)
- Rhcsa12
- Static comprehensive experiment ---hcip1
- leetcode842. Split the array into Fibonacci sequences
- DDL statement of MySQL Foundation
猜你喜欢

Rhcsa day 9

DDL statement of MySQL Foundation

Static comprehensive experiment ---hcip1

Huge number multiplication (C language)

XMIND installation

JMeter Foundation
![[Galaxy Kirin V10] [desktop] cannot add printer](/img/a6/28e4aa31e805a018e6db2b32ca1be0.jpg)
[Galaxy Kirin V10] [desktop] cannot add printer

Add t more space to your computer (no need to add hard disk)

2022 AAAI fellow release! Yan Shuicheng, chief scientist of sail, and Feng Yan, Professor of Hong Kong University of science and technology, were selected

Occasional pit compiled by idea
随机推荐
JMeter common configuration components and parameterization
Iterator generators and modules
TS type gymnastics: illustrating a complex advanced type
MFC document view framework (relationship between classes)
OSPF summary
[Galaxy Kirin V10] [desktop and server] FRP intranet penetration
Ten key performance indicators of software applications
Static comprehensive experiment ---hcip1
/*Write a function to open the file for input, read the contents of the file into the vector container of string class 8.9: type, and store each line as an element of the container object*/
DML statement of MySQL Foundation
Rhcsa learning practice
[untitled]
Performance test process
Learning XML DOM -- a typical model for parsing XML documents
Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
For and while loops
Dichotomy search (C language)
Write a program to judge whether the elements contained in a vector < int> container are 9.20: exactly the same as those in a list < int> container.
The last month before a game goes online
Canoe - description of common database attributes