The Ms assembly is used for modelling. Programming in Fore using this assembly consists in creating and setting up modeling container objects designed to solve problems of mathematical modelling of dynamic systems.
The following objects are used for modelling:
Variable. It is used to get source data and load calculation algorithm results. The IMsVariable interface is used to work with variables.
Model. This is an equivalent of a real process that reflects its most important properties in mathematical form: the laws which it obeys, links between its components, and so on. This object determines parameters of converting input variables using statistical and mathematical methods. The IMsModel interface is used to work with models.
Metamodel. A model that describes structure and hierarchical calculation sequence of other models. The IMsMetaModel interface is used to work with metamodels.
Scenario. A collection of source data and assumptions used in modelling. After the calculation, a scenario series, by which the calculated data is located, is created in the output variable. The IMsScenarioTreeElement interface is used to work with scenarios.
Modeling problem. It calculates models according to the sequence determined in metamodel. It is used to get calculation results and load these results to specified variables. The IMsProblem interface is used to work with modeling problems.
These objects are worked in the modeling container environment, the IMsModelSpace interface is used to work with these objects.
Modeling is performed in accordance with the following scheme:
Then the sequential modelling of balance of trade is described as example. Balance of trade is the difference between export and import, thus the modelling is quite simple:
First of all, a modeling container is required. Modeling container creation is described in the Creating a Modeling Container example. Create a user modeling container with the MODEL_SPACE identifier. Then execute the following steps:
See also:
Ms Assembly Classes | Ms Assembly Interfaces | Ms Assembly Enumerations | Examples | Ms Assembly Hierarchy