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. This object is used for getting the source data and unloading the results of calculation algorithm. Use the IMsVariable interface to work with a variable.
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. Use the IMsModel interface to work with a model.
Metamodel. A model that describes structure and calculation sequence of other models. The IMsMetaModel interface is used to work with a metamodel.
Scenario. A collection of source data and assumptions used in modelling. After the calculation the scenario series, by which the calculated data is located, is created in the output variable. The IMsScenarioTreeElement interface is used to work with a scenario.
Modeling Problem. It calculates models according to the order determined in metamodel. This object is used to get calculation results and unload these results to specified variables. The IMsproblem interface is used to work with a modeling problem.
These objects are worked in modeling container environment using the IMsModelSpace interface.
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