Script Manager Training Module

Slides:



Advertisements
Similar presentations
Request Dispatching for Cheap Energy Prices in Cloud Data Centers
Advertisements

SpringerLink Training Kit
Luminosity measurements at Hadron Colliders
From Word Embeddings To Document Distances
Choosing a Dental Plan Student Name
Virtual Environments and Computer Graphics
Chương 1: CÁC PHƯƠNG THỨC GIAO DỊCH TRÊN THỊ TRƯỜNG THẾ GIỚI
THỰC TIỄN KINH DOANH TRONG CỘNG ĐỒNG KINH TẾ ASEAN –
D. Phát triển thương hiệu
NHỮNG VẤN ĐỀ NỔI BẬT CỦA NỀN KINH TẾ VIỆT NAM GIAI ĐOẠN
Điều trị chống huyết khối trong tai biến mạch máu não
BÖnh Parkinson PGS.TS.BS NGUYỄN TRỌNG HƯNG BỆNH VIỆN LÃO KHOA TRUNG ƯƠNG TRƯỜNG ĐẠI HỌC Y HÀ NỘI Bác Ninh 2013.
Nasal Cannula X particulate mask
Evolving Architecture for Beyond the Standard Model
HF NOISE FILTERS PERFORMANCE
Electronics for Pedestrians – Passive Components –
Parameterization of Tabulated BRDFs Ian Mallett (me), Cem Yuksel
L-Systems and Affine Transformations
CMSC423: Bioinformatic Algorithms, Databases and Tools
Some aspect concerning the LMDZ dynamical core and its use
Bayesian Confidence Limits and Intervals
实习总结 (Internship Summary)
Current State of Japanese Economy under Negative Interest Rate and Proposed Remedies Naoyuki Yoshino Dean Asian Development Bank Institute Professor Emeritus,
Front End Electronics for SOI Monolithic Pixel Sensor
Face Recognition Monday, February 1, 2016.
Solving Rubik's Cube By: Etai Nativ.
CS284 Paper Presentation Arpad Kovacs
انتقال حرارت 2 خانم خسرویار.
Summer Student Program First results
Theoretical Results on Neutrinos
HERMESでのHard Exclusive生成過程による 核子内クォーク全角運動量についての研究
Wavelet Coherence & Cross-Wavelet Transform
yaSpMV: Yet Another SpMV Framework on GPUs
Creating Synthetic Microdata for Higher Educational Use in Japan: Reproduction of Distribution Type based on the Descriptive Statistics Kiyomi Shirakawa.
MOCLA02 Design of a Compact L-­band Transverse Deflecting Cavity with Arbitrary Polarizations for the SACLA Injector Sep. 14th, 2015 H. Maesaka, T. Asaka,
Hui Wang†*, Canturk Isci‡, Lavanya Subramanian*,
Fuel cell development program for electric vehicle
Overview of TST-2 Experiment
Optomechanics with atoms
داده کاوی سئوالات نمونه
Inter-system biases estimation in multi-GNSS relative positioning with GPS and Galileo Cecile Deprez and Rene Warnant University of Liege, Belgium  
ლექცია 4 - ფული და ინფლაცია
10. predavanje Novac i financijski sustav
Wissenschaftliche Aussprache zur Dissertation
FLUORECENCE MICROSCOPY SUPERRESOLUTION BLINK MICROSCOPY ON THE BASIS OF ENGINEERED DARK STATES* *Christian Steinhauer, Carsten Forthmann, Jan Vogelsang,
Particle acceleration during the gamma-ray flares of the Crab Nebular
Interpretations of the Derivative Gottfried Wilhelm Leibniz
Advisor: Chiuyuan Chen Student: Shao-Chun Lin
Widow Rockfish Assessment
SiW-ECAL Beam Test 2015 Kick-Off meeting
On Robust Neighbor Discovery in Mobile Wireless Networks
Chapter 6 并发:死锁和饥饿 Operating Systems: Internals and Design Principles
You NEED your book!!! Frequency Distribution
Y V =0 a V =V0 x b b V =0 z
Fairness-oriented Scheduling Support for Multicore Systems
Climate-Energy-Policy Interaction
Hui Wang†*, Canturk Isci‡, Lavanya Subramanian*,
Ch48 Statistics by Chtan FYHSKulai
The ABCD matrix for parabolic reflectors and its application to astigmatism free four-mirror cavities.
Measure Twice and Cut Once: Robust Dynamic Voltage Scaling for FPGAs
Online Learning: An Introduction
Factor Based Index of Systemic Stress (FISS)
What is Chemistry? Chemistry is: the study of matter & the changes it undergoes Composition Structure Properties Energy changes.
THE BERRY PHASE OF A BOGOLIUBOV QUASIPARTICLE IN AN ABRIKOSOV VORTEX*
Quantum-classical transition in optical twin beams and experimental applications to quantum metrology Ivano Ruo-Berchera Frascati.
The Toroidal Sporadic Source: Understanding Temporal Variations
FW 3.4: More Circle Practice
ارائه یک روش حل مبتنی بر استراتژی های تکاملی گروه بندی برای حل مسئله بسته بندی اقلام در ظروف
Decision Procedures Christoph M. Wintersteiger 9/11/2017 3:14 PM
Limits on Anomalous WWγ and WWZ Couplings from DØ
Presentation transcript:

Script Manager Training Module DSS Training Material Script Manager Training Module Script Manager Module NBI Secretariat

What you learn in this module? This module introduces you to Script definition and uses What the Iron Python scripting language? Script Manager basics. Creating Script in the DSS. Handling changes and metadata DSS Predefined scripts

Script Definition and Uses

