Version: | 2.0 |
---|---|
Provider: | PyXMCDA |
SOAP service’s name: | |
csvToXMCDA-performanceTable-PyXMCDA (see SOAP requests for details) |
Transforms a file containing a performance table from a comma-separated values (CSV) file to three XMCDA compliant files, containing the corresponding criteria ids, alternatives’ ids and the performance table.
Contact: Sébastien Bigaret (sebastien.bigaret@telecom-bretagne.eu)
Web page: https://gitlab.com/sbigaret/ws-pyxmcda
(For outputs, see below)
The performance table as a CSV file.
Example:
,cost,risk,employment,connection a11,17537,28.3,34.8,2.33 a03,16973,29,34.9,2.66
The first column contains the criteria’ ids. Additionally, the alternatives’ names are also extracted when the cells are formatted like id (name). Set the parameter “First column” to “id” to deactivate the extraction of alternatives’ names.
Then one line per alternative, with their ids and names derived from the 1st cell (just like criteria’ ids, see above) and the rest being the performance of each alternative on the criteria.
By default the values are supposed to be float numbers. This can be changed using the parameter “Default content”. It is possible to specify the type of a value by prepending it with a prefix:
Example:
,cost,risky,color,connection
a11,17537,boolean:true,string:red,2.33
a03,16973,boolean:false,string:blue.na:
The input value should be a valid XMCDA document whose main tag is <other>
.
Parameters of the method
The input value should be a valid XMCDA document whose main tag is <programParameters>
.
It must have the following form:
<programParameters>
<parameter id="csv_delimiter">
<values>
<value>
<label>%1</label>
</value>
</values>
</parameter>
<parameter id="default_prefix">
<values>
<value>
<label>%2</label>
</value>
</values>
</parameter>
<parameter id="name_in_id">
<values>
<value>
<boolean>%3</boolean>
</value>
</values>
</parameter>
</programParameters>
where:
%1 is a parameter named “CSV delimiter”. This is a string, and the value should conform to the following constraint: One character maximum. More formally, the constraint is:
%1.length() < 2
%2 is a parameter named “Default content”. It can have the following values:
float
: floatlabel
: stringinteger
: integerboolean
: booleanThe default value is float.
%3 is a parameter named “First column”. It can have the following values:
false
: idtrue
: id (name)The default value is id_and_name.
The equivalent alternative ids.
The returned value is a XMCDA document whose main tag is <alternatives>
.
The equivalent criteria ids.
The returned value is a XMCDA document whose main tag is <criteria>
.
The equivalent performances.
The returned value is a XMCDA document whose main tag is <performanceTable>
.
Status messages.
The returned value is a XMCDA document whose main tag is <programExecutionResult>
.