Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hekate:heart_howto [2011/09/29 11:26]
kkr
hekate:heart_howto [2019/06/27 15:49] (current)
Line 140: Line 140:
   - **[model,​remove,​ +modelname, +username].** - removes a model specified by modelname and username. After successful deletion fo the model <​code>​[true]</​code>​ is returned. In case of an error, following error message is sent back to the client<​code>​[false,'​Error while deleting model.'​]</​code>​   - **[model,​remove,​ +modelname, +username].** - removes a model specified by modelname and username. After successful deletion fo the model <​code>​[true]</​code>​ is returned. In case of an error, following error message is sent back to the client<​code>​[false,'​Error while deleting model.'​]</​code>​
   - **[model,​run,​ +modelname, +username, +{ddi | gdi | tdi | foi}, +tables, +{statename | statedef} ].** - runs inference process for the specified by specified model in one of the four modes, ddi, gdi, tdi or foi for given tables (schemas) - (see [[gox/3]] for details). State from which the inference should start can be either a name of the state that is located in HMR file, or a full definition of the state. The full definition of the state (statedef) should look as follows: <​code>​[[attribute_name1,​ value],​[attribute_name2,​ value] ... ]</​code>​ If the inference process succeed, the following answer is sent back to the client:<​code>​[true,​system_state,​ system_trajectory]</​code>​ The system_state is final state of the system defined as statedef. The system trajectory is a list of rules that were fired in the form of <​code>​[schema_name,​rule_id,​schema_name,​ rule_id, ...]</​code>​ If there is an error during this procedure, the following error message will be sent back to the user: <​code>​[false,'​Error occurred while running model'​]</​code>​   - **[model,​run,​ +modelname, +username, +{ddi | gdi | tdi | foi}, +tables, +{statename | statedef} ].** - runs inference process for the specified by specified model in one of the four modes, ddi, gdi, tdi or foi for given tables (schemas) - (see [[gox/3]] for details). State from which the inference should start can be either a name of the state that is located in HMR file, or a full definition of the state. The full definition of the state (statedef) should look as follows: <​code>​[[attribute_name1,​ value],​[attribute_name2,​ value] ... ]</​code>​ If the inference process succeed, the following answer is sent back to the client:<​code>​[true,​system_state,​ system_trajectory]</​code>​ The system_state is final state of the system defined as statedef. The system trajectory is a list of rules that were fired in the form of <​code>​[schema_name,​rule_id,​schema_name,​ rule_id, ...]</​code>​ If there is an error during this procedure, the following error message will be sent back to the user: <​code>​[false,'​Error occurred while running model'​]</​code>​
 +  - **[scheme, get, +modelname, +username, +schemeName].** - returns scheme of a given name in aform of:<​code>​[true,​[[INPUT_ATTRIBUTES],​[OUTPUT_ATTRIBUTES]]]</​code>​
   - **[state, add ,​+modelname,​ +username, +statename, +statedef ].** - adds new state to specified model. The statedef is full state definition in a form of: <​code>​[[attribute_name1,​ value],​[attribute_name2,​ value] ... ]</​code>​ The statename is a Prolog string.   - **[state, add ,​+modelname,​ +username, +statename, +statedef ].** - adds new state to specified model. The statedef is full state definition in a form of: <​code>​[[attribute_name1,​ value],​[attribute_name2,​ value] ... ]</​code>​ The statename is a Prolog string.
   - **[state, remove, +modelname, +username, +statename ].** - remove a state from specified model. If the operation succeeds following message is sent back to the client: <​code>​[true]</​code>​. In case of an error, the following message is sent back: <​code>​[false,'​Error while deleting model.'​]</​code>​   - **[state, remove, +modelname, +username, +statename ].** - remove a state from specified model. If the operation succeeds following message is sent back to the client: <​code>​[true]</​code>​. In case of an error, the following message is sent back: <​code>​[false,'​Error while deleting model.'​]</​code>​
Line 151: Line 152:
  
 ==== Protocol examples ==== ==== Protocol examples ====
-  - Adding a model in hmr format <​code>​ [model,​add,​hml'​MyName','​Username','​xtype [ name: week_days, base: symbolic, ordered: yes, domain: [moday,​tuesday],​ desc: \'This is only one definition\'​].'​]. </​code>​+  - Adding a model in hmr format <​code>​ [model,​add,​hml,'​MyName','​Username','​xtype [ name: week_days, base: symbolic, ordered: yes, domain: [moday,​tuesday],​ desc: \'This is only one definition\'​].'​]. </​code>​
   - Getting a whole model in hmr format <​code>​ [model,​get,​hmr,​ '​MyName','​Username',​ [[all]]].</​code>​As a result following message should be returned:<​code>​[true,​ [xtype[name:​week_days,​ base:​symbolic,​ ordered:​yes,​ domain:​[moday,​ tuesday], desc:'​This is only one definition'​].]]</​code>​   - Getting a whole model in hmr format <​code>​ [model,​get,​hmr,​ '​MyName','​Username',​ [[all]]].</​code>​As a result following message should be returned:<​code>​[true,​ [xtype[name:​week_days,​ base:​symbolic,​ ordered:​yes,​ domain:​[moday,​ tuesday], desc:'​This is only one definition'​].]]</​code>​
   - Getting all the atrributes and types in hml format <​code>​[model,​get,​hml,​ '​MyName','​Username',​ [[atrs], [tpes]]]</​code>​   - Getting all the atrributes and types in hml format <​code>​[model,​get,​hml,​ '​MyName','​Username',​ [[atrs], [tpes]]]</​code>​
hekate/heart_howto.1317288388.txt.gz · Last modified: 2019/06/27 16:00 (external edit)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0