Script definition and uses What is a script? A script is a series of instructions that are written using a scripting language to typically automate repetitive tasks. These instructions are interpreted or carried out by another program rather than directly by the computer processor . To give an example, The DSS is a complied program which runs directly by the computer processor. If you write a script within the DSS, you don't need to compile it and run separately. It can run within the DSS. In this case the script instructions are passed to the computer processor via the DSS.

Script definition and uses What are the uses of Scripts the DSS? Automate repetitive tasks. Calculate the value of an indicator. Create customized functionality in the DSS such as creating other Managers Tools.

What the Iron Python scripting language? Iron Python is the scripting language of the DSS. It is an open-source implementation of the Python programming language. Iron Python is integrated with the .NET Framework and can use both the .NET Framework and Python libraries.

Review Questions Question 1: What is a script? Question 2: What are the uses of scripts in the DSS?

Script Manager Basics

Script Manager basics - Components The Scripts Explorer The Scripts view. Tools Explorer window The Properties Window.

Script Manager basics - Storage Scripts can be viewed either by group or storage. Viewing by group is similar to arranging scripts in folders to easily access them (similar to other DSS objects in other explorers). So what is viewing by storage? A storage is equivalent to a file. In the DSS, a storage contains the scripts and functions coded in IronPython

Script Manager basics - Types The scripts in the DSS have the following two types: Scripts with no arguments (i.e. simple scripts) which does not need arguments (i.e. data) to be passed to it before running. Scripts with arguments (i.e. complex scripts) which does need arguments (i.e. data) to be passed to it before running.

Exercises and Review Questions Exercise 1: Activating the Script Manager Exercise 2: Adding a 'user defined' group Question 1: List the components of the Script Manager. Question 2: Scripts can be viewed by group or storage in the DSS. (True/False)

Creating Scripts in the DSS

Creating scripts in the DSS Script details To make a script known to the DSS (i.e. its name appears within the explorer when view by group), it must have a header defining its author, and description for simple scripts and input (if with arguments) and output (if it returns a value) for complex scripts. Scripts that are added without such headers, they become only local to the storage where they are saved and cannot be called directly from the DSS explorer.

Creating scripts in the DSS Script details To make a script known to the DSS (i.e. its name appears within the explorer when view by group), it must have a header defining its author, and description for simple scripts and input (if with arguments) and output (if it returns a value) for complex scripts. Scripts that are added without such headers, they become only local to the storage where they are saved and cannot be called directly from the DSS explorer.

Live Demo

Creating scripts in the DSS Script arguments The complex scripts are different from the simple ones as they have arguments. These arguments can be: numbers text or A DDS object (i.e. a time series or a scenario).

Exercises and Review Questions (Simple scripts module) Exercise 1: Adding, saving and running a simple script Exercise 2: Debugging a simple script Exercise3: Indentifying script errors Question 1: What are the details that are needed for a complex script to be known to the DSS?

Exercises and Review Questions (Complex scripts module) Exercise 1: Adding, saving and running a complex script Exercise 2: Debugging a complex script Question 1: Give three examples of complex script arguments? Question 2: DSS objects cannot be passed to a complex script. (True\False)

Handling Changes and Metadata

Handling changes and metadata Displayed in the Properties window. All operations are logged from recent to old. Metadata can be imported and edited.

Exercises and Review Questions Exercise 1: Handling Script change Log Exercise 2: Handling Metadata Question 1: Explain how Script storage data metadata is imported and updated within the DSS. Question 2: The DSS keeps track of all the operations made on a script. (True/False) Question 3: When a script storage metadata schema is imported into the DSS, can this schema be made available for time series data? (True/False)

DSS Predefined Indicators

DSS Predefined indicators A scripting library was developed for the calculation of the DSS predefined indicators. The scripts are organized into the shown eight storages.

DSS Predefined Social scripts

DSS Predefined Environmental Scripts

DSS Predefined Economic Scripts

Expanding the DSS predefined indicators Steps to add a new script: Define what the script will do Identify the data that is needed for the script. This can be external (i.e. data does not exist in the DSS but can be organized in spreadsheets and imported into the DSS) or internal (e.g. generated by DSS Modeling tools). Add the script into a temporary storage within the Script Manager code the script to using Iron Python Test the script to ensure it works properly. If testing is successful add the new script into a storage that is already created into the DSS or if does not fit with any of them create a new storage for it. Ensure the header of the script is updated with a good description.

Expanding the DSS predefined indicators Steps to modify an existing script: Identify what needs to be changed with the script. Identify if more data that is needed for the script. Modify the existing script code. Test the script to ensure it works properly. If testing is successful add to the modified script into the same storage. Ensure your modifications are added to the header of the script.

Review Questions Question 1: What are the main predefined script storages in the DSS? Question 2: The DSS predefined set of scripts cannot be expanded. (True/False)

Advanced Scripting

Application Programming Interface (API) What is an API? It is a set of routines, protocols, and tools for building software applications. It expresses a software components in terms of its operations, inputs, outputs, and underlying types. It defines functionalities that are independent of their respective implementations, which allows definitions and implementations to vary without compromising each other. A good API makes it easier to develop a program by providing all the building blocks. A programmer then puts the blocks together.

What is the DSS API? It is set of functions and procedures that allow the creation of applications (e.g. scripts) which access the features or data of the DSS. It has the functionality that would allow you to use Iron Python to do this. Examples are: To get time series data from the Timeseries Manger to calculate its average value. To get scenario data from the Scenario Manger to run it in a loop. To get A GIS feature data from the GIS Manager to manipulate its data.

Exercises and Review Questions Exercise 1: Accessing DSS objects using Iron Python(time series object) Exercise 2: Accessing tools using a script Question 1: What is an API?