CA3 Problem Solving

【论文笔记】Solving Billion-Scale Knapsack Problems Solving Billion-Scale Knapsack Problems ABSTRACT 背包问题(Knapsack problems,KPs)在工业中很常见,但求解KPs是NP-hard问题,只能在较小的规模下求解。本文以一种稍微广义的形式研究了KPs,并证明通过分布式算法可以近似最优地求解KPs。提出的方法可以在现成的分布式计算框架(如MPI、Hadoop、Spark)中很容易地实现。 阅读详情


Diploma in Information Technology 
Problem Solving 
Instruction for CA3 Group Assignment 
October 2024 Semester 
Assessment 
100 marks (This assignment constitutes 40% of the overall assessment) 
Deliverables 
There are Four (4) deliverables in this assignment, students must complete ALL 
components. 
1. Written project report (6%) 
2. Python codes (20%) 
3. User guides with sample inputs/outputs (4%) 
4. Oral Presentation (10%) 
The Task 
The objective of this project is to allow students to design and implement a mini 
program. You are to use flowchart to design your program, with clear steps and flows 
indicated. You need to use Python programming language to code all the programs, 
according to the project requirement. 
In your report, write a brief description, in 500 words, on your program design. You 
need to include flowcharts demonstrating the main program flow in the report. You will 
also include screenshot samples on how the program should run in the report. 
In your Python codes, include comments to explain the purpose of each section. 
Assessment Marks Allocation 
 Component Assessed Marks Allocation 
1 Part 1 – Report with flowchart 15 
2 Part 2a – Main Programs (Python) 40 
Part 2b – Additional Features 10 
3 Part 3 – User guides with screenshots 10 
4 Part 4 – Oral Presentation 25 
Total 100 
 
The Case - Go “MOBILE” Locker is coming to the campus. 
The CEO of Go Locker has decided to explore the deployment of “MOBILE” lockers 
to Nanyang Technological University (NTU). 
With Internet making online shopping experience easy and enjoyable, the use of self service lockers has become popular and a possible business opportunity for Go 
Locker to service students studying in big campus like NTU. 
Currently in NTU, students can only one locker at a fixed location. However, with 
student studying different modules each semester, not all lecture halls and classrooms 
can be close to the locker location. Hence, a fixed location locker make it 
inconvenience and troublesome to access, due to “tourism” and heavy human traffic 
between lesson. 
Combining the use of electric track transport system (not-in-scope), student can 
access their “MOBILE” locker at any available Go Locker stations. For example, 
students can request to “send” their lockers to a station nearest to their next lesson, 
collect and store items before next lesson. 
In the pilot phase, Go Locker will allow student to rent up to 2 lockers, at $2 per locker. 
Student can release/return the locker anytime. Each request to move locker to a 
specified station will incur 20 cents. When a locker is moved to the specified station, 
student can proceed to access/open the locker. 
As an intern in IMDA (Infocomm Media Development Authority), your supervisor has 
assigned you to help Go Locker with this pilot project, with objectives to automate the 
mobile locker rental and operations processes. 
Project Requirement 
After extensive discussions, Go Locker would like to have the following essential 
features to be included: 
 System Admin functionalities that featured creation of station, locker, 
updating of locker details, and reports for station, locker usage. 
 Station Operations/functionalities that include rent/return locker, request 
locker moves, enquiring locker location and viewing of usage report. 
 Further features to be integrated in the application are configurable rental 
fees, moving fees, and a background program to process the “moving” of 
lockers (see BONUS features). 
Based on you understanding, the pilot project will have 2 applications: one to allow 
Go Locker administrators to perform administrative functionalities, and the other for 
students to perform locker operations. 
1. Go Locker – Admin 
For the Go Locker administrators, the application should display the following 
menu: 
^^^^ Go Locker - Admin ^^^^ 
1. Setup station 
2. Create locker 
3. Update locker 
4. View station report 
5. Track locker usage 
0. Exit 
Enter option: 
Before presenting the menus, your application needs to load/pre-setup the 
stations, lockers, students from Appendix A and rentals (if any) into collections*. 
* Your group can decide to implement using either Dictionary or List. 
a. Setup station 
This function allows the administrator to setup a new station. 
 
