SlideShare uma empresa Scribd logo
1 de 17
Poles Position A preliminary study for a unified time-series model data warehouse   Davide Moraschi Competitiveness and Sustainability
[object Object],[object Object],Database Notes The structure of the database will determine both the complexity of the statements needed to pass information back and forth with Vensim and the efficiency with which these statements can be executed. If you are passing small amounts of data then it is best to use the most convenient database structure and write very explicit queries and output statements.  If you are passing a larger amount of data you may want to emulate the simple example that comes with Vensim .  You can then use Triggers or other mechanisms supported by the database you are using to do any necessary internal transformations prior to Vensim’s database reads and successive to its database writes .
Simple Database Example The model  odbctest.mdl  along with the Microsoft Access Database  odbctest.mdb  provides a simple example of the ODBC connectivity. The database has a table describing variables along with a unique index for each variable subscript combination. There are no internal constraints on referential integrity in this database, but those should be included for a more complete application.
Data access from Vensim is done via ODBC and vdi/vdo files. The syntax of these files is briefly explained in the documentation: VDI files are treated as standard changes files and read when  simulation starts:
[object Object],[object Object],[object Object]
Data access from GAMS is done via GDX files. This is a proprietary binary format, and several tools are available to produce such files from different sources.
In order to create a “common” database we must first create a “common” nomenclature. In Vensim we speak about Variables, Subscripts, Ranges, Subranges In GAMS we speak about Parameters, Sets, Elements
Dimension Subscript Dimension Element Element Element Vector Range, Subrange Set Variable Variable Parameter Common name Vensim name GAMS name
WOOD = Variable CATCUSTOMER = Vector [AUT,URBAN,LPETROL] = Dimension AUT = Element
TSTRAD = Variable SS = Vector ( mmpdr ,  aus ,  nzl )  = Dimension mmpdr  = Element
TIME SERIES Identification TIME SERIES  Value … 0.5853 0.5868 0.5875 0.5906 … 1998 1997 1996 1995 … 5 Y1995 4 Y1994 7 Y1993 5 Y1992 1 Y1976
VARIABLES EXECUTIONS DIMENSIONS VALUES ELEMENTS VECTORS Many-to-Many Many-to-Many Many-to-Many One-to-Many Many-to-Many
Visual Basic GDX File VPM File GDXIO.DLL VENDLL32.DLL  OO4O GDXIO and VENDLL32 are standard windows API libraries, can be called from any DLL compliant programming language. OO4O is a COM interface, can be called from any COM aware programming language.
http://test.jrc.es/morasdaTests/Viewer.cfm
retval& = vensim_get_data( ByVal FileList(v%),  ByVal VarList(i%) & SubList(ii%),  ByVal "time",  varvals(0),  timevals(0),  ByVal ZERO) gdxdatareadstrstart(ap&, synr&, nrrecs&) gdxdatareadstr(ap&, astrelements, avals, afdim&)
SQL2GMS  is a tool to convert data from an  SQL database  into GAMS readable format. The source is any data source accessible through Microsoft’s Data Access components including  ADO ,  ODBC  and  OLEDB . The target is a  GAMS Include File  or a  GAMS GDX File . SQL2GMS, Version 3.0, November 2006 Erwin Kalvelagen, GAMS Development Corp
 

Mais conteúdo relacionado

Mais procurados

How to create custom dashboards in Elastic Search / Kibana with Performance V...
How to create custom dashboards in Elastic Search / Kibana with Performance V...How to create custom dashboards in Elastic Search / Kibana with Performance V...
How to create custom dashboards in Elastic Search / Kibana with Performance V...PerformanceVision (previously SecurActive)
 
Size as an Advantage: How Big Enterprises Can Move Fast
Size as an Advantage: How Big Enterprises Can Move FastSize as an Advantage: How Big Enterprises Can Move Fast
Size as an Advantage: How Big Enterprises Can Move FastChetan Desai
 
"Why we all build bad architectures and how to stop doing it", Vova Kyrychenko
"Why we all build bad architectures and how to stop doing it", Vova Kyrychenko"Why we all build bad architectures and how to stop doing it", Vova Kyrychenko
"Why we all build bad architectures and how to stop doing it", Vova KyrychenkoFwdays
 
Five Trends in Real Time Applications
Five Trends in Real Time ApplicationsFive Trends in Real Time Applications
Five Trends in Real Time Applicationsconfluent
 
Resilience from Theory to Practice
Resilience from Theory to PracticeResilience from Theory to Practice
Resilience from Theory to PracticeLivePerson
 
jBPM5: Bringing more Power to your Business Processes
jBPM5: Bringing more Power to your Business ProcessesjBPM5: Bringing more Power to your Business Processes
jBPM5: Bringing more Power to your Business ProcessesKris Verlaenen
 
