Расчёт метода «Детерминированное уравнение»

Ниже приведен пример использования операции GetMs для расчёта уравнения. В запросе передаются: экземпляр открытого контейнера моделирования, шаблон расчёта уравнения и параметры выполнения операции. В ответе приходит экземпляр модели, содержащей уравнение с результатами расчёта.

Для выполнения примера уравнение должно рассчитываться методом «Детерминированное уравнение».

В примере C# для вывода результатов используются вспомогательные процедуры: PrintArray, PrintSeries, описанные в разделе «Расчёт уравнения».

SOAP-запрос:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetMs xmlns="http://www.fsight.ru/PP.SOM.Som">
<tMs xmlns="">
  <id>AOGBEFLOHDNBFOAEDPIBNDGEBKEDGIEEJKBKNMPOIOPJKGIB!M!S!CDMLANFLOHDNBFOAEJJKHCEGAMOAEGLOEPKMEPMOJMOAHLALB</id>
  </tMs>
<tArg xmlns="">
<pattern>
  <obInst>false</obInst>
  <all>false</all>
<item>
  <key>89669</key>
<problem>
<metamodel>
  <calculationChain>Get</calculationChain>
<calcChainPattern>
<modelPattern>
<transform>
  <outputs>Get</outputs>
  <formulaCount>true</formulaCount>
<formulas>
<method>
  <series>true</series>
  </method>
  </formulas>
  <displayId>true</displayId>
<equationsFormula>
  <method />
  </equationsFormula>
  <series>Get</series>
  <kind>true</kind>
  <displaySettings>true</displaySettings>
  <additionalAttributes>true</additionalAttributes>
  <calculationType>true</calculationType>
  <calculationDirection>true</calculationDirection>
<transformVariable>
  <slices>Get</slices>
<transformSlice>
  <selection>Get</selection>
  </transformSlice>
  </transformVariable>
  </transform>
  <stochastic>true</stochastic>
  <calculationPeriod>true</calculationPeriod>
  <useModelPeriod>true</useModelPeriod>
  <useExistingData>true</useExistingData>
  <treatNullsAsZeros>true</treatNullsAsZeros>
  <autoName>true</autoName>
  <generatedName>true</generatedName>
  <period>true</period>
  <isExclusive>true</isExclusive>
  <useAutoPeriod>true</useAutoPeriod>
  </modelPattern>
<entryKeys>
  <l>4</l>
  </entryKeys>
  </calcChainPattern>
  </metamodel>
  </problem>
  </item>
  </pattern>
<execParams>
  <k>0</k>
<modelKeys>
  <l>4</l>
  </modelKeys>
  <scenarioKeys />
  <execMethod>true</execMethod>
  <execEvaluateSeries>true</execEvaluateSeries>
  <execPairCorrelationMatrix>true</execPairCorrelationMatrix>
  </execParams>
  </tArg>
  </GetMs>
  </s:Body>
  </s:Envelope>

SOAP-ответ:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetMsResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xmlns="">
  <id>AOGBEFLOHDNBFOAEDPIBNDGEBKEDGIEEJKBKNMPOIOPJKGIB!M!S!CDMLANFLOHDNBFOAEJJKHCEGAMOAEGLOEPKMEPMOJMOAHLALB</id>
  </id>
<meta xmlns="">
<item>
  <k>89669</k>
  <id>MODEL_NEW</id>
  <n>MODEL_NEW</n>
  <vis>1</vis>
  <type>Problem</type>
<problemMd>
<metamodel>
  <k>89670</k>
<calculationChain>
<its>
<Item>
  <k>4</k>
  <id>OBJ4</id>
  <n>MyOutputVavable|A[t] = 10 - MyInputVavable[t] * 3.14, (От родителя)-(От родителя)</n>
  <vis>1</vis>
  <type>Model</type>
  <excluded>0</excluded>
  <graphMeta />
<model>
<transform>
<outputs>
<its>
<Item>
  <k>1</k>
  <id>VARIABLES_89670</id>
  <n>Variables</n>
  <vis>1</vis>
<slices>
<its>
<Item>
  <k>0</k>
  <id>MyOutputVavable|A</id>
  <n>MyOutputVavable|A</n>
  <vis>1</vis>
  <variableKey>1</variableKey>
  <stubKey>89671</stubKey>
<selections>
<its>
<Item>
<id>
  <id>89683</id>
  </id>
  <variant>2</variant>
  </Item>
  </its>
  </selections>
  <aggregator>None</aggregator>
<parametrizedDimensions>
<its>
<Item>
  <dimension>0</dimension>
  <parameter>0</parameter>
  </Item>
  </its>
  </parametrizedDimensions>
<unitInfo>
  <unit>4294967295</unit>
  <measure>4294967295</measure>
  <baseUnit>4294967295</baseUnit>
  <unitsDimensionKey>0</unitsDimensionKey>
  </unitInfo>
  <level>Year</level>
  </Item>
  </its>
  </slices>
  <variableStubKey>89671</variableStubKey>
  <parameterID />
  <kind>Stub</kind>
  <attributeId />
  <attributeType>Series</attributeType>
  </Item>
  </its>
  </outputs>
  <formulaCount>1</formulaCount>
<formulas>
<its>
<it>
  <k>0</k>
  <kind>Deterministic</kind>
<method>
<deterministic>
  <modifyType>Replace</modifyType>
  <expression>10 - @_2:0[] * 3.14</expression>