To setup a new station, the following data elements should be collected: 
 Station Code: should be unique, in format of NTU-XXX-DD, where XXX 
represents the building code (e.g., N21, S32), and DD represents digits 
from 00 to 99. 
 Station Name: name description of the station (e.g., The Hive level 1, The 
Arc level 2) 
 Rows: number of rows for this station 
 Columns: number of columns for this station 
 Status: Open or Closed 
The maximum number of lockers for this station will be Rows X Columns. 
Hence if station NTU-S32-01 has 4 rows and 20 columns, the capacity for 
this station is 80 slots. Therefore, your application may need to include a 
collection to represent the 80 slots. These slots will be empty, until student 
request to move their locker into the station. 
When a new station is created, the status should be defaulted to “Open”. The 
new station will be added into the collection and updated into “Stations.txt” 
file. 
b. Create locker 
Locker can be added into the system to meet the demand. To add a new 
locker, these data elements should be collected: 
 ID: starting from 10001, increment by 1 for each new locker created 
 Location: “Central store”, “In transit”, or any valid station code. Defaulted 
to “Central store” at creation. 
 Row: default to empty/zero unless the locker is in a station. 
 Column: default to empty/zero unless the locker is in a station. 
 Status: “Occupied”, “Available” (default), “Suspended”. 
 Rental ID: if “Occupied”, need to record the rental ID. 
When a new locker is created, then locker should be added into the collection 
and updated into “Lockers.txt” file. 
c. Update locker 
The “Update Locker” option allows the administrator to update the locker’s 
details: 
 User should first provide the locker ID to search. 
 If there is no locker with this ID, display appropriate error message and 
return to menu. 
 If the ID is valid, your program should display the locker details, and if 
occupied, the student ID, student name and date started renting this 
locker. 
 Only allow update to Location and Status. 
 However, status can only be updated to “Suspended” when current Status 
is “Available”. When updating Status from “Occupied” to “Available”, the 
rental record needs to be terminated. 
 Any updates should also be affected into “Lockers.txt” 
d. View station utilization report 
The option allows the administrator to view the current station utilization. 
 User should first provide the station code to search. 
 If there is no station with this code, display appropriate error message and 
return to menu. 
 If the station code is valid, your program should display the station details, 
and a table showing all the slots (rows x columns) – with locker IDs for 
those slots that contain the students’ lockers. 
e. Track locker usage 
The option allows the administrator to track the operations of a specific locker.
 User should first provide the locker ID to search. 
 If there is no locker with this ID, display appropriate error message and 
return to menu. 
 If the ID is valid, your program should display the locker details, and if 
occupied, the student ID, student name and date started renting this 
locker. 
 Your application should ask for the Date-From and Date-To, before 
generating the report containing all operations for this locker during the 
specified dates. 
 Below is a demonstration of the generation of “Track locker usage” report:
Enter Locker ID: 10002
Locker ID: 10002 
Location: Central Store 
Status: Occupied 
Student ID: 10256499 
Student Name: See Sin Ho 
Rental Start Date: 14-Sep-2024 
Enter Date-From: 14-Aug-2024
Enter Date-To: 15-Oct-2024
Date Time Operation Student ID 
------------------------------------------------------------- 
15-Aug-2024 12:33 Locker return 10255884 
15-Aug-2024 12:34 Move to Central Store - 
14-Sep-2024 09:11 Locker rental 10256499 
14-Sep-2024 10:23 Move to NTU-S31-06 10256499 
14-Sep-2024 10:45 Move to Central Store - 
14-Sep-2024 14:55 Move to NTU-N21-02 10256499 
14-Sep-2024 15:10 Move to Central Store - 
18-Sep-2024 09:01 Move to NTU-S32-06 10256499 
18-Sep-2024 09:08 Move to Central Store - 
------------------------------------------------------------- 
2. Go Locker - Operations 
For the students, the application should display the following Operations menu:
++++ Go Locker – Operations ++++ 
1. Rent a locker 
2. Request move 
3. Return locker 
4. Enquire locker location 
5. View usage report 
0. Exit 
Enter option: 
Before presenting the menus, your application needs to load/pre-setup the 
stations, lockers, students from Appendix A and rentals (if any) into collections*. 
* Your group can decide to implement using either Dictionary or List. 
a. Rent a locker 
To rent a locker, students only need to provide their student ID. 
 If the ID is valid, your program should display rented locker details (if any), 
