user:code:scilab [Promethee]

Scilab: The open source platform for numerical computation

Wrapping

  • input: ”.sci” script file
  • input parameters syntax
    • variable:
      #(variable_name)
    • formula:
      @<formula_expression>
  • output: detects output expressions like
    disp(“z =+string(...))
    lower case output taken as scalar float, upper case as 1D array of float
  • running progress: last line of output stream

Example

  • input file:
    x1=#x1 * 15-5;
    x2=#x2 * 15;
     
    X=[x1,x2]
     
    disp("X = "+string(X(1))+string(X(2));
    disp("z = "+string((x2 - 5/(4*%pi^2)*(x1^2) + 5/%pi*x1 - 6)^2 + 10*(1 - 1/(8*%pi))*cos(x1) + 10));
     
    exit
  • input variables: x1, x2
  • output: z (scalar), X (array)

Installation

  • user side:
    • unzip in Promethee installation directory,
    • restart Promethee GUI.
  • server side:
    • unzip in Promethee installation directory,
    • open shell console, check “scilab -nw -f Promethee_Install_Path/examples/0d_Scilab.sci” returns numerical values,
    • add
       <CODE name="Scilab" cplugin="file:./plugins/calc/Scilab.cplugin.jar" command="scilab -nw -f" />
      line in calculator.xml file inside ”<calculator>” tag,
    • wait for configuration refresh (5 s. if calculator is free).
© IRSN - All right reserved - Legal information