<result>
<slice>
  <k>0</k>
  <id>MyOutputVavable|A</id>
  <n>MyOutputVavable|A</n>
  <vis>1</vis>
  <variableKey>1</variableKey>
  <stubKey>89671</stubKey>
<selections>
<its>
<Item>
<id>
  <id>89683</id>
  </id>
  <variant>2</variant>
  </Item>
  </its>
  </selections>
  <aggregator>None</aggregator>
<parametrizedDimensions>
<its>
<Item>
  <dimension>0</dimension>
  <parameter>0</parameter>
  </Item>
  </its>
  </parametrizedDimensions>
<unitInfo>
  <unit>4294967295</unit>
  <measure>4294967295</measure>
  <baseUnit>4294967295</baseUnit>
  <unitsDimensionKey>0</unitsDimensionKey>
  </unitInfo>
  <level>Year</level>
  </slice>
  <lag />
  <key>0</key>
  <termToText>{MyOutputVavable|A[t]}</termToText>
  <termToInnerText>@_1:0[]</termToInnerText>
<termInfo>
  <k>4294967295</k>
  <lag>0</lag>
<inversion>
  <type>None</type>
  <lag>PrecidingValue</lag>
  <previousLag>-1</previousLag>
  <seasonality>None</seasonality>
  <dependence>Linear</dependence>
  <K>3</K>
  </inversion>
<slice>
  <k>0</k>
  <id>MyOutputVavable|A</id>
  <n>MyOutputVavable|A</n>
  <vis>1</vis>
  <variableKey>1</variableKey>
  <stubKey>89671</stubKey>
<selections>
<its>
<Item>
<id>
  <id>89683</id>
  </id>
  <variant>2</variant>
  </Item>
  </its>
  </selections>
  <aggregator>None</aggregator>
<parametrizedDimensions>
<its>
<Item>
  <dimension>0</dimension>
  <parameter>0</parameter>
  </Item>
  </its>
  </parametrizedDimensions>
<unitInfo>
  <unit>4294967295</unit>
  <measure>4294967295</measure>
  <baseUnit>4294967295</baseUnit>
  <unitsDimensionKey>0</unitsDimensionKey>
  </unitInfo>
  <level>Year</level>
  </slice>
  <date>1899-12-30</date>
  </termInfo>
<unitInfo>
  <unit>4294967295</unit>
  <measure>4294967295</measure>
  <baseUnit>4294967295</baseUnit>
  <unitsDimensionKey>0</unitsDimensionKey>
  </unitInfo>
  <included>0</included>
  </result>
<operands>
<its>
<Item>
  <k>0</k>
<slice>
  <k>0</k>
  <id>1</id>
  <n>MyInputVavable</n>
  <vis>1</vis>
  <variableKey>2</variableKey>
  <stubKey>89671</stubKey>
<selections>
<its>
<Item>
<id>
  <id>89683</id>
  </id>
  <variant>1</variant>
  </Item>
  </its>
  </selections>
  <aggregator>None</aggregator>
<parametrizedDimensions>
<its>
<Item>
  <dimension>0</dimension>
  <parameter>0</parameter>
  </Item>
  </its>
  </parametrizedDimensions>
<unitInfo>
  <unit>4294967295</unit>
  <measure>4294967295</measure>
  <baseUnit>4294967295</baseUnit>
  <unitsDimensionKey>0</unitsDimensionKey>
  </unitInfo>
  <level>Year</level>
  </slice>
  <lag />
  <key>1</key>
  <termToText>{MyInputVavable[t]}</termToText>
  <termToInnerText>@_2:0[]</termToInnerText>
<termInfo>
  <k>4294967295</k>
  <lag>0</lag>
<inversion>
  <type>None</type>
  <lag>PrecidingValue</lag>
  <previousLag>-1</previousLag>
  <seasonality>None</seasonality>
  <dependence>Linear</dependence>
  <K>3</K>
  </inversion>
<slice>
  <k>0</k>
  <id>1</id>
  <n>MyInputVavable</n>
  <vis>1</vis>
  <variableKey>2</variableKey>
  <stubKey>89671</stubKey>
<selections>
<its>
<Item>
<id>
  <id>89683</id>
  </id>
  <variant>1</variant>
  </Item>
  </its>
  </selections>
  <aggregator>None</aggregator>
<parametrizedDimensions>
<its>
<Item>
  <dimension>0</dimension>
  <parameter>0</parameter>
  </Item>
  </its>
  </parametrizedDimensions>
<unitInfo>
  <unit>4294967295</unit>
  <measure>4294967295</measure>
  <baseUnit>4294967295</baseUnit>
  <unitsDimensionKey>0</unitsDimensionKey>
  </unitInfo>
  <level>Year</level>
  </slice>
  <date>1899-12-30</date>
  </termInfo>
<unitInfo>
  <unit>4294967295</unit>
  <measure>4294967295</measure>
  <baseUnit>4294967295</baseUnit>
  <unitsDimensionKey>0</unitsDimensionKey>
  </unitInfo>
  <included>1</included>
  </Item>
  </its>
  </operands>
<pairCorrelationMatrix>
<data>
  <d>1</d>
  </data>
  </pairCorrelationMatrix>
  </deterministic>
  <name>10 - X1 * 3.14</name>
<series>
<addFactor>
  <k>4294967295</k>
  </addFactor>
  </series>
<evaluateSeries>
<its>
<Item>
  <scenarioKey>4294967295</scenarioKey>