and if student is renting 2 lockers now, display appropriate error message 
and return to menu. 
 If student can still rent a locker, your program will locate an available 
locker and create the rental transaction, charging $2 to the student 
account. 
 Rental transaction should include the locker ID, student ID, start date and 
end date (default to None, until the rental is terminated). 
 Your program should generate a unique Rental ID (running number) and 
display the rental details. 
Below are demonstrations of a locker rental: 
++++ Go Locker – Operations ++++ 
1. Rent a locker 
2. Request move 
3. Return locker 
4. Enquire locker location 
5. View usage report 
0. Exit 
Enter option: 1
Enter Student ID: 10255884
--------------------------------------------------------- 
Locker allocated: 10002 Location: Central store 
Rental ID: 2400102 
Start date: 14-Sep-2024 
$2 is charge to your account. 
--------------------------------------------------------- 
++++ Go Locker – Operations ++++ 
1. Rent a locker 
2. Request move 
3. Return locker 
4. Enquire locker location 
5. View usage report 
0. Exit 
Enter option: 1
Enter Student ID: 10256499
Sorry, you are already renting 2 lockers. 
--------------------------------------------------------- 
Locker allocated: 10003 Location: NTU-N31-04 (2-05) 
Rental ID: 2400101 
Start date: 10-Sep-2024 
--------------------------------------------------------- 
Locker allocated: 10001 Location: Central store 
Rental ID: 2400099 
Start date: 15-Aug-2024 
--------------------------------------------------------- 
b. Request move 
To start moving a locker, the student ID and locker ID must be provided: 
 Your program must validate both student ID and locker ID. 
 If the IDs are valid, your program should display rented locker details. 
 If not, display appropriate error message and return to menu. 
 Prompt for the station code to move to. 
 Create the move transaction record if, 
 The station code is valid and is not same as current location. 
 The destination has slots for this locker, hence displaying “Station 
Code (Row-Column)” for this move. For example, “NTU-N31-04 (1-09)”
Below are demonstrations of a locker move: 
++++ Go Locker – Operation ++++ 
1. Rent a locker 
2. Request move 
3. Return locker 
4. Enquire locker location 
5. View usage report 
0. Exit 
Enter option: 2
Enter Student ID: 10255884
Enter Locker ID: 10003
Sorry, 10003 is not your locker. 
++++ Go Locker – Operations ++++ 
1. Rent a locker 
2. Request move 
3. Return locker 
4. Enquire locker location 
5. View usage report 
0. Exit 
Enter option: 2
Enter Student ID: 10255884
Enter Locker ID: 10002
--------------------------------------------------------- 
Locker allocated: 10002 Location: Central store 
Rental ID: 2400102 
Start date: 14-Sep-2024 
--------------------------------------------------------- 
Enter Station code to move to: NTU-N31-04
Locker is moving to NTU-N31-04 (1-09) 
--------------------------------------------------------- 
Locker allocated: 10002 Location: In transit 
Rental ID: 2400102 
Start date: 14-Sep-2024 
--------------------------------------------------------- 
c. Return locker 
Student can return a locker by providing the student ID and locker ID: 
 Your program must validate both student ID and locker ID. 
 If the IDs are valid, your program should display rented locker details. 
 If not, display appropriate error message and return to menu. 
 Prompt for confirmation to return the locker. 
 Closed the rental record by updating the end date to current date, update 
the locker status to “Available” and rental ID for this locker will be None. 
 If the current location of the locker is at any station, system will initiate a 
locker move transaction to “Central store”. 
 Your program should present a usage statement for this rental. 
++++ Go Locker – Operations ++++ 
1. Rent a locker 
2. Request move 
3. Return locker 
4. Enquire locker location 
5. View usage report 
0. Exit 
Enter option: 3
Enter Student ID: 10255884
Enter Locker ID: 10002
--------------------------------------------------------- 
Locker allocated: 10002 Location: NTU-N31-04 (1-09) 
Rental ID: 2400102 
Start date: 14-Sep-2024 
End date: 10-Oct-2024 
Moving locker back to Central store. 
--------------------------------------------------------- 
Rental charge: $2.00 
Move charges: $2.00 (10 moves) 
Penalty charges: $2.00 (2 counts) 
Total charges for this rental: $6.00 
--------------------------------------------------------- 
d. Enquire locker location 
To find out where the student’s lockers are, student need to provide their 
student ID. 
 Your program should display appropriate error message if there is no 
