`
leonzhx
  • 浏览: 801566 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Chapter 5. Distributed Git

阅读更多

1.   You can easily continue using centralized workflow with Git. Simply set up a single repository, and give everyone on your team push access; Git won't let users overwrite each other. If one developer clones, makes changes, and then tries to push their changes while another developer has pushed in the meantime, the server will reject that developer's changes. They will be told that they're trying to push non-fast-forward changes and that they won't be able to do so until they fetch and merge.


 

2.   Integration-Manager Workflow (i.e. GitHub) often includes a canonical repository that represents the "official" project. To contribute to that project, you create your own public clone of the project and push your changes to it. Then, you can send a request to the maintainer of the main project to pull in your changes. They can add your repository as a remote, test your changes locally, merge them into their branch, and push back to their repository. The process works as follows :

    1)   The project maintainer pushes to their public repository.

    2)  A contributor clones that repository and makes changes.

    3)   The contributor pushes to their own public copy.

      4)   The contributor sends the maintainer an e-mail asking them to pull changes.

      5)   The maintainer adds the contributor's repo as a remote and merges locally.

    6)   The maintainer pushes merged changes to the main repository.



 

3.   Dictator and Lieutenants Workflow (i.e. Linux Kernel) is a variant of a multiple-repository workflow. It's generally used by huge projects with hundreds of collaborators; Various integration managers are in charge of certain parts of the repository; they're called lieutenants . All the lieutenants have one integration manager known as the benevolent dictator . The benevolent dictator's repository serves as the reference repository from which all the collaborators need to pull. The process works like:

    1)   Regular developers work on their topic branch and rebase their work on top of master . The master branch is that of the dictator.

      2)   Lieutenants merge the developers' topic branches into their master branch.

    3)   The dictator merges the lieutenants' master branches into the dictator's master branch.

    4)   The dictator pushes their master to the reference repository so the other developers can rebase on it.

  

 

4.   The Git project provides a document that lays out a number of good tips for creating commits from which to submit patches—you can read it in the Git source code in the Documentation/SubmittingPatches file.

 

5.   You don't want to submit any whitespace errors. Git provides an easy way to check for this—before you commit, run git diff --check   , which identifies possible whitespace errors and lists them for you. If you run that command before committing, you can tell if you're about to commit whitespace issues that may annoy other developers.

 

6.   Try to make each commit a logically separate changeset. Don't code for a long time on five different issues and then submit them all as one massive commit. Even if you don't commit the changes before finishing coding for all the five issues, use the staging area to split your work into at least one commit per issue, with a useful message per commit. If some of the changes modify the same file, try to use git add --patch   to partially stage files. This approach also makes it easier to pull out or revert one of the changesets if you need to later.

 

7.   Getting in the habit of creating quality commit messages makes using and collaborating with Git a lot easier. Your messages should start with a single line that's no more than about 50 characters and that describes the changeset concisely, followed by a blank line, followed by a more detailed explanation. The Git project requires that the more detailed explanation include your motivation for the change and contrast its implementation with previous behavior. It's also a good idea to use the imperative present tense in these messages. In other words, instead of "I added tests for" or "Adding tests for," use "Add tests for."

 

8.   Here is a template originally written by Tim Pope at tpope.net:

Short (50 chars or less) summary of changes

 

More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); tools like rebase can get confused if you run the two together.

 

Further paragraphs come after blank lines.

 

  -  Bullet points are okay, too

 

  -  Typically a hyphen or asterisk is used for the bullet, preceded by a

    single space, with blank lines in between, but conventions vary here

 

9.   The Git project has well-formatted commit messages. Run git log --no-merges   to see what a nicely formatted project-commit history looks like.

 

10.   For a private project with one or two other developers, you can follow a workflow similar to what you might do when using CVCS. You still get the advantages of things like offline committing and vastly simpler branching and merging, but the workflow can be very similar; the main difference is that merges happen client-side rather than on the server at commit time.

 

11.  T o see what commit the work on branch issue54 has to be merged into on remote master branch:

git log --no-merges origin/master ^issue54

--no-merges means not printing commits with more than one parent. Git showed all matching commits on origin/master but on issue54 .

 

12.  In a private small team, you can follow a workflow similar to what you might do when using centralized systems. Y ou work for a while, generally in a topic branch. When you want to share that work, you merge it into your own master branch, then fetch and merge origin/master if it has changed, and finally push to the master branch on the server. The general sequence is something like:


 

13.   In a private managed team, let's say that John and Jessica are working together on one feature, while Jessica and Josie are working on a second. In this case, the company is using a type of integration-manager workflow where the work of the individual groups is integrated only by certain engineers, and the master branch of the main repository can be updated only by those engineers. In this scenario, all work is done in team-based branches and pulled together by the integrators later. The sequence for the workflow will look like:


 

And Jessica’s committing history will look like:


 

14.   You may want to use rebase -i   to squash your work down to a single commit, or rearrange the work in the commits to make the patch easier for the maintainer to review.

 

15.   When your work has been pushed up to your fork, you need to notify the maintainer. This is often called a pull request , and you can either generate it via the website—GitHub has a "pull request" button that automatically messages the maintainer—or run the git request-pull command and e-mail the output to the project maintainer manually.

 

16.   The request-pull   command takes the base branch into which you want your topic branch pulled and the Git repository URL you want them to pull from, and outputs a summary of all the changes you're asking to be pulled in:

$ git remote add myfork git://githost/simplegit.git

$ git push myfork featureA

$ git request-pull origin/master myfork

The following changes since commit 1edee6b1d61823a2de3b09c160d7080b8d1b3a40:

  John Smith (l):

        added a new function

 

 

are available in the git repository at:

 

  git://githost/simplegit.git featureA

 

Jessica Smith (2):

      add limit to log function

      change log output to 30 from 25

 

  lib/simplegit.rb |   10 +++++++++−

  1 files changed, 9 insertions(+), 1 deletions(−)

 

17.   On a project for which you're not the maintainer, it's generally easier to have a branch like master always track origin/master   and to do your work in topic branches that you can easily discard if they're rejected. Having work themes isolated into topic branches also makes it easier for you to rebase your work if the tip of the main repository has moved in the meantime and your commits no longer apply cleanly.

 

18.   If the project maintainer has pulled in a bunch of other patches and tried your branch, but it no longer cleanly merges. In this case, you can try to rebase that branch on top of origin/master, resolve the conflicts for the maintainer, and then resubmit your changes:

$ git checkout featureA

$ git rebase origin/master

$ git push -f myfork featureA

Because you rebased the branch, you have to specify the -f to your push command in order to be able to replace the featureA branch on the server with a commit that isn't a descendant of it.

 

19.   If the maintainer has looked at work in your branch and likes the concept, but would like you to change an implementation detail. You'll also take this opportunity to move the work to be based off the project's current master branch. You start a new branch based off the current origin/master branch, squash the featureB changes there, resolve any conflicts, make the implementation change, and then push that up as a new branch:

$ git checkout -b featureBv2 origin/master

$ git merge --no-commit --squash featureB

$ (change implementation)

$ git commit

$ git push myfork featureBv2

The --squash   option takes all the work on the merged branch and squashes it into one non-merge commit on top of the branch you're on. The --no-commit option tells Git not to automatically record a commit. This allows you to introduce all the changes from another branch and then make more changes before recording the new commit.

 

20.   For those larger public projects that accept patches via a developer mailing list, You use git format-patch to generate the mbox-formatted files that you can e-mail to the list—it turns each commit into an e-mail message with the first line of the commit message as the subject and the rest of the message plus the patch that the commit introduces as the body:

$ git format-patch -M origin/master

0001-add-limit-to-log-function.patch

0002-changed-log-output-to-30-from-25.patch

The format-patch   command prints out the names of the patch files it creates. The -M   switch tells Git to look for renames.

 

21.   You can also edit these patch files to add more information for the e-mail list that you don't want to show up in the commit message. If you add text between the “---“ line and the beginning of the patch, then developers can read it; but applying the patch excludes it.

 

22.   Git provides a tool to help you send properly formatted patches via IMAP. You can read detailed instructions for a number of mail programs at the end of the Documentation/SubmittingPatches file in the Git source code.

 

23.   To send a patch, first, you need to set up the imap section in your ˜/.gitconfig   file:

  [imap]

  folder = "[Gmail]/Drafts"

  host = imaps://imap.gmail.com

 

user = user@gmail.com

  pass = p4ssword

  port = 993

  sslverify = false

If your IMAP server doesn't use SSL, the last two lines probably aren't necessary, and the host value will be imap:// instead of imaps:// .

When that is set up, you can use git send-email to place the patch series in the Drafts folder of the specified IMAP server:

$ git send-email *.patch

At this point, you should be able to go to your Drafts   folder, change the To field to the mailing list you're sending the patch to.

 

24.   When you're thinking of integrating new work, it's generally a good idea to try it out in a topic branch—a temporary branch specifically made to try out that new work. This way, it's easy to tweak a patch individually and leave it if it's not working until you have time to come back to it. If you create a simple branch name based on the theme of the work you're going to try, such as ruby_client   or something similarly descriptive, you can easily remember it if you have to abandon it for a while and come back later. The maintainer of the Git project tends to namespace these branches as well—such as sc/ruby_client , where sc is short for the person who contributed the work.

 

25.   If you received the patch from someone who generated it with the git diff or a Unix diff command, you can apply it with the git apply command:

$ git apply /tmp/patch-ruby-client.patch

This modifies the files in your working directory. It's almost identical to running a patch -pl command to apply the patch while it's more paranoid and accepts fewer fuzzy matches than patch . It also handles file adds, deletes, and renames if they're described in the git diff format, which patch won't do. Finally, git apply   is an "apply all or abort all" model where either everything is applied or nothing is, whereas patch   can partially apply patchfiles, leaving your working directory in a weird state. It won't create a commit for you—after running it, you must stage and commit the changes introduced manually.

 

26.  You can also use git apply   to see if a patch applies cleanly before you try actually applying it—you can run git apply --check with the patch. If there is no output, then the patch should apply cleanly. This command also exits with a non-zero status if the check fails, so you can use it in scripts if you want.

 

27.   To apply a patch generated by format-patch , you use git am . Technically, git am is built to read an mbox file, which is a simple, plain-text format for storing one or more e-mail messages in one text file.

 

28.   If someone has e-mailed you the patch properly using git send-email   , and you download that into an mbox format, then you can point git am to that mbox file, and it will start applying all the patches it sees. If you run a mail client that can save several e-mails out in mbox format, you can save entire patch series into a file and then use git am to apply them one at a time:

$ git am 0001-limit-log-function.patch

It applied cleanly and automatically created the new commit for you. The author information is taken from the e-mail's From and Date headers, and the message of the commit is taken from the Subject and body (before the patch) of the e-mail.

 

29.   It's possible that the patch won't apply cleanly. In that case, the git am process will fail and puts conflict markers in any files it has issues with, much like a conflicted merge or rebase operation. You solve this issue much the same way—edit the file to resolve the conflict, stage the new file, and then run git am --resolved to continue to the next patch.

 

30.   If you want Git to try a bit more intelligently to resolve the conflict, you can pass a −3 option to it, which makes Git attempt a three-way merge. This option isn't on by default because it doesn't work if the commit the patch says it was based on isn't in your repository.

 

31.   If you're applying a number of patches from an mbox, you can also run the am   command in interactive mode with –i option, which stops at each patch it finds and asks if you want to apply it.

 

32.   It's often helpful to get a review of all the commits that are in the topic branch but that aren't in your master branch. You can exclude commits in the master branch by adding the --not option before the branch name. For example, if your contributor sends you two patches and you create a branch called contrib and applied those patches there, you can run this:

$ git log contrib --not master

 

33.  To see what changes each commit introduces, you can pass the -p option to git log   and it will append the diff introduced to each commit. To see a full diff of what would happen if you were to merge this topic branch with master branch, you may run this:

                    $ git diff master

Git directly compares the snapshots of the last commit of the topic branch you're on and the snapshot of the last commit on the master branch.

To have Git compare the last commit on your topic branch with the first common ancestor it has with the master branch, you can do that by explicitly figuring out the common ancestor and then running your diff on it:

$ git merge-base contrib master

36c7dba2c95e6bbb78dfa822519ecfec6e1ca649

$ git diff 36c7db

Or you can put three periods after another branch to do a diff between the last commit of the branch you're on and its common ancestor with another branch:

$ git diff master...topic

This command shows you only the work your topic branch has introduced since its common ancestor with master .

 

34.   One simple workflow of integrating contributed work is to merge contributed work into your master branch. In this scenario, you have a master   branch that contains basically stable code. When you have work in a topic branch that you've done or that someone has contributed and you've verified, you merge it into your master   branch, delete the topic branch, and then continue the process.

 

35.   If you have more developers or a larger project, you'll probably want to use at least a two-phase merge cycle. In this scenario, you have two long-running branches, master and develop   , in which you determine that master   is updated only when a very stable release is cut and all new code is integrated into the develop branch. You regularly push both of these branches to the public repository. Each time you have a new topic branch to merge in, you merge it into develop ; then, when you tag a release, you fast-forward master to wherever the now-stable develop branch is.

 

36.   In the scenario of Large-Merging Workflow, the Git project has four long-running branches: master , next , and pu (proposed updates) for new work, and maint   for maintenance backports. When new work is introduced by contributors, it's collected into topic branches in the maintainer's repository. At this point, the topics are evaluated to determine whether they're safe and ready for consumption or whether they need more work. If they're safe, they're merged into next   , and that branch is pushed up so everyone can try the topics integrated together. If the topics still need work, they're merged into pu instead. When it's determined that they're totally stable, the topics are re-merged into pu and are then rebuilt from the topics that were in next but didn't yet graduate to master . This means master almost always moves forward, next is rebased occasionally, and pu is rebased even more often. maint branch is forked off from the last release to provide backported patches in case a maintenance release is required.

 

37.   The other way to move introduced work from one branch to another is to cherry-pick it. A cherry-pick in Git is like a rebase for a single commit. It takes the patch that was introduced in a commit and tries to reapply it on the branch you're currently on. This is useful if you have a number of commits on a topic branch and you want to integrate only one of them, or if you only have one commit on a topic branch and you'd prefer to cherry-pick it rather than run rebase . Suppose you have a project that looks like:


If you want to pull commit e43a6 into your master branch, you can run:

$ git cherry-pick e43a6

This pulls the same change introduced in e43a6 , but you get a new commit SHA-1 value, because the date applied is different:


 

38.   When you've decided to cut a release, you'll probably want to drop a tag so you can re-create that release at any point going forward:

$ git tag -s v1.5 -m  'my signed 1.5 tag'

If you do sign your tags, you may have the problem of distributing the public PGP key used to sign your tags. The maintainer of the Git project has solved this issue by including their public key as a blob in the repository and then adding a tag that points directly to that content. To do this, you can first figure out which key you want:

$ gpg --list-keys

/Users/schacon/.gnupg/pubring.gpg

---------------------------------

pub   1024D/F721C45A 2009-02-09 [expires:  2010-02-09]

uid                  Scott Chacon <schacon@gmail.com>

sub   2048g/45D02282 2009-02-09 [expires: 2010-02-09]

 

Then, you can directly import the key into the Git database by exporting it and piping that through git hash-object   , which writes a new blob with those contents into Git and gives you back the SHA-1 of the blob:

$ gpg -a --export F721C45A  |  git hash-object -w --stdin

659ef797dl8l633c87ec71ac3f9ba29fe5775b92

 

Then you can create a tag that points directly to it by specifying the new SHA-1 value that the hash-object command gave you:

$ git tag -a maintainer-pgp-pub 659ef797d181633c87ec71ac3f9ba29fe5775b92

 

If you run git push --tags , the maintainer-pgp-pub tag will be shared with everyone. If anyone wants to verify a tag, they can directly import your PGP key by pulling the blob directly out of the database and importing it into GPG:

$ git show maintainer-pgp-pub | gpg --import

 

They can use that key to verify all your signed tags. Also, if you include instructions in the tag message, running git show <tag> will let you give the end user more specific instructions about tag verification.

 

39.   If you want to have a human-readable name to go with a commit, you can run git describe   on that commit. Git gives you the name of the nearest tag with the number of commits on top of that tag and a partial SHA-1 value of the commit you're describing:

$ git describe master

v1.6.2-rc1-20-g8c5b85c

git --version   also gives you something that looks like this. If you're describing a commit that you have directly tagged, it gives you the tag name. The git describe command favors annotated tags. You can also use this string as the target of a checkout or show command, although it relies on the abbreviated SHA-1 value at the end, so it may not be valid forever. For instance, the Linux kernel recently jumped from 8 to 10 characters to ensure SHA-1 object uniqueness, so older git describe output names were invalidated.

 

40.   You can create an archive of the latest snapshot of your code:

$ git archive master --prefix='project/' | gzip > `git describe master`.tar.gz

$ ls *.tar.gz

v1.6.2-rc1-20-g8c5b85c.tar.gz

You can also create a zip archive in much the same way, but by passing the --format=zip option to git archive :

$ git archive master --prefix='project/'  --format=zip > `git describe master` .zip

 

41.   A nice way of quickly getting a sort of change log of what has been added to your project since your last release or e-mail is to use the git shortlog   command. It summarizes all the commits in the range you give it:

$ git shortlog --no-merges master --not v1.0.1

You get a clean summary of all the commits since v1.0.1, grouped by author.

  • 大小: 15.7 KB
  • 大小: 44.4 KB
  • 大小: 42.4 KB
  • 大小: 57.8 KB
  • 大小: 103.6 KB
  • 大小: 46 KB
  • 大小: 15.8 KB
  • 大小: 16.1 KB
分享到:
评论

相关推荐

    基于ssm的网络教学平台(有报告)。Javaee项目,ssm项目。

    重点:所有项目均附赠详尽的SQL文件,这一细节的处理,让我们的项目相比其他博主的作品,严谨性提升了不止一个量级!更重要的是,所有项目源码均经过我亲自的严格测试与验证,确保能够无障碍地正常运行。 1.项目适用场景:本项目特别适用于计算机领域的毕业设计课题、课程作业等场合。对于计算机科学与技术等相关专业的学生而言,这些项目无疑是一个绝佳的选择,既能满足学术要求,又能锻炼实际操作能力。 2.超值福利:所有定价为9.9元的项目,均包含完整的SQL文件。如需远程部署可随时联系我,我将竭诚为您提供满意的服务。在此,也想对一直以来支持我的朋友们表示由衷的感谢,你们的支持是我不断前行的动力! 3.求关注:如果觉得我的项目对你有帮助,请别忘了点个关注哦!你的支持对我意义重大,也是我持续分享优质资源的动力源泉。再次感谢大家的支持与厚爱! 4.资源详情:https://blog.csdn.net/2301_78888169/article/details/144929660 更多关于项目的详细信息与精彩内容,请访问我的CSDN博客!

    2024年AI代码平台及产品发展简报-V11.pdf

    2024年AI代码平台及产品发展简报-V11

    蓝桥杯JAVA代码.zip

    蓝桥杯算法学习冲刺(主要以题目为主)

    QPSK调制解调技术研究与FPGA实现:详细实验文档的探索与实践,基于FPGA实现的QPSK调制解调技术:实验文档详细解读与验证,QPSK调制解调 FPGA设计,有详细实验文档 ,QPSK调制解调;

    QPSK调制解调技术研究与FPGA实现:详细实验文档的探索与实践,基于FPGA实现的QPSK调制解调技术:实验文档详细解读与验证,QPSK调制解调 FPGA设计,有详细实验文档 ,QPSK调制解调; FPGA设计; 详细实验文档,基于QPSK调制的FPGA设计与实验文档

    PID、ADRC和MPC轨迹跟踪控制器在Matlab 2018与Carsim 8中的Simulink仿真研究,PID、ADRC与MPC轨迹跟踪控制器在Matlab 2018与Carsim 8中的仿真研

    PID、ADRC和MPC轨迹跟踪控制器在Matlab 2018与Carsim 8中的Simulink仿真研究,PID、ADRC与MPC轨迹跟踪控制器在Matlab 2018与Carsim 8中的仿真研究,PID, ADRC和MPC轨迹跟踪控制器Simulink仿真模型。 MPC用于跟踪轨迹 ADRC用于跟踪理想横摆角 PID用于跟踪轨迹 轨迹工况有双移线,避障轨迹,正弦轨迹多种 matlab版本为2018,carsim版本为8 ,PID; ADRC; MPC; 轨迹跟踪控制器; Simulink仿真模型; 双移线; 避障轨迹; 正弦轨迹; MATLAB 2018; CarSim 8,基于Simulink的PID、ADRC与MPC轨迹跟踪控制器仿真模型研究

    基于Springboot的个性化图书推荐系统。Javaee项目,springboot项目。

    重点:所有项目均附赠详尽的SQL文件,这一细节的处理,让我们的项目相比其他博主的作品,严谨性提升了不止一个量级!更重要的是,所有项目源码均经过我亲自的严格测试与验证,确保能够无障碍地正常运行。 1.项目适用场景:本项目特别适用于计算机领域的毕业设计课题、课程作业等场合。对于计算机科学与技术等相关专业的学生而言,这些项目无疑是一个绝佳的选择,既能满足学术要求,又能锻炼实际操作能力。 2.超值福利:所有定价为9.9元的项目,均包含完整的SQL文件。如需远程部署可随时联系我,我将竭诚为您提供满意的服务。在此,也想对一直以来支持我的朋友们表示由衷的感谢,你们的支持是我不断前行的动力! 3.求关注:如果觉得我的项目对你有帮助,请别忘了点个关注哦!你的支持对我意义重大,也是我持续分享优质资源的动力源泉。再次感谢大家的支持与厚爱! 4.资源详情:https://blog.csdn.net/2301_78888169/article/details/144486173 更多关于项目的详细信息与精彩内容,请访问我的CSDN博客!

    Matlab实现Transformer-Adaboost时间序列预测的详细项目实例(含完整的程序,GUI设计和代码详解)

    内容概要:本文档详细介绍了一个利用Matlab实现Transformer-Adaboost结合的时间序列预测项目实例。项目涵盖Transformer架构的时间序列特征提取与建模,Adaboost集成方法用于增强预测性能,以及详细的模型设计思路、训练、评估过程和最终的GUI可视化。整个项目强调数据预处理、窗口化操作、模型训练及其优化(包括正则化、早停等手段)、模型融合策略和技术部署,如GPU加速等,并展示了通过多个评估指标衡量预测效果。此外,还提出了未来的改进建议和发展方向,涵盖了多层次集成学习、智能决策支持、自动化超参数调整等多个方面。最后部分阐述了在金融预测、销售数据预测等领域中的广泛应用可能性。 适合人群:具有一定编程经验的研发人员,尤其对时间序列预测感兴趣的研究者和技术从业者。 使用场景及目标:该项目适用于需要进行高质量时间序列预测的企业或机构,比如金融机构、能源供应商和服务商、电子商务公司。目标包括但不限于金融市场的波动性预测、电力负荷预估和库存管理。该系统可以部署到各类平台,如Linux服务器集群或云计算环境,为用户提供实时准确的预测服务,并支持扩展以满足更高频率的数据吞吐量需求。 其他说明:此文档不仅包含了丰富的理论分析,还有大量实用的操作指南,从项目构思到具体的代码片段都有详细记录,使用户能够轻松复制并改进这一时间序列预测方案。文中提供的完整代码和详细的注释有助于加速学习进程,并激发更多创新想法。

    液滴穿越障碍:从文献到案例的复现研究,液滴破裂与障碍物穿越:文献复现案例研究,液滴生成并通过障碍物破裂 该案例是文献复现,文献与案例一起 ,液滴生成; 障碍物破裂; 文献复现; 案例研究,液滴破

    液滴穿越障碍:从文献到案例的复现研究,液滴破裂与障碍物穿越:文献复现案例研究,液滴生成并通过障碍物破裂。 该案例是文献复现,文献与案例一起。 ,液滴生成; 障碍物破裂; 文献复现; 案例研究,液滴破裂:障碍挑战的文献复现案例

    蓝桥杯练习题_2.zip

    蓝桥杯算法学习冲刺(主要以题目为主)

    蓝桥杯笔记,用于个人学习进步.zip

    蓝桥杯算法学习冲刺(主要以题目为主)

    基于最小递归二乘法的MPC自适应轨迹跟踪控制优化 针对轮胎刚度时变特性提升模型精度与鲁棒性,仿真验证满足车辆低速高精度跟踪与高速稳定性提升 ,基于变预测时域MPC自适应轨迹跟踪控制与轮胎侧偏刚度优化提

    基于最小递归二乘法的MPC自适应轨迹跟踪控制优化 针对轮胎刚度时变特性提升模型精度与鲁棒性,仿真验证满足车辆低速高精度跟踪与高速稳定性提升。,基于变预测时域MPC自适应轨迹跟踪控制与轮胎侧偏刚度优化提升模型精度和鲁棒性,基于变预测时域的MPC自适应轨迹跟踪控制,针对轮胎刚度时变的特点造成控制模型精度降低,基于最小递归二乘法(RLS)估算的轮胎侧偏刚度,提升了模型的控制精度和鲁棒性,通过carsim与simulink联合仿真结果发现,改进后的轨迹跟踪控制器既满足了车辆低速行驶下的轨 迹跟踪精度,也一定程度上克服了高速下车辆容易失去稳定性的问题。 有详细的lunwen分析说明和资料,以及本人的,仿真包运行。 ,基于变预测时域的MPC; 自适应轨迹跟踪控制; 轮胎刚度时变; 控制模型精度降低; 最小递归二乘法(RLS)估算; 模型控制精度和鲁棒性提升; carsim与simulink联合仿真; 轨迹跟踪控制器; 车辆稳定性。,基于变预测时域MPC的轮胎刚度自适应轨迹跟踪控制策略研究

    GMSK调制解调技术研究:基于FPGA设计与实验详解,GMSK调制解调技术详解:基于FPGA设计的实验文档与实践应用,GMSK调制解调 FPGA设计,有详细实验文档 ,GMSK调制解调; FPGA设计

    GMSK调制解调技术研究:基于FPGA设计与实验详解,GMSK调制解调技术详解:基于FPGA设计的实验文档与实践应用,GMSK调制解调 FPGA设计,有详细实验文档 ,GMSK调制解调; FPGA设计; 详细实验文档; 实验结果分析,GMSK调制解调技术:FPGA设计与实验详解

    (源码)基于Arduino和Python的Cansat卫星系统.zip

    # 基于Arduino和Python的Cansat卫星系统 ## 项目简介 本项目是一个Cansat卫星系统,旨在设计和实现一个小型卫星模型,通过火箭发射至1公里高空,并使用地面站接收其传输的数据。项目涉及Arduino编程、Python数据处理和可视化。 ## 主要特性和功能 1. 硬件组件 使用Arduino Nano作为Cansat的微控制器。 搭载BMP 280温度和压力传感器、ATGM336H GPS模块、LoRa通信模块等。 地面站使用Arduino Uno和LoRa通信模块接收数据。 2. 数据处理 使用Python进行数据处理和可视化,包括数据清洗、计算风速、绘制温度、压力、风速和海拔随时间变化的图表等。 3. 通信与控制 通过LoRa模块实现Cansat与地面站之间的数据传输。 提供实时监视和记录数据的脚本。 ## 安装和使用步骤 ### 1. 硬件准备

    LongSung-USB-Drivers-V2.0-for-Windows

    U9300C 龙尚4G模块安装后模块才能正常使用,win7 win10驱动程序,支持USB转接板。

    (源码)基于Arduino平台的物联网温湿度监控系统.zip

    # 基于Arduino平台的物联网温湿度监控系统 ## 项目简介 这是一个基于Arduino平台的物联网温湿度监控项目,旨在通过简单的硬件设备实现环境数据的实时监测与远程管理。该项目适用于智能家居、农业种植等领域。 ## 项目的主要特性和功能 1. 温湿度数据采集通过Arduino板连接温湿度传感器,实时采集环境数据。 2. 数据传输将采集到的数据通过无线网络模块发送到服务器或远程终端。 3. 数据可视化可在电脑或移动设备端展示实时的温湿度数据。 4. 报警功能当温湿度数据超过预设阈值时,自动触发报警通知。 ## 安装使用步骤 前提假设用户已经下载了本项目的源码文件。以下是简单明了的安装使用步骤 1. 环境准备安装Arduino开发环境,配置必要的硬件接口。 2. 硬件连接将Arduino板与温湿度传感器、无线网络模块连接。 3. 代码上传将本项目提供的Arduino代码上传至Arduino板。

    基于需求响应与清洁能源接入的配电网重构优化:综合成本与混合整数凸规划模型分析(matlab实现),基于需求响应与清洁能源接入的配电网重构算法研究:网损与成本优化的仿真分析,高比例清洁能源接入下计及需求

    基于需求响应与清洁能源接入的配电网重构优化:综合成本与混合整数凸规划模型分析(matlab实现),基于需求响应与清洁能源接入的配电网重构算法研究:网损与成本优化的仿真分析,高比例清洁能源接入下计及需求响应的配电网重构(matlab代码) 该程序复现《高比例清洁能源接入下计及需求响应的配电网重构》,以考虑网损成本、弃风弃光成本和开关操作惩罚成本的综合成本最小为目标,针对配电网重构模型的非凸性,引入中间变量并对其进行二阶锥松弛,构建混合整数凸规划模型,采用改进的 IEEE33 节点配电网进行算例仿真,分析了需求响应措施和清洁能源渗透率对配电网重构结果的影响。 该程序复现效果和出图较好(详见程序结果部分),注释清楚,方便学习 ,高比例清洁能源; 需求响应; 配电网重构; 二阶锥松弛; 综合成本最小化; MATLAB代码; IEEE33节点配电网; 复现效果; 出图; 注释清楚。,Matlab代码复现:高比例清洁能源接入下的配电网重构模型与需求响应分析

    (源码)基于C++的RapidJSON库测试项目.zip

    # 基于C++的RapidJSON库测试项目 ## 项目简介 本项目是一个基于C++的RapidJSON库测试项目,主要用于测试RapidJSON库的功能正确性、性能以及稳定性。RapidJSON是一个高效的C++ JSON解析生成库,广泛应用于各种场景。本项目通过编写一系列的单元测试,覆盖了RapidJSON库的主要功能点,包括JSON解析、生成、内存管理、编码转换等,以确保RapidJSON库在各种情况下都能正确、稳定地工作。 ## 项目的主要特性和功能 1. 单元测试框架使用Google Test测试框架进行单元测试,确保测试的可靠性和可扩展性。 2. 全面测试覆盖覆盖了RapidJSON库的主要功能点,包括JSON解析、生成、内存管理、编码转换等,以及针对各种输入数据的测试。 3. 性能测试通过性能基准测试,评估RapidJSON库在处理不同规模和类型的JSON数据时的性能表现。

    蓝桥杯单片机十一届试题.zip

    蓝桥杯算法学习冲刺(主要以题目为主)

    vmware虚拟机安装教程.docx

    内容概要:本文详细介绍如何安装和初步使用 VMware 虚拟机,从下载安装 VMware 到创建和配置新的虚拟机。主要内容包括:软件选择和安装步骤、虚拟机的新建配置、操作系统安装及初始化设置、安装 VMware Tools 提升性能以及一些常用的 VMWare 功能,如虚拟网络的不同连接方式及其应用场景。同时介绍了 VMware 软件在网络连接管理和服务配置方面的一些要点,确保虚拟机正常运行。 适用人群:计算机操作较为熟练、有意搭建不同操作系统测试环境的技术人员,以及想要了解虚拟机基本概念及应用的学生。 使用场景及目标:适合于个人用户进行系统兼容性和安全性的验证;适用于企业或开发者做软件测试、模拟复杂环境下作业,确保不影响宿主机正常工作的前提下完成多种任务;适用于教学培训环境中部署实验平台。此外,还可以用来隔离特定业务流程(比如银行工具)、探索不同类型操作系统的特点。 其他说明:需要注意的是,为了避免安装过程中出现问题,建议暂时关闭杀毒软件和防火墙。安装 VMware 需要接受许可协议,同时可以选择安装路径和安装类型(典型/自定义)。最后,对于网络设置,默认提供的三种模式——桥接模式、仅主机模式和 NAT 模式,可以帮助用户根据不同需求灵活调整网络连接方式。

    java毕业设计之网上校友录设计源码.zip

    java毕业设计源码

Global site tag (gtag.js) - Google Analytics