<fact>
  <d>3</d>
  <d>7</d>
  <d>2</d>
  <d>6</d>
  <d>4</d>
  <d>1</d>
  <d>5</d>
  <d>3.42857143</d>
  <d>3.28571429</d>
  <d>3.14285714</d>
  <d>3</d>
  <d>2.85714286</d>
  <d>2.71428571</d>
  <d>2.57142857</d>
  <d>2.42857143</d>
  <d>2.28571429</d>
  <d>2.14285714</d>
  <d>2</d>
  <d>1.85714286</d>
  <d>1.71428571</d>
  <d>1.57142857</d>
  <d>1.42857143</d>
  <d>1.28571429</d>
  <d>1.14285714</d>
  <d>1</d>
  <d>0.85714286</d>
  <d>0.71428571</d>
  <d>0.57142857</d>
  <d>NaN</d>
  </fact>
<modelling>
  <d>6.859999999999999</d>
  <d>-2.56</d>
  <d>3.72</d>
  <d>-11.98</d>
  <d>-13.55</d>
  <d>-18.574</d>
  <d>-23.598</d>
  <d>-28.62200000000001</d>
  <d>-33.646</d>
  <d>-38.67</d>
  <d>-43.69400000000001</d>
  <d>-48.718</d>
  <d>-53.742</d>
  <d>-58.76600000000001</d>
  <d>-63.79000000000001</d>
  <d>-68.81400000000001</d>
  <d>-73.83800000000001</d>
  <d>-78.86200000000001</d>
  <d>-83.886</d>
  <d>-88.91000000000001</d>
  <d>-93.93400000000001</d>
  <d>-98.95800000000001</d>
  <d>-103.982</d>
  <d>-109.006</d>
  <d>-114.03</d>
  <d>-119.054</d>
  <d>NaN</d>
  <d>NaN</d>
  <d>NaN</d>
  </modelling>
<residuals>
  <d>-3.859999999999999</d>
  <d>9.56</d>
  <d>-1.72</d>
  <d>17.98</d>
  <d>17.55</d>
  <d>19.574</d>
  <d>28.598</d>
  <d>32.05057143000001</d>
  <d>36.93171429</d>
  <d>41.81285714</d>
  <d>46.69400000000001</d>
  <d>51.57514286000001</d>
  <d>56.45628571</d>
  <d>61.33742857000001</d>
  <d>66.21857143000001</d>
  <d>71.09971429000001</d>
  <d>75.98085714000001</d>
  <d>80.86200000000001</d>
  <d>85.74314285999999</d>
  <d>90.62428571000001</d>
  <d>95.50542857000001</d>
  <d>100.38657143</d>
  <d>105.26771429</d>
  <d>110.14885714</d>
  <d>115.03</d>
  <d>119.91114286</d>
  <d>NaN</d>
  <d>NaN</d>
  <d>NaN</d>
  </residuals>
<input>
  <d>3</d>
  <d>7</d>
  <d>2</d>
  <d>6</d>
  <d>4</d>
  <d>1</d>
  <d>5</d>
  <d>3.42857143</d>
  <d>3.28571429</d>
  <d>3.14285714</d>
  <d>3</d>
  <d>2.85714286</d>
  <d>2.71428571</d>
  <d>2.57142857</d>
  <d>2.42857143</d>
  <d>2.28571429</d>
  <d>2.14285714</d>
  <d>2</d>
  <d>1.85714286</d>
  <d>1.71428571</d>
  <d>1.57142857</d>
  <d>1.42857143</d>
  <d>1.28571429</d>
  <d>1.14285714</d>
  <d>1</d>
  <d>0.85714286</d>
  <d>0.71428571</d>
  <d>0.57142857</d>
  <d>NaN</d>
  <d>NaN</d>
  <d>NaN</d>
  </input>
<factors>
<its>
<it>
  <termToText>{MyInputVavable[t]}</termToText>
<serie>
  <d>1</d>
  <d>4</d>
  <d>2</d>
  <d>7</d>
  <d>7.5</d>
  <d>9.1</d>
  <d>10.7</d>
  <d>12.3</d>
  <d>13.9</d>
  <d>15.5</d>
  <d>17.1</d>
  <d>18.7</d>
  <d>20.3</d>
  <d>21.9</d>
  <d>23.5</d>
  <d>25.1</d>
  <d>26.7</d>
  <d>28.3</d>
  <d>29.9</d>
  <d>31.5</d>
  <d>33.1</d>
  <d>34.7</d>
  <d>36.3</d>
  <d>37.9</d>
  <d>39.5</d>
  <d>41.1</d>
  <d>NaN</d>
  <d>NaN</d>
  <d>NaN</d>
  <d>NaN</d>
  <d>NaN</d>
  </serie>
<inversion>
  <type>None</type>
  <lag>PrecidingValue</lag>
  <previousLag>-1</previousLag>
  <seasonality>None</seasonality>
  <dependence>Linear</dependence>
  <K>3</K>
  </inversion>
  <entryKey>1</entryKey>
  </it>
  </its>
  </factors>
  </Item>
  </its>
<dates>
  <it>1990A1</it>
  <it>1991A1</it>
  <it>1992A1</it>
  <it>1993A1</it>
  <it>1994A1</it>
  <it>1995A1</it>
  <it>1996A1</it>
  <it>1997A1</it>
  <it>1998A1</it>
  <it>1999A1</it>
  <it>2000A1</it>
  <it>2001A1</it>
  <it>2002A1</it>
  <it>2003A1</it>
  <it>2004A1</it>
  <it>2005A1</it>
  <it>2006A1</it>
  <it>2007A1</it>
  <it>2008A1</it>
  <it>2009A1</it>
  <it>2010A1</it>
  <it>2011A1</it>
  <it>2012A1</it>
  <it>2013A1</it>
  <it>2014A1</it>
  <it>2015A1</it>
  <it>2016A1</it>
  <it>2017A1</it>
  <it>2018A1</it>
  <it>2019A1</it>
  <it>2020A1</it>
  </dates>
  </evaluateSeries>