student matching the student ID, or currently no rental record for this 
student. 
 If the “active” rental record(s) is located, display the locker(s) details. 
++++ Go Locker – Operations ++++ 
1. Rent a locker 
2. Request move 
3. Return locker 
4. Enquire locker location 
5. View usage report 
0. Exit 
Enter option: 5
Enter Student ID: 10256379
No rental records 
++++ Go Locker – Operations ++++ 
1. Rent a locker 
2. Request move 
3. Return locker 
4. Enquire locker location 
5. View usage report 
0. Exit 
Enter option: 4
Enter Student ID: 10256499
--------------------------------------------------------- 
Locker allocated: 10003 Location: NTU-N31-04 (1-09) 
Rental ID: 2400101 
Start date: 10-Sep-2024 
--------------------------------------------------------- 
Locker allocated: 10001 Location: Central store 
Rental ID: 2400099 
Start date: 15-Aug-2024 
--------------------------------------------------------- 
e. View usage report 
Student can view locker usage report by first providing the student ID: 
 Your program should display appropriate error message if there is no 
student matching the student ID; or has no rental record for this student. 
 If the rental record(s) is located, display the locker(s) details. 
++++ Go Locker – Operations ++++ 
1. Rent a locker 
2. Request move 
3. Return locker 
4. Enquire locker location 
5. View usage report 
0. Exit 
Enter option: 4
Enter Student ID: 10256379
No rental records 
++++ Go Locker – Operations ++++ 
1. Rent a locker 
2. Request move 
3. Return locker 
4. Enquire locker location 
5. View usage report 
0. Exit 
Enter option: 4
Enter Student ID: 10256499
--------------------------------------------------------- 
Locker allocated: 10003 Location: NTU-N31-04 (1-09) 
Rental ID: 2400101 
Start date: 10-Sep-2024 
--------------------------------------------------------- 
Locker allocated: 10001 Location: Central store 
Rental ID: 2400099 
Start date: 15-Aug-2024 
--------------------------------------------------------- 
Locker allocated: 10006 
Rental ID: 2400084 
Start date: 10-Jul-2024 
End date: 20-Sep-2024 
--------------------------------------------------------- 
Enter Rental ID to view usage: 2400099 
Date Time Operation Student ID 
------------------------------------------------------------- 
14-Sep-2024 09:11 Locker rental 10256499 
14-Sep-2024 10:23 Move to NTU-S31-09 10256499 
14-Sep-2024 10:45 Move to Central Store - 
14-Sep-2024 14:55 Move to NTU-N21-11 10256499 
14-Sep-2024 15:10 Move to Central Store - 
18-Sep-2024 09:01 Move to NTU-S32-01 10256499 
18-Sep-2024 09:08 Move to Central Store - 
------------------------------------------------------------- 
Rental charge: $2.00 
Move charges: $0.60 (3 moves) 
Total charges for this rental: $2.60 
------------------------------------------------------------- 
To show your ability in coding, your supervisor gave you the flexibility to design the 
structure and interface. Now, you shall apply what you have learnt in the school into 
practice. 
More (BONUS) features for consideration: 
You should explore problem solving techniques to design a solution to allow: 
a. Dynamic, configurable setup of rental fees and moving fees. Aim is not to re code and restart application for any changes to rental fees and moving fees.
b. Have a background program processing the locker move requests. 
 When a student request for a locker moves, this transaction will be 
recorded and processed by your background program. 
 The locker location will be updated accordingly after 3 min, simulating the 
movement of the locker vis the electric track delivery system. 
 Hence, it will be “In transit”, follow by e.g., “NTU-N32-11” after 3 min. 
 Locker move requests can also be initiated by the system, 30 min after 
