SyDEVS Library Framework Overview

Slides:



Advertisements
Similar presentations
C Language.
Advertisements

George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
Objects and Classes First Programming Concepts. 14/10/2004Lecture 1a: Introduction 2 Fundamental Concepts object class method parameter data type.
Principles of Procedural Programming
Functions.
OOP Languages: Java vs C++
OMNET++. Outline Introduction Overview The NED Language Simple Modules.
Lesson 5 – Looking at the Output MATSim Tutorial, 2011, Shanghai 1.
Functions Parameters & Variable Scope Chapter 6. 2 Overview  Using Function Arguments and Parameters  Differences between Value Parameters and Reference.
Classes and Class Members Chapter 3. 3 Public Interface Contract between class and its clients to fulfill certain responsibilities The client is an object.
Modeling Process CSCE 668Set 14: Simulations 2 May be several algorithms (processes) runs on each processor to simulate the desired communication system.
A Metadata Based Approach For Supporting Subsetting Queries Over Parallel HDF5 Datasets Vignesh Santhanagopalan Graduate Student Department Of CSE.
Discrete Event Modeling and Simulation of Distributed Architectures using the DSSV Methodology E. de Gentili, F. Bernardi, J.F. Santucci University Pascal.
Develop DEVS Models Using DEVSJAVA Dr. Feng Gu. DEVS atomic model Elements of an atomic model input events output events state variables state transition.
Programming Languages and Paradigms Object-Oriented Programming (Part II)
Advanced BioPSE NCRR Dynamic Compilation Joint Session #1: Advanced BioPSE/SCIRun.
DAY OVERLOADING.  Overloading: allows for making several methods with the same name (method heading) which differ from each other in the type.
Towards a Choreography for IRS-III Stefania Galizia and John Domingue WSMO Workshop, September 2004.
Applications Development
DEVS Based Modeling and Simulation of the CORBA POA F. Bernardi, E. de Gentili, Pr. J.F. Santucci {bernardi, gentili, University.
Visual Specification of a DSL Processor Debugger Tamás Mészáros and Tihamér Levendovszky Budapest University of Technology and Economics.
Module 8: Delegates and Events. Overview Delegates Multicast Delegates Events When to Use Delegates, Events, and Interfaces.
SCHOOL OF ELECTRICAL AND COMPUTER ENGINEERING | SCHOOL OF COMPUTER SCIENCE | GEORGIA INSTITUTE OF TECHNOLOGY MANIFOLD Manifold Execution Model and System.
CCA Common Component Architecture Distributed Array Component based on Global Arrays Manoj Krishnan, Jarek Nieplocha High Performance Computing Group Pacific.
Department of Electronic & Electrical Engineering Functions Parameters Arguments Pointers/dereference & * Scope Global/Local Storage Static/Automatic.
ADVANCED POINTERS. Overview Review on pointers and arrays Common troubles with pointers Multidimensional arrays Pointers as function arguments Functions.
CSE 332: C++ templates and generic programming II Review: Concepts and Models Templates impose requirements on type parameters –Types that are plugged.
Java 5 Class Anatomy. User Defined Classes To this point we’ve been using classes that have been defined in the Java standard class library. Creating.
Lecture 9 Symbol Table and Attributed Grammars
APPENDIX a WRITING SUBROUTINES IN C
How to be generic Lecture 10
Queues Rem Collier Room A1.02
Constructing Precedence Table
Review What is an object? What is a class?
2.7 Inheritance Types of inheritance
CSC241: Object Oriented Programming
Inheritance and Big O And your first reading assignment
Module 5: Common Type System
Command Line Arguments
CHAPTER 7 & 8 REVIEW QUESTIONS
CS3340 – OOP and C++ L. Grewe.
Exceptions, Interfaces & Generics
Computing with C# and the .NET Framework
C++ -> Java - A High School Teacher's Perspective
EE 422C Java FX.
CIS 488/588 Bruce R. Maxim UM-Dearborn
CS 1430: Programming in C++.
SyDEVS Introduction Theory – Paradigm – Implementation
Classes In C#.
SyDEVS Library Building7m Tutorial
Polymorphism.
The Building Blocks Classes: Java class library, over 1,800 classes:
Operator Overloading; String and Array Objects
Object Oriented Programming
Reference Parameters.
Multidimensional Arrays
Recursive Linked Lists
What time is it?. What time is it? Major Concepts: a data structure model: basic representation of data, such as integers, logic values, and characters.
Iterators Professor Hugh C. Lauer CS-2303, System Programming Concepts
Sound Processing with Pure Data
Class.
Fundamental Programming
Data Structures & Algorithms
Recursive Linked Lists
Recursive Linked Lists
Final Exam Review Inheritance Template Functions and Classes
CECS 130 Final Exam Review Session
C# Language & .NET Platform 9th Lecture
Chapter 5 Classes.
Data Structures & Programming
Presentation transcript:

SyDEVS Library Framework Overview Autodesk Research April 2018

Classic Theory (1970s)

SyDEVS Approach Simulation Node

SyDEVS Approach Simulation Node

SyDEVS Approach Simulation Node

SyDEVS Approach Simulation Node

SyDEVS Approach Message Passing Simulation Node

SyDEVS Approach Message Passing Simulation Node Data

SyDEVS Approach Dataflow Message Passing Function Node Simulation Node

SyDEVS Approach Dataflow Message Passing Dataflow Function Node Simulation Node Data

SyDEVS Approach Dataflow Message Passing Dataflow Function Node Simulation Node Data Statistics (for Discovery) or Performance Metrics (for Design)

Proposed Visual Interface https://autodeskresearch.com/publications/designingdevs

Proposed Visual Interface

Proposed Visual Interface

Proposed Visual Interface

Proposed Visual Interface

Example top building_dynamics initial_temperature weather building_closed_system building_dynamics building_dynamcs_node initial_temperature parameter_node initial_temperature weather weather_node outdoor_temperature building_info building_info_node building_layout thermodynamics thermodynamics_node wall_resistance temperature_field comfort comfort_node initial_position initial_position_node occupant_temperature occupant occupant_node walking_speed parameter_node initial_position walking_speed average_temperature average_temperature statistic_node occupant_position frame_duration parameter_node frame_duration building_vis building_vis_node

Example – Function Nodes

Example – Function Nodes Flow Input Flow Output (Inputs) (Outputs)

Example top building_dynamics initial_temperature weather building_closed_system building_dynamics building_dynamcs_node initial_temperature parameter_node initial_temperature weather weather_node outdoor_temperature building_info building_info_node building_layout thermodynamics thermodynamics_node wall_resistance temperature_field comfort comfort_node initial_position initial_position_node occupant_temperature occupant occupant_node walking_speed parameter_node initial_position walking_speed average_temperature average_temperature statistic_node occupant_position frame_duration parameter_node frame_duration building_vis building_vis_node

Example – Simulation Nodes

Example – Simulation Nodes (Inputs) System Node Message Input Flow Input Flow Output (Parameters) (Statistics) Message Output (Outputs)

Example – Atomic Nodes

Example – Composite Nodes

Example – Flow Links

Example – Message Links

Example – Inward Links

Example – Inner Links

Example – Outward Links

Example top building_dynamics initial_temperature weather building_closed_system building_dynamics building_dynamcs_node initial_temperature parameter_node initial_temperature weather weather_node outdoor_temperature building_info building_info_node building_layout thermodynamics thermodynamics_node wall_resistance temperature_field comfort comfort_node initial_position initial_position_node occupant_temperature occupant occupant_node walking_speed parameter_node initial_position walking_speed average_temperature average_temperature statistic_node occupant_position frame_duration parameter_node frame_duration building_vis building_vis_node

Node Example top building_dynamics initial_temperature weather building_closed_system building_dynamics building_dynamcs_node initial_temperature parameter_node initial_temperature weather weather_node outdoor_temperature Node building_info building_info_node building_layout thermodynamics thermodynamics_node wall_resistance temperature_field comfort comfort_node initial_position initial_position_node occupant_temperature occupant occupant_node walking_speed parameter_node initial_position walking_speed average_temperature average_temperature statistic_node occupant_position frame_duration parameter_node frame_duration building_vis building_vis_node

Example Example Node class thermodynamics_node : public atomic_node { port<flow, input, thermodynamic_temperature> initial_temperature_input; port<flow, input, std::pair<array2d<int64>, distance>> building_layout_input; port<flow, input, float64> wall_resistance_input; port<message, input, thermodynamic_temperature> outdoor_temperature_input; port<message, output, array2d<thermodynamic_temperature>> temperature_field_output; protected: array2d<int64> L; // building layout int64 nx; // number of cells in the x dimension int64 ny; // number of cells in the y dimension float64 wall_R; // wall resistance array2d<thermodynamic_temperature> TF; // temperature field duration step_dt; // time step duration planned_dt; // planned duration virtual duration initialization_event(); virtual duration unplanned_event(duration elapsed_dt); virtual duration planned_event(duration elapsed_dt); virtual void finalization_event(duration elapsed_dt); };

Example Example Types of Nodes class thermodynamics_node : public atomic_node { public: port<flow, input, thermodynamic_temperature> initial_temperature_input; port<flow, input, std::pair<array2d<int64>, distance>> building_layout_input; port<flow, input, float64> wall_resistance_input; port<message, input, thermodynamic_temperature> outdoor_temperature_input; port<message, output, array2d<thermodynamic_temperature>> temperature_field_output; protected: array2d<int64> L; // building layout int64 nx; // number of cells in the x dimension int64 ny; // number of cells in the y dimension float64 wall_R; // wall resistance array2d<thermodynamic_temperature> TF; // temperature field duration step_dt; // time step duration planned_dt; // planned duration virtual duration initialization_event(); virtual duration unplanned_event(duration elapsed_dt); virtual duration planned_event(duration elapsed_dt); virtual void finalization_event(duration elapsed_dt); };

Types of Nodes class system_node { }; class atomic_node: public system_node virtual duration initialization_event() = 0; virtual duration unplanned_event(duration elapsed_dt) = 0; virtual duration planned_event(duration elapsed_dt) = 0; virtual void finalization_event(duration elapsed_dt) = 0; class composite_node : public system_node void inward_link(port<dmode, input, T>& src_port, port<dmode, input, T>& dst_port); void inner_link(port<dmode, output, T>& src_port, port<dmode, input, T>& dst_port); void outward_link(port<dmode, output, T>& src_port, port<dmode, output, T>& dst_port); } class function_node : public system_node virtual void flow_event() = 0; // Also... }; class collection_node ... Types of Nodes

Event Handlers class system_node { }; class atomic_node: public system_node virtual duration initialization_event() = 0; virtual duration unplanned_event(duration elapsed_dt) = 0; virtual duration planned_event(duration elapsed_dt) = 0; virtual void finalization_event(duration elapsed_dt) = 0; class composite_node : public system_node void inward_link(port<dmode, input, T>& src_port, port<dmode, input, T>& dst_port); void inner_link(port<dmode, output, T>& src_port, port<dmode, input, T>& dst_port); void outward_link(port<dmode, output, T>& src_port, port<dmode, output, T>& dst_port); } class function_node : public system_node virtual void flow_event() = 0; // Also... }; class collection_node ... Event Handlers

Visual Interface Event Handlers

Ports 3 1 1 Example top building_dynamics initial_temperature weather building_closed_system building_dynamics building_dynamcs_node initial_temperature parameter_node initial_temperature weather weather_node Ports 3 outdoor_temperature 1 building_info building_info_node building_layout thermodynamics thermodynamics_node wall_resistance 1 temperature_field comfort comfort_node initial_position initial_position_node occupant_temperature occupant occupant_node walking_speed parameter_node initial_position walking_speed average_temperature average_temperature statistic_node occupant_position frame_duration parameter_node frame_duration building_vis building_vis_node

Example Example Ports class thermodynamics_node : public atomic_node { public: port<flow, input, thermodynamic_temperature> initial_temperature_input; port<flow, input, std::pair<array2d<int64>, distance>> building_layout_input; port<flow, input, float64> wall_resistance_input; port<message, input, thermodynamic_temperature> outdoor_temperature_input; port<message, output, array2d<thermodynamic_temperature>> temperature_field_output; protected: array2d<int64> L; // building layout int64 nx; // number of cells in the x dimension int64 ny; // number of cells in the y dimension float64 wall_R; // wall resistance array2d<thermodynamic_temperature> TF; // temperature field duration step_dt; // time step duration planned_dt; // planned duration virtual duration initialization_event(); virtual duration unplanned_event(duration elapsed_dt); virtual duration planned_event(duration elapsed_dt); virtual void finalization_event(duration elapsed_dt); }; 3 1 1

Example Example Data types class thermodynamics_node : public atomic_node { public: port<flow, input, thermodynamic_temperature> initial_temperature_input; port<flow, input, std::pair<array2d<int64>, distance>> building_layout_input; port<flow, input, float64> wall_resistance_input; port<message, input, thermodynamic_temperature> outdoor_temperature_input; port<message, output, array2d<thermodynamic_temperature>> temperature_field_output; protected: array2d<int64> L; // building layout int64 nx; // number of cells in the x dimension int64 ny; // number of cells in the y dimension float64 wall_R; // wall resistance array2d<thermodynamic_temperature> TF; // temperature field duration step_dt; // time step duration planned_dt; // planned duration virtual duration initialization_event(); virtual duration unplanned_event(duration elapsed_dt); virtual duration planned_event(duration elapsed_dt); virtual void finalization_event(duration elapsed_dt); };

Data types // Core Types pointer // not sortable; encapsulates std::shared_ptr<void> bool // sortable int64 // sortable float64 // sortable std::string // sortable quantity<U> // sortable; includes e.g. distance, duration, quantity<decltype(_kg*_m/_s/_s)> arraynd<T, ndims> // valid if T is valid; not sortable std::pair<T1, T2> // valid if T1, T2 are valid; sortable if T1, T2 are sortable std::tuple<T> // valid if T is valid; sortable if T is sortable std::tuple<T, Ts...> // valid if T, Ts... are valid; sortable if T, Ts... are sortable std::vector<T> // valid if T is valid; sortable if T is sortable std::set<T> // valid if T is valid; sortable if T is sortable std::map<Key, T> // valid if T is valid and Key is valid and sortable; // sortable if T is sortable std::shared_ptr<T> // not sortable T default_value<T>() // create a default value of core type T tostring(const T&) // convert the value of core type T to a string Data types

2nd Example #include <my_cpp_libraries/my_CFD_solver.h> class CFD_node : public atomic_node { public: port<message, output, array3d<float>> velocities; protected: my_CFD_solver_state CFD_state; virtual duration initialization_event() CFD_state = initialize_my_CFD_solver(); return 5_s; // planned_dt } virtual duration planned_event(duration elapsed_dt) advance_one_time_step_using_my_CFD_solver(CFD_state); velocities.send(CFD_state.get_velocities); };

2nd Example Possible to wrap existing simulation libraries (eg. CFD) #include <my_cpp_libraries/my_CFD_solver.h> class CFD_node : public atomic_node { public: port<message, output, array3d<float>> velocities; protected: my_CFD_solver_state CFD_state; virtual duration initialization_event() CFD_state = initialize_my_CFD_solver(); return 5_s; // planned_dt } virtual duration planned_event(duration elapsed_dt) advance_one_time_step_using_my_CFD_solver(CFD_state); velocities.send(CFD_state.get_velocities); };

2nd Example The library includes multidimensional arrays #include <my_cpp_libraries/my_CFD_solver.h> class CFD_node : public atomic_node { public: port<message, output, array3d<float>> velocities; protected: my_CFD_solver_state CFD_state; virtual duration initialization_event() CFD_state = initialize_my_CFD_solver(); return 5_s; // planned_dt } virtual duration planned_event(duration elapsed_dt) advance_one_time_step_using_my_CFD_solver(CFD_state); velocities.send(CFD_state.get_velocities); };

2nd Example #include <my_cpp_libraries/my_CFD_solver.h> class CFD_node : public atomic_node { public: port<message, output, array3d<float>> velocities; protected: my_CFD_solver_state CFD_state; virtual duration initialization_event() CFD_state = initialize_my_CFD_solver(); return 5_s; // planned_dt } virtual duration planned_event(duration elapsed_dt) advance_one_time_step_using_my_CFD_solver(CFD_state); velocities.send(CFD_state.get_velocities); }; Elapsed durations and planned durations are important concepts

2nd Example #include <my_cpp_libraries/my_CFD_solver.h> class CFD_node : public atomic_node { public: port<message, output, array3d<float>> velocities; protected: my_CFD_solver_state CFD_state; virtual duration initialization_event() CFD_state = initialize_my_CFD_solver(); return 5_s; // planned_dt } virtual duration planned_event(duration elapsed_dt) advance_one_time_step_using_my_CFD_solver(CFD_state); velocities.send(CFD_state.get_velocities); }; SI units are represented explicitly and checked at compile-time

Review

Review – ?

Review – Function Nodes

Review – Function Nodes ? ?

Review – Function Nodes Flow Input Flow Output (Inputs) (Outputs)

Review

Review – ?

Review – Simulation Nodes

Review – Simulation Nodes System Node ? ? ? ?

Review – Simulation Nodes (Inputs) System Node Message Input Flow Input Flow Output (Parameters) (Statistics) Message Output (Outputs)

Review – ?

Review – Atomic Nodes

Review – ?

Review – Composite Nodes

Review – ?

Review – Flow Links

Review – ?

Review – Message Links

Review – ?

Review – Inward Links

Review – ?

Review – Inner Links

Review – ?

Review – Outward Links