Automated Integrated Testing with MongoDB
Automated Integrated Testing with MongoDBAutomated Integrated Testing with MongoDB
Automated Integrated Testing with MongoDBMongoDB
 
Team Foundation Server 2008 Overview
Team Foundation Server 2008 OverviewTeam Foundation Server 2008 Overview
Team Foundation Server 2008 OverviewSteve Lange
 
Testing Microservices
Testing MicroservicesTesting Microservices
Testing MicroservicesNagarro
 
Cqrs + event sourcing pyxis v2 - en
Cqrs + event sourcing   pyxis v2 - enCqrs + event sourcing   pyxis v2 - en
Cqrs + event sourcing pyxis v2 - enEric De Carufel
 
Tips For a Successful Cloud Proof-of-Concept - RightScale Compute 2013
Tips For a Successful Cloud Proof-of-Concept - RightScale Compute 2013Tips For a Successful Cloud Proof-of-Concept - RightScale Compute 2013
Tips For a Successful Cloud Proof-of-Concept - RightScale Compute 2013RightScale
 
SOA vs Microservices vs SBA
SOA vs Microservices vs SBASOA vs Microservices vs SBA
SOA vs Microservices vs SBAMichael Sukachev
 
"Production Driven Development", Serhii Kalinets
"Production Driven Development", Serhii Kalinets"Production Driven Development", Serhii Kalinets
"Production Driven Development", Serhii KalinetsFwdays
 
VMworld 2015: vRealize Operations Insight: Manage vSphere and Your Entire Dat...
VMworld 2015: vRealize Operations Insight: Manage vSphere and Your Entire Dat...VMworld 2015: vRealize Operations Insight: Manage vSphere and Your Entire Dat...
VMworld 2015: vRealize Operations Insight: Manage vSphere and Your Entire Dat...VMworld
 
Impact 2013 2971 - Fundamental integration and service patterns
Impact 2013 2971 - Fundamental integration and service patternsImpact 2013 2971 - Fundamental integration and service patterns
Impact 2013 2971 - Fundamental integration and service patternsBrian Petrini
 
apidays LIVE Australia - Building an Enterprise Eventing Platform by Gnanagur...
apidays LIVE Australia - Building an Enterprise Eventing Platform by Gnanagur...apidays LIVE Australia - Building an Enterprise Eventing Platform by Gnanagur...
apidays LIVE Australia - Building an Enterprise Eventing Platform by Gnanagur...apidays
 
Supercharge Your Integration Services
Supercharge Your Integration Services�Supercharge Your Integration Services�
Supercharge Your Integration ServicesChristina Lin
 
Caching for Microservices Architectures: Session I
Caching for Microservices Architectures: Session ICaching for Microservices Architectures: Session I
Caching for Microservices Architectures: Session IVMware Tanzu
 

Mais procurados (20)

How to create custom dashboards in Elastic Search / Kibana with Performance V...
How to create custom dashboards in Elastic Search / Kibana with Performance V...How to create custom dashboards in Elastic Search / Kibana with Performance V...
How to create custom dashboards in Elastic Search / Kibana with Performance V...
 
Size as an Advantage: How Big Enterprises Can Move Fast
Size as an Advantage: How Big Enterprises Can Move FastSize as an Advantage: How Big Enterprises Can Move Fast
Size as an Advantage: How Big Enterprises Can Move Fast
 
"Why we all build bad architectures and how to stop doing it", Vova Kyrychenko
"Why we all build bad architectures and how to stop doing it", Vova Kyrychenko"Why we all build bad architectures and how to stop doing it", Vova Kyrychenko
"Why we all build bad architectures and how to stop doing it", Vova Kyrychenko
 
Five Trends in Real Time Applications
Five Trends in Real Time ApplicationsFive Trends in Real Time Applications
Five Trends in Real Time Applications
 
Resilience from Theory to Practice
Resilience from Theory to PracticeResilience from Theory to Practice
Resilience from Theory to Practice
 
Workshop on CIFS / SMB Protocol Performance Analysis
Workshop on CIFS / SMB Protocol Performance AnalysisWorkshop on CIFS / SMB Protocol Performance Analysis
Workshop on CIFS / SMB Protocol Performance Analysis
 
Cloud Design Patterns
Cloud Design PatternsCloud Design Patterns
Cloud Design Patterns
 
jBPM5: Bringing more Power to your Business Processes
jBPM5: Bringing more Power to your Business ProcessesjBPM5: Bringing more Power to your Business Processes
jBPM5: Bringing more Power to your Business Processes
 
Automated Integrated Testing with MongoDB
Automated Integrated Testing with MongoDBAutomated Integrated Testing with MongoDB
Automated Integrated Testing with MongoDB
 