the locker has arrived at a station. This is to manage space/slot, ensuring 
there are slots at each station to serve students. 
Instructions for CA3 Report, Python Codes and User Guides 
Cover Page 
The cover page should include the institution name (and institution logo) the 
programme and the module name, the semester and year and date of submission. All 
these must be centralised in the page. 
Write FULL Name and Student number as in the register on the cover. Students should 
a keep a copy of assignment submitted. 
Python Codes 
Suggested IDE and version: Wing Personal 7, Python 3.8.2 and above. 
Please zip all your Python codes into single file and upload it together with the report. 
If you used any additional Python library apart from the standard package, you need 
to include them in the submission. 
Referencing 
No referencing is needed for program designs and codes. 
Font and Spacing 
Font: Times New Roman 
Font size: 12 and 1.5 for line spacing. 
Penalty Marks for Late Submission of Assignment 
By one day: 20% to be deducted from total marks. 
More than one day: submission will NOT be graded. 
Plagiarism and Collusion 
Students are not allowed to reuse old assignments or submit projects from previous 
semesters or copy from sources, particularly from the Internet web. 
The submitted report must show evidence that this is students’ own work. No marks 
will be awarded if there are no workings or reasonable explanations. Please be 
reminded that plagiarism and collusion is a serious offence, and all cases will be 
referred to the administration. Grades will be withheld if the submission is suspected 
of plagiarism or collusion till investigations are completed. 
Important Dates of CA3 Report 
CA3 Group Assignment Deadline: 11 November 2024 11.59 am.
Submit ONE project via Canvas per group, submission must be completed for reports 
to be graded. 
Lecturer Contact
You should contact your lecturer via your SIM email whenever you have any issue 
about your project. 
 

Behavioral Questions in graduate program 1.Leadership: Can you tell me about a time when you took the lead on a project or initiative? How do you motivate and inspire others in a team setting? Describe a situation where you had to resolve a conflict within a group.2.Teamwork: Give an example of a 阅读详情

相关推荐

Kubernetes TLS自动化:cert-manager+Traefik+Let’s Encrypt排障实战

TLS(传输层安全协议)是现代云原生应用实现HTTPS加密通信的基础机制,其核心在于证书生命周期管理、协议版本协商与密钥套件安全配置。在Kubernetes环境中,单纯配置Secret或Ingress远不足以保障生产级TLS可靠性——必须依托cert-manager实现ACME协议驱动的自动签发与续期,并由Traefik等支持动态加载的Ingress控制器完成证书热更新与安全策略执行。这一闭环直接决定服务可用性、合规性(如PCI DSS/NIST要求)及客户端兼容性。本文聚焦真实生产场景中高频问题:ACME

weixin_33968104的博客 375

Volume 1. Elementary Problem Solving

String Palindromes Where’s Waldorf? Automatic Poetry Artificial Intelligence? Excuses, Excuses! Decode the tape Andy’s First Dictionary Immediate Decodability Automatic Editing Big Number Integer I...

Ai_Mijie的博客 299

Ubuntu 18.04 安装 Anaconda 实操指南:避坑、验证与 IDE 连通

Anaconda 是面向数据科学的 Python 发行版,其核心价值在于集成 Conda 包/环境管理器与开箱即用的科学计算栈。在 Linux 系统中,安装本质是执行自解压 installer 脚本并完成 shell 初始化,但 Ubuntu 18.04 因系统 Python 强依赖、locale 缺失、shell 加载逻辑特殊(login shell 优先读 ~/.bash_profile)、/tmp 挂载限制等历史特性,极易导致 conda 命令不可用、解释器无法被 PyCharm 或 VS Code

congjukun0600的博客 422

uva算法入门经典题解导航 - Volume 1. Elementary Problem Solving - Maths - Misc

Title Total Submissions / Solving % Total Users / Solving % 113 - Power of Cryptography 46744 38.37% 15396 87.48% 10161 - Ant on a Chessboard 12242

追随大神的脚步~ 894

Conda清华源连接失败全解析:从SSL证书到网络配置的终极解决方案