<inversionInfo>
  <type>None</type>
  <lag>PrecidingValue</lag>
  <previousLag>-1</previousLag>
  <seasonality>None</seasonality>
  <dependence>Linear</dependence>
  <K>3</K>
  </inversionInfo>
  <doUseR>0</doUseR>
  <supportsR>0</supportsR>
  </method>
  <calendarLevel>Year</calendarLevel>
  <outputSliceKey>0</outputSliceKey>
  </it>
  </its>
  </formulas>
  <displayId>0</displayId>
<series>
  <its />
  </series>
  <kind>Simple</kind>
<displaySettings>
  <displayTermsAs>Derive</displayTermsAs>
  </displaySettings>
  <additionalAttributes />
  <calculationType>Serie</calculationType>
  <calculationDirection>Forward</calculationDirection>
  </transform>
  <stochastic>0</stochastic>
  <calculationPeriod>Forecast</calculationPeriod>
  <useModelPeriod>1</useModelPeriod>
  <useExistingData>0</useExistingData>
  <treatNullsAsZeros>0</treatNullsAsZeros>
  <autoName>1</autoName>
<period>
  <identificationStartDate>1990-01-01</identificationStartDate>
  <identificationEndDate>2018-04-24</identificationEndDate>
  <forecastStartDate>2018-04-25</forecastStartDate>
  <forecastEndDate>2020-01-01</forecastEndDate>
  <identificationStartDateParamID />
  <identificationEndDateParamID />
  <forecastStartDateParamID />
  <forecastEndDateParamID />
  <autoPeriod>28672</autoPeriod>
  <identificationStartOffset>0</identificationStartOffset>
  <identificationEndOffset>0</identificationEndOffset>
  <forecastEndOffset>0</forecastEndOffset>
  <isIdentStartCorrect>1</isIdentStartCorrect>
  <isIdentEndCorrect>1</isIdentEndCorrect>
  <isForecastEndCorrect>1</isForecastEndCorrect>
  </period>
  <isExclusive>1</isExclusive>
  <useAutoPeriod>1</useAutoPeriod>
  <generatedName>MyOutputVavable|A[t] = 10 - MyInputVavable[t] * 3.14</generatedName>
  <warnings />
  <readOnly>0</readOnly>
  </model>
  </Item>
  </its>
  </calculationChain>
<visualController>
  <userRPath />
  <isRExist>0</isRExist>
  </visualController>
<suppressEmptyFilter>
  <suppressEmpty>0</suppressEmpty>
  <suppressEmptyArea>SerieBounds</suppressEmptyArea>
  </suppressEmptyFilter>
  <readOnly>0</readOnly>
  <variableTestUseR>0</variableTestUseR>
  <calculateIdentOnFact>0</calculateIdentOnFact>
  </metamodel>
  <useScenarios>0</useScenarios>
  <readOnly>0</readOnly>
  </problemMd>
  </item>
  </meta>
  </GetMsResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON-запрос:

{
 "GetMs" : 
  {
   "tMs" : 
    {
     "id" : "AOGBEFLOHDNBFOAEDPIBNDGEBKEDGIEEJKBKNMPOIOPJKGIB!M!S!CDMLANFLOHDNBFOAEJJKHCEGAMOAEGLOEPKMEPMOJMOAHLALB"
    },
   "tArg" : 
    {
     "pattern" : 
      {
       "obInst" : "false",
       "all" : "false",
       "item" : 
        {
         "key" : "89669",
         "problem" : 
          {
           "metamodel" : 
            {
             "calculationChain" : "Get",
             "calcChainPattern" : 
              {
               "modelPattern" : 
                {
                 "transform" : 
                  {
                   "outputs" : "Get",
                   "formulaCount" : "true",
                   "formulas" : 
                    {
                     "method" : 
                      {
                       "series" : "true"
                      }
                    },
                   "displayId" : "true",
                   "equationsFormula" : 
                    {
                     "method" : ""
                    },
                   "series" : "Get",
                   "kind" : "true",
                   "displaySettings" : "true",
                   "additionalAttributes" : "true",
                   "calculationType" : "true",
                   "calculationDirection" : "true",
                   "transformVariable" : 
                    {
                     "slices" : "Get",
                     "transformSlice" : 
                      {
                       "selection" : "Get"
                      }
                    }
                  },
                 "stochastic" : "true",
                 "calculationPeriod" : "true",
                 "useModelPeriod" : "true",
                 "useExistingData" : "true",
                 "treatNullsAsZeros" : "true",
                 "autoName" : "true",
                 "generatedName" : "true",
                 "period" : "true",
                 "isExclusive" : "true",
                 "useAutoPeriod" : "true"
                },
               "entryKeys" : 
                {
                 "l" : "4"
                }
              }
            }
          }
        }
      },
     "execParams" : 
      {
       "k" : "0",
       "modelKeys" : 
        {
         "l" : "4"
        },
       "scenarioKeys" : "",
       "execMethod" : "true",
       "execEvaluateSeries" : "true",
       "execPairCorrelationMatrix" : "true"
      }
    }
  }
}

JSON-ответ:

