-
Matlab绘制邻接矩阵
Matlab绘制邻接矩阵 Floyd算法的基本思想如下:从任意节点A到任意节点B的最短路径不外乎2种可能,1是直接从A到B,2是从A经过若干个节点X到B。所以,我们假设Dis(AB)为节点A到节点B的最短路径的距离,对于每一个节点X,我们检查Dis(AX) + Dis(XB) < Dis(AB)是否成立,如果成立,证明从A到X再到B的路径比A直接到B的路径短,我们便设置Dis(AB) = Dis(AX) + Dis(XB),这样一来,当我们遍历完所有节点X,Dis(AB)中记录的便是A到B的最短路径的距离。
- 2020-12-08下载
- 积分:1
-
Building Trading Bots Using Java [2016]
Building Trading Bots Using JavaEnglish | 6 Jan. 2017 | ISBN: 1484225198 | 300 Pages | PDF | 6.22 MBBuild an automated currency trading bot from scratch with java. In this book, you will learn about the nitty-gritty of automated trading and have a closer look at Java, the Spring Framework, event-Building Trading Bots Using Javahekhar VarshneyGrangesSwitzerlandISBN13(pbk):978-1-4842-2519-6ISBN-13(electronic): 978-1-4842-2520-2DOI10.1007/978-1-4842-2520-2Library of Congress Control Number: 2016961228Copyright o 2016 by Shekhar VarshneyThis work is subject to copyright All rights are reserved by the Publisher, whether the wholeor part of the material is concerned, specifically the rights of translation, reprinting, reuse ofillustrations, recitation, broadcasting, reproduction on microfilms or in any other physicalway, and transmission or information storage and retrieval, electronic adaptation, computersoftware, or by similar or dissimilar methodology now known or hereafter developedTrademarked names, logos, and images may appear in this book. Rather than use a trademarksymbol with every occurrence of a trademarked name, logo, or image we use the names, logos,nd images only in an editorial fashion and to the benefit of the trademark owner, with nointention of infringement of the trademarkThe use in this publication of trade names, trademarks, service marks, and similar terms, even ifthey are not identified as such, is not to be taken as an expression of opinion as to whetheror notthey are subject to proprietary rightsWhile the advice and information in this book are believed to be true and accurate at thedate of publication, neither the authors nor the editors nor the publisher can accept any legalresponsibility for any errors or omissions that may be made. The publisher makes no warranty,express or implied, with respect to the material contained hereinManaging Director: Welmoed SpahrLead Editor: Steve AnglinEditorial Board: Steve Anglin, Pramila Balan, Laura Berendson, Aaron Black, Louise Corrigan,Jonathan gennick, Robert Hutchinson, Celestin Suresh John, Nikhil KarkalJames Markham, Susan McDermott, Matthew Moodie, Natalie Pao, Gwenan SpearingCoordinating Editor: Mark PowersCopy Editor: Kezia EndsleyCompositor: SPi GlobalIndexer: SPi GlobaArtist: SPi GlobalDistributed to the book trade worldwide by Springer Science+ Business Media New York,233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax(201)348-4505e-mailorders-ny@springer-sbm.comorvisitwww.springeronline.com.ApressMedia,Llcisa California LlC and the sole member(owner) is Springer Science Business Media FinanceInc(SSBM Finance Inc). SSBM Finance Inc is a Delaware corporationForinformationontranslationspleasee-mailrights@apress.comorvisitwww.apress.comApress and friends of ed books may be purchased in bulk for academic, corporate, or promotionaluse eBook versions and licenses are also available for most titles For more information referenceourSpecialbUlkSales-ebookLicensingwebpageatwww.apress.com/bulk-salesAny source code or other supplementary materials referenced by the author in this text areavailabletoreadersatwww.apress.com.Fordetailedinformationabouthowtolocateyourbookssourcecodegotowww.apress.com/source-code/.ReaderscanalsoaccesssourcecodeatSpringerlink in the Supplementary Material section for each chapter.Printed on acid-free paperedicated to the angels in my lifemy mother, my wife Preshita, and my two daughters Mihika and anyaLast but not the least, my college professor, Dr. Rajat Moona,who sowed the seeds of computer programming in my dnaContents at a glanceAbout the authorChapter 1: Introduction to Trading Bota.Chapter 2: Account Management27Chapter 3: Tradeable Instruments47Chapter 4: Event Streaming: Market Data EventsChapter 5: Historic Instrument Market Data aeEERaar75Chapter 6: Placing Orders and trades97Chapter 7: Event Streaming: Trade/Order/Account Events159Chapter 8: Integration with Twitter aamna■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■175Chapter 9: Implementing Strategies.am.203Chapter 10: Heartbeating ammmmmmmmmmmn 219Chapter 11: E-Mail Notifications ammmmatmmammmmmmmnmamman 231Chapter 12: Configuration, Deployment, and Running the Bot 243Chapter 13: Unit Testing■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■口■■■■■263Index…277ContentsAbout the author,i币Chapter 1: Introduction to Trading Bot m mmmemmIRD■■■■■■■■■■■■■■■■■■■■■■■■■What Is a Trading Bot?Why do We need a trading bot?...3The capabilities of the Trading BotDesign goalsCode organization and software Stack Used .OANDA REST API as Reference Implementation.m....ammann. 8Opening an oanda practice Account80 ANDA JS0 N Keys…………Constructor Dependencies for OANDA Implementations15Event-Driven architectureG0 ogle eventBus…18Provider helper Interface20Trading Config class.........mmonann......mtnonnn.......tnn 22Obtaining the Source Code.aaeeaaaee... 24Try It Yourself section..aaaaaa.. 24Chapter 2: Account Managementa27Account provider interface31A Concrete Implementation for AccountDataProvider32Encapsulating Everything Behind a Generic AccountlnfoService37Try It yourself43VIlCONTENTSChapter 3: Tradeable Instruments47InstrumentA Concrete Implementation for InstrumentDataProvider52Encapsulating Everything Behind a Generic Instrumentservice56Try It yourself58Chapter 4: Event Streaming: Market Data Events mmmmmmmmmm. 61Streaming Market Data Interface.A Concrete Implementation for MarketData StreamingService .m..63Downstream Market data event disseminationMarketEventcallback……69Try It Yourself,…70Chapter 5: Historic Instrument Market Data mmmmmmmm 75How to read a candlestick75Enum Defining the Candlestick Granularity76Define pojo to hold candlestick information77Historical Data Provider Interface79A Concrete Implementation for HistoricMarketDataProvidern81Discussion An Alternate Database Implementation85Candlesticks for Moving Average Calculations....88MovingAverage calculation Service89Try lt YourselfChapter 6: Placing Orders and Trades■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■97Order pojo definition98Order Management provider Interface101A Concrete Implementation for Order ManagementProvider,103A Simple orderInfoService,115CONTENTSValidating Orders Before Execution: PreOrderValidationService... 116Putting It All Together in an OrderExecution Service .mmmm... 121Trade pojo definition124Trade Management provider Interface127A Concrete Implementation for TradeManagementProvider129Encapsulating Read Operations Behind TradelnfoService.....m. 136Try It yourself144Chapter 7: Event Streaming: Trade/order/Account Events m 159Streaming Event Interface161A Concrete Implementation for Events StreamingService162Try It Yourself171Chapter 8: Integration with Twitter■■■■■■■■■■■■■■■■■■■■175Creating a Twitter Application175Spring Social180Using and Configuring Spring Social180Harvesting FX Tweets181Tweetharvester Interface wmmm. 185XTWeethandler Interface,,,………AbstractFxtweethandler base class186User-Specific TweetHandlersTry lt Yourself.Chapter 9: Implementing Strategies.aa203Copy Twitter Strategy204Fade the Move Strategy210Try It Yourself214CONTENTSChapter 10: Heartbeating ammammmmmmmmmmmmmmm 219HeartBeatPayload. ..m......m. 219Streaming the Heartbeat Interface220A Concrete Implementation for HeartBeatstreamingService221HeartBeatcallback Interface223DefaultheartBeatservice223Try It Yourself226Chapter 11: E-Mail notifications n231Notification Design.EmailPayLoad poJoEmailContentgenerator interface……232Sample Implementations.EventEmailNotifier service mm...m. 235Try It Yourself.237Chapter 12: Configuration, Deployment, and running the bot m 243Configuring the Trading Bot243Core Beans configuration244Twitter-Related Beans Configuration.....................247Provider Beans Configuration248Strategies configuration…254Services Configuration254Building the Bot...,,,,,…,,……256Running the bot.....,,……259CONTENTSChapter 13: Unit Testinga263Using Mockito as a Mocking Framework.Mocking Http iNteraction..............m....................e........................ 264Mocking Streams.The versatile verify Mockit0…....,.,,…271Mocking Twitter Interaction .EclEmma Code Coverage Tool for Eclipse ide.nDDDDDDDDDm274Index■■■■■■■■■■■■■■■■■■■口En277
- 2020-12-07下载
- 积分:1
-
语音信号处理毕业设计论文
这是一篇关于语音信号处理的毕业设计论文。希望对大家的学习有所帮助。
- 2020-12-11下载
- 积分:1
-
企业人力资源管理(系统管理、人力资源档案管理、薪酬管理、调动管理、培训管理、激励管理、招聘管理和标准化数据报表八个模块)
为了提高企业信息化水平,促进企业管理的规范化、制度化、流程化,XX单位决定实施人力资源管理系统。希望通过这个系统的实施规范人事档案的管理,规范薪酬体系和薪酬发放的管理,规范人事的调动管理、培训管理和激励管理。并对招聘工作的职位发布、简历、面试、招聘题库、招聘考试、录用等环节加以规范。系统还需提供人事档案的导出和报表功能
- 2020-12-01下载
- 积分:1
-
基于Hadoop平台实现一个分布式网络爬虫
基于Hadoop实现一个分布式网络爬虫系统的理论描述
- 2020-12-12下载
- 积分:1
-
功率谱MATLAB程序
用MATLAB编写功率谱程序,包含各种方法,会对您有所帮助
- 2020-12-02下载
- 积分:1
-
Python3 实现大众点评网酒店信息和酒店评论的网页爬虫
内容:根据已有的的"大众点评网"酒店主页的URL地址,自动抓取所需要的酒店的名称、图片、经纬度、酒店价格、用户评论数量以及用户评论的用户ID、用户名字、评分、评论时间等,并且将爬取成功的内容存放到.txt文档中。平台:Python 3.5.3;Eclipse for Pydev主程序:DianpingSpider.py注意:设置了时间,模拟器等,较为有效地防止大众点评网的反爬虫结束检测到同一个IP访问频繁而屏蔽爬取,但是未能实现IP代理。
- 2020-11-27下载
- 积分:1
-
Codejock.Xtreme.Toolkit.Pro.v15.3.1+VS2013补丁
这个是15.3.1 完全破解版 。 目前只支持到VS2010 。 感谢网友share 的VS2013 补丁 。 补丁实际就是一个VS2013 的工程文件 。 具体如何使用,请参照我的CSDN blog.
- 2020-05-29下载
- 积分:1
-
NGSIM使用手册(1)
美国NGSIM系统的使用手册,方便读者高效的利用NGSIM进行数据下载,完成交通领域的研究Technical Report Documentation Page1. Report No2. Government Accession no3. Recipients Catalog NoFHWA-HOP-06-0124. Title and subtitle5. Report DateNext Generation Simulation(NGSIM) Data Format Planly20046. Performing Organization Code7. Author(s8. Performing Organization report noVijay Kovvali, richard margiotta, Robert franc, vassiliAlexiadis9. Performing Organization Name and Address10. Work Unit NoCAMBRIDGE SYSTEMATIC INC150 CAMBRIDGE PARK DRIVE SUITE 400011. Contract or grant noCAMBRIDGE MA 02140DTFH61-02-C-0003612. Sponsoring Agency Name and Address13. Type of Report and Period CoveredDepartment of transportationFinal reportFederal Highway AdministrationJuly 2003-july 2004Office of Acquisition Management14. Sponsoring Agency Code400 Seventh Street SW, RM 4410Washington, DC 2059015. Supplementary notesFHWA COTR: John Halkias, Office of Operations, and James Colyar, Office of Operations r&d16. AbstractThe Next Generation Simulation Program(NGSIM) Data Format Plan was developed to define thestructure, documentation, and transfer requirements for data that will be collected for estimationcalibration, and validation of core behavioral algorithms. The development of the data Format Plan isbased on existing formats that are relevant to ngsim and augmented to fill in gaps. to this end, a reviewof existing data formats was undertaken and their relevance to NGSiM was assessed. The review includeddata standards developed for intelligent transportation systems(ITS), data formats developed specificallyfor traffic simulation models, and data formats developed for broader transportation applications. Thespecified data formats were developed with the objective of promoting efficient research by maintainingonsistency between data collection and research, and providing consistent storage and transmittalprotocols. On the other hand, this plan intentionally avoids over specification of data formats, so as tominimize unnecessary limitations to research. This document specifies the conceptual data model by meansof Unified Modeling Language UMl class diagrams; the data dictionary in the data standard prescribed bP1489-1999 format developed by the Institute of Electrical and Electronics Engineers(IEEE); the dataexchange structure for data transfer from user to user or from the database/repository to users; and theNGSIM metadata17. Key words1 8. Distribution StatementNext generation simulation, NGSIM, trafficNo restrictions. This document is available to thesimulation, high-level plan, traffic data collection, public through the National Technical Informationvehicle trajectory dataService, Springfield, VA2216119. Security Classif. (of this report) 20. Security Classif. (of this page) 21. No of Pages22. PriceUnclassifiedUnclassifiedForm dot e1700.7(8-72)Reproduction of completed pages authorizedTABLE OF CONTENTSEXECUTIVE SUMMARY1.0 INTRODUCTION1.1High- Level plan context……垂垂垂垂·着垂垂垂垂非垂·非垂垂看垂音非非;·垂垂音看垂看垂1.2 Background1.3 Data Collection Types……1344581. 4 Data Conversion1.5 Data Formats·····.···············.··.···.·;···..·.··..·.···2.0 NGSIM DATA REQUIREMENTS22 Microsimulation Software Data format,…………172.1 NGSIM Data…192.3 Rcquirements for NgsiM data Collection..................193.0 RECOMMENDED NGSIM DATA FORMATS..m. 233.1 NGSIM Data model233.2 NGSIM Data Dictionary……………243.3 NGSIM Metadata.............................253.4 NGSIM Data Exchange Format273.5 File and Directory Naming Convention……293.6 Summary30REFERENCES31APPENDIX A-REVIEW OF EXISTING TRANSPORTATION DATA FORMATS3APPENDIX B-ACCURACY REQUIREMENTS FOR NGSIM DATACOLLECTION,45APPENDIX C-DATA MODEL∴….,,53APPENdIXD-DATA DICTIONARY.APPENDIX E-METADATA. ...........................................................................................99APPENdIX F-SYSTEM-STATE DATA看香音看音香n117List of FiguresFigure 1 Diagram. NGSIM task interdependencies4Figure2. Diagran. Data format classification relevant to ngsim1………Figure 3. Diagram. Top level data model of general traffic simulation55Figure4. Diagram. Influencing factors database packages………………56Figure 5. Diagram. Behavioral models packages57Figure6. Diagran. Facility type generalization…………18Figure 7. Diagram. Traffic management systems generalization......59Figure 8. Diagram. Transit management systems generalizationFigure9. Diagran. nvironment generalization.………………………0Figure 10. Diagram NTCIP Controller class diagram61Figure 11 Diagram Actuated traffic signal controller generalization2Figure12 Diagram. Generalized microsimulation data model………………63Figure 13 Diagram Data concept components and constructs(IEEE Std 1489-1999)66List of tablesTable 1. Example validation data by algorithm categoryTable 2. Summary of NGSiM categorizations for data formatsTable 3. Accuracy requirements for vehicle trajectory data. ..45Table 4. Accuracy requirements for instrumented vehicle data.........46Table 5. Accuracy requirements for wide-area detector data......... 47Table 6. Accuracy requirements for nctwork-rclated data48Table 7. Accuracy requirements for representative transportation managementsystems data52Table 8. Terminology for UMLmodeler54Table 9. Data dictionary for NgSim.67Table 10 processing documentation metadata for ngsimwwwwwm116Table1l. Requisite vehicle trajectory data…………………………117Table 12. requisite wide-area detector data requirements……118EXECUTIVE SUMMARYThe Next Generation Simulation Program(NGsim) Data Format plan was developed todefine the structure, documentation, and transfer requirements for data that will be col-lected for estimation, calibration, and validation of core behavioral algorithms. Thedevelopment of the data format plan is based on existing formats that are relevant toNGSIM and augmented to fill in gaps. To this end, a review of existing data formats wasundertaken and their relevance to ngsim was assessed. The review included data standards developed for intelligent transportation systems (ITS), data formats developed spe-cifically for traffic simulation models and data formats developed for broader transporta-tion applications. The specified data formats were developed with the objective of pro-moting efficient research by maintaining consistency between data collection andresearch, and providing consistent storage and transmittal protocols. On the other handthis plan intentionally avoids overspecification of data formats, so as to minimize unnecessary limitations to researchFour data format components were specified in this document, including: 1)data model,2)data dictionary, 3 )metadata, and 4) data exchange formatNGSIM Data Model- The conceptual data model for NGSIM data formats is pre-sented by means of Unified Modeling Language() class diagrams. Used in con-junction with the data dictionary, the data model allows for construction of a formaldatabase/repository for NGSIM validation dataNGSIM Data Dictionary This provides definition of individual data elementsrequired by NGsim. It follows the data standard prescribed by P1489-1999 formatdeveloped by the Institutc of Elcctrical and Electronics Engineers(ieee)NGSIM Data Exchange Format- The data cxchange structure dcfincs how datashould be transferred from user to user or from the database /repository to users. Thisdocument specifies the framework for developing data exchange formats by providingthe data model and the data dictionary; it also provides clear guidance on the formatstandards with which the data exchange format should conform Currently it doesnot provide specific schema for the data exchange formatsNGSIM Metadata- This includes both traditional metadata(definitions, specificationsand valid value lists for data elements and general information about the dataset andits availability); and processing metadata(what has happened to the data from data col-lection to data archival). Administrative metadata formats were adapted fromContent Standard for Digital Geospatial Metadata(FGDC-STD-001-1998), developedby the Federal Geographic Data Committee(FGDC). Recommendations for NGSiMprocessing metadata are based on the guidance provided in ASTM E2259-03, devel-oped by the American Society for Testing and Materials(ASTm)1.0 INTRODUCTIONThe objectives of the NGsim program include the followingDevelopment of a core set of open behavioral algorithms in support of traffic simulation with a primary focus on microscopic modelingCollection of extensive data that will be used for estimation calibration and validationof the core behavioral algorithms; and storing the data in a repository that can be uni-versally accessedThe High-Level Plan for DatasetsTask E3)identified different kinds of traffic data col-lection methods and technologies and recommended three kinds of data collection effortsfor ngsim, including vehicle trajectory data wide area detector data and instrumentedvehicle dataThis report Task F)presents the documentation, format structure, and transfer requirements for the ngsim data formats for these data collection efforts identified in task e3This report is organized as followsExecutive Summary -Provides an executive summary of this documentSection1.0-Provides an overview and introduction to this report, including the con-text of the data format plan within NGsIM, information on NGsim data collection anddata types, information on data conversion, general information on data formats, anda summary of available transportation data formats and their relevance for ngsimSection 2.0-Presents definitions and categorization for different data types, and pro-vides ngsim data requirementsSection 3.0-Presents data format recommendations for the NGsim program,including a data model, data elements for the data dictionary, metadata to describe thedata collection effort and data exchange formatsReferences-Presents references used in developing this data format planAppendix a-Presents a review of existing transportation data formatsAppendix B-Presents accuracy requirements for NGSiM data collectionAppendix C- Presents a UML representation of the ngsim data modelAppendix D-Presents a high-level NGSIM data dictionaryAppendix E- Presents metadata categories, dictionary, and recommended metadataformats for ngsim1.1 HIGH-LEVEL PLAN CONTEXTInterdependencies among NGSIM tasks are shown in figure 1. The High-Level Plan forDatasets(Task E. 3) presents an assessment of existing datasets of potential use for NGSIM,and makes recommendations on the focus for nGsim data collection methodologies. Thisreport on the data Format Plan task f) provides recommendations on the data exchangeformat(s) for NGSIM data collection efforts. The data formats are also influenced by theHigh-Level Verification and Validation Plan(task e 2)Task E 1-1Core algorithmAssessmentTask e,3Task e.1-2Task e2High-LevelCore AlgorithmHigh-Level Verificationlan for DatasetsPlanandⅤ alidation planTask eData format planFigure 1 Diagram. NGSIM task interdependencies.1.2 BACKGROUNDThe NGSiM field data collection effort pursues data required for developing, estimating,calibrating and validating traffic behavioral algorithms. Tactical route execution, opera-tional driving, and en-route strategic traveler behaviors were identified as the focus of theNGSIM core behavioral algorithm research in the identification and prioritization of coreAlgorithms Task D)report. The High-Level Verification and Validation Plan(task e2)provides an example of the data collection datasets for each algorithm category as shownin table 1. the table illustrates the extent over which data must be collected for each levelof algorithm. For example, for operational driving algorithms, a single stretch of roadwayon a freeway will likely be sufficient, while, for development of tactical driving algo-rithms, the data collection effort should be expanded to include the freeway section andmultiple entry and exit ramps that feed the freeway. The data formats developed in thisplan address the data, both static and dynamic, that are pertinent to the data collectionefforts necessary for developing and validating all three categories of driver behavioralalgorithms4
- 2020-12-05下载
- 积分:1
-
简易秒表时钟的设计含C语言及proteus仿真
含C程序 proteus仿真 本设计任务 (1)以24h(小时)计时方式,显示格式为: 13.-25-15 (2)用八位LED数码管显示时、分、秒 (3)使用按键开关可实现时分调整 (4)使用按键开关可实现时分秒表 /时钟功能转换通过按键进行时钟/秒表功 能的转换,时钟计时每1s进行加1操作,秒表计时每10ms进行加1操 作。 按键实现计时启动、暂停及清零功能。 省电模式
- 2020-12-11下载
- 积分:1