在Python数据科学和机器学习开发中,包管理器是构建稳定开发环境的核心工具。Conda作为跨平台的包与环境管理工具,其工作原理是通过HTTP/HTTPS协议从远程仓库下载元数据和软件包。SSL/TLS证书验证是HTTPS安全通信的基础,它确保客户端与服务器之间的连接不被篡改。当系统根证书缺失、时间不同步或网络代理干扰时,证书验证失败会导致CondaHTTPError和SSLError,影响开发效率。这类问题在配置国内镜像源(如清华源)时尤为常见,因为镜像站点的证书链可能与本机环境不匹配。通过系统性的网络连

weixin_34378767的博客 409

Ubuntu 20.04 安装 Miniconda/Anaconda 实操指南:解决 conda activate 失败与环境配置问题

conda 是 Python 科学计算领域主流的跨平台包与环境管理工具,其核心原理是通过独立 Python 解释器、隔离的虚拟环境和声明式依赖解析实现环境可重现性。技术价值在于规避系统 Python 冲突、支持多版本 Python 共存、简化 CUDA/PyTorch 等复杂依赖部署。典型应用场景包括 Ubuntu 20.04 服务器部署数据科学栈、AI 实验室配置 PyTorch 环境、VS Code/PyCharm 集成调试及 Jupyter 内核管理。本文聚焦 Ubuntu 20.04 LTS 系统下

weixin_34033624的博客 465

Volume 1. Elementary Problem Solving->Volume 1 String 409 - Excuses, Excuses!

Excuses, Excuses!  Judge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time required listening

Cyibing的专栏 771

【信息科学与工程学】【数据中心】【智算中心】【容灾备份】 第二十五篇 智算中心业务容灾-第一部分

设计原则具体实施关键技术监控指标恢复策略测试验证冗余设计​1. 多副本数据存储2. 多路径网络连接3. 多活计算资源4. 多实例服务部署1. 数据复制技术2. 负载均衡技术3. 集群管理技术4. 容器编排技术1. 副本健康状态2. 路径可用性3. 资源利用率4. 服务实例状态1. 自动故障转移2. 数据一致性修复3. 资源重新调度4. 服务重新注册1. 故障注入测试2. 切换演练3. 性能压测4. 数据一致性验证自动化恢复​。

weixin_49199313的博客 1281

Car race game 归并排序求逆序数

Car race game Time Limit 1000ms Memory Limit 65536K description   Bob is a game programming specialist. In his new car race game, there are some r

aksdrxzd的专栏 397

ArcMap 10.7/10.8启动加载界面后闪退?可能是这个隐藏的Normal.mxt模板文件在搞鬼

本文深入分析了ArcMap 10.7/10.8启动加载界面后闪退的问题,指出Normal.mxt模板文件损坏是常见原因。提供了从定位、删除模板文件到系统级修复的完整解决方案,帮助GIS工程师快速恢复工作流程。

weixin_28523493的博客 333

CMN-700组件全解析:从XP路由器到HN-F主节点的实战配置指南

本文深入解析Arm CMN-700片上网络IP的核心组件与实战配置。重点剖析了XP网格路由器的拓扑规划与CHI通道管理,以及HN-F全一致性主节点在维护缓存一致性、管理SLC和地址映射中的关键作用。通过一个12×12网格的配置案例,为硬件工程师提供了从组件布局、地址映射到性能调优的系统级设计指南。

weixin_29313423的博客 290

SPOJ 1771 Yet Another N-Queen Problem 解题报告(Dancing Link)

1771. Yet Another N-Queen Problem Problem code: NQUEEN After solving Solution to the n Queens Puzzle by constructing, LoadingTime wants to solve a harder version of the N-Queen P

SF-_- 的 ACM 博客 1185

从原理图到PCB:手把手教你绘制DRV8301驱动板(附完整代码与避坑指南)

本文详细介绍了如何从原理图设计到PCB布局,手把手教你绘制DRV8301驱动板,特别适用于FOC(磁场定向控制)系统开发。内容涵盖元器件选型、电源树架构设计、栅极驱动电路、PCB布局技巧、焊接调试及代码配置,并附有完整代码与常见问题避坑指南,帮助工程师快速掌握DRV8301驱动板的设计与优化。

weixin_33716941的博客 397

Diophantus of Alexandria HDU - 1299(数论)

Diophantus of Alexandria was an egypt mathematician living in Alexandria. He was one of the first mathematicians to study equations where variables were restricted to integral values. In honor of him,

