Connecting to YModelCli from esProc

Read(755) Label: esproc, connect,

Follow these instructions to use YModelCli external library files in esProc:

1. Under YModelCli, the external library directory in YModel installation directory, and in YModel’s class path (installation root directory\YModel\lib), find files YModel external library needs and copy them to esProc directory (installation root directory\esProc\extlib\YModelCli).

The YModelCli folder under YModel installation directory contains YModel core jar file scu-ym2-cli-2.10.jar:

YModel’s class path (installation root directory\YModel\lib) contains the following jar files:

apache-ant-zip-2.3.jar

commons-io-2.4.jar

fastjson-1.2.49.jar

gson-2.8.0.jar

jackson-annotations-2.9.6.jar

jackson-core-2.9.6.jar

jackson-databind-2.9.6.jar

jackson-databind-2.9.6-sources.jar

jackson-dataformat-msgpack-0.8.14.jar

mining.jar

msgpack-0.6.12.jar

msgpack-core-0.8.16.jar

Note: Users can choose appropriate ones from these third-party jars for specific scenarios.

 

2. Configure external library directory on esProc designer

Click Tool -> Options -> Environment on the menu bar and access the following interface:

Click Browse button after External library directory to select an external library, as shown below:

 

Click Select button to select the directory where the YModelClic external library settles and click OK button. Then restart IDE to make the configuration take effect.

Note:

1) Users can define name and path of the external library folder. It would be better not to select a directory having too many subdirectories as the external library directory so that the file loading efficiency won’t affected. And do not put jar files of different external libraries under same directory in order to prevent errors resulted from jar collisions.

2) When executing a dfx file from the command line on a non-GUI interface, you can change the configuration file under installation root directory/esProc/config/raqsoftConfig.xml manually and add an external library direction:

<Esproc>

      … …

    // Configure path of external library folder

  <extLibsPath>D:\raqsoft\esProc\extlib</extLibsPath>

  <importLibs>

//Configure name of external library folder

      <lib>YModelCli</lib>

  </importLibs>

</Esproc>

3. esProc offers a series of external library functions for using YModel prediction functionality. They include ym2_env(), ym2_model(), ym2_mcfload(), ym2_pcfload(), ym2_pcfsave(), ym2_predict(), ym2_result() and ym2_close(), etc. Find their uses in Function Reference.