当前位置:网站首页>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 .
边栏推荐
- Canoe the second simulation engineering xvehicle 3 CAPL programming (operation)
- Time complexity and space complexity
- VI text editor and user rights management, group management and time management
- Installation of ES plug-in in Google browser
- [untitled]
- From programmers to large-scale distributed architects, where are you (I)
- On binary tree (C language)
- MPLS: multi protocol label switching
- Occasional pit compiled by idea
- Locust installation
猜你喜欢
Jemeter script recording
[Galaxy Kirin V10] [server] NUMA Technology
Installation of ES plug-in in Google browser
Software sharing: the best PDF document conversion tool and PDF Suite Enterprise version sharing | with sharing
Rhcsa12
If you don't know these four caching modes, dare you say you understand caching?
C language structure to realize simple address book
Canoe - the second simulation project -xvihicle1 bus database design (operation)
Quick sort (C language)
VI text editor and user rights management, group management and time management
随机推荐
/*The rewriter outputs the contents of the IA array. It is required that the type defined by typedef cannot be used in the outer loop*/
[Galaxy Kirin V10] [server] grub default password
Huge number (C language)
Fundamentals of database operation
183 sets of free resume templates to help everyone find a good job
The most ideal automated testing model, how to achieve layering of automated testing
Regular expression
[Galaxy Kirin V10] [server] system partition expansion
Performance test overview
Recursion and divide and conquer strategy
Write a program to define an array with 10 int elements, and take its position in the array as the initial value of each element.
JMeter assembly point technology and logic controller
JMeter common configuration components and parameterization
[Galaxy Kirin V10] [desktop] FTP common scene setup
20 minutes to learn what XML is_ XML learning notes_ What is an XML file_ Basic grammatical rules_ How to parse
[test theory] test the dimension of professional ability
Seven examples to understand the storage rules of shaped data on each bit
[untitled]
How do microservices aggregate API documents? This wave of show~
Jemeter script recording