Friday, November 28, 2008

Research Methodology - Automated Model Production

Models are constructed and translated in a different way from object oriented programming. There is no clear distinction between classes and objects, as a class only becomes an instance gradually as translations are made from step 1 to 3, and as the models are visualised, interacted with, and represented to users. In the early research an ontology was translated and created from a C++ program, and also from a database. Now, models are created in the Vanguard System (http://www.vanguardsw.com/products/vanguard-system/) modelling tool, with information imported to this from a Protégé ontology, via the nested SQL queries. Vanguard System performs the calculations necessary for the economic model. After inferencing/calculation a result ontology is created for step 3. The step 3 result ontology/taxonomy is created by manually coding, then a system is created to reproduce and output this code automatically. This translation is then tested on many different models to ensure it is generic.

The diagram below examines many of the ways translation could be used for User Driven Modelling/Programming. An example of the repeatable process of this design is that the ‘System Translator Program’ created in Step 1 produces a new ‘System/Translator Program’ in Step 2 which creates a Visualisation. This technique is used to translate an ontology to a CAD style diagram using a second stage of translation. The second ‘System Translator Program’ could also have created a ‘Model/Program’, ‘Meta Program’ or translate to an ‘External Application’. So, this is not an exhaustive diagram, as many types of translation not shown on this diagram would be possible. Another option is that Step 1 could be repeated to translate between ontologies.

Diagram Translation Process for User Driven Modelling/Programming (UDM/P)


Translation Process for User Driven Modelling/Programming (UDM/P)

The ontology represents the relationships between nodes in a machine independent way, so this makes it possible to translate the information into Meta languages via recursive querying. For Step 2 translation, SQL (Structured Query Language) is then used to access the underlying database representation of the ontology. These SQL calls cycle recursively through all the relationships and write out result code for each node, and each relationship automatically. The translation code reads node names and node types (e.g. class, attribute) so it can make an appropriate SQL call for each node, and make a copy in another language or system, then look for children or attributes. This allows any tree to be represented in computer languages. Then recursive routines write the programming language to be output.

More information is available at http://sites.google.com/site/userdrivenmodellingprogramming/index.

Models produced so far are available at - http://www.cems.uwe.ac.uk/~phale/EconomicModels/ModelsVisualised.htm.

Tuesday, November 18, 2008

Economic Models 2

These economic models are constructed and translated in a different way from object oriented programming. There is no clear distinction between classes and objects, as a class only becomes an instance gradually as translations are made, and the models are visualised and represented to users.

At present the main focus is on extending the translation to interactive representations in Java and JavaScript. These will allow users to amend the parameter values of models and to see the result recalculated.

Once all or most of the translations are fully working, I'll concentrate on adding multiple models. Each model could then be translated automatically to many different visualisations/representations. I'll concentrate mainly on economic models, but might also eventually include other kinds of equation based models.

Economic Models - previous post - http://userdrivenmodelling.blogspot.com/2008/11/economic-models.html.

Economic Models Example -
http://www.cems.uwe.ac.uk/~phale/EconomicModels/ModelsVisualised.htm.

Java Applet Example - http://www.cems.uwe.ac.uk/~phale/EconomicModels/Bized/ConsumptionFunctionVanguardOutput/ConsumptionFunctionVanguardOutputInteractive/build/ConsumptionFunctionModelJavaAppletVanguardInteractive.html.

Demonstraion of Economic Model - Consumption Function - Java representation - automatically translated

Tuesday, November 11, 2008

Economic Models

In order to prove the concept that User Driven Modelling is applicable to domains outside engineering, I'm developing economic models using the same kind of translation technique as I used for engineering models. Models are created in the Vanguard System (http://www.vanguardsw.com/) modelling tool, and can be imported to this from Protégé http://protege.stanford.edu/, via nested SQL queries. Vanguard System performs the calculations necessary for the economic model.

The next step is to visualise the Models in the web browser, and in various languages, to show the concept of multiple language implementations being created from one model. These multiple language implementations all share the same semantics and provide a tree based representation of this semantics.

These are demonstrated at http://www.cems.uwe.ac.uk/~phale/EconomicModels/ModelsVisualised.htm, different representations are provides, so that hopefully at least one representation is accessible to the various web browsers. So far there is an XML, HTML, and Java Applet representation. My intention is to extend both the representation of models and the number and type of models represented, until there is a large grid of models, and representations. Options for extending the representation are to JavaScript, SVG, RSS, RDF, and meta programs, and to increase, the interactivity/editability of the models.

This technique should allow automated creation of many models and language representations of them automatically, using one set of model code outputters/translators.

I'm getting the economic models from Biz/ed - http://www.bized.co.uk/educators/he/spreadsheet/section_1.htm. Eventually I might extend this to other types of models as well as engineering and economic models.

The implementation of the models is at http://www.cems.uwe.ac.uk/~phale/EconomicModels/ModelsVisualised.htm.