Team Foundation Server 2008 Overview
Team Foundation Server 2008 OverviewTeam Foundation Server 2008 Overview
Team Foundation Server 2008 Overview
 
Testing Microservices
Testing MicroservicesTesting Microservices
Testing Microservices
 
Cqrs + event sourcing pyxis v2 - en
Cqrs + event sourcing   pyxis v2 - enCqrs + event sourcing   pyxis v2 - en
Cqrs + event sourcing pyxis v2 - en
 
Tips For a Successful Cloud Proof-of-Concept - RightScale Compute 2013
Tips For a Successful Cloud Proof-of-Concept - RightScale Compute 2013Tips For a Successful Cloud Proof-of-Concept - RightScale Compute 2013
Tips For a Successful Cloud Proof-of-Concept - RightScale Compute 2013
 
SOA vs Microservices vs SBA
SOA vs Microservices vs SBASOA vs Microservices vs SBA
SOA vs Microservices vs SBA
 
"Production Driven Development", Serhii Kalinets
"Production Driven Development", Serhii Kalinets"Production Driven Development", Serhii Kalinets
"Production Driven Development", Serhii Kalinets
 
VMworld 2015: vRealize Operations Insight: Manage vSphere and Your Entire Dat...
VMworld 2015: vRealize Operations Insight: Manage vSphere and Your Entire Dat...VMworld 2015: vRealize Operations Insight: Manage vSphere and Your Entire Dat...
VMworld 2015: vRealize Operations Insight: Manage vSphere and Your Entire Dat...
 
Impact 2013 2971 - Fundamental integration and service patterns
Impact 2013 2971 - Fundamental integration and service patternsImpact 2013 2971 - Fundamental integration and service patterns
Impact 2013 2971 - Fundamental integration and service patterns
 
apidays LIVE Australia - Building an Enterprise Eventing Platform by Gnanagur...
apidays LIVE Australia - Building an Enterprise Eventing Platform by Gnanagur...apidays LIVE Australia - Building an Enterprise Eventing Platform by Gnanagur...
apidays LIVE Australia - Building an Enterprise Eventing Platform by Gnanagur...
 
Supercharge Your Integration Services
Supercharge Your Integration Services�Supercharge Your Integration Services�
Supercharge Your Integration Services
 
Caching for Microservices Architectures: Session I
Caching for Microservices Architectures: Session ICaching for Microservices Architectures: Session I
Caching for Microservices Architectures: Session I
 

Destaque (9)

Portretfotowedstrijd Plus Magazine
Portretfotowedstrijd Plus MagazinePortretfotowedstrijd Plus Magazine
Portretfotowedstrijd Plus Magazine
 
1.7operatingplant
1.7operatingplant1.7operatingplant
1.7operatingplant
 
wb4-3
wb4-3wb4-3
wb4-3
 
Wb6-1
Wb6-1Wb6-1
Wb6-1
 
5.2.3insulationtester
5.2.3insulationtester5.2.3insulationtester
5.2.3insulationtester
 
wb4-6
wb4-6wb4-6
wb4-6
 
wb5-1
wb5-1wb5-1
wb5-1
 
wb4-4
wb4-4wb4-4
wb4-4
 
Blogging, Travel, Making Money etc.
Blogging, Travel, Making Money etc.Blogging, Travel, Making Money etc.
Blogging, Travel, Making Money etc.
 

Semelhante a Poles position

A Platform for Application Risk Intelligence
A Platform for Application Risk IntelligenceA Platform for Application Risk Intelligence
A Platform for Application Risk IntelligenceCheckmarx
 
A Generic Open Source Framework for Auto Generation of Data Manipulation Comm...
A Generic Open Source Framework for Auto Generation of Data Manipulation Comm...A Generic Open Source Framework for Auto Generation of Data Manipulation Comm...
A Generic Open Source Framework for Auto Generation of Data Manipulation Comm...iosrjce
 
Introduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesIntroduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesAshishRathore72
 
Stored-Procedures-Presentation
Stored-Procedures-PresentationStored-Procedures-Presentation
Stored-Procedures-PresentationChuck Walker
 
Data Virtualization Primer -
Data Virtualization Primer -Data Virtualization Primer -
Data Virtualization Primer -Kenneth Peeples
 
Schema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdf
Schema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdfSchema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdf
Schema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdfseo18
 
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingJaime Martin Losa
 
.Net framework interview questions
.Net framework interview questions.Net framework interview questions
.Net framework interview questionsMir Majid
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicDavid Solivan
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB
 
DICE & Cloudify – Quality Big Data Made Easy
DICE & Cloudify – Quality Big Data Made EasyDICE & Cloudify – Quality Big Data Made Easy
DICE & Cloudify – Quality Big Data Made EasyCloudify Community
 

Semelhante a Poles position (20)

