实例介绍
编程语言的学习,针对仿真工具digsilent
Table of contents Table of contents 1 Getting Started in DPL A Quick Tutorial.an 1.1 Create a small sample project 1.2 Create a dPL command object................. 1.3 Create a filter and put it inside the dpl command object 14 Write the dPl Script……,…,…,… n日n日日111111日日自 2 Anatomy of a dPL Object.aaaaa 14 3 Basic DPL Scripting…… a18 3.1 Accessing Network objects 3. 1. 1 By the General Selection......... 18 3.1.2 By sets……… 20 3.13 By Filters,… 21 3.1.4 By Code.,,… 3.2 Identifying, Accessing and modifying object Parameters 24 3.2.1 Identifying variable Names for a Parameter 24 3.2.2 Accessing Parameters . ,25 3.2. 3 Modifying Parameters 3.3 Creating New Ol 33.1 Copy from an Internal Template…… 25 3.3.2 Copy from an External Template .. 3.3. 3 Create a New object by Code 28 3.4 Checking if a Project is Actⅳe..… 29 3.5 Navigating Folders and object Contents 29 3.5. 1 Project Folders 3.5.2 Object Contents…,,,…,… 3.5.3 Objects in a study case ∴.31 3.6 Accessing study cases..... 日自道日111_日道日日E1 31 3.7 EXecuting Calculations 33 3.8 Accessing Results,…,…,…,,, naa1111日1画 ,34 38.1 Static Calculations( Load flow, Short circuit,etc)…….… 34 3.82 Dynamic Simulations..,…,,,…,,…,…,…,…,…,,……,………,34 3.9 Plotting results 35 3.9. 1 Creating a New virtual instrument page........ 自日面盖画面11a 35 3.9.2 Creating a virtual Instrument : ■■ 重国 着鲁 35 3.9.3 Adding objects and variables to plots 1日日n口 画面 3.9.4 Plotting EXample... DPL Cookbook Table of contents 4 Advanced dPL Scripting. mammaaaaaBaaBaameeeBBBaBBBBBBBBBBBBBB.... Bm a .. aa a0 38 4.1 DPL Sub-Scripts( or subroutines)…… 1““量日日自主1 4.1.1 Executing Sub-Scripts......... 4. 1.2 Passing Arguments to Sub-Scripts 39 4.1.3 Accessing Sub-Script Results 4.2 Vectors Maps and Matrices........::. 41 4.3 Reading from and Writing to External Files 41 4.4 Topological Searches 41 5 Working with Results Files ammaaaaaaaaaaaaamaaaaaa 42 5.1 Adding results Files to the DPL Script…… 5.2 Structure of results files a日 5.3 Loading a results File into Memory...,…,… 5.4 Getting the Relevant Column Number 1日面 5.5 Getting Data from the results File...... 5.6 Getting the Time interval Data 5.7 Finding the Number of Time Intervals...,..,.,.... 45 5.8 A Simple example∴ 45 6 Working with virtual Instrument Panels……….…47 1 Introduction 6.2 Local title blocks 621 Creating Local Title blocks Manually…,,,,…,… 8 6.2.2 Creating Local Title blocks in DPL 6.2.3 Title block dPL Script Exampl 6. 3 Constants in visplots 51 6.3. 1 Constants dPL Script Example.....,..........,......... 51 6. 4 Exporting vi panels to WMF aaaa::::::::::aa ,52 DPL Cookbook Table of contents 1 Getting Started in DPL-A Quick Tutorial This is a short step-by-step tutorial that attempts to get the user started in writing and running DPL scripts Before going through this tutorial, the user should already have a basic grasp of powerfactory handling and performing simple tasks such as load flows and short circuit simulations 1.1 Create a small sample project Firstly, we will create a small sample project. Create a new project and draw the following simple 20kv network using line types from the global library Single Busbar/20kV Bus >os > T Terminal(1) Terminal(2) 1.25MA 3.75NVA Run a load flow to make sure the model works DPL Cookbook Table of contents 1.2 Create a DPL command object 1. Go to the scripts folder of the project library 日旧 DPL Tut 日 d Lbrary cd Equipment Type brary a0 Operational Library S iScr cl0 Table Reports cl0 Templates 山 User Defined Models H吕 s Nel work Model ch Operation Scenarios 由 Study 2. Right-click anywhere in the data window and select New->Others. T by Show New Folder Define Others dd to Select as Base to Compare tp Spread sheet Format 3. Select DPL Command(ComDPL)"and press OK DPL Cookbook Table of contents Element Selection -Settings\ Default\Element Selection. Int Newobj*2) Elemente OK C Terminals Substation, Site C Branch Net elements anc C Bus Nel Elements C Types for Net Elements C Controllers/Motor Driven Machine C Composite Model CC C DPL Command and more Other Eement DPL Command ( ComDp 4. Call the script DPL_ Loading" DPL Command-Saripts\DPLscript1 ComDolesae Basin Options Advanced Options| Scipt Desciption I Version I Execute Name Cose hpu parameters Cancel Etemal Objects: Name DPL Cookbook Table of contents 1.3 Create a filter and put it inside the DPL command object 1. DPL command objects can contain other objects within it. To see the contents of a dPL command object click on the " Contents"button DPLC Command- Scnpts\DPL_Loading ComL ?83 asic Options Advanced Options Script Description Verson Execute Name DPL_Loading Close General se ection Input parameters Cancel value Description Check Scripts\DPL Loadin 间X回哈心野的出团的口 Cammand Object modified Object modified by O object(s)ofo 0 object(s) selected 2. We want to create a filter object. Right-click anywhere in the contents area and select New->Others Select"General Filter(SetFilt)"and press oK Element Selection-SettingslDetault\Element Selection IntNewobi*? Eements OK C Terminals, Substation. Site C Bus Net日 ements C Types for Net Bements Controlers/Motor Driven Machines Common Model C Block F DPL Command and more Element General Riter (Set Fit DPL Cookbook 8 Table of contents Name the filter Lines"and in the object Filter"option select Line General Filter- Scripts\DPLLoading\Lines SetFilt ?义 Name and Location Advanced Graphic I OK Look in 厂 Include subfolders 厂 Stop at matching Folder Terminal synchronous Machine Relevant Objects for Calculation Area Interconnecting Branches General load 2-Winding Transformer 3-Winding Transformer External Grid Others 4. In the Look in"option select Network data Please select Object 旧DFL№ aryze Resuts FL Trager &FedirOutp E C DPL Tutorlal 图Lay 日8 Network Model 图 ff Diagrams Wr叫 Power Plants A OPerators 百 h operation Scenarios 5. Finally, check the Include Subfolders"option The final filter object should look like this: DPL Cookbook 9 Table of contents General Filter -Scripts\DPL_Loading\Lines. SetFilt Name and Location Advanced Graphic I OK Cancel Object Fiter.EmLne Look in I Network Model \Network Data y Include Subfolders 厂 Stop at matching Folder Relevant Objects for Calculate Area Interconnecting Branches 6. Click on the"apply"button, and the three line objects should appear in a data window L- Object Filter:".ElmLne 回曲③的出边的A回 Name Gnd Type Terminal i Terminal i Teminal j emna zone Typ Lne. Typ Tow, T Substation Substation N2XS(F)2Y1x120RM Single Busbar Bus Terminal ne2 N2XS(F)2Y1x120RMSingle Busbar20kV/Bus Terminal(1) N2XS(F)2Y 1x120RM Single Busbar Bus Teminal(2) d1.I bI\ Flexble Data Basic Data Load Flow(VDE /EC Short Crcut_ Complete Short-CrcutANSI Short- Circut _IEC 61363 RMS-Sim Ln 1 3 object(s)of 3 1 object(s)selected Drag Drop 7. Press OK. The filter object should now be saved inside the dpl command object. When objects are saved inside the DPL command object, they can be called by a dPL script by simply referencing the name of the saved object, i. e in this case"Lines Scripts\DPL_Loading: ×回物8数的出团尚≥回 Name Command Object modfied Object modified by 0122011093655 julius Ln 1 1 object(s)of1 object(s)selected Drag Drop Now we will start to write the DPL script. Close the Contents window DPL Cookbook 【实例截图】
【核心代码】
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论