Coldfresh的博客 393

30分钟上手TI DRV89xx-Q1EVM:多通道电机驱动器评估板实战指南

多通道H桥电机驱动器是机器人、工业自动化及汽车电子中实现多轴运动控制的核心器件,其核心原理是通过集成多个半桥电路,利用SPI通信与PWM调制技术,实现对多个直流电机或负载的独立、精确驱动。这类技术方案能显著减少外围元件数量与PCB面积,提升系统集成度与可靠性,在关节机器人、精密座椅调节及多轴控制单元等场景中价值突出。本文以德州仪器DRV89xx-Q1系列评估板为例,深入解析其硬件架构、安全操作规范及图形化软件配置流程,重点涵盖**过流保护**与**PWM频率**等关键参数的设置与调试,帮助工程师快速完成从硬

weixin_29192141的博客 336

054_小驰私房菜_Camx i2c读写相关备忘

Camera 对Ae、Af这些控制,实际都是,最终实际都是落实到hal下发相关的指令给驱动,那hal这边是怎么给驱动下发相关命令的呢?#小驰私房菜054# #Qcom Camx#可以参考看下下面相关代码内容。

152

POJ 3006 Dirichlet's Theorem on Arithmetic Progressions

Dirichlet's Theorem on Arithmetic Progressions Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 18757   Accepted: 9400 Description If a and d are relatively p

weixin_37571609的博客 316

【雷达】基于matlab合成孔径雷达干涉测量(InSAR)时序分析【含Matlab源码 9037期】

合成孔径雷达干涉测量(InSAR)时序分析 完整代码,包运行;可提供运行操作视频!适合小白!

订阅付费专栏Matlab(奶茶价版),可赠送奶茶价版付费专栏指定代码1份; 159

hdu2255(Chocolate,km算法+构图)

Chocolate Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 966Accepted Submission(s): 479 Problem Descrip...

weixin_30339969的博客 88

【Burp入门第三十三篇】BurpSuite+Proxifier安装配置,实现微信小程序抓包

本文介绍Burp+Proxifier安装配置,实现微信小程序抓包

等风来 5877

动态规划之【树形DP】第3课:树形DP应用案例实践2

动态规划之【树形DP】第3课:树形DP应用案例实践2

王老师青少年编程 773

hduoj1027

Ignatius and the Princess II Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7227    Accepted Submission(s): 4290 Problem Description N

fengzhizi76506的博客 329

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain&#39;s apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath(&#39;DeepLearnToolbox&#39;));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand(&#39;state&#39;,0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = &#39;sigm&#39;;%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, &#39;Too big error&#39;);```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, &#39;Too big error&#39;);```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上千个国外免费权威优质编程学习课程大放送 —— 基础篇

随着互联网的发展,像 MIT 和斯坦福等世界名校,都开始在网上公开一些优质的在线免费课程供大家学习。到现在,已经有来自全球共 1000 所左右的学校提供了非常多的优质课程,最有名的平台就是 MOOC。中国也有类似的学习网站例如中国大学MOOC网:https://www.icourse163.org/国外有一个叫 Dhawal Shah 的小哥,对现在国外的优质课程进行搜集、整理、筛选、汇总和分类。...

weixin_40190543的博客 331

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

D. Gargari and Permutations dp + LCS ( dp 好题 )

Gargari got bored to play with the bishops and now, after solving the problem about them, he is trying to do math homework. In a math book he have found k permutations. Each of them consists of number...

loooooog的博客 375

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

微积分 | dy / dx 是分数吗?—— 导数符号的数学本质

……

u013669912的博客 1505

BEIT:图像 Transformer 的 BERT 预训练

Hangbo Bao , Li Dong , Songhao Piao , Furu Wei † Harbin Institute of Technology ‡ Microsoft Research https://aka.ms/beitHangbo Bao ,Li Dong ,Songhao Piao ,Furu Wei † 哈尔滨工业大学‡ MicrosoftResearchhttps://aka.ms/beitWe introduce a self-supervised vision represe

u013250861的博客 76
上一篇: Doubly-linked list data structure
下一篇: AME 209/MSE 280 Matlab script
wx____codinghelp
博客等级 码龄2年 771粉丝 115原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值