{
 "GetMsResult" : 
  {
   "id" : 
    {
     "id" : "AOGBEFLOHDNBFOAEDPIBNDGEBKEDGIEEJKBKNMPOIOPJKGIB!M!S!CDMLANFLOHDNBFOAEJJKHCEGAMOAEGLOEPKMEPMOJMOAHLALB"
    },
   "meta" : 
    {
     "item" : 
      {
       "k" : "89669",
       "id" : "MODEL_NEW",
       "n" : "MODEL_NEW",
       "vis" : "1",
       "type" : "Problem",
       "problemMd" : 
        {
         "metamodel" : 
          {
           "k" : "89670",
           "calculationChain" : 
            {
             "its" : 
              {
               "Item" : 
                {
                 "k" : "4",
                 "id" : "OBJ4",
                 "n" : "MyOutputVavable|A[t] = 10 - MyInputVavable[t] * 3.14, (От родителя)-(От родителя)",
                 "vis" : "1",
                 "type" : "Model",
                 "excluded" : "0",
                 "graphMeta" : "",
                 "model" : 
                  {
                   "transform" : 
                    {
                     "outputs" : 
                      {
                       "its" : 
                        {
                         "Item" : 
                          {
                           "k" : "1",
                           "id" : "VARIABLES_89670",
                           "n" : "Variables",
                           "vis" : "1",
                           "slices" : 
                            {
                             "its" : 
                              {
                               "Item" : 
                                {
                                 "k" : "0",
                                 "id" : "MyOutputVavable|A",
                                 "n" : "MyOutputVavable|A",
                                 "vis" : "1",
                                 "variableKey" : "1",
                                 "stubKey" : "89671",
                                 "selections" : 
                                  {
                                   "its" : 
                                    {
                                     "Item" : 
                                      {
                                       "id" : 
                                        {
                                         "id" : "89683"
                                        },
                                       "variant" : "2"
                                      }
                                    }
                                  },
                                 "aggregator" : "None",
                                 "parametrizedDimensions" : 
                                  {
                                   "its" : 
                                    {
                                     "Item" : 
                                      {
                                       "dimension" : "0",
                                       "parameter" : "0"
                                      }
                                    }
                                  },
                                 "unitInfo" : 
                                  {
                                   "unit" : "4294967295",
                                   "measure" : "4294967295",
                                   "baseUnit" : "4294967295",
                                   "unitsDimensionKey" : "0"
                                  },
                                 "level" : "Year"
                                }
                              }
                            },
                           "variableStubKey" : "89671",
                           "parameterID" : "",
                           "kind" : "Stub",
                           "attributeId" : "",
                           "attributeType" : "Series"
                          }
                        }
                      },
                     "formulaCount" : "1",
                     "formulas" : 
                      {
                       "its" : 
                        {
                         "it" : 
                          [
                            {
                             "k" : "0",
                             "kind" : "Deterministic",
                             "method" : 
                              {
                               "deterministic" : 
                                {
                                 "modifyType" : "Replace",
                                 "expression" : "10 - @_2:0[] * 3.14",
                                 "result" : 
                                  {
                                   "slice" : 
                                    {
                                     "k" : "0",
                                     "id" : "MyOutputVavable|A",
                                     "n" : "MyOutputVavable|A",
                                     "vis" : "1",
                                     "variableKey" : "1",
                                     "stubKey" : "89671",
                                     "selections" : 
                                      {
                                       "its" : 
                                        {
                                         "Item" : 
                                          {
                                           "id" : 
                                            {
                                             "id" : "89683"
                                            },
                                           "variant" : "2"
                                          }
                                        }
                                      },
                                     "aggregator" : "None",
                                     "parametrizedDimensions" : 
                                      {
                                       "its" : 
                                        {
                                         "Item" : 
                                          {
                                           "dimension" : "0",
                                           "parameter" : "0"
                                          }
                                        }
                                      },
                                     "unitInfo" : 
                                      {
                                       "unit" : "4294967295",
                                       "measure" : "4294967295",
                                       "baseUnit" : "4294967295",
                                       "unitsDimensionKey" : "0"
                                      },
                                     "level" : "Year"
                                    },
                                   "lag" : "",
                                   "key" : "0",
                                   "termToText" : "{MyOutputVavable|A[t]}",
                                   "termToInnerText" : "@_1:0[]",
                                   "termInfo" : 
                                    {
                                     "k" : "4294967295",
                                     "lag" : "0",
                                     "inversion" : 
                                      {
                                       "type" : "None",
                                       "lag" : "PrecidingValue",
                                       "previousLag" : "-1",
                                       "seasonality" : "None",
                                       "dependence" : "Linear",
                                       "K" : "3"
                                      },
                                     "slice" : 
                                      {
                                       "k" : "0",
                                       "id" : "MyOutputVavable|A",
                                       "n" : "MyOutputVavable|A",
                                       "vis" : "1",
                                       "variableKey" : "1",
                                       "stubKey" : "89671",
                                       "selections" : 
                                        {
                                         "its" : 
                                          {
                                           "Item" : 
                                            {
                                             "id" : 
                                              {
                                               "id" : "89683"
                                              },
                                             "variant" : "2"
                                            }
                                          }
                                        },
                                       "aggregator" : "None",
                                       "parametrizedDimensions" : 
                                        {
                                         "its" : 
                                          {
                                           "Item" : 
                                            {
                                             "dimension" : "0",
                                             "parameter" : "0"
                                            }
                                          }
                                        },
                                       "unitInfo" : 
                                        {
                                         "unit" : "4294967295",
                                         "measure" : "4294967295",
                                         "baseUnit" : "4294967295",
                                         "unitsDimensionKey" : "0"
                                        },
                                       "level" : "Year"
                                      },
                                     "date" : "1899-12-30"
                                    },
                                   "unitInfo" : 
                                    {
                                     "unit" : "4294967295",
                                     "measure" : "4294967295",
                                     "baseUnit" : "4294967295",
                                     "unitsDimensionKey" : "0"
                                    },
                                   "included" : "0"
                                  },
                                 "operands" : 
                                  {
                                   "its" : 
                                    {
                                     "Item" : 
                                      {
                                       "k" : "0",
                                       "slice" : 
                                        {
                                         "k" : "0",
                                         "id" : "1",
                                         "n" : "MyInputVavable",
                                         "vis" : "1",
                                         "variableKey" : "2",
                                         "stubKey" : "89671",
                                         "selections" : 
                                          {
                                           "its" : 
                                            {
                                             "Item" : 
                                              {
                                               "id" : 
                                                {
                                                 "id" : "89683"
                                                },
                                               "variant" : "1"
                                              }
                                            }
                                          },
                                         "aggregator" : "None",
                                         "parametrizedDimensions" : 
                                          {
                                           "its" : 
                                            {
                                             "Item" : 
                                              {
                                               "dimension" : "0",
                                               "parameter" : "0"
                                              }
                                            }
                                          },
                                         "unitInfo" : 
                                          {
                                           "unit" : "4294967295",
                                           "measure" : "4294967295",
                                           "baseUnit" : "4294967295",
                                           "unitsDimensionKey" : "0"
                                          },
                                         "level" : "Year"
                                        },
                                       "lag" : "",
                                       "key" : "1",
                                       "termToText" : "{MyInputVavable[t]}",
                                       "termToInnerText" : "@_2:0[]",
                                       "termInfo" : 
                                        {
                                         "k" : "4294967295",
                                         "lag" : "0",
                                         "inversion" : 
                                          {
                                           "type" : "None",
                                           "lag" : "PrecidingValue",
                                           "previousLag" : "-1",
                                           "seasonality" : "None",
                                           "dependence" : "Linear",
                                           "K" : "3"
                                          },
                                         "slice" : 
                                          {
                                           "k" : "0",
                                           "id" : "1",
                                           "n" : "MyInputVavable",
                                           "vis" : "1",
                                           "variableKey" : "2",
                                           "stubKey" : "89671",
                                           "selections" : 
                                            {
                                             "its" : 
                                              {
                                               "Item" : 
                                                {
                                                 "id" : 
                                                  {
                                                   "id" : "89683"
                                                  },
                                                 "variant" : "1"
                                                }
                                              }
                                            },
                                           "aggregator" : "None",
                                           "parametrizedDimensions" : 
                                            {
                                             "its" : 
                                              {
                                               "Item" : 
                                                {
                                                 "dimension" : "0",
                                                 "parameter" : "0"
                                                }
                                              }
                                            },
                                           "unitInfo" : 
                                            {
                                             "unit" : "4294967295",
                                             "measure" : "4294967295",
                                             "baseUnit" : "4294967295",
                                             "unitsDimensionKey" : "0"
                                            },
                                           "level" : "Year"
                                          },
                                         "date" : "1899-12-30"
                                        },
                                       "unitInfo" : 
                                        {
                                         "unit" : "4294967295",
                                         "measure" : "4294967295",
                                         "baseUnit" : "4294967295",
                                         "unitsDimensionKey" : "0"
                                        },
                                       "included" : "1"
                                      }
                                    }
                                  },
                                 "pairCorrelationMatrix" : 
                                  {
                                   "data" : 
                                    {
                                     "d" : "1"
                                    }
                                  }
                                },
                               "name" : "10 - X1 * 3.14",
                               "series" : 
                                {
                                 "addFactor" : 
                                  {
                                   "k" : "4294967295"
                                  }
                                },
                               "evaluateSeries" : 
                                {
                                 "its" : 
                                  {
                                   "Item" : 
                                    {
                                     "scenarioKey" : "4294967295",
                                     "fact" : 
                                      {
                                       "d" : 
                                        [
                                          "3",
                                          "7",
                                          "2",
                                          "6",
                                          "4",
                                          "1",
                                          "5",
                                          "3.42857143",
                                          "3.28571429",
                                          "3.14285714",
                                          "3",
                                          "2.85714286",
                                          "2.71428571",
                                          "2.57142857",
                                          "2.42857143",
                                          "2.28571429",
                                          "2.14285714",
                                          "2",
                                          "1.85714286",
                                          "1.71428571",
                                          "1.57142857",
                                          "1.42857143",
                                          "1.28571429",
                                          "1.14285714",
                                          "1",
                                          "0.85714286",
                                          "0.71428571",
                                          "0.57142857",
                                          "NaN"
                                        ]
                                      },
                                     "modelling" : 
                                      {
                                       "d" : 
                                        [
                                          "6.859999999999999",
                                          "-2.56",
                                          "3.72",
                                          "-11.98",
                                          "-13.55",
                                          "-18.574",
                                          "-23.598",
                                          "-28.62200000000001",
                                          "-33.646",
                                          "-38.67",
                                          "-43.69400000000001",
                                          "-48.718",
                                          "-53.742",
                                          "-58.76600000000001",
                                          "-63.79000000000001",
                                          "-68.81400000000001",
                                          "-73.83800000000001",
                                          "-78.86200000000001",
                                          "-83.886",
                                          "-88.91000000000001",
                                          "-93.93400000000001",
                                          "-98.95800000000001",
                                          "-103.982",
                                          "-109.006",
                                          "-114.03",
                                          "-119.054",
                                          "NaN",
                                          "NaN",
                                          "NaN"
                                        ]
                                      },
                                     "residuals" : 
                                      {
                                       "d" : 
                                        [
                                          "-3.859999999999999",
                                          "9.56",
                                          "-1.72",
                                          "17.98",
                                          "17.55",
                                          "19.574",
                                          "28.598",
                                          "32.05057143000001",
                                          "36.93171429",
                                          "41.81285714",
                                          "46.69400000000001",
                                          "51.57514286000001",
                                          "56.45628571",
                                          "61.33742857000001",
                                          "66.21857143000001",
                                          "71.09971429000001",
                                          "75.98085714000001",
                                          "80.86200000000001",
                                          "85.74314285999999",
                                          "90.62428571000001",
                                          "95.50542857000001",
                                          "100.38657143",
                                          "105.26771429",
                                          "110.14885714",
                                          "115.03",
                                          "119.91114286",
                                          "NaN",
                                          "NaN",
                                          "NaN"
                                        ]
                                      },
                                     "input" : 
                                      {
                                       "d" : 
                                        [
                                          "3",
                                          "7",
                                          "2",
                                          "6",
                                          "4",
                                          "1",
                                          "5",
                                          "3.42857143",
                                          "3.28571429",
                                          "3.14285714",
                                          "3",
                                          "2.85714286",
                                          "2.71428571",
                                          "2.57142857",
                                          "2.42857143",
                                          "2.28571429",
                                          "2.14285714",
                                          "2",
                                          "1.85714286",
                                          "1.71428571",
                                          "1.57142857",
                                          "1.42857143",
                                          "1.28571429",
                                          "1.14285714",
                                          "1",
                                          "0.85714286",
                                          "0.71428571",
                                          "0.57142857",
                                          "NaN",
                                          "NaN",
                                          "NaN"
                                        ]
                                      },
                                     "factors" : 
                                      {
                                       "its" : 
                                        {
                                         "it" : 
                                          [
                                            {
                                             "termToText" : "{MyInputVavable[t]}",
                                             "serie" : 
                                              {
                                               "d" : 
                                                [
                                                  "1",
                                                  "4",
                                                  "2",
                                                  "7",
                                                  "7.5",
                                                  "9.1",
                                                  "10.7",
                                                  "12.3",
                                                  "13.9",
                                                  "15.5",
                                                  "17.1",
                                                  "18.7",
                                                  "20.3",
                                                  "21.9",
                                                  "23.5",
                                                  "25.1",
                                                  "26.7",
                                                  "28.3",
                                                  "29.9",
                                                  "31.5",
                                                  "33.1",
                                                  "34.7",
                                                  "36.3",
                                                  "37.9",
                                                  "39.5",
                                                  "41.1",
                                                  "NaN",
                                                  "NaN",
                                                  "NaN",
                                                  "NaN",
                                                  "NaN"
                                                ]
                                              },
                                             "inversion" : 
                                              {
                                               "type" : "None",
                                               "lag" : "PrecidingValue",
                                               "previousLag" : "-1",
                                               "seasonality" : "None",
                                               "dependence" : "Linear",
                                               "K" : "3"
                                              },
                                             "entryKey" : "1"
                                            }
                                          ]
                                        }
                                      }
                                    }
                                  },
                                 "dates" : 
                                  {
                                   "it" : 
                                    [
                                      "1990A1",
                                      "1991A1",
                                      "1992A1",
                                      "1993A1",
                                      "1994A1",
                                      "1995A1",
                                      "1996A1",
                                      "1997A1",
                                      "1998A1",
                                      "1999A1",
                                      "2000A1",
                                      "2001A1",
                                      "2002A1",
                                      "2003A1",
                                      "2004A1",
                                      "2005A1",
                                      "2006A1",
                                      "2007A1",
                                      "2008A1",
                                      "2009A1",
                                      "2010A1",
                                      "2011A1",
                                      "2012A1",
                                      "2013A1",
                                      "2014A1",
                                      "2015A1",
                                      "2016A1",
                                      "2017A1",
                                      "2018A1",
                                      "2019A1",
                                      "2020A1"
                                    ]
                                  }
                                },
                               "inversionInfo" : 
                                {
                                 "type" : "None",
                                 "lag" : "PrecidingValue",
                                 "previousLag" : "-1",
                                 "seasonality" : "None",
                                 "dependence" : "Linear",
                                 "K" : "3"
                                },
                               "doUseR" : "0",
                               "supportsR" : "0"
                              },
                             "calendarLevel" : "Year",
                             "outputSliceKey" : "0"
                            }
                          ]
                        }
                      },
                     "displayId" : "0",
                     "series" : 
                      {
                       "its" : ""
                      },
                     "kind" : "Simple",
                     "displaySettings" : 
                      {
                       "displayTermsAs" : "Derive"
                      },
                     "additionalAttributes" : "",
                     "calculationType" : "Serie",
                     "calculationDirection" : "Forward"
                    },
                   "stochastic" : "0",
                   "calculationPeriod" : "Forecast",
                   "useModelPeriod" : "1",
                   "useExistingData" : "0",
                   "treatNullsAsZeros" : "0",
                   "autoName" : "1",
                   "period" : 
                    {
                     "identificationStartDate" : "1990-01-01",
                     "identificationEndDate" : "2018-04-24",
                     "forecastStartDate" : "2018-04-25",
                     "forecastEndDate" : "2020-01-01",
                     "identificationStartDateParamID" : "",
                     "identificationEndDateParamID" : "",
                     "forecastStartDateParamID" : "",
                     "forecastEndDateParamID" : "",
                     "autoPeriod" : "28672",
                     "identificationStartOffset" : "0",
                     "identificationEndOffset" : "0",
                     "forecastEndOffset" : "0",
                     "isIdentStartCorrect" : "1",
                     "isIdentEndCorrect" : "1",
                     "isForecastEndCorrect" : "1"
                    },
                   "isExclusive" : "1",
                   "useAutoPeriod" : "1",
                   "generatedName" : "MyOutputVavable|A[t] = 10 - MyInputVavable[t] * 3.14",
                   "warnings" : "",
                   "readOnly" : "0"
                  }
                }
              }
            },
           "visualController" : 
            {
             "userRPath" : "",
             "isRExist" : "0"
            },
           "suppressEmptyFilter" : 
            {
             "suppressEmpty" : "0",
             "suppressEmptyArea" : "SerieBounds"
            },
           "readOnly" : "0",
           "variableTestUseR" : "0",
           "calculateIdentOnFact" : "0"
          },
         "useScenarios" : "0",
         "readOnly" : "0"
        }
      }
    }
  }
}
public static MsCalculationChainEntry GetMsDeterm(MsId ms, ulong modelKey, ulong eqKey)
{
    var getMsOp = new GetMs();
    // Задаём параметры выполнения операции
    getMsOp.tMs = ms;
    getMsOp.tArg = new GetMsArg()
    {  // Задаем шаблон извлечения данных
        pattern = new MsMdPattern()
        {
            obInst = false,
            all = false,
            item = new MsItemPattern()
            {  // Указываем ключ рассчитываемой модели
                key = modelKey,
                problem = new MsProblemPattern()
                {
                    metamodel = new MsMetaModelPattern()
                    {
                        calculationChain = ListOperation.Get,
                        calcChainPattern = new MsCalculationChainPattern()
                        {
                            // Указываем ключ рассчитываемого уравнения
                            entryKeys = new long[] { (long)eqKey },
                            modelPattern = new MsModelPattern()
                            {
                                autoName = true,
                                calculationPeriod = true,
                                generatedName = true,
                                isExclusive = true,
                                period = true,
                                stochastic = true,
                                treatNullsAsZeros = true,
                                useAutoPeriod = true,
                                useExistingData = true,
                                useModelPeriod = true,
                                transform = new MsFormulaTransformPattern()
                                {
                                    additionalAttributes = true,
                                    calculationDirection = true,
                                    calculationType = true,
                                    displayId = true,
                                    displaySettings = true,
                                    formulaCount = true,
                                    outputs = ListOperation.Get,
                                    series = ListOperation.Get,
                                    kind = true,
                                    formulas = new TsFormulaPattern()
                                    {
                                        method = new TsMethodPattern()
                                        {
                                            series = true
                                        }
                                    },
                                    equationsFormula = new TsFormulaPattern()
                                    {
                                        method = new TsMethodPattern() { }
                                    },
                                    transformVariable = new MsFormulaTransformVariablePattern()
                                    {
                                        slices = ListOperation.Get,
                                        transformSlice = new MsFormulaTransformSlicePattern()
                                        {
                                            selection = ListOperation.Get
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }, // Задаем параметры расчёта уравнения
        execParams = new MsMdExecParams()
        {
            k = 0,
            execMethod = true,
            execEvaluateSeries = true,
            execPairCorrelationMatrix = true,
            scenarioKeys = new long[] { },
            modelKeys = new long[] { (long)eqKey }
        }
    };
            // Создаем прокси-объект для выполнения операции
            var somClient = new SomPortTypeClient();
    GetMsResult getMsResult = somClient.GetMs(getMsOp);
    MsMetaModel meta = getMsResult.meta.item.problemMd.metamodel;
    MsCalculationChainEntry chainEntry = meta.calculationChain.its.GetValue(0) as MsCalculationChainEntry;
    // Выводим ошибки и предупреждения
    MsModel eq = chainEntry.model;
    if (eq.warnings != null)
    {
        Console.WriteLine("-- Предупреждения --");
        Console.WriteLine("".PadRight(3) + printArray(eq.warnings));
    }
    if (eq.error == null) //Проверяем, возникли ли ошибки при расчёте уравнения
    {   // Уравнение рассчитано без ошибок, получаем результаты расчёта   
        TsFormula formula = eq.transform.formulas.its.GetValue(0) as TsFormula;
        TsDeterministicMethod determ = formula.method.deterministic;       
        Console.WriteLine("-- Входные факторы --");       
        Console.WriteLine("".PadRight(3) + printArray(determ.factsMatrix));
        Console.WriteLine("-- Матрица корреляции --");
        MsPairCorrelationMatrix pm = determ.pairCorrelationMatrix;
        if (pm.error != null) {Console.WriteLine("".PadRight(3) + "ошибка: " + pm.error);}       
        Console.WriteLine("".PadRight(3) + printArray(pm.data));
        // Получаем рассчитанные значения и выводим в окно консоли
        MsEvaluateSeriesResult seriesRes = formula.method.evaluateSeries;
        printSeries(seriesRes);
    }
    else // При расчёте уравнения возникли ошибки
    {
        Console.WriteLine("-- Ошибки --");
        Console.WriteLine(eq.error);
    }
    // Возвращаем модель, содержащую уравнение
    return chainEntry;
}

См. также:

GetMs: Операция