A Platform for Application Risk Intelligence
A Platform for Application Risk IntelligenceA Platform for Application Risk Intelligence
A Platform for Application Risk Intelligence
 
Data vault what's Next: Part 2
Data vault what's Next: Part 2Data vault what's Next: Part 2
Data vault what's Next: Part 2
 
Project seminar
Project seminarProject seminar
Project seminar
 
D017372538
D017372538D017372538
D017372538
 
A Generic Open Source Framework for Auto Generation of Data Manipulation Comm...
A Generic Open Source Framework for Auto Generation of Data Manipulation Comm...A Generic Open Source Framework for Auto Generation of Data Manipulation Comm...
A Generic Open Source Framework for Auto Generation of Data Manipulation Comm...
 
Introduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesIntroduction to MongoDB and its best practices
Introduction to MongoDB and its best practices
 
Database
DatabaseDatabase
Database
 
Stored-Procedures-Presentation
Stored-Procedures-PresentationStored-Procedures-Presentation
Stored-Procedures-Presentation
 
Data Virtualization Primer -
Data Virtualization Primer -Data Virtualization Primer -
Data Virtualization Primer -
 
dvprimer-concepts
dvprimer-conceptsdvprimer-concepts
dvprimer-concepts
 
Schema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdf
Schema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdfSchema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdf
Schema-based multi-tenant architecture using Quarkus & Hibernate-ORM.pdf
 
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
 
Vb essentials
Vb essentialsVb essentials
Vb essentials
 
Open source Technology
Open source TechnologyOpen source Technology
Open source Technology
 
.Net framework interview questions
.Net framework interview questions.Net framework interview questions
.Net framework interview questions
 
Web based booking a car taxi5
Web based booking a car taxi5Web based booking a car taxi5
Web based booking a car taxi5
 
Visual studio
Visual studioVisual studio
Visual studio
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
DICE & Cloudify – Quality Big Data Made Easy
DICE & Cloudify – Quality Big Data Made EasyDICE & Cloudify – Quality Big Data Made Easy
DICE & Cloudify – Quality Big Data Made Easy
 

Poles position

  • 1. Poles Position A preliminary study for a unified time-series model data warehouse Davide Moraschi Competitiveness and Sustainability
  • 2.
  • 3. Simple Database Example The model odbctest.mdl along with the Microsoft Access Database odbctest.mdb provides a simple example of the ODBC connectivity. The database has a table describing variables along with a unique index for each variable subscript combination. There are no internal constraints on referential integrity in this database, but those should be included for a more complete application.
  • 4. Data access from Vensim is done via ODBC and vdi/vdo files. The syntax of these files is briefly explained in the documentation: VDI files are treated as standard changes files and read when simulation starts:
  • 5.
  • 6. Data access from GAMS is done via GDX files. This is a proprietary binary format, and several tools are available to produce such files from different sources.
  • 7. In order to create a “common” database we must first create a “common” nomenclature. In Vensim we speak about Variables, Subscripts, Ranges, Subranges In GAMS we speak about Parameters, Sets, Elements
  • 8. Dimension Subscript Dimension Element Element Element Vector Range, Subrange Set Variable Variable Parameter Common name Vensim name GAMS name
  • 9. WOOD = Variable CATCUSTOMER = Vector [AUT,URBAN,LPETROL] = Dimension AUT = Element
  • 10. TSTRAD = Variable SS = Vector ( mmpdr , aus , nzl ) = Dimension mmpdr = Element
  • 11. TIME SERIES Identification TIME SERIES Value … 0.5853 0.5868 0.5875 0.5906 … 1998 1997 1996 1995 … 5 Y1995 4 Y1994 7 Y1993 5 Y1992 1 Y1976
  • 12. VARIABLES EXECUTIONS DIMENSIONS VALUES ELEMENTS VECTORS Many-to-Many Many-to-Many Many-to-Many One-to-Many Many-to-Many
  • 13. Visual Basic GDX File VPM File GDXIO.DLL VENDLL32.DLL OO4O GDXIO and VENDLL32 are standard windows API libraries, can be called from any DLL compliant programming language. OO4O is a COM interface, can be called from any COM aware programming language.
  • 15. retval& = vensim_get_data( ByVal FileList(v%), ByVal VarList(i%) & SubList(ii%), ByVal "time", varvals(0), timevals(0), ByVal ZERO) gdxdatareadstrstart(ap&, synr&, nrrecs&) gdxdatareadstr(ap&, astrelements, avals, afdim&)
  • 16. SQL2GMS is a tool to convert data from an SQL database into GAMS readable format. The source is any data source accessible through Microsoft’s Data Access components including ADO , ODBC and OLEDB . The target is a GAMS Include File or a GAMS GDX File . SQL2GMS, Version 3.0, November 2006 Erwin Kalvelagen, GAMS Development Corp
  • 17.