summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--combined.js7503
-rw-r--r--js/Branching/CLKFROM.js10
-rw-r--r--js/Branching/CLKGOTO.js12
-rw-r--r--js/Branching/CLKGotoTagVisibility.js12
-rw-r--r--js/Branching/DEMUX.js26
-rw-r--r--js/Branching/DEMUX.pickle83
-rw-r--r--js/Branching/DEMUX_f.js26
-rw-r--r--js/Branching/DEMUX_f.pickle83
-rw-r--r--js/Branching/ESELECT_f.js13
-rw-r--r--js/Branching/ESELECT_f.pickle27
-rw-r--r--js/Branching/EXTRACTOR.js13
-rw-r--r--js/Branching/EXTRACTOR.pickle39
-rw-r--r--js/Branching/FROM.js12
-rw-r--r--js/Branching/FROMMO.js14
-rw-r--r--js/Branching/GOTO.js16
-rw-r--r--js/Branching/GOTOMO.js18
-rw-r--r--js/Branching/GotoTagVisibility.js12
-rw-r--r--js/Branching/GotoTagVisibilityMO.js12
-rw-r--r--js/Branching/ISELECT_f.js15
-rw-r--r--js/Branching/ISELECT_f.pickle79
-rw-r--r--js/Branching/ISELECT_m.js23
-rw-r--r--js/Branching/ISELECT_m.pickle45
-rw-r--r--js/Branching/MUX.js26
-rw-r--r--js/Branching/MUX.pickle41
-rw-r--r--js/Branching/MUX_f.js26
-rw-r--r--js/Branching/MUX_f.pickle41
-rw-r--r--js/Branching/M_SWITCH.js33
-rw-r--r--js/Branching/M_SWITCH.pickle35
-rw-r--r--js/Branching/NRMSOM_f.js15
-rw-r--r--js/Branching/NRMSOM_f.pickle38
-rw-r--r--js/Branching/RELAY_f.js19
-rw-r--r--js/Branching/RELAY_f.pickle27
-rw-r--r--js/Branching/SCALAR2VECTOR.js15
-rw-r--r--js/Branching/SCALAR2VECTOR.pickle37
-rw-r--r--js/Branching/SELECT_f.js15
-rw-r--r--js/Branching/SELECT_f.pickle81
-rw-r--r--js/Branching/SELECT_m.js23
-rw-r--r--js/Branching/SELECT_m.pickle39
-rw-r--r--js/Branching/SELF_SWITCH.js8
-rw-r--r--js/Branching/SELF_SWITCH.pickle6
-rw-r--r--js/Branching/SWITCH2.js14
-rw-r--r--js/Branching/SWITCH2_m.js23
-rw-r--r--js/Branching/SWITCH2_m.pickle45
-rw-r--r--js/Branching/SWITCH_f.js19
-rw-r--r--js/Branching/SWITCH_f.pickle29
-rw-r--r--js/Electrical/CCS.js44
-rw-r--r--js/Electrical/CVS.js44
-rw-r--r--js/Electrical/Capacitor.js10
-rw-r--r--js/Electrical/ConstantVoltage.js10
-rw-r--r--js/Electrical/CurrentSensor.js6
-rw-r--r--js/Electrical/Diode.js10
-rw-r--r--js/Electrical/Ground.js6
-rw-r--r--js/Electrical/Gyrator.js46
-rw-r--r--js/Electrical/IdealTransformer.js46
-rw-r--r--js/Electrical/Inductor.js10
-rw-r--r--js/Electrical/MOTOR.js4
-rw-r--r--js/Electrical/NMOS.js10
-rw-r--r--js/Electrical/NPN.js46
-rw-r--r--js/Electrical/OpAmp.js14
-rw-r--r--js/Electrical/PMOS.js10
-rw-r--r--js/Electrical/PNP.js46
-rw-r--r--js/Electrical/PotentialSensor.js4
-rw-r--r--js/Electrical/Resistor.js10
-rw-r--r--js/Electrical/SineVoltage.js10
-rw-r--r--js/Electrical/Switch.js14
-rw-r--r--js/Electrical/VVsourceAC.js12
-rw-r--r--js/Electrical/VariableResistor.js6
-rw-r--r--js/Electrical/VoltageSensor.js6
-rw-r--r--js/Electrical/VsourceAC.js10
-rw-r--r--js/Events/ANDBLK.js14
-rw-r--r--js/Events/ANDLOG_f.js2
-rw-r--r--js/Events/CLKSOMV_f.js2
-rw-r--r--js/Events/CLKSOM_f.js2
-rw-r--r--js/Events/END_c.js8
-rw-r--r--js/Events/EVTDLY_c.js10
-rw-r--r--js/Events/EVTDLY_f.js10
-rw-r--r--js/Events/EVTGEN_f.js8
-rw-r--r--js/Events/EVTVARDLY.js8
-rw-r--r--js/Events/HALT_f.js8
-rw-r--r--js/Events/IFTHEL_f.js15
-rw-r--r--js/Events/IFTHEL_f.pickle25
-rw-r--r--js/Events/MCLOCK_f.js36
-rw-r--r--js/Events/MFCLCK_f.js10
-rw-r--r--js/Events/M_freq.js32
-rw-r--r--js/Events/M_freq.pickle106
-rw-r--r--js/Events/VirtualCLK0.js2
-rw-r--r--js/Events/freq_div.js80
-rw-r--r--js/Hydraulics/Bache.js14
-rw-r--r--js/Hydraulics/Flowmeter.js46
-rw-r--r--js/Hydraulics/PerteDP.js10
-rw-r--r--js/Hydraulics/PuitsP.js10
-rw-r--r--js/Hydraulics/SourceP.js10
-rw-r--r--js/Hydraulics/VanneReglante.js10
-rw-r--r--js/IntegerOp/BITCLEAR.js43
-rw-r--r--js/IntegerOp/BITCLEAR.pickle43
-rw-r--r--js/IntegerOp/BITSET.js43
-rw-r--r--js/IntegerOp/BITSET.pickle43
-rw-r--r--js/IntegerOp/CONVERT.js25
-rw-r--r--js/IntegerOp/CONVERT.pickle41
-rw-r--r--js/IntegerOp/DFLIPFLOP.js10
-rw-r--r--js/IntegerOp/DLATCH.js4
-rw-r--r--js/IntegerOp/EXTRACTBITS.js49
-rw-r--r--js/IntegerOp/EXTRACTBITS.pickle45
-rw-r--r--js/IntegerOp/INTMUL.js27
-rw-r--r--js/IntegerOp/INTMUL.pickle37
-rw-r--r--js/IntegerOp/JKFLIPFLOP.js26
-rw-r--r--js/IntegerOp/LOGIC.js33
-rw-r--r--js/IntegerOp/LOGIC.pickle37
-rw-r--r--js/IntegerOp/SHIFT.js25
-rw-r--r--js/IntegerOp/SHIFT.pickle49
-rw-r--r--js/IntegerOp/SRFLIPFLOP.js24
-rw-r--r--js/Linear/BIGSOM_f.js15
-rw-r--r--js/Linear/BIGSOM_f.pickle43
-rw-r--r--js/Linear/CLINDUMMY_f.js4
-rw-r--r--js/Linear/CLR.js52
-rw-r--r--js/Linear/CLR.pickle72
-rw-r--r--js/Linear/CLR_f.js52
-rw-r--r--js/Linear/CLR_f.pickle72
-rw-r--r--js/Linear/CLSS.js41
-rw-r--r--js/Linear/CLSS.pickle70
-rw-r--r--js/Linear/CLSS_f.js37
-rw-r--r--js/Linear/CLSS_f.pickle92
-rw-r--r--js/Linear/DELAYV_f.js23
-rw-r--r--js/Linear/DELAYV_f.pickle31
-rw-r--r--js/Linear/DELAY_f.js44
-rw-r--r--js/Linear/DERIV.js4
-rw-r--r--js/Linear/DIFF_c.js18
-rw-r--r--js/Linear/DLR.js46
-rw-r--r--js/Linear/DLR.pickle58
-rw-r--r--js/Linear/DLR_f.js46
-rw-r--r--js/Linear/DLR_f.pickle58
-rw-r--r--js/Linear/DLSS.js37
-rw-r--r--js/Linear/DLSS.pickle60
-rw-r--r--js/Linear/DLSS_f.js33
-rw-r--r--js/Linear/DLSS_f.pickle80
-rw-r--r--js/Linear/DOLLAR.js57
-rw-r--r--js/Linear/DOLLAR.pickle31
-rw-r--r--js/Linear/DOLLAR_f.js23
-rw-r--r--js/Linear/DOLLAR_f.pickle26
-rw-r--r--js/Linear/DOLLAR_m.js57
-rw-r--r--js/Linear/DOLLAR_m.pickle31
-rw-r--r--js/Linear/GAINBLK.js82
-rw-r--r--js/Linear/GAINBLK.pickle58
-rw-r--r--js/Linear/GAINBLK_f.js21
-rw-r--r--js/Linear/GAINBLK_f.pickle81
-rw-r--r--js/Linear/GAIN_f.js21
-rw-r--r--js/Linear/GAIN_f.pickle83
-rw-r--r--js/Linear/INTEGRAL.js27
-rw-r--r--js/Linear/INTEGRAL.pickle49
-rw-r--r--js/Linear/INTEGRAL_f.js8
-rw-r--r--js/Linear/INTEGRAL_m.js53
-rw-r--r--js/Linear/INTEGRAL_m.pickle47
-rw-r--r--js/Linear/PID.js36
-rw-r--r--js/Linear/REGISTER.js21
-rw-r--r--js/Linear/REGISTER.pickle31
-rw-r--r--js/Linear/REGISTER_f.js10
-rw-r--r--js/Linear/SAMPHOLD.js4
-rw-r--r--js/Linear/SAMPHOLD_m.js17
-rw-r--r--js/Linear/SAMPHOLD_m.pickle35
-rw-r--r--js/Linear/SAMPLEHOLD_f.js4
-rw-r--r--js/Linear/SOM_f.js22
-rw-r--r--js/Linear/SUMMATION.js53
-rw-r--r--js/Linear/SUMMATION.pickle49
-rw-r--r--js/Linear/SUM_f.js4
-rw-r--r--js/Linear/TCLSS.js39
-rw-r--r--js/Linear/TCLSS.pickle98
-rw-r--r--js/Linear/TCLSS_f.js39
-rw-r--r--js/Linear/TCLSS_f.pickle98
-rw-r--r--js/Linear/TIME_DELAY.js21
-rw-r--r--js/Linear/TIME_DELAY.pickle37
-rw-r--r--js/Linear/VARIABLE_DELAY.js21
-rw-r--r--js/Linear/VARIABLE_DELAY.pickle45
-rw-r--r--js/MatrixOp/CUMSUM.js57
-rw-r--r--js/MatrixOp/CUMSUM.pickle81
-rw-r--r--js/MatrixOp/EXTRACT.js49
-rw-r--r--js/MatrixOp/EXTRACT.pickle57
-rw-r--r--js/MatrixOp/EXTTRI.js51
-rw-r--r--js/MatrixOp/EXTTRI.pickle41
-rw-r--r--js/MatrixOp/MATBKSL.js39
-rw-r--r--js/MatrixOp/MATBKSL.pickle41
-rw-r--r--js/MatrixOp/MATCATH.js31
-rw-r--r--js/MatrixOp/MATCATH.pickle37
-rw-r--r--js/MatrixOp/MATCATV.js33
-rw-r--r--js/MatrixOp/MATCATV.pickle39
-rw-r--r--js/MatrixOp/MATDET.js39
-rw-r--r--js/MatrixOp/MATDET.pickle41
-rw-r--r--js/MatrixOp/MATDIAG.js39
-rw-r--r--js/MatrixOp/MATDIAG.pickle41
-rw-r--r--js/MatrixOp/MATDIV.js39
-rw-r--r--js/MatrixOp/MATDIV.pickle41
-rw-r--r--js/MatrixOp/MATEIG.js57
-rw-r--r--js/MatrixOp/MATEIG.pickle83
-rw-r--r--js/MatrixOp/MATEXPM.js39
-rw-r--r--js/MatrixOp/MATEXPM.pickle41
-rw-r--r--js/MatrixOp/MATINV.js39
-rw-r--r--js/MatrixOp/MATINV.pickle41
-rw-r--r--js/MatrixOp/MATLU.js33
-rw-r--r--js/MatrixOp/MATLU.pickle39
-rw-r--r--js/MatrixOp/MATMAGPHI.js43
-rw-r--r--js/MatrixOp/MATMAGPHI.pickle85
-rw-r--r--js/MatrixOp/MATMUL.js45
-rw-r--r--js/MatrixOp/MATMUL.pickle43
-rw-r--r--js/MatrixOp/MATPINV.js39
-rw-r--r--js/MatrixOp/MATPINV.pickle41
-rw-r--r--js/MatrixOp/MATRESH.js49
-rw-r--r--js/MatrixOp/MATRESH.pickle45
-rw-r--r--js/MatrixOp/MATSING.js63
-rw-r--r--js/MatrixOp/MATSING.pickle83
-rw-r--r--js/MatrixOp/MATSUM.js61
-rw-r--r--js/MatrixOp/MATSUM.pickle81
-rw-r--r--js/MatrixOp/MATTRAN.js37
-rw-r--r--js/MatrixOp/MATTRAN.pickle43
-rw-r--r--js/MatrixOp/MATZCONJ.js8
-rw-r--r--js/MatrixOp/MATZREIM.js43
-rw-r--r--js/MatrixOp/MATZREIM.pickle87
-rw-r--r--js/MatrixOp/RICC.js27
-rw-r--r--js/MatrixOp/RICC.pickle93
-rw-r--r--js/MatrixOp/ROOTCOEF.js39
-rw-r--r--js/MatrixOp/ROOTCOEF.pickle41
-rw-r--r--js/MatrixOp/SQRT.js31
-rw-r--r--js/MatrixOp/SQRT.pickle31
-rw-r--r--js/MatrixOp/SUBMAT.js49
-rw-r--r--js/MatrixOp/SUBMAT.pickle41
-rw-r--r--js/Misc/AUTOMAT.js97
-rw-r--r--js/Misc/AUTOMAT.pickle120
-rw-r--r--js/Misc/BACKLASH.js10
-rw-r--r--js/Misc/BOUNCE.js45
-rw-r--r--js/Misc/BOUNCE.pickle55
-rw-r--r--js/Misc/BOUNCEXY.js36
-rw-r--r--js/Misc/BPLATFORM.js26
-rw-r--r--js/Misc/CBLOCK.js60
-rw-r--r--js/Misc/CBLOCK.pickle76
-rw-r--r--js/Misc/CBLOCK4.js42
-rw-r--r--js/Misc/CBLOCK4.pickle92
-rw-r--r--js/Misc/CONSTRAINT2_c.js22
-rw-r--r--js/Misc/CONSTRAINT_c.js15
-rw-r--r--js/Misc/CONSTRAINT_c.pickle45
-rw-r--r--js/Misc/DEADBAND.js12
-rw-r--r--js/Misc/DEBUG.js21
-rw-r--r--js/Misc/DEBUG.pickle25
-rw-r--r--js/Misc/DEBUG_SCICOS.js5
-rw-r--r--js/Misc/DEBUG_SCICOS.pickle3
-rw-r--r--js/Misc/DIFF_f.js8
-rw-r--r--js/Misc/DSUPER.js40
-rw-r--r--js/Misc/DSUPER.pickle72
-rw-r--r--js/Misc/EDGETRIGGER.js8
-rw-r--r--js/Misc/EDGE_TRIGGER.js70
-rw-r--r--js/Misc/ENDBLK.js48
-rw-r--r--js/Misc/EXPRESSION.pickle49
-rw-r--r--js/Misc/Extract_Activation.js28
-rw-r--r--js/Misc/HYSTHERESIS.js14
-rw-r--r--js/Misc/IMPSPLIT_f.js2
-rw-r--r--js/Misc/LOGICAL_OP.js54
-rw-r--r--js/Misc/LOGICAL_OP.pickle33
-rw-r--r--js/Misc/MBLOCK.js126
-rw-r--r--js/Misc/MBLOCK.pickle243
-rw-r--r--js/Misc/MEMORY_f.js23
-rw-r--r--js/Misc/MEMORY_f.pickle42
-rw-r--r--js/Misc/MPBLOCK.js135
-rw-r--r--js/Misc/MPBLOCK.pickle241
-rw-r--r--js/Misc/PAL_f.js14
-rw-r--r--js/Misc/PAL_f.pickle43
-rw-r--r--js/Misc/PENDULUM_ANIM.js26
-rw-r--r--js/Misc/RATELIMITER.js12
-rw-r--r--js/Misc/RELATIONALOP.js43
-rw-r--r--js/Misc/RELATIONALOP.pickle37
-rw-r--r--js/Misc/SUPER_f.js8
-rw-r--r--js/Misc/TEXT_f.js30
-rw-r--r--js/Misc/c_block.js41
-rw-r--r--js/Misc/c_block.pickle56
-rw-r--r--js/Misc/fortran_block.js25
-rw-r--r--js/Misc/fortran_block.pickle48
-rw-r--r--js/Misc/func_block.js13
-rw-r--r--js/Misc/func_block.pickle53
-rw-r--r--js/Misc/generic_block.js23
-rw-r--r--js/Misc/generic_block.pickle51
-rw-r--r--js/Misc/generic_block2.js23
-rw-r--r--js/Misc/generic_block2.pickle53
-rw-r--r--js/Misc/generic_block3.js27
-rw-r--r--js/Misc/generic_block3.pickle55
-rw-r--r--js/Misc/scifunc_block.js50
-rw-r--r--js/Misc/scifunc_block.pickle54
-rw-r--r--js/Misc/scifunc_block_m.js56
-rw-r--r--js/Misc/scifunc_block_m.pickle80
-rw-r--r--js/NonLinear/ABSBLK_f.js2
-rw-r--r--js/NonLinear/ABS_VALUE.js10
-rw-r--r--js/NonLinear/COSBLK_f.js4
-rw-r--r--js/NonLinear/DLRADAPT_f.js18
-rw-r--r--js/NonLinear/DLRADAPT_f.pickle19
-rw-r--r--js/NonLinear/EXPBLK_f.js12
-rw-r--r--js/NonLinear/EXPBLK_m.js12
-rw-r--r--js/NonLinear/FSV_f.js6
-rw-r--r--js/NonLinear/INTRP2BLK_f.js8
-rw-r--r--js/NonLinear/INTRPLBLK_f.js8
-rw-r--r--js/NonLinear/INVBLK.js6
-rw-r--r--js/NonLinear/INVBLK_f.js6
-rw-r--r--js/NonLinear/LOGBLK_f.js12
-rw-r--r--js/NonLinear/LOOKUP2D.js66
-rw-r--r--js/NonLinear/LOOKUP2D.pickle120
-rw-r--r--js/NonLinear/LOOKUP_c.js97
-rw-r--r--js/NonLinear/LOOKUP_c.pickle652
-rw-r--r--js/NonLinear/LOOKUP_f.js26
-rw-r--r--js/NonLinear/LOOKUP_f.pickle81
-rw-r--r--js/NonLinear/MAXMIN.js24
-rw-r--r--js/NonLinear/MAXMIN.pickle33
-rw-r--r--js/NonLinear/MAX_f.js6
-rw-r--r--js/NonLinear/MIN_f.js6
-rw-r--r--js/NonLinear/POWBLK_f.js12
-rw-r--r--js/NonLinear/PRODUCT.js29
-rw-r--r--js/NonLinear/PRODUCT.pickle83
-rw-r--r--js/NonLinear/QUANT_f.js10
-rw-r--r--js/NonLinear/SATURATION.js12
-rw-r--r--js/NonLinear/SAT_f.js14
-rw-r--r--js/NonLinear/SIGNUM.js10
-rw-r--r--js/NonLinear/SINBLK_f.js4
-rw-r--r--js/NonLinear/TANBLK_f.js6
-rw-r--r--js/NonLinear/TrigFun.js12
-rw-r--r--js/PDE/PDE.js128
-rw-r--r--js/PDE/PDE.pickle122
-rw-r--r--js/Sinks/AFFICH_m.js35
-rw-r--r--js/Sinks/AFFICH_m.pickle31
-rw-r--r--js/Sinks/BARXY.js18
-rw-r--r--js/Sinks/CANIMXY.js55
-rw-r--r--js/Sinks/CANIMXY.pickle43
-rw-r--r--js/Sinks/CANIMXY3D.js69
-rw-r--r--js/Sinks/CANIMXY3D.pickle103
-rw-r--r--js/Sinks/CEVENTSCOPE.js43
-rw-r--r--js/Sinks/CEVENTSCOPE.pickle43
-rw-r--r--js/Sinks/CFSCOPE.js42
-rw-r--r--js/Sinks/CLKOUTV_f.js62
-rw-r--r--js/Sinks/CLKOUTV_f.pickle131
-rw-r--r--js/Sinks/CLKOUT_f.js8
-rw-r--r--js/Sinks/CMAT3D.js36
-rw-r--r--js/Sinks/CMAT3D.pickle14
-rw-r--r--js/Sinks/CMATVIEW.js34
-rw-r--r--js/Sinks/CMATVIEW.pickle16
-rw-r--r--js/Sinks/CMSCOPE.js75
-rw-r--r--js/Sinks/CMSCOPE.pickle43
-rw-r--r--js/Sinks/CSCOPE.js47
-rw-r--r--js/Sinks/CSCOPE.pickle79
-rw-r--r--js/Sinks/CSCOPXY.js55
-rw-r--r--js/Sinks/CSCOPXY.pickle51
-rw-r--r--js/Sinks/CSCOPXY3D.js65
-rw-r--r--js/Sinks/CSCOPXY3D.pickle99
-rw-r--r--js/Sinks/OUTIMPL_f.js16
-rw-r--r--js/Sinks/OUT_f.js12
-rw-r--r--js/Sinks/TOWS_c.js23
-rw-r--r--js/Sinks/TOWS_c.pickle37
-rw-r--r--js/Sinks/TRASH_f.js6
-rw-r--r--js/Sinks/WFILE_f.js55
-rw-r--r--js/Sinks/WFILE_f.pickle67
-rw-r--r--js/Sinks/WRITEAU_f.js40
-rw-r--r--js/Sinks/WRITEC_f.js53
-rw-r--r--js/Sinks/WRITEC_f.pickle73
-rw-r--r--js/Sources/CLKINV_f.js10
-rw-r--r--js/Sources/CLKIN_f.js8
-rw-r--r--js/Sources/CLOCK_c.js36
-rw-r--r--js/Sources/CLOCK_f.js36
-rw-r--r--js/Sources/CONST.js12
-rw-r--r--js/Sources/CONST_f.js10
-rw-r--r--js/Sources/CONST_m.js33
-rw-r--r--js/Sources/CONST_m.pickle39
-rw-r--r--js/Sources/CURVE_c.js91
-rw-r--r--js/Sources/CURVE_c.pickle674
-rw-r--r--js/Sources/CURV_f.js44
-rw-r--r--js/Sources/CURV_f.pickle25
-rw-r--r--js/Sources/Counter.js8
-rw-r--r--js/Sources/FROMWSB.js48
-rw-r--r--js/Sources/FROMWS_c.js25
-rw-r--r--js/Sources/FROMWS_c.pickle43
-rw-r--r--js/Sources/GENSIN_f.js17
-rw-r--r--js/Sources/GENSIN_f.pickle84
-rw-r--r--js/Sources/GENSQR_f.js10
-rw-r--r--js/Sources/GEN_SQR.js52
-rw-r--r--js/Sources/GEN_SQR.pickle96
-rw-r--r--js/Sources/Ground_g.js6
-rw-r--r--js/Sources/INIMPL_f.js16
-rw-r--r--js/Sources/IN_f.js27
-rw-r--r--js/Sources/IN_f.pickle87
-rw-r--r--js/Sources/Modulo_Count.js8
-rw-r--r--js/Sources/PULSE_SC.js52
-rw-r--r--js/Sources/PULSE_SC.pickle94
-rw-r--r--js/Sources/RAMP.js10
-rw-r--r--js/Sources/RAND_f.js18
-rw-r--r--js/Sources/RAND_m.js31
-rw-r--r--js/Sources/RAND_m.pickle47
-rw-r--r--js/Sources/READAU_f.js63
-rw-r--r--js/Sources/READAU_f.pickle39
-rw-r--r--js/Sources/READC_f.js63
-rw-r--r--js/Sources/READC_f.pickle39
-rw-r--r--js/Sources/RFILE_f.js61
-rw-r--r--js/Sources/RFILE_f.pickle38
-rw-r--r--js/Sources/SAWTOOTH_f.js4
-rw-r--r--js/Sources/STEP.js21
-rw-r--r--js/Sources/STEP.pickle49
-rw-r--r--js/Sources/STEP_FUNCTION.js56
-rw-r--r--js/Sources/SampleCLK.js14
-rw-r--r--js/Sources/Sigbuilder.js44
-rw-r--r--js/Sources/TIME_f.js2
-rw-r--r--js/Sources/TKSCALE.js8
-rw-r--r--js/Threshold/GENERAL_f.js33
-rw-r--r--js/Threshold/GENERAL_f.pickle41
-rw-r--r--js/Threshold/NEGTOPOS_f.js2
-rw-r--r--js/Threshold/POSTONEG_f.js4
-rw-r--r--js/Threshold/ZCROSS_f.js14
-rwxr-xr-xsci2jslex.py7
-rwxr-xr-xsci2jsyacc.py26
407 files changed, 12246 insertions, 11705 deletions
diff --git a/combined.js b/combined.js
index 6514572d..2483daa3 100644
--- a/combined.js
+++ b/combined.js
@@ -8,7 +8,7 @@ function CLKFROM() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = "A";
+ var exprs = "A";
this.x = standard_define([2,1],this.model,exprs," ");
this.x.graphics.id = "From";
return new BasicBlock(this.x);
@@ -24,17 +24,17 @@ function CLKFROM() {
CLKFROM.prototype.set = function CLKFROM() {
this.tag = arguments[0]["tag"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.tag,exprs] = scicos_getvalue("Set block parameters","Tag",list("str",-1),exprs);
if (!ok) {
break;
}
if (this.model.opar!=list(this.tag)) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.opar = list(new ScilabDouble([this.tag]));
this.model.evtout = new ScilabDouble([1]);
@@ -59,7 +59,7 @@ function CLKGOTO() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = [["A"],[sci2exp(1)]];
+ var exprs = [["A"],[sci2exp(1)]];
this.x = standard_define([2,1],this.model,exprs," ");
this.x.graphics.id = "Goto";
return new BasicBlock(this.x);
@@ -78,9 +78,9 @@ function CLKGOTO() {
this.tag = arguments[0]["tag"]
this.tagvis = parseFloat(arguments[0]["tagvis"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.tag,this.tagvis,exprs] = scicos_getvalue("Set block parameters",["Tag","Tag Visibility (1=Local 2=Scoped 3=Global)"],list("str",-1,"vec",1),exprs);
if (!ok) {
@@ -88,13 +88,13 @@ function CLKGOTO() {
}
if (((this.tagvis<1)||(this.tagvis>3))) {
message("Tag Visibility must be between 1 and 3");
- ok = false;
+ var ok = false;
}
this.tagvis = int(this.tagvis);
if (ok) {
if (((this.model.opar!=list(this.tag))||(this.model.ipar!=this.tagvis))) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.opar = list(new ScilabDouble([this.tag]));
this.model.ipar = new ScilabDouble([this.tagvis]);
@@ -126,8 +126,8 @@ function CLKGotoTagVisibility() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [false,false];
- exprs = "A";
- gr_i = [];
+ var exprs = "A";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -143,8 +143,8 @@ function CLKGotoTagVisibility() {
CLKGotoTagVisibility.prototype.set = function CLKGotoTagVisibility() {
this.tag = arguments[0]["tag"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
@@ -153,8 +153,8 @@ function CLKGotoTagVisibility() {
}
if (ok) {
if (this.model.opar!=list(this.tag)) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
graphics.exprs = exprs;
this.model.opar = list(new ScilabDouble([this.tag]));
@@ -179,8 +179,8 @@ function DEMUX() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- exprs = string(this.out);
- gr_i = [];
+ var exprs = string(this.out);
+ var gr_i = [];
this.x = standard_define([.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -196,8 +196,8 @@ function DEMUX() {
DEMUX.prototype.set = function DEMUX() {
this.out = parseFloat(arguments[0]["out"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.out,exprs] = scicos_getvalue("Set DEMUX block parameters",["number of output ports or vector of sizes"],list("intvec",-1),exprs);
@@ -207,21 +207,27 @@ function DEMUX() {
if (size(this.out,"*")==1) {
if (this.out<2||this.out>31) {
message("Block must have at least 2 and at most 31 output ports");
- ok = false;
+ var ok = false;
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,0,-transpose([1:this.out]),[],[]);
+ var tmpvar0 = check_io(this.model,graphics,0,-transpose([1:this.out]),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
} else {
if (size(this.out,"*")<2||or(this.out==0)||size(this.out,"*")>31) {
message([["Block must have at least 2 and at most 31 output ports"],["size 0 is not allowed"]]);
- ok = false;
+ var ok = false;
} else {
if (min(this.out)<0) {
- nin = 0;
+ var nin = 0;
} else {
- nin = sum(this.out);
+ var nin = sum(this.out);
}
- [this.model,graphics,ok] = check_io(this.model,graphics,nin,this.out.slice(),[],[]);
+ var tmpvar1 = check_io(this.model,graphics,nin,this.out.slice(),[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
this.out = size(this.out,"*");
}
@@ -250,8 +256,8 @@ function DEMUX_f() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- exprs = string(this.out);
- gr_i = [];
+ var exprs = string(this.out);
+ var gr_i = [];
this.x = standard_define([.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -267,8 +273,8 @@ function DEMUX_f() {
DEMUX_f.prototype.set = function DEMUX_f() {
this.out = parseFloat(arguments[0]["out"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.out,exprs] = scicos_getvalue("Set DEMUX block parameters",["number of output ports or vector of sizes"],list("vec",-1),exprs);
@@ -278,21 +284,27 @@ function DEMUX_f() {
if (size(this.out,"*")==1) {
if (this.out<2||this.out>8) {
message("Block must have at least 2 and at most 8 output ports");
- ok = false;
+ var ok = false;
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,0,-transpose([1:this.out]),[],[]);
+ var tmpvar0 = check_io(this.model,graphics,0,-transpose([1:this.out]),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
} else {
if (size(this.out,"*")<2||size(this.out,"*")>8||or(this.out==0)) {
message([["Block must have at least 2 and at most 8 output ports"],["and size 0 is not allowed"]]);
- ok = false;
+ var ok = false;
} else {
if (min(this.out)<0) {
- nin = 0;
+ var nin = 0;
} else {
- nin = sum(this.out);
+ var nin = sum(this.out);
}
- [this.model,graphics,ok] = check_io(this.model,graphics,nin,this.out.slice(),[],[]);
+ var tmpvar1 = check_io(this.model,graphics,nin,this.out.slice(),[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
this.out = size(this.out,"*");
}
@@ -325,8 +337,8 @@ function ESELECT_f() {
this.model.dep_ut = [true,false];
this.model.nmode = new ScilabDouble([0]);
this.model.nzcross = new ScilabDouble([0]);
- gr_i = [];
- exprs = [[string(this.out)],[string(1)],[string(this.model.nmode)]];
+ var gr_i = [];
+ var exprs = [[string(this.out)],[string(1)],[string(this.model.nmode)]];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -346,8 +358,8 @@ function ESELECT_f() {
this.inh = parseFloat(arguments[0]["inh"])
this.nmod = parseFloat(arguments[0]["nmod"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==1) {
exprs[2-1] = string(1);
}
@@ -372,7 +384,10 @@ function ESELECT_f() {
if (this.out<2) {
message("Block must have at least two output ports");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,1,[],this.inh,[ones(this.out,1)]);
+ var tmpvar0 = check_io(this.model,graphics,1,[],this.inh,[ones(this.out,1)])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.evtout = new ScilabDouble([ones(this.out,1)]);
@@ -399,8 +414,8 @@ function EXTRACTOR() {
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
this.model.ipar = new ScilabDouble([this.ind]);
- exprs = [sci2exp(this.ind)];
- gr_i = [];
+ var exprs = [sci2exp(this.ind)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -416,8 +431,8 @@ function EXTRACTOR() {
EXTRACTOR.prototype.set = function EXTRACTOR() {
this.ind = parseFloat(arguments[0]["ind"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.ind,exprs] = scicos_getvalue("Set block parameters",["indices to extract"],list("vec",-1),exprs);
@@ -426,7 +441,10 @@ function EXTRACTOR() {
}
this.ind = int(this.ind);
this.ind = this.ind.slice();
- [this.model,graphics,ok] = check_io(this.model,graphics,[-1],size(this.ind,1),[],[]);
+ var tmpvar0 = check_io(this.model,graphics,[-1],size(this.ind,1),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
this.model.ipar = this.ind;
graphics.exprs = exprs;
@@ -453,8 +471,8 @@ function FROM() {
this.model.opar = list(new ScilabString(["A"]));
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = ["A"];
- gr_i = [];
+ var exprs = ["A"];
+ var gr_i = [];
this.x = standard_define([2,1],this.model,exprs,gr_i);
this.x.graphics.id = "From";
return new BasicBlock(this.x);
@@ -471,8 +489,8 @@ function FROM() {
FROM.prototype.set = function FROM() {
this.tag = arguments[0]["tag"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tag,exprs] = scicos_getvalue("Set parameters",["Tag"],list("str",-1),exprs);
@@ -481,8 +499,8 @@ function FROM() {
}
if (ok) {
if (this.model.opar!=list(this.tag)) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
graphics.exprs = exprs;
this.model.opar = list(new ScilabDouble([this.tag]));
@@ -510,11 +528,11 @@ function FROMMO() {
this.model.opar = list(new ScilabString(["A"]));
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "frommo";
mo.outputs = "n";
- exprs = ["A"];
- gr_i = [];
+ var exprs = ["A"];
+ var gr_i = [];
this.x = standard_define([2,1],this.model,exprs,gr_i);
this.x.graphics.out_implicit = ["I"];
return new BasicBlock(this.x);
@@ -531,8 +549,8 @@ function FROMMO() {
FROMMO.prototype.set = function FROMMO() {
this.tag = arguments[0]["tag"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tag,exprs] = scicos_getvalue("Set parameters",["Tag"],list("str",-1),exprs);
@@ -541,8 +559,8 @@ function FROMMO() {
}
if (ok) {
if (this.model.opar!=list(this.tag)) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
graphics.exprs = exprs;
this.model.opar = list(new ScilabDouble([this.tag]));
@@ -570,8 +588,8 @@ function GOTO() {
this.model.opar = list(new ScilabString(["A"]));
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = [["A"],[sci2exp(1)]];
- gr_i = [];
+ var exprs = [["A"],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([2,1],this.model,exprs,gr_i);
this.x.graphics.id = "Goto";
return new BasicBlock(this.x);
@@ -590,8 +608,8 @@ function GOTO() {
this.tag = arguments[0]["tag"]
this.tagvis = parseFloat(arguments[0]["tagvis"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tag,this.tagvis,exprs] = scicos_getvalue("Set parameters",["Tag","Tag Visibility(1=Local 2=scoped 3= global)"],list("str",-1,"vec",1),exprs);
@@ -601,19 +619,19 @@ function GOTO() {
this.tagvis = int(this.tagvis);
if (((this.tagvis<1)||(this.tagvis>3))) {
message("Tag Visibility must be between 1 and 3");
- ok = false;
+ var ok = false;
}
if (ok) {
if (((this.model.ipar!=this.tagvis)||(this.model.opar!=list(this.tag)))) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
graphics.exprs = exprs;
this.model.opar = list(new ScilabDouble([this.tag]));
this.model.ipar = new ScilabDouble([this.tagvis]);
this.x.model = this.model;
this.x.graphics = graphics;
- arg1 = this.x;
+ var arg1 = this.x;
break;
}
}
@@ -636,11 +654,11 @@ function GOTOMO() {
this.model.opar = list(new ScilabString(["A"]));
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "gotomo";
mo.inputs = "p";
- exprs = [["A"],[sci2exp(1)]];
- gr_i = [];
+ var exprs = [["A"],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([2,1],this.model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
return new BasicBlock(this.x);
@@ -659,8 +677,8 @@ function GOTOMO() {
this.tag = arguments[0]["tag"]
this.tagvis = parseFloat(arguments[0]["tagvis"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tag,this.tagvis,exprs] = scicos_getvalue("Set parameters",["Tag","Tag Visibility(1=Local 2=scoped 3= global)"],list("str",-1,"vec",1),exprs);
@@ -670,19 +688,19 @@ function GOTOMO() {
this.tagvis = int(this.tagvis);
if (((this.tagvis<1)||(this.tagvis>3))) {
message("Tag Visibility must be between 1 and 3");
- ok = false;
+ var ok = false;
}
if (ok) {
if (((this.model.ipar!=this.tagvis)||(this.model.opar!=list(this.tag)))) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
graphics.exprs = exprs;
this.model.opar = list(new ScilabDouble([this.tag]));
this.model.ipar = new ScilabDouble([this.tagvis]);
this.x.model = this.model;
this.x.graphics = graphics;
- arg1 = this.x;
+ var arg1 = this.x;
break;
}
}
@@ -706,8 +724,8 @@ function GotoTagVisibility() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [false,false];
- exprs = "A";
- gr_i = [];
+ var exprs = "A";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -723,8 +741,8 @@ function GotoTagVisibility() {
GotoTagVisibility.prototype.set = function GotoTagVisibility() {
this.tag = arguments[0]["tag"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
@@ -733,8 +751,8 @@ function GotoTagVisibility() {
}
if (ok) {
if (this.model.opar!=list(this.tag)) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
graphics.exprs = exprs;
this.model.opar = list(new ScilabDouble([this.tag]));
@@ -763,8 +781,8 @@ function GotoTagVisibilityMO() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [false,false];
- exprs = "A";
- gr_i = [];
+ var exprs = "A";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -780,8 +798,8 @@ function GotoTagVisibilityMO() {
GotoTagVisibilityMO.prototype.set = function GotoTagVisibilityMO() {
this.tag = arguments[0]["tag"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
@@ -790,8 +808,8 @@ function GotoTagVisibilityMO() {
}
if (ok) {
if (this.model.opar!=list(this.tag)) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
graphics.exprs = exprs;
this.model.opar = list(new ScilabDouble([this.tag]));
@@ -808,7 +826,7 @@ function GotoTagVisibilityMO() {
function ISELECT_f() {
ISELECT_f.prototype.define = function ISELECT_f() {
this.z0 = 0;
- out = [[-1],[-1]];
+ var out = [[-1],[-1]];
this.nout = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["selector"]), new ScilabDouble([2]));
@@ -818,8 +836,8 @@ function ISELECT_f() {
this.model.dstate = new ScilabDouble([this.z0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.nout)],[string(this.z0+1)]];
- gr_i = [];
+ var exprs = [[string(this.nout)],[string(this.z0+1)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -837,8 +855,8 @@ function ISELECT_f() {
this.nout = parseFloat(arguments[0]["nout"])
this.z0 = parseFloat(arguments[0]["z0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nout,this.z0,exprs] = scicos_getvalue("Set parameters",["number of outputs","initial connected output"],list("vec",1,"vec",1),exprs);
@@ -848,7 +866,10 @@ function ISELECT_f() {
if (this.z0>this.nout||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,-1,-ones(this.nout,1),ones(this.nout,1),[]);
+ var tmpvar0 = check_io(this.model,graphics,-1,-ones(this.nout,1),ones(this.nout,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.dstate = new ScilabDouble([this.z0-1]);
@@ -883,8 +904,8 @@ function ISELECT_m() {
this.model.dstate = new ScilabDouble([this.z0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[sci2exp(this.nout)],[sci2exp(this.z0)]];
- gr_i = [];
+ var exprs = [[sci2exp(1)],[sci2exp(this.nout)],[sci2exp(this.z0)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -904,8 +925,8 @@ function ISELECT_m() {
this.nout = parseFloat(arguments[0]["nout"])
this.z0 = parseFloat(arguments[0]["z0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.typ,this.nout,this.z0,exprs] = scicos_getvalue("Set parameters",["Datatype(1= real double 2=Complex 3=int32 ...)","number of outputs","initial connected output"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -916,14 +937,17 @@ function ISELECT_m() {
message("initial connected input is not a valid input port number");
} else if (((this.typ<1)||(this.typ>8))) {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
} else {
- it = this.typ;
- ot = this.typ*ones(1,this.nout);
+ var it = this.typ;
+ var ot = this.typ*ones(1,this.nout);
if (ok) {
- out = [-ones(this.nout,1),-2*ones(this.nout,1)];
- in1 = [-1,-2];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(this.nout,1),[]);
+ var out = [-ones(this.nout,1),-2*ones(this.nout,1)];
+ var in1 = [-1,-2];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(this.nout,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.dstate = new ScilabDouble([this.z0]);
@@ -948,8 +972,8 @@ function MUX() {
this.model.ipar = new ScilabDouble([this.in1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = string(this.in1);
- gr_i = [];
+ var exprs = string(this.in1);
+ var gr_i = [];
this.x = standard_define([.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -964,8 +988,8 @@ function MUX() {
MUX.prototype.set = function MUX() {
this.in1 = parseFloat(arguments[0]["in1"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.in1,exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("intvec",-1),exprs);
@@ -975,21 +999,27 @@ function MUX() {
if (size(this.in1,"*")==1) {
if (this.in1<2||this.in1>31) {
message("Block must have at least two input ports and at most 31");
- ok = false;
+ var ok = false;
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,-transpose([1:this.in1]),0,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,-transpose([1:this.in1]),0,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
} else {
if (size(this.in1,"*")<2||or(this.in1==0)||size(this.in1,"*")>31) {
message([["Block must have at least two input ports"],["and at most 31. Size 0 is not allowed. "]]);
- ok = false;
+ var ok = false;
} else {
if (min(this.in1)<0) {
- nout = 0;
+ var nout = 0;
} else {
- nout = sum(this.in1);
+ var nout = sum(this.in1);
}
- [this.model,graphics,ok] = check_io(this.model,graphics,this.in1.slice(),nout,[],[]);
+ var tmpvar1 = check_io(this.model,graphics,this.in1.slice(),nout,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
this.in1 = size(this.in1,"*");
}
@@ -1017,8 +1047,8 @@ function MUX_f() {
this.model.ipar = new ScilabDouble([this.in1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = string(this.in1);
- gr_i = [];
+ var exprs = string(this.in1);
+ var gr_i = [];
this.x = standard_define([0.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -1033,8 +1063,8 @@ function MUX_f() {
MUX_f.prototype.set = function MUX_f() {
this.in1 = parseFloat(arguments[0]["in1"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.in1,exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("vec",-1),exprs);
@@ -1044,21 +1074,27 @@ function MUX_f() {
if (size(this.in1,"*")==1) {
if (this.in1<2||this.in1>8) {
message("Block must have at least two input ports and at most eight");
- ok = false;
+ var ok = false;
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,-transpose([1:this.in1]),0,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,-transpose([1:this.in1]),0,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
} else {
if (size(this.in1,"*")<2||size(this.in1,"*")>8||or(this.in1==0)) {
message([["Block must have at least two input ports"],["and at most eight, and size 0 is not allowed. "]]);
- ok = false;
+ var ok = false;
} else {
if (min(this.in1)<0) {
- nout = 0;
+ var nout = 0;
} else {
- nout = sum(this.in1);
+ var nout = sum(this.in1);
}
- [this.model,graphics,ok] = check_io(this.model,graphics,this.in1.slice(),nout,[],[]);
+ var tmpvar1 = check_io(this.model,graphics,this.in1.slice(),nout,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
this.in1 = size(this.in1,"*");
}
@@ -1078,8 +1114,8 @@ function MUX_f() {
/* autogenerated from "macros/Branching/M_SWITCH.sci" */
function M_SWITCH() {
M_SWITCH.prototype.define = function M_SWITCH() {
- in1 = [[1],[-1],[-1]];
- ipar = [[1],[3]];
+ var in1 = [[1],[-1],[-1]];
+ var ipar = [[1],[3]];
this.nin = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["mswitch"]), new ScilabDouble([4]));
@@ -1088,8 +1124,8 @@ function M_SWITCH() {
this.model.ipar = new ScilabDouble(ipar);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.nin)],[string(ipar)]];
- gr_i = [];
+ var exprs = [[string(this.nin)],[string(ipar)]];
+ var gr_i = [];
this.x = standard_define([2.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -1109,8 +1145,8 @@ function M_SWITCH() {
this.base = parseFloat(arguments[0]["base"])
this.rule = arguments[0]["rule"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nin,this.base,this.rule,exprs] = scicos_getvalue("Set parameters",["number of inputs","zero base indexing (0), otherwise 1","rounding rule: int (0), round (1), ceil (2), floor (3)"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -1127,17 +1163,20 @@ function M_SWITCH() {
message("incorrect rounding rule");
} else {
if (this.nin==1) {
- in1 = [[1,1],[-1,1]];
- out = [1,1];
+ var in1 = [[1,1],[-1,1]];
+ var out = [1,1];
} else {
- in1 = [[1],[-ones(this.nin,1)]];
- in2 = [[1],[-2*ones(this.nin,1)]];
- in1 = [in1,in2];
- out = [-1,-2];
- }
- it = [[-1],[-2*ones(this.nin,1)]];
- ot = -2;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var in1 = [[1],[-ones(this.nin,1)]];
+ var in2 = [[1],[-2*ones(this.nin,1)]];
+ var in1 = [in1,in2];
+ var out = [-1,-2];
+ }
+ var it = [[-1],[-2*ones(this.nin,1)]];
+ var ot = -2;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.ipar = new ScilabDouble([this.base],[this.rule]);
@@ -1153,7 +1192,7 @@ function M_SWITCH() {
/* autogenerated from "macros/Branching/NRMSOM_f.sci" */
function NRMSOM_f() {
NRMSOM_f.prototype.define = function NRMSOM_f() {
- in1 = [[-1],[-1]];
+ var in1 = [[-1],[-1]];
this.nin = 2;
this.model = scicos_model();
this.model.sim = new ScilabString(["junk"]);
@@ -1161,8 +1200,8 @@ function NRMSOM_f() {
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [string(this.nin)];
- gr_i = [];
+ var exprs = [string(this.nin)];
+ var gr_i = [];
this.x = standard_define([.2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -1178,15 +1217,18 @@ function NRMSOM_f() {
NRMSOM_f.prototype.set = function NRMSOM_f() {
this.nin = parseFloat(arguments[0]["nin"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nin,exprs] = scicos_getvalue("Set parameters",["number of inputs"],list("vec",1),exprs);
if (!ok) {
break;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,-ones(this.nin,1),-1,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,-ones(this.nin,1),-1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.x.graphics = graphics;
@@ -1200,8 +1242,8 @@ function NRMSOM_f() {
/* autogenerated from "macros/Branching/RELAY_f.sci" */
function RELAY_f() {
RELAY_f.prototype.define = function RELAY_f() {
- i0 = 0;
- in1 = [[-1],[-1]];
+ var i0 = 0;
+ var in1 = [[-1],[-1]];
this.nin = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["relay"]), new ScilabDouble([2]));
@@ -1212,8 +1254,8 @@ function RELAY_f() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,true];
- exprs = [[string(this.nin)],[string(i0+1)]];
- gr_i = [];
+ var exprs = [[string(this.nin)],[string(i0+1)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -1231,10 +1273,10 @@ function RELAY_f() {
this.nin = parseFloat(arguments[0]["nin"])
this.z0 = arguments[0]["z0"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- ipar = this.model.ipar;
+ var ipar = this.model.ipar;
while (true) {
[ok,this.nin,this.z0,exprs] = scicos_getvalue("Set parameters",["number of inputs","initial connected input"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -1243,7 +1285,10 @@ function RELAY_f() {
if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[]);
+ var tmpvar0 = check_io(this.model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.dstate = new ScilabString([this.z0-1]);
@@ -1266,8 +1311,8 @@ function SCALAR2VECTOR() {
this.model.in1 = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [string([this.nout])];
- gr_i = [];
+ var exprs = [string([this.nout])];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -1283,8 +1328,8 @@ function SCALAR2VECTOR() {
SCALAR2VECTOR.prototype.set = function SCALAR2VECTOR() {
this.nout = parseFloat(arguments[0]["nout"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nout,exprs] = scicos_getvalue("Set block parameters",["size of output (-1: if don\'t know)"],list("vec",1),exprs);
@@ -1294,10 +1339,13 @@ function SCALAR2VECTOR() {
this.nout = int(this.nout);
if ((this.nout!=-1&&(this.nout<=0))) {
message("size of output must be -1 or >0");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,[1],this.nout,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,[1],this.nout,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
@@ -1313,7 +1361,7 @@ function SCALAR2VECTOR() {
function SELECT_f() {
SELECT_f.prototype.define = function SELECT_f() {
this.z0 = 0;
- in1 = [[-1],[-1]];
+ var in1 = [[-1],[-1]];
this.nin = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["selector"]), new ScilabDouble([2]));
@@ -1323,8 +1371,8 @@ function SELECT_f() {
this.model.dstate = new ScilabDouble([this.z0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.nin)],[string(this.z0+1)]];
- gr_i = [];
+ var exprs = [[string(this.nin)],[string(this.z0+1)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -1342,8 +1390,8 @@ function SELECT_f() {
this.nin = parseFloat(arguments[0]["nin"])
this.z0 = parseFloat(arguments[0]["z0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nin,this.z0,exprs] = scicos_getvalue("Set parameters",["number of inputs","initial connected input"],list("vec",1,"vec",1),exprs);
@@ -1353,7 +1401,10 @@ function SELECT_f() {
if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[]);
+ var tmpvar0 = check_io(this.model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.dstate = new ScilabDouble([this.z0-1]);
@@ -1388,8 +1439,8 @@ function SELECT_m() {
this.model.dstate = new ScilabDouble([this.z0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[sci2exp(this.nin)],[sci2exp(this.z0)]];
- gr_i = [];
+ var exprs = [[sci2exp(1)],[sci2exp(this.nin)],[sci2exp(this.z0)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -1409,8 +1460,8 @@ function SELECT_m() {
this.nin = parseFloat(arguments[0]["nin"])
this.z0 = parseFloat(arguments[0]["z0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.typ,this.nin,this.z0,exprs] = scicos_getvalue("Set parameters",["Datatype(1= real double 2=Complex 3=int32 ..)","number of inputs","initial connected input"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -1421,14 +1472,17 @@ function SELECT_m() {
message("initial connected input is not a valid input port number");
} else if (((this.typ<1)||(this.typ>8))&&(this.typ!=-1)) {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
} else {
- it = this.typ*ones(1,this.nin);
- ot = this.typ;
+ var it = this.typ*ones(1,this.nin);
+ var ot = this.typ;
if (ok) {
- in1 = [-ones(this.nin,1),-2*ones(this.nin,1)];
- out = [-1,-2];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(this.nin,1),[]);
+ var in1 = [-ones(this.nin,1),-2*ones(this.nin,1)];
+ var out = [-1,-2];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(this.nin,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.dstate = new ScilabDouble([this.z0]);
@@ -1457,7 +1511,7 @@ function SELF_SWITCH() {
this.x.model.out = 1;
this.x.model.blocktype = "h";
this.x.model.dep_ut = [false,false];
- this.x.model.rpar = this.genSwitchInnerDiagram[this.stateOpen-1];
+ this.x.model.rpar = genSwitchInnerDiagram(this.stateOpen);
this.x.model.opar = list(this.stateOpen);
this.x.graphics.in_implicit = ["E"];
this.x.graphics.in_style = "";
@@ -1477,10 +1531,10 @@ function SELF_SWITCH() {
SELF_SWITCH.prototype.set = function SELF_SWITCH() {
this.x = arg1;
this.stateOpen = this.x.model.opar[1-1];
- this.x.model.rpar = this.genSwitchInnerDiagram[!this.stateOpen-1];
+ this.x.model.rpar = genSwitchInnerDiagram(!this.stateOpen);
this.x.model.opar = list(!this.stateOpen);
- y = 0;
- typ = list();
+ var y = 0;
+ var typ = list();
if (this.stateOpen==false) {
this.x.graphics.style = "SELF_SWITCH_OFF";
} else {
@@ -1492,10 +1546,10 @@ function SELF_SWITCH() {
/* autogenerated from "macros/Branching/SWITCH2.sci" */
function SWITCH2() {
SWITCH2.prototype.define = function SWITCH2() {
- in1 = [[-1],[1],[-1]];
- ipar = [0];
+ var in1 = [[-1],[1],[-1]];
+ var ipar = [0];
this.nzz = 1;
- rpar = 0;
+ var rpar = 0;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["switch2"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble(in1);
@@ -1506,8 +1560,8 @@ function SWITCH2() {
this.model.nmode = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(ipar)],[string(rpar)],[string(this.nzz)]];
- gr_i = [];
+ var exprs = [[string(ipar)],[string(rpar)],[string(this.nzz)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -1527,8 +1581,8 @@ function SWITCH2() {
this.thra = arguments[0]["thra"]
this.nzz = parseFloat(arguments[0]["nzz"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.rule,this.thra,this.nzz,exprs] = scicos_getvalue("Set parameters",["pass first input if: u2>=a (0), u2>a (1), u2~=a (2)","threshold a","use zero crossing: yes (1), no (0)"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -1562,9 +1616,9 @@ function SWITCH2() {
/* autogenerated from "macros/Branching/SWITCH2_m.sci" */
function SWITCH2_m() {
SWITCH2_m.prototype.define = function SWITCH2_m() {
- ipar = [0];
+ var ipar = [0];
this.nzz = 1;
- rpar = 0;
+ var rpar = 0;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["switch2_m"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1],[1],[-1]);
@@ -1579,8 +1633,8 @@ function SWITCH2_m() {
this.model.nmode = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[string(ipar)],[string(rpar)],[string(this.nzz)]];
- gr_i = [];
+ var exprs = [[sci2exp(1)],[string(ipar)],[string(rpar)],[string(this.nzz)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -1602,8 +1656,8 @@ function SWITCH2_m() {
this.thra = arguments[0]["thra"]
this.nzz = parseFloat(arguments[0]["nzz"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.ot,this.rule,this.thra,this.nzz,exprs] = scicos_getvalue("Set parameters",["Datatype (1=real double 2=complex 3=int32 ...)","pass first input if: u2>=a (0), u2>a (1), u2~=a (2)","threshold a","use zero crossing: yes (1), no (0)"],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
@@ -1629,15 +1683,18 @@ function SWITCH2_m() {
}
if (((this.ot<1)||(this.ot>8))&&(this.ot!=-1)) {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
it[1-1] = this.ot;
it[2-1] = 1;
it[3-1] = this.ot;
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,this.ot),[],[]);
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,this.ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.x.graphics = graphics;
@@ -1651,8 +1708,8 @@ function SWITCH2_m() {
/* autogenerated from "macros/Branching/SWITCH_f.sci" */
function SWITCH_f() {
SWITCH_f.prototype.define = function SWITCH_f() {
- i0 = 0;
- in1 = [[-1],[-1]];
+ var i0 = 0;
+ var in1 = [[-1],[-1]];
this.nin = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["switchn"]), new ScilabDouble([2]));
@@ -1662,8 +1719,8 @@ function SWITCH_f() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,true];
- exprs = [[string(this.nin)],[string(i0+1)]];
- gr_i = [];
+ var exprs = [[string(this.nin)],[string(i0+1)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -1681,10 +1738,10 @@ function SWITCH_f() {
this.nin = parseFloat(arguments[0]["nin"])
this.z0 = arguments[0]["z0"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- ipar = this.model.ipar;
+ var ipar = this.model.ipar;
while (true) {
[ok,this.nin,this.z0,exprs] = scicos_getvalue("Set switch parameters",["number of inputs","connected input"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -1693,7 +1750,10 @@ function SWITCH_f() {
if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,-ones(this.nin,1),-1,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,-ones(this.nin,1),-1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.ipar = new ScilabString([this.z0-1]);
@@ -1709,43 +1769,43 @@ function SWITCH_f() {
/* autogenerated from "macros/Electrical/CCS.sci" */
function CCS() {
CCS.prototype.define = function CCS() {
- ModelName = "CCS";
- PrametersValue = [];
- ParametersName = [];
- this.model = scicos_model();
- Typein = [];
- Typeout = [];
- MI = [];
- MO = [];
- P = [[2,50,1,0],[70,98,2,0],[70,2,-2,0]];
- PortName = [["Iin"],["p"],["n"]];
+ var ModelName = "CCS";
+ var PrametersValue = [];
+ var ParametersName = [];
+ this.model = scicos_model();
+ var Typein = [];
+ var Typeout = [];
+ var MI = [];
+ var MO = [];
+ var P = [[2,50,1,0],[70,98,2,0],[70,2,-2,0]];
+ var PortName = [["Iin"],["p"],["n"]];
for (i=1;i<=size(P,"r");i+=1) {
if (P[i-1][3-1]==1) {
- Typein = [[Typein],["E"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["E"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==2) {
- Typein = [[Typein],["I"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["I"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==-1) {
- Typeout = [[Typeout],["E"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["E"]];
+ var MO = [[MO],[PortName[i-1]]];
}
if (P[i-1][3-1]==-2) {
- Typeout = [[Typeout],["I"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["I"]];
+ var MO = [[MO],[PortName[i-1]]];
}
}
this.model = scicos_model();
- mo = modelica();
+ var mo = modelica();
this.model.sim = new ScilabString([ModelName]);
mo.inputs = MI;
mo.outputs = MO;
this.model.rpar = PrametersValue;
mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName));
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
mo.model = ModelName;
@@ -1767,8 +1827,8 @@ function CCS() {
}
CCS.prototype.set = function CCS() {
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.x = arg1;
return new BasicBlock(this.x);
@@ -1777,43 +1837,43 @@ function CCS() {
/* autogenerated from "macros/Electrical/CVS.sci" */
function CVS() {
CVS.prototype.define = function CVS() {
- ModelName = "CVS";
- PrametersValue = [];
- ParametersName = [];
- this.model = scicos_model();
- Typein = [];
- Typeout = [];
- MI = [];
- MO = [];
- P = [[2,50,1,0],[70,98,2,0],[70,2,-2,0]];
- PortName = [["vin"],["p"],["n"]];
+ var ModelName = "CVS";
+ var PrametersValue = [];
+ var ParametersName = [];
+ this.model = scicos_model();
+ var Typein = [];
+ var Typeout = [];
+ var MI = [];
+ var MO = [];
+ var P = [[2,50,1,0],[70,98,2,0],[70,2,-2,0]];
+ var PortName = [["vin"],["p"],["n"]];
for (i=1;i<=size(P,"r");i+=1) {
if (P[i-1][3-1]==1) {
- Typein = [[Typein],["E"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["E"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==2) {
- Typein = [[Typein],["I"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["I"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==-1) {
- Typeout = [[Typeout],["E"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["E"]];
+ var MO = [[MO],[PortName[i-1]]];
}
if (P[i-1][3-1]==-2) {
- Typeout = [[Typeout],["I"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["I"]];
+ var MO = [[MO],[PortName[i-1]]];
}
}
this.model = scicos_model();
- mo = modelica();
+ var mo = modelica();
this.model.sim = new ScilabString([ModelName]);
mo.inputs = MI;
mo.outputs = MO;
this.model.rpar = PrametersValue;
mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName));
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
mo.model = ModelName;
@@ -1835,8 +1895,8 @@ function CVS() {
}
CVS.prototype.set = function CVS() {
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.x = arg1;
return new BasicBlock(this.x);
@@ -1852,7 +1912,7 @@ function Capacitor() {
this.model.sim = new ScilabString(["Capacitor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Capacitor";
mo.inputs = "p";
mo.outputs = "n";
@@ -1860,8 +1920,8 @@ function Capacitor() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = string([[this.C],[this.v]]);
- gr_i = [];
+ var exprs = string([[this.C],[this.v]]);
+ var gr_i = [];
this.x = standard_define([2,1.1],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -1881,8 +1941,8 @@ function Capacitor() {
this.C = parseFloat(arguments[0]["C"])
this.v = parseFloat(arguments[0]["v"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.C,this.v,exprs] = scicos_getvalue("Set Capacitor block parameter",["C (F)","Initial Voltage"],list("vec",1,"vec",1),exprs);
@@ -1910,14 +1970,14 @@ function ConstantVoltage() {
this.model.sim = new ScilabString(["ConstantVoltage"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "ConstantVoltage";
mo.inputs = "p";
mo.outputs = "n";
mo.parameters = list("V",list(this.V));
this.model.equations = new ScilabDouble([mo]);
- exprs = string(this.V);
- gr_i = [];
+ var exprs = string(this.V);
+ var gr_i = [];
this.x = standard_define([1.5,1.1],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -1934,8 +1994,8 @@ function ConstantVoltage() {
ConstantVoltage.prototype.set = function ConstantVoltage() {
this.V = parseFloat(arguments[0]["V"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.V,exprs] = scicos_getvalue("Set ConstantVoltage block parameter","V (volt)",list("vec",1),exprs);
@@ -1961,13 +2021,13 @@ function CurrentSensor() {
this.model.sim = new ScilabString(["CurrentSensor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "CurrentSensor";
mo.inputs = "p";
mo.outputs = [["n"],["i"]];
this.model.equations = new ScilabDouble([mo]);
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = [["I"],["E"]];
@@ -2000,14 +2060,14 @@ function Diode() {
this.model.sim = new ScilabString(["Diode"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Diode";
mo.inputs = "p";
mo.outputs = "n";
mo.parameters = list(["Ids","Vt","Maxexp","R"],list(this.Ids,this.Vt,this.Maxexp,this.R));
this.model.equations = new ScilabDouble([mo]);
- exprs = string([[this.Ids],[this.Vt],[this.Maxexp],[this.R]]);
- gr_i = [];
+ var exprs = string([[this.Ids],[this.Vt],[this.Maxexp],[this.R]]);
+ var gr_i = [];
this.x = standard_define([2,1],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -2031,8 +2091,8 @@ function Diode() {
this.Maxexp = parseFloat(arguments[0]["Maxexp"])
this.R = parseFloat(arguments[0]["R"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.Ids,this.Vt,this.Maxexp,this.R,exprs] = scicos_getvalue("Set Diode block parameter",["Saturation cuurent (A)","Voltage equivalent to temperature (Volt)","Max exponent for linear continuation","R (ohm)"],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
@@ -2058,12 +2118,12 @@ function Ground() {
this.model.sim = new ScilabString(["Ground"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Ground";
mo.inputs = "p";
this.model.equations = new ScilabDouble([mo]);
- exprs = "";
- gr_i = [];
+ var exprs = "";
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -2085,43 +2145,43 @@ function Ground() {
/* autogenerated from "macros/Electrical/Gyrator.sci" */
function Gyrator() {
Gyrator.prototype.define = function Gyrator() {
- ModelName = "Gyrator";
- PrametersValue = [[1],[1]];
- ParametersName = [["G1"],["G2"]];
- this.model = scicos_model();
- Typein = [];
- Typeout = [];
- MI = [];
- MO = [];
- P = [[2.5,90,2,0],[2.5,10,2,0],[97.5,90,-2,0],[97.5,10,-2,0]];
- PortName = [["p1"],["n1"],["p2"],["n2"]];
+ var ModelName = "Gyrator";
+ var PrametersValue = [[1],[1]];
+ var ParametersName = [["G1"],["G2"]];
+ this.model = scicos_model();
+ var Typein = [];
+ var Typeout = [];
+ var MI = [];
+ var MO = [];
+ var P = [[2.5,90,2,0],[2.5,10,2,0],[97.5,90,-2,0],[97.5,10,-2,0]];
+ var PortName = [["p1"],["n1"],["p2"],["n2"]];
for (i=1;i<=size(P,"r");i+=1) {
if (P[i-1][3-1]==1) {
- Typein = [[Typein],["E"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["E"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==2) {
- Typein = [[Typein],["I"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["I"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==-1) {
- Typeout = [[Typeout],["E"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["E"]];
+ var MO = [[MO],[PortName[i-1]]];
}
if (P[i-1][3-1]==-2) {
- Typeout = [[Typeout],["I"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["I"]];
+ var MO = [[MO],[PortName[i-1]]];
}
}
this.model = scicos_model();
- mo = modelica();
+ var mo = modelica();
this.model.sim = new ScilabString([ModelName]);
mo.inputs = MI;
mo.outputs = MO;
this.model.rpar = new ScilabDouble(PrametersValue);
mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName));
- exprs = [["1"],["1"]];
- gr_i = [];
+ var exprs = [["1"],["1"]];
+ var gr_i = [];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
mo.model = ModelName;
@@ -2147,11 +2207,11 @@ function Gyrator() {
this.G1 = arguments[0]["G1"]
this.G2 = arguments[0]["G2"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.x = arg1;
- exprs = this.x.graphics.exprs;
+ var exprs = this.x.graphics.exprs;
while (true) {
[ok,this.G1,this.G2,exprs] = scicos_getvalue([["Set Gyrator block parameters:"],[""],["G1: Gyration conductance"],["G2: Gyration conductance"]],["G1","G2"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -2167,43 +2227,43 @@ function Gyrator() {
/* autogenerated from "macros/Electrical/IdealTransformer.sci" */
function IdealTransformer() {
IdealTransformer.prototype.define = function IdealTransformer() {
- ModelName = "IdealTransformer";
- PrametersValue = [1];
- ParametersName = ["N"];
- this.model = scicos_model();
- Typein = [];
- Typeout = [];
- MI = [];
- MO = [];
- P = [[2.5,90,2,0],[2.5,10,2,0],[97.5,90,-2,0],[97.5,10,-2,0]];
- PortName = [["p1"],["n1"],["p2"],["n2"]];
+ var ModelName = "IdealTransformer";
+ var PrametersValue = [1];
+ var ParametersName = ["N"];
+ this.model = scicos_model();
+ var Typein = [];
+ var Typeout = [];
+ var MI = [];
+ var MO = [];
+ var P = [[2.5,90,2,0],[2.5,10,2,0],[97.5,90,-2,0],[97.5,10,-2,0]];
+ var PortName = [["p1"],["n1"],["p2"],["n2"]];
for (i=1;i<=size(P,"r");i+=1) {
if (P[i-1][3-1]==1) {
- Typein = [[Typein],["E"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["E"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==2) {
- Typein = [[Typein],["I"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["I"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==-1) {
- Typeout = [[Typeout],["E"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["E"]];
+ var MO = [[MO],[PortName[i-1]]];
}
if (P[i-1][3-1]==-2) {
- Typeout = [[Typeout],["I"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["I"]];
+ var MO = [[MO],[PortName[i-1]]];
}
}
this.model = scicos_model();
- mo = modelica();
+ var mo = modelica();
this.model.sim = new ScilabString([ModelName]);
mo.inputs = MI;
mo.outputs = MO;
this.model.rpar = PrametersValue;
mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName));
- exprs = ["1"];
- gr_i = [];
+ var exprs = ["1"];
+ var gr_i = [];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
mo.model = ModelName;
@@ -2227,11 +2287,11 @@ function IdealTransformer() {
IdealTransformer.prototype.set = function IdealTransformer() {
this.N = arguments[0]["N"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.x = arg1;
- exprs = this.x.graphics.exprs;
+ var exprs = this.x.graphics.exprs;
while (true) {
[ok,this.N,exprs] = scicos_getvalue([["Set Transformer block parameters:"],[""],["N:"+" Turn ratio (N1/N2)"]],["N"],list("vec",1),exprs);
if (!ok) {
@@ -2255,14 +2315,14 @@ function Inductor() {
this.model.sim = new ScilabString(["Inductor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Inductor";
mo.inputs = "p";
mo.outputs = "n";
mo.parameters = list("L",list(this.L));
this.model.equations = new ScilabDouble([mo]);
- exprs = string(this.L);
- gr_i = [];
+ var exprs = string(this.L);
+ var gr_i = [];
this.x = standard_define([2,0.9],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -2279,8 +2339,8 @@ function Inductor() {
Inductor.prototype.set = function Inductor() {
this.L = parseFloat(arguments[0]["L"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.L,exprs] = scicos_getvalue("Set Inductor block parameter","L (H)",list("vec",1),exprs);
@@ -2306,8 +2366,8 @@ function MOTOR() {
this.model.sim = new ScilabString(["motor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- gr_i = [];
- exprs = "";
+ var gr_i = [];
+ var exprs = "";
this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.out_implicit = [["I"],["I"]];
this.x.graphics.in_implicit = ["I"];
@@ -2342,7 +2402,7 @@ function NMOS() {
this.model.sim = new ScilabString(["NMOS"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "NMOS";
mo.outputs = [["D"],["B"],["S"]];
mo.inputs = "G";
@@ -2350,8 +2410,8 @@ function NMOS() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]];
- gr_i = [];
+ var exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = [["I"],["I"],["I"]];
@@ -2385,8 +2445,8 @@ function NMOS() {
this.dL = parseFloat(arguments[0]["dL"])
this.RDS = parseFloat(arguments[0]["RDS"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS,exprs] = scicos_getvalue("Set NMOS Transistor block parameters",["Width [m]","Length [m]","Transconductance parameter [A/(V*V)]","Zero bias threshold voltage [V]","Bulk threshold parameter","Reduction of pinch-off region","Narrowing of channel [m]","Shortening of channel [m]","Drain-Source-Resistance [Ohm]"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
@@ -2405,43 +2465,43 @@ function NMOS() {
/* autogenerated from "macros/Electrical/NPN.sci" */
function NPN() {
NPN.prototype.define = function NPN() {
- ModelName = "NPN";
- PrametersValue = [[50],[0.1],[0],[0.02],[1.200e-10],[5.000e-09],[1.000e-12],[4.000e-13],[5.000e-13],[0.8],[0.4],[0.8],[0.333],[1.000e-15],[1.000e-15],[0.02585],[40]];
- ParametersName = [["Bf"],["Br"],["Is"],["Vak"],["Tauf"],["Taur"],["Ccs"],["Cje"],["Cjc"],["Phie"],["Me"],["Phic"],["Mc"],["Gbc"],["Gbe"],["Vt"],["EMinMax"]];
- this.model = scicos_model();
- Typein = [];
- Typeout = [];
- MI = [];
- MO = [];
- P = [[100,90,-2,0],[0,50,2,0],[100,10,-2,0]];
- PortName = [["C"],["B"],["E"]];
+ var ModelName = "NPN";
+ var PrametersValue = [[50],[0.1],[0],[0.02],[1.200e-10],[5.000e-09],[1.000e-12],[4.000e-13],[5.000e-13],[0.8],[0.4],[0.8],[0.333],[1.000e-15],[1.000e-15],[0.02585],[40]];
+ var ParametersName = [["Bf"],["Br"],["Is"],["Vak"],["Tauf"],["Taur"],["Ccs"],["Cje"],["Cjc"],["Phie"],["Me"],["Phic"],["Mc"],["Gbc"],["Gbe"],["Vt"],["EMinMax"]];
+ this.model = scicos_model();
+ var Typein = [];
+ var Typeout = [];
+ var MI = [];
+ var MO = [];
+ var P = [[100,90,-2,0],[0,50,2,0],[100,10,-2,0]];
+ var PortName = [["C"],["B"],["E"]];
for (i=1;i<=size(P,"r");i+=1) {
if (P[i-1][3-1]==1) {
- Typein = [[Typein],["E"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["E"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==2) {
- Typein = [[Typein],["I"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["I"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==-1) {
- Typeout = [[Typeout],["E"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["E"]];
+ var MO = [[MO],[PortName[i-1]]];
}
if (P[i-1][3-1]==-2) {
- Typeout = [[Typeout],["I"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["I"]];
+ var MO = [[MO],[PortName[i-1]]];
}
}
this.model = scicos_model();
- mo = modelica();
+ var mo = modelica();
this.model.sim = new ScilabString([ModelName]);
mo.inputs = MI;
mo.outputs = MO;
this.model.rpar = new ScilabDouble(PrametersValue);
mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName));
- exprs = [["50"],["0.1"],["1.e-16"],["0.02"],["0.12e-9"],["5e-9"],["1e-12"],["0.4e-12"],["0.5e-12"],["0.8"],["0.4"],["0.8"],["0.333"],["1e-15"],["1e-15"],["0.02585"],["40"]];
- gr_i = [];
+ var exprs = [["50"],["0.1"],["1.e-16"],["0.02"],["0.12e-9"],["5e-9"],["1e-12"],["0.4e-12"],["0.5e-12"],["0.8"],["0.4"],["0.8"],["0.333"],["1e-15"],["1e-15"],["0.02585"],["40"]];
+ var gr_i = [];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
mo.model = ModelName;
@@ -2497,11 +2557,11 @@ function NPN() {
this.Vt = arguments[0]["Vt"]
this.EMinMax = arguments[0]["EMinMax"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.x = arg1;
- exprs = this.x.graphics.exprs;
+ var exprs = this.x.graphics.exprs;
while (true) {
[ok,this.Bf,this.Br,this.Is,this.Vak,this.Tauf,this.Taur,this.Ccs,this.Cje,this.Cjc,this.Phie,this.Me,this.Phic,this.Mc,this.Gbc,this.Gbe,this.Vt,this.EMinMax,exprs] = scicos_getvalue([["Set NPN block parameters:"],[""]],["Bf : Forward beta","Br : Reverse beta","Is : Transport saturation current","Vak : Early voltage (inverse), 1/Volt","Tauf: Ideal forward transit time","Taur: Ideal reverse transit time","Ccs : Collector-substrat(ground) cap.","Cje : Base-emitter zero bias depletion cap.","Cjc : Base-coll. zero bias depletion cap.","Phie: Base-emitter diffusion voltage","Me : Base-emitter gradation exponent","Phic: Base-collector diffusion voltage","Mc : Base-collector gradation exponent","Gbc : Base-collector conductance","Gbe : Base-emitter conductance","Vt : Voltage equivalent of temperature","EMinmax: if x > EMinMax, the exp(x) is linearized"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -2517,13 +2577,13 @@ function NPN() {
/* autogenerated from "macros/Electrical/OpAmp.sci" */
function OpAmp() {
OpAmp.prototype.define = function OpAmp() {
- S = [];
- Z = [];
+ var S = [];
+ var Z = [];
this.model = scicos_model();
this.model.sim = new ScilabString(["OpAmp"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = this.model.sim;
mo.inputs = [["in_p"],["in_n"]];
mo.outputs = ["out"];
@@ -2532,8 +2592,8 @@ function OpAmp() {
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
this.model.rpar = Z;
- exprs = string(Z);
- gr_i = [];
+ var exprs = string(Z);
+ var gr_i = [];
this.x = standard_define([3,5],this.model,exprs,gr_i);
this.x.graphics.in_implicit = [["I"],["I"]];
this.x.graphics.out_implicit = ["I"];
@@ -2555,8 +2615,8 @@ function OpAmp() {
this.SatH = arguments[0]["SatH"]
this.SatL = arguments[0]["SatL"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (false) {
[ok,this.OLGain,this.SatH,this.SatL,exprs] = scicos_getvalue("Set the Operational Amplifier parameters",["Open Loop Gain","Positive saturation voltage","Negative saturation voltage"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -2588,7 +2648,7 @@ function PMOS() {
this.model.sim = new ScilabString(["PMOS"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "PMOS";
mo.outputs = [["D"],["B"],["S"]];
mo.inputs = "G";
@@ -2596,8 +2656,8 @@ function PMOS() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]];
- gr_i = [];
+ var exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = [["I"],["I"],["I"]];
@@ -2631,8 +2691,8 @@ function PMOS() {
this.dL = parseFloat(arguments[0]["dL"])
this.RDS = parseFloat(arguments[0]["RDS"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS,exprs] = scicos_getvalue("Set PMOS Transistor parameters",["Width [m]","Length [m]","Transconductance parameter [A/(V*V)]","Zero bias threshold voltage [V]","Bulk threshold parameter","Reduction of pinch-off region","Narrowing of channel [m]","Shortening of channel [m]","Drain-Source-Resistance [Ohm]"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
@@ -2651,43 +2711,43 @@ function PMOS() {
/* autogenerated from "macros/Electrical/PNP.sci" */
function PNP() {
PNP.prototype.define = function PNP() {
- ModelName = "PNP";
- PrametersValue = [[50],[0.1],[0],[0.02],[1.200e-10],[5.000e-09],[1.000e-12],[4.000e-13],[5.000e-13],[0.8],[0.4],[0.8],[0.333],[1.000e-15],[1.000e-15],[0.02585],[40]];
- ParametersName = [["Bf"],["Br"],["Is"],["Vak"],["Tauf"],["Taur"],["Ccs"],["Cje"],["Cjc"],["Phie"],["Me"],["Phic"],["Mc"],["Gbc"],["Gbe"],["Vt"],["EMinMax"]];
- this.model = scicos_model();
- Typein = [];
- Typeout = [];
- MI = [];
- MO = [];
- P = [[100,90,-2,0],[0,50,2,0],[100,10,-2,0]];
- PortName = [["C"],["B"],["E"]];
+ var ModelName = "PNP";
+ var PrametersValue = [[50],[0.1],[0],[0.02],[1.200e-10],[5.000e-09],[1.000e-12],[4.000e-13],[5.000e-13],[0.8],[0.4],[0.8],[0.333],[1.000e-15],[1.000e-15],[0.02585],[40]];
+ var ParametersName = [["Bf"],["Br"],["Is"],["Vak"],["Tauf"],["Taur"],["Ccs"],["Cje"],["Cjc"],["Phie"],["Me"],["Phic"],["Mc"],["Gbc"],["Gbe"],["Vt"],["EMinMax"]];
+ this.model = scicos_model();
+ var Typein = [];
+ var Typeout = [];
+ var MI = [];
+ var MO = [];
+ var P = [[100,90,-2,0],[0,50,2,0],[100,10,-2,0]];
+ var PortName = [["C"],["B"],["E"]];
for (i=1;i<=size(P,"r");i+=1) {
if (P[i-1][3-1]==1) {
- Typein = [[Typein],["E"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["E"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==2) {
- Typein = [[Typein],["I"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["I"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==-1) {
- Typeout = [[Typeout],["E"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["E"]];
+ var MO = [[MO],[PortName[i-1]]];
}
if (P[i-1][3-1]==-2) {
- Typeout = [[Typeout],["I"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["I"]];
+ var MO = [[MO],[PortName[i-1]]];
}
}
this.model = scicos_model();
- mo = modelica();
+ var mo = modelica();
this.model.sim = new ScilabString([ModelName]);
mo.inputs = MI;
mo.outputs = MO;
this.model.rpar = new ScilabDouble(PrametersValue);
mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName));
- exprs = [["50"],["0.1"],["1.e-16"],["0.02"],["0.12e-9"],["5e-9"],["1e-12"],["0.4e-12"],["0.5e-12"],["0.8"],["0.4"],["0.8"],["0.333"],["1e-15"],["1e-15"],["0.02585"],["40"]];
- gr_i = [];
+ var exprs = [["50"],["0.1"],["1.e-16"],["0.02"],["0.12e-9"],["5e-9"],["1e-12"],["0.4e-12"],["0.5e-12"],["0.8"],["0.4"],["0.8"],["0.333"],["1e-15"],["1e-15"],["0.02585"],["40"]];
+ var gr_i = [];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
mo.model = ModelName;
@@ -2743,11 +2803,11 @@ function PNP() {
this.Vt = arguments[0]["Vt"]
this.EMinMax = arguments[0]["EMinMax"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.x = arg1;
- exprs = this.x.graphics.exprs;
+ var exprs = this.x.graphics.exprs;
while (true) {
[ok,this.Bf,this.Br,this.Is,this.Vak,this.Tauf,this.Taur,this.Ccs,this.Cje,this.Cjc,this.Phie,this.Me,this.Phic,this.Mc,this.Gbc,this.Gbe,this.Vt,this.EMinMax,exprs] = scicos_getvalue([["Set PNP block parameters:"],[""]],["Bf : Forward beta","Br : Reverse beta","Is : Transport saturation current","Vak : Early voltage (inverse), 1/Volt","Tauf: Ideal forward transit time","Taur: Ideal reverse transit time","Ccs : Collector-substrat(ground) cap.","Cje : Base-emitter zero bias depletion cap.","Cjc : Base-coll. zero bias depletion cap.","Phie: Base-emitter diffusion voltage","Me : Base-emitter gradation exponent","Phic: Base-collector diffusion voltage","Mc : Base-collector gradation exponent","Gbc : Base-collector conductance","Gbe : Base-emitter conductance","Vt : Voltage equivalent of temperature","EMinMax: if x > EMinMax, the exp(x) function is linearized"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -2770,12 +2830,12 @@ function PotentialSensor() {
this.model.sim = new ScilabString(["PotentialSensor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "PotentialSensor";
mo.inputs = "p";
mo.outputs = ["v"];
this.model.equations = new ScilabDouble([mo]);
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,"",list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["E"];
@@ -2803,7 +2863,7 @@ function Resistor() {
this.model.sim = new ScilabString(["resistor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Resistor";
mo.inputs = "p";
mo.outputs = "n";
@@ -2811,8 +2871,8 @@ function Resistor() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = string(this.R);
- gr_i = [];
+ var exprs = string(this.R);
+ var gr_i = [];
this.x = standard_define([2,1],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -2829,8 +2889,8 @@ function Resistor() {
Resistor.prototype.set = function Resistor() {
this.R = parseFloat(arguments[0]["R"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.R,exprs] = scicos_getvalue("Set Resistor block parameter","R (ohm)",list("vec",1),exprs);
@@ -2862,14 +2922,14 @@ function SineVoltage() {
this.model.sim = new ScilabString(["SineVoltage"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "SineVoltage";
mo.inputs = "p";
mo.outputs = "n";
mo.parameters = list([["V"],["phase"],["freqHz"],["offset"],["startTime"]],list(this.V,this.ph,this.frq,this.offset,this.start));
this.model.equations = new ScilabDouble([mo]);
- exprs = [[string(this.V)],[string(this.ph)],[string(this.frq)],[string(this.offset)],[string(this.start)]];
- gr_i = [];
+ var exprs = [[string(this.V)],[string(this.ph)],[string(this.frq)],[string(this.offset)],[string(this.start)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -2895,8 +2955,8 @@ function SineVoltage() {
this.offset = parseFloat(arguments[0]["offset"])
this.start = parseFloat(arguments[0]["start"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.V,this.ph,this.frq,this.offset,this.start,exprs] = scicos_getvalue("Set voltage source parameter",["Amplitude (Volt)","phase (rad)","Frequency (Hz)","Voltageoffset (V)","Timeoffset (s)"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
@@ -2919,12 +2979,12 @@ function Switch() {
this.model = scicos_model();
this.Ron = 0.01;
this.Roff = 1e5;
- S = [["Ron"],["Roff"]];
- Z = eval(S);
+ var S = [["Ron"],["Roff"]];
+ var Z = eval(S);
this.model.sim = new ScilabString(["Switch"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = this.model.sim;
mo.inputs = [["p"],["inp"]];
mo.outputs = "n";
@@ -2933,8 +2993,8 @@ function Switch() {
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
this.model.rpar = new ScilabDouble([Z]);
- exprs = string(Z);
- gr_i = [];
+ var exprs = string(Z);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = [["I"],["E"]];
this.x.graphics.out_implicit = ["I"];
@@ -2954,8 +3014,8 @@ function Switch() {
this.Ron = parseFloat(arguments[0]["Ron"])
this.Roff = parseFloat(arguments[0]["Roff"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.Ron,this.Roff,exprs] = scicos_getvalue("Set non-ideal electrical switch parameters",["Resistance in On state (Ohm)","Resistance in Off state (Ohm)"],list("vec",1,"vec",1),exprs);
@@ -2977,20 +3037,20 @@ function VVsourceAC() {
this.model = scicos_model();
this.model.in1 = new ScilabDouble([1],[1]);
this.model.out = [1];
- VA = 220;
+ var VA = 220;
this.FR = 50;
this.model.rpar = [this.FR];
this.model.sim = new ScilabString(["VVsourceAC"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "VVsourceAC";
mo.inputs = ["p","VA"];
mo.outputs = "n";
mo.parameters = list(["f"],list(this.FR));
this.model.equations = new ScilabDouble([mo]);
- exprs = [string(this.FR)];
- gr_i = [];
+ var exprs = [string(this.FR)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I","E"];
this.x.graphics.out_implicit = ["I"];
@@ -3008,8 +3068,8 @@ function VVsourceAC() {
VVsourceAC.prototype.set = function VVsourceAC() {
this.FR = parseFloat(arguments[0]["FR"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.FR,exprs] = scicos_getvalue("Set voltage source parameter",["Frequency (Hz)"],list("vec",-1),exprs);
@@ -3033,15 +3093,15 @@ function VariableResistor() {
this.model.sim = new ScilabString(["VariableResistor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "VariableResistor";
mo.inputs = ["p","R"];
mo.outputs = "n";
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I","E"];
this.x.graphics.out_implicit = ["I"];
@@ -3069,13 +3129,13 @@ function VoltageSensor() {
this.model.sim = new ScilabString(["VoltageSensor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "VoltageSensor";
mo.inputs = "p";
mo.outputs = [["n"],["v"]];
this.model.equations = new ScilabDouble([mo]);
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = [["I"],["E"]];
@@ -3106,14 +3166,14 @@ function VsourceAC() {
this.model.sim = new ScilabString(["VsourceAC"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "VsourceAC";
mo.inputs = "p";
mo.outputs = "n";
mo.parameters = list([["VA"],["f"]],list(this.VA,this.FR));
this.model.equations = new ScilabDouble([mo]);
- exprs = [[string(this.VA)],[string(this.FR)]];
- gr_i = [];
+ var exprs = [[string(this.VA)],[string(this.FR)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -3133,8 +3193,8 @@ function VsourceAC() {
this.VA = parseFloat(arguments[0]["VA"])
this.FR = parseFloat(arguments[0]["FR"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.VA,this.FR,exprs] = scicos_getvalue("Set voltage source parameter",["Amplitude (Volt)","Frequency (Hz)"],list("vec",-1,"vec",-1),exprs);
@@ -3154,45 +3214,45 @@ function VsourceAC() {
/* autogenerated from "macros/Events/ANDBLK.sci" */
function ANDBLK() {
ANDBLK.prototype.define = function ANDBLK() {
- andlog = ANDLOG_f("define");
+ var andlog = ANDLOG_f("define");
andlog.graphics.orig = [194,133];
andlog.graphics.sz = [60,60];
andlog.graphics.flip = true;
andlog.graphics.pout = 9;
andlog.graphics.pein = [[4],[11]];
- input_port1 = CLKIN_f("define");
+ var input_port1 = CLKIN_f("define");
input_port1.graphics.orig = [149,287];
input_port1.graphics.sz = [20,20];
input_port1.graphics.flip = true;
input_port1.graphics.exprs = "1";
input_port1.graphics.peout = 4;
input_port1.model.ipar = 1;
- output_port = CLKOUT_f("define");
+ var output_port = CLKOUT_f("define");
output_port.graphics.orig = [450,83];
output_port.graphics.sz = [20,20];
output_port.graphics.flip = true;
output_port.graphics.exprs = "1";
output_port.graphics.pein = 8;
output_port.model.ipar = 1;
- input_port2 = CLKIN_f("define");
+ var input_port2 = CLKIN_f("define");
input_port2.graphics.orig = [141,330];
input_port2.graphics.sz = [20,20];
input_port2.graphics.flip = true;
input_port2.graphics.exprs = "2";
input_port2.graphics.peout = 6;
input_port2.model.ipar = 2;
- ifthel = IFTHEL_f("define");
+ var ifthel = IFTHEL_f("define");
ifthel.graphics.orig = [331,137];
ifthel.graphics.sz = [60,60];
ifthel.graphics.flip = true;
ifthel.graphics.pin = 9;
ifthel.graphics.pein = 12;
ifthel.graphics.peout = [[8],[0]];
- split = CLKSPLIT_f("define");
+ var split = CLKSPLIT_f("define");
split.graphics.orig = [[234],[275.78348]];
split.graphics.pein = 6;
split.graphics.peout = [[11],[12]];
- diagram = scicos_diagram();
+ var diagram = scicos_diagram();
diagram.objs[1-1] = andlog;
diagram.objs[2-1] = input_port1;
diagram.objs[3-1] = output_port;
@@ -3243,7 +3303,7 @@ function ANDLOG_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,3],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -3270,7 +3330,7 @@ function CLKSOMV_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -3297,7 +3357,7 @@ function CLKSOM_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([1,1]/1.2,this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -3351,8 +3411,8 @@ function END_c() {
this.model.firing = new ScilabDouble([this.tf]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = string(this.tf);
- gr_i = [];
+ var exprs = string(this.tf);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -3368,8 +3428,8 @@ function END_c() {
END_c.prototype.set = function END_c() {
this.tf = parseFloat(arguments[0]["tf"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tf,exprs] = scicos_getvalue("Set final simulation time",["Final simulation time"],list("vec",1),exprs);
@@ -3400,8 +3460,8 @@ function EVTDLY_c() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([this.ff]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.dt)],[sci2exp(this.ff)]];
- gr_i = [];
+ var exprs = [[string(this.dt)],[sci2exp(this.ff)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -3419,8 +3479,8 @@ function EVTDLY_c() {
this.dt = parseFloat(arguments[0]["dt"])
this.ff = parseFloat(arguments[0]["ff"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.dt,this.ff,exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" to disable any output event."]],["Delay","Date of initial output event"],list("vec",1,"vec",1),exprs);
@@ -3429,7 +3489,7 @@ function EVTDLY_c() {
}
if (this.dt<=0) {
message("Delay must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
graphics.exprs = exprs;
@@ -3456,8 +3516,8 @@ function EVTDLY_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([this.ff]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.dt)],[sci2exp(this.ff)]];
- gr_i = [];
+ var exprs = [[string(this.dt)],[sci2exp(this.ff)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -3475,8 +3535,8 @@ function EVTDLY_f() {
this.dt = parseFloat(arguments[0]["dt"])
this.ff = parseFloat(arguments[0]["ff"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.dt,this.ff,exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" if no initial event required"]],["Delay","Date of initial output event"],list("vec",1,"vec",1),exprs);
@@ -3485,7 +3545,7 @@ function EVTDLY_f() {
}
if (this.dt<=0) {
message("Delay must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
graphics.exprs = exprs;
@@ -3509,8 +3569,8 @@ function EVTGEN_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([this.tt]);
this.model.dep_ut = [false,false];
- exprs = string(this.tt);
- gr_i = [];
+ var exprs = string(this.tt);
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -3526,8 +3586,8 @@ function EVTGEN_f() {
EVTGEN_f.prototype.set = function EVTGEN_f() {
this.tt = parseFloat(arguments[0]["tt"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tt,exprs] = scicos_getvalue("Set Event time",["Event Time"],list("vec",1),exprs);
@@ -3557,8 +3617,8 @@ function EVTVARDLY() {
this.model.firing = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = string(this.model.firing);
- gr_i = [];
+ var exprs = string(this.model.firing);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -3573,8 +3633,8 @@ function EVTVARDLY() {
EVTVARDLY.prototype.set = function EVTVARDLY() {
this.fir = arguments[0]["fir"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.fir,exprs] = scicos_getvalue("Set parameter of variable event delay","Initial event firing time (<0 if absent)",list("vec",1),exprs);
@@ -3601,8 +3661,8 @@ function HALT_f() {
this.model.ipar = new ScilabDouble([0]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = string(this.n);
- gr_i = [];
+ var exprs = string(this.n);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -3618,8 +3678,8 @@ function HALT_f() {
HALT_f.prototype.set = function HALT_f() {
this.n = parseFloat(arguments[0]["n"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.n,exprs] = scicos_getvalue("Set Halt block parameters",["State on halt"],list("vec",1),exprs);
@@ -3652,8 +3712,8 @@ function IFTHEL_f() {
this.model.dep_ut = [true,false];
this.model.nmode = new ScilabDouble([1]);
this.model.nzcross = new ScilabDouble([1]);
- gr_i = [];
- exprs = [[string(this.model.in1)],[string(this.model.nmode)]];
+ var gr_i = [];
+ var exprs = [[string(this.model.in1)],[string(this.model.nmode)]];
this.x = standard_define([3,3],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -3671,11 +3731,11 @@ function IFTHEL_f() {
this.inh = inverse(arguments[0]["inh"])
this.nmod = parseFloat(arguments[0]["nmod"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (exprs==[]) {
- exprs = string(1);
+ var exprs = string(1);
}
if (size(exprs,"*")==1) {
exprs[2-1] = string(1);
@@ -3692,7 +3752,10 @@ function IFTHEL_f() {
if (this.inh!=1) {
this.inh = [];
}
- [this.model,graphics,ok] = check_io(this.model,graphics,1,[],this.inh,[[1],[1]]);
+ var tmpvar0 = check_io(this.model,graphics,1,[],this.inh,[[1],[1]])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.evtin = this.inh;
@@ -3710,10 +3773,10 @@ function IFTHEL_f() {
/* autogenerated from "macros/Events/MCLOCK_f.sci" */
function MCLOCK_f() {
MCLOCK_f.prototype.define = function MCLOCK_f() {
- nn = 2;
- dt = 0.1;
- exprs = [[string(dt)],[string(nn)]];
- mfclck = MFCLCK_f("define");
+ var nn = 2;
+ var dt = 0.1;
+ var exprs = [[string(dt)],[string(nn)]];
+ var mfclck = MFCLCK_f("define");
mfclck.graphics.orig = [334,199];
mfclck.graphics.sz = [40,40];
mfclck.graphics.flip = true;
@@ -3723,37 +3786,37 @@ function MCLOCK_f() {
mfclck.model.rpar = 0.1;
mfclck.model.ipar = nn;
mfclck.model.firing = [-1,0];
- clksom = CLKSOM_f("define");
+ var clksom = CLKSOM_f("define");
clksom.graphics.orig = [457,161];
clksom.graphics.sz = [16.666667,16.666667];
clksom.graphics.flip = true;
clksom.graphics.exprs = [["0.1"],["0.1"]];
clksom.graphics.pein = [[4],[9],[0]];
clksom.graphics.peout = 5;
- output_port1 = CLKOUT_f("define");
+ var output_port1 = CLKOUT_f("define");
output_port1.graphics.orig = [509,261];
output_port1.graphics.sz = [20,20];
output_port1.graphics.flip = true;
output_port1.graphics.exprs = "1";
output_port1.graphics.pein = 10;
output_port1.model.ipar = 1;
- output_port2 = CLKOUT_f("define");
+ var output_port2 = CLKOUT_f("define");
output_port2.graphics.orig = [509,142];
output_port2.graphics.sz = [20,20];
output_port2.graphics.flip = true;
output_port2.graphics.exprs = "2";
output_port2.graphics.pein = 13;
output_port2.model.ipar = 2;
- split1 = CLKSPLIT_f("define");
+ var split1 = CLKSPLIT_f("define");
split1.graphics.orig = [[411.92504],[169.33333]];
split1.graphics.pein = 3;
split1.graphics.peout = [[9],[10]];
- split2 = CLKSPLIT_f("define");
+ var split2 = CLKSPLIT_f("define");
split2.graphics.orig = [[482.45315],[169.33333]];
split2.graphics.pein = 5;
split2.graphics.peout = [[12],[13]];
- gr_i = [];
- diagram = scicos_diagram();
+ var gr_i = [];
+ var diagram = scicos_diagram();
diagram.objs[1-1] = mfclck;
diagram.objs[2-1] = clksom;
diagram.objs[3-1] = scicos_link(xx=[[360.7],[360.7],[411.9]],yy=[[193.3],[169.3],[169.3]],ct=[10,-1],from=[1,2],to=[8,1]);
@@ -3788,23 +3851,23 @@ function MCLOCK_f() {
}
MCLOCK_f.prototype.set = function MCLOCK_f() {
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="MFCLCK_f") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- spath = list("model","rpar","objs",path);
- xx = arg1[spath-1];
+ var newpar = list();
+ var spath = list("model","rpar","objs",path);
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (or(this.xxn!=xx)) {
arg1[spath-1] = this.xxn;
newpar[size(newpar)+1-1] = path;
}
this.x = arg1;
- y = 0;
- typ = newpar;
+ var y = 0;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
@@ -3823,8 +3886,8 @@ function MFCLCK_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [-1,0];
this.model.dep_ut = [false,false];
- exprs = [[string(this.dt)],[string(this.nn)]];
- gr_i = [];
+ var exprs = [[string(this.dt)],[string(this.nn)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -3842,14 +3905,14 @@ function MFCLCK_f() {
this.dt = parseFloat(arguments[0]["dt"])
this.nn = parseFloat(arguments[0]["nn"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
[ok,this.dt,this.nn,exprs] = scicos_getvalue("Set Multifrequency clock parameters",["basic period (1/f)","multiply by (n)"],list("vec",1,"vec",1),exprs);
if (ok) {
this.model.ipar = new ScilabDouble([this.nn]);
this.model.rpar = new ScilabDouble([this.dt]);
- hh = this.model.firing;
+ var hh = this.model.firing;
hh[2-1] = 0;
this.model.firing = hh;
graphics.exprs = exprs;
@@ -3871,8 +3934,8 @@ function M_freq() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [0,-1,-1];
this.model.dep_ut = [false,false];
- exprs = [[sci2exp([[1],[2]])],[sci2exp([[0],[0]])]];
- gr_i = [];
+ var exprs = [[sci2exp([[1],[2]])],[sci2exp([[0],[0]])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -3890,9 +3953,9 @@ function M_freq() {
this.frequ = inverse(arguments[0]["frequ"])
this.offset = inverse(arguments[0]["offset"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.frequ,this.offset,exprs] = scicos_getvalue("Set block parameters",["Sample time","Offset"],list("vec",-1,"vec",-1),exprs);
if (!ok) {
@@ -3902,21 +3965,33 @@ function M_freq() {
this.frequ = this.frequ.slice();
if ((size(this.frequ,"*"))!=(size(this.offset,"*"))) {
message("offset and frequency must have the same size");
- ok = false;
+ var ok = false;
} else if (or(this.frequ<0)) {
message("Frequency must be a positif number");
- ok = false;
+ var ok = false;
} else if (or(abs(this.offset)>this.frequ)) {
message("The |Offset| must be less than the Frequency");
- ok = false;
+ var ok = false;
}
if (ok) {
- [m,den,off,count,m1,fir,this.frequ,this.offset,ok] = mfrequ_clk(this.frequ,this.offset);
+ var tmpvar0 = mfrequ_clk(this.frequ,this.offset)
+ var m = tmpvar0[0]
+ var den = tmpvar0[1]
+ var off = tmpvar0[2]
+ var count = tmpvar0[3]
+ var m1 = tmpvar0[4]
+ var fir = tmpvar0[5]
+ this.frequ = tmpvar0[6]
+ this.offset = tmpvar0[7]
+ var ok = tmpvar0[8];
}
if (ok) {
this.model.opar = list(m, new ScilabDouble([double(den)]), new ScilabDouble([off]), new ScilabDouble([count]));
- mn = (2^size(m1,"*"))-1;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(),list(),1,ones(mn,1));
+ var mn = (2^size(m1,"*"))-1;
+ var tmpvar1 = set_io(this.model,graphics,list(),list(),1,ones(mn,1))
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (mn>3) {
graphics.sz = [40+(mn-3)*10,40];
} else {
@@ -3943,7 +4018,7 @@ function VirtualCLK0() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = [];
+ var exprs = [];
this.x = standard_define([2,2],this.model,exprs," ");
return new BasicBlock(this.x);
}
@@ -3963,7 +4038,7 @@ function VirtualCLK0() {
/* autogenerated from "macros/Events/freq_div.sci" */
function freq_div() {
freq_div.prototype.define = function freq_div() {
- scs_m_1 = scicos_diagram();
+ var scs_m_1 = scicos_diagram();
scs_m_1.objs[1-1] = Modulo_Count("define");
scs_m_1.objs[2-1] = CLKINV_f("define");
scs_m_1.objs[3-1] = CLKOUTV_f("define");
@@ -3974,8 +4049,8 @@ function freq_div() {
scs_m_1.objs[8-1] = scicos_link();
scs_m_1.objs[9-1] = scicos_link();
scs_m_1.objs[10-1] = scicos_link();
- blk = scs_m_1.objs[1-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[1-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [0,-100];
graphics.sz = [60,40];
@@ -3987,8 +4062,8 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[1-1] = blk;
- blk = scs_m_1.objs[2-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[2-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [120,0];
graphics.sz = [20,20];
@@ -3998,8 +4073,8 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[2-1] = blk;
- blk = scs_m_1.objs[3-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[3-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [130,-160];
graphics.sz = [20,20];
@@ -4009,8 +4084,8 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[3-1] = blk;
- blk = scs_m_1.objs[4-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[4-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [100,-100];
graphics.sz = [60,40];
@@ -4022,8 +4097,8 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[4-1] = blk;
- blk = scs_m_1.objs[5-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[5-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [127,-33];
graphics.sz = [7,7];
@@ -4032,26 +4107,26 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[5-1] = blk;
- lnk = scs_m_1.objs[6-1];
+ var lnk = scs_m_1.objs[6-1];
lnk.ct = [5,-1];
lnk.from = [2,1,0];
lnk.to = [5,1,1];
scs_m_1.objs[6-1] = lnk;
- lnk = scs_m_1.objs[7-1];
+ var lnk = scs_m_1.objs[7-1];
lnk.from = [1,1,0];
lnk.to = [4,1,1];
scs_m_1.objs[7-1] = lnk;
- lnk = scs_m_1.objs[8-1];
+ var lnk = scs_m_1.objs[8-1];
lnk.ct = [5,-1];
lnk.from = [4,2,0];
lnk.to = [3,1,1];
scs_m_1.objs[8-1] = lnk;
- lnk = scs_m_1.objs[9-1];
+ var lnk = scs_m_1.objs[9-1];
lnk.ct = [5,-1];
lnk.from = [5,1,0];
lnk.to = [4,1,1];
scs_m_1.objs[9-1] = lnk;
- lnk = scs_m_1.objs[10-1];
+ var lnk = scs_m_1.objs[10-1];
lnk.xx = [0,30,1];
lnk.yy = [0,-30,1];
lnk.ct = [5,-1];
@@ -4065,7 +4140,7 @@ function freq_div() {
this.model.evtin = new ScilabDouble([1]);
this.model.evtout = new ScilabDouble([1]);
this.model.rpar = scs_m_1;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -4083,23 +4158,23 @@ function freq_div() {
%ph = parseFloat(arguments[0]["%ph"])
%df = parseFloat(arguments[0]["%df"])
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="Modulo_Count") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- y = 0;
- spath = list();
+ var newpar = list();
+ var y = 0;
+ var spath = list();
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path;
- xx = arg1[spath-1];
- xxn = xx;
- graphics = xx.graphics;
- exprs = graphics.exprs;
+ var xx = arg1[spath-1];
+ var xxn = xx;
+ var graphics = xx.graphics;
+ var exprs = graphics.exprs;
this.model = xx.model;
while (true) {
[ok,%ph,%df,exprs] = scicos_getvalue("Set frequency division block parameters",["Phase (0 to division factor -1)","Division factor"],list("vec",1,"vec",1),exprs);
@@ -4124,55 +4199,55 @@ function freq_div() {
}
if (diffobjs(xxn,xx)) {
this.model = xx.model;
- model_n = xxn.model;
+ var model_n = xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = xxn;
newpar[size(newpar)+1-1] = 1;
- y = max(y,needcompile);
+ var y = max(y,needcompile);
}
this.x = arg1;
- typ = newpar;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
/* autogenerated from "macros/Hydraulics/Bache.sci" */
function Bache() {
Bache.prototype.define = function Bache() {
- in1 = 2;
- out = 3;
+ var in1 = 2;
+ var out = 3;
this.model = scicos_model();
this.model.in1 = [-transpose([1:in1])];
this.model.out = [-transpose([1:out])];
@@ -4189,7 +4264,7 @@ function Bache() {
this.model.sim = new ScilabString(["Bache"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Bache";
mo.inputs = ["Ce1","Ce2"];
mo.outputs = ["Cs1","Cs2","yNiveau"];
@@ -4197,8 +4272,8 @@ function Bache() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = [[string(this.Patm)],[string(this.A)],[string(this.ze1)],[string(this.ze2)],[string(this.zs1)],[string(this.zs2)],[string(this.z0)],[string(this.T0)],[string(this.p_rho)]];
- gr_i = [];
+ var exprs = [[string(this.Patm)],[string(this.A)],[string(this.ze1)],[string(this.ze2)],[string(this.zs1)],[string(this.zs2)],[string(this.z0)],[string(this.T0)],[string(this.p_rho)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = [["I"],["I"]];
this.x.graphics.out_implicit = [["I"],["I"],["E"]];
@@ -4232,8 +4307,8 @@ function Bache() {
this.T0 = parseFloat(arguments[0]["T0"])
this.p_rho = parseFloat(arguments[0]["p_rho"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.Patm,this.A,this.ze1,this.ze2,this.zs1,this.zs2,this.z0,this.T0,this.p_rho,exprs] = scicos_getvalue("Parametres de la bache",["Pression dans le ciel de la bache : Patm (Pa)","Section de la bache : A (m2)","Altitude du piquage d entrée 1: ze1 (m)","Altitude du piquage d entrée 2: ze2 (m)","Altitude du piquage de sortie 1: zs1 (m)","Altitude du piquage de sortie 2: zs2 (m)","Altitude initiale du fluide : z0 (m)","Température initiale du fluide : T0 (K)","Si >0, masse volumique imposée du fluide : p_rho (kg/m3)"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
@@ -4253,43 +4328,43 @@ function Bache() {
/* autogenerated from "macros/Hydraulics/Flowmeter.sci" */
function Flowmeter() {
Flowmeter.prototype.define = function Flowmeter() {
- ModelName = "Flowmeter";
- PrametersValue = 1;
- ParametersName = "Qini";
- this.model = scicos_model();
- Typein = [];
- Typeout = [];
- MI = [];
- MO = [];
- P = [[50,105,-1,90],[0,10,2,0],[101,10,-2,0]];
- PortName = [["Mesure"],["C1"],["C2"]];
+ var ModelName = "Flowmeter";
+ var PrametersValue = 1;
+ var ParametersName = "Qini";
+ this.model = scicos_model();
+ var Typein = [];
+ var Typeout = [];
+ var MI = [];
+ var MO = [];
+ var P = [[50,105,-1,90],[0,10,2,0],[101,10,-2,0]];
+ var PortName = [["Mesure"],["C1"],["C2"]];
for (i=1;i<=size(P,"r");i+=1) {
if (P[i-1][3-1]==1) {
- Typein = [[Typein],["E"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["E"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==2) {
- Typein = [[Typein],["I"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["I"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==-1) {
- Typeout = [[Typeout],["E"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["E"]];
+ var MO = [[MO],[PortName[i-1]]];
}
if (P[i-1][3-1]==-2) {
- Typeout = [[Typeout],["I"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["I"]];
+ var MO = [[MO],[PortName[i-1]]];
}
}
this.model = scicos_model();
- mo = modelica();
+ var mo = modelica();
this.model.sim = new ScilabString([ModelName]);
mo.inputs = MI;
mo.outputs = MO;
this.model.rpar = new ScilabDouble([PrametersValue]);
mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName));
- exprs = "1";
- gr_i = [];
+ var exprs = "1";
+ var gr_i = [];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
mo.model = ModelName;
@@ -4312,11 +4387,11 @@ function Flowmeter() {
Flowmeter.prototype.set = function Flowmeter() {
this.Qini = arguments[0]["Qini"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.x = arg1;
- exprs = this.x.graphics.exprs;
+ var exprs = this.x.graphics.exprs;
while (false) {
[ok,this.Qini,exprs] = scicos_getvalue([["Set Flowmeter block parameters:"],[""],["Qini: "]],"Qini",list("vec",1),exprs);
if (!ok) {
@@ -4345,7 +4420,7 @@ function PerteDP() {
this.model.sim = new ScilabString(["PerteDP"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "PerteDP";
mo.inputs = "C1";
mo.outputs = "C2";
@@ -4353,8 +4428,8 @@ function PerteDP() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = [[string(this.L)],[string(this.D)],[string(this.lambda)],[string(this.z1)],[string(this.z2)],[string(this.p_rho)]];
- gr_i = [];
+ var exprs = [[string(this.L)],[string(this.D)],[string(this.lambda)],[string(this.z1)],[string(this.z2)],[string(this.p_rho)]];
+ var gr_i = [];
this.x = standard_define([2,1],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -4382,8 +4457,8 @@ function PerteDP() {
this.z2 = parseFloat(arguments[0]["z2"])
this.p_rho = parseFloat(arguments[0]["p_rho"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.L,this.D,this.lambda,this.z1,this.z2,this.p_rho,exprs] = scicos_getvalue("Parametres du tuyau",["Longueur du tube : L (m)","Diamètre interne du tube : D (m)","Coefficient de perte de charge-frottement(S.U) : lambda","Altitude entrée tuyauterie : z1 (m)","Altitude sortie tuyauterie : z2 (m)","Si >0, masse volumique imposée fu fluide : p_rho (kg/m3)"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
@@ -4412,14 +4487,14 @@ function PuitsP() {
this.model.sim = new ScilabString(["Puits"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Puits";
mo.inputs = ["C"];
mo.parameters = list([["P0"],["T0"],["H0"],["option_temperature"]],[[this.P0],[this.T0],[this.H0],[this.option_temperature]]);
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
- exprs = [[string(this.P0)],[string(this.T0)],[string(this.H0)],[string(this.option_temperature)]];
- gr_i = [];
+ var exprs = [[string(this.P0)],[string(this.T0)],[string(this.H0)],[string(this.option_temperature)]];
+ var gr_i = [];
this.x = standard_define([2.5,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
return new BasicBlock(this.x);
@@ -4442,8 +4517,8 @@ function PuitsP() {
this.H0 = parseFloat(arguments[0]["H0"])
this.option_temperature = parseFloat(arguments[0]["option_temperature"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.P0,this.T0,this.H0,this.option_temperature,exprs] = scicos_getvalue("Paramètres du puits",["Pression de la source : P0 (Pa)","Temperature de la source : T0 (K)","Enthalpie spécifique de la source : H0 (J/kg)","1:température fixée - 2:enthalpie fixée : option_temperature"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
@@ -4472,7 +4547,7 @@ function SourceP() {
this.model.sim = new ScilabString(["Source"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Source";
mo.inputs = [];
mo.outputs = ["C"];
@@ -4480,8 +4555,8 @@ function SourceP() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = [[string(this.P0)],[string(this.T0)],[string(this.H0)],[string(this.option_temperature)]];
- gr_i = [];
+ var exprs = [[string(this.P0)],[string(this.T0)],[string(this.H0)],[string(this.option_temperature)]];
+ var gr_i = [];
this.x = standard_define([2.5,2],this.model,exprs,list(gr_i,0));
this.x.graphics.out_implicit = ["I"];
return new BasicBlock(this.x);
@@ -4504,8 +4579,8 @@ function SourceP() {
this.H0 = parseFloat(arguments[0]["H0"])
this.option_temperature = parseFloat(arguments[0]["option_temperature"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.P0,this.T0,this.H0,this.option_temperature,exprs] = scicos_getvalue("Paramètres du puits",["Pression de la source : P0 (Pa)","Temperature de la source : T0 (K)","Enthalpie spécifique de la source : H0 (J/kg)","1:température fixée - 2:enthalpie fixée : option_temperature"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
@@ -4534,7 +4609,7 @@ function VanneReglante() {
this.model.sim = new ScilabString(["VanneReglante"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "VanneReglante";
mo.inputs = ["C1","Ouv"];
mo.outputs = "C2";
@@ -4542,8 +4617,8 @@ function VanneReglante() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = [[string(this.Cvmax)],[string(this.p_rho)]];
- gr_i = [];
+ var exprs = [[string(this.Cvmax)],[string(this.p_rho)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = [["I"],["E"]];
this.x.graphics.out_implicit = ["I"];
@@ -4563,8 +4638,8 @@ function VanneReglante() {
this.Cvmax = parseFloat(arguments[0]["Cvmax"])
this.p_rho = parseFloat(arguments[0]["p_rho"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.Cvmax,this.p_rho,exprs] = scicos_getvalue("Paramètres de la vanne reglante",["Cvmax","p_rho"],list("vec",-1,"vec",-1),exprs);
@@ -4595,8 +4670,8 @@ function BITCLEAR() {
this.model.opar = list(new ScilabDouble([int32(0)]));
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(3)],[sci2exp(0)]];
- gr_i = [];
+ var exprs = [[sci2exp(3)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -4614,57 +4689,60 @@ function BITCLEAR() {
this.Datatype = arguments[0]["Datatype"]
this.bit = parseFloat(arguments[0]["bit"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.Datatype,this.bit,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","BITCLEAR")],[" "],["Clear a bit"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Index of Bit (0 is least significant)"],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- in1 = [this.model.in1,this.model.in2];
+ var in1 = [this.model.in1,this.model.in2];
if (floor(this.bit)!=this.bit) {
block_parameter_error(msprintf("Wrong type for \'%s\' parameter: %5.1f.","Index of Bit",this.bit),"Must be integer.");
- ok = false;
+ var ok = false;
} else if ((this.Datatype==3)||(this.Datatype==6)) {
if (this.bit>31||this.bit<0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 31]"));
- ok = false;
+ var ok = false;
} else {
this.bit = uint32(this.bit);
- n = (2^32-1)-2^this.bit;
- n = uint32(n);
+ var n = (2^32-1)-2^this.bit;
+ var n = uint32(n);
this.model.sim = list(new ScilabString(["bit_clear_32"]), new ScilabDouble([4]));
}
} else if ((this.Datatype==4)||(this.Datatype==7)) {
if (this.bit>15||this.bit<0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 15]"));
- ok = false;
+ var ok = false;
} else {
this.bit = uint16(this.bit);
- n = (2^16-1)-2^this.bit;
- n = uint16(n);
+ var n = (2^16-1)-2^this.bit;
+ var n = uint16(n);
this.model.sim = list(new ScilabString(["bit_clear_16"]), new ScilabDouble([4]));
}
} else if ((this.Datatype==5)||(this.Datatype==8)) {
if (this.bit>7||this.bit<0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 7]"));
- ok = false;
+ var ok = false;
} else {
this.bit = uint8(this.bit);
- n = (2^8-1)-2^this.bit;
- n = uint8(n);
+ var n = (2^8-1)-2^this.bit;
+ var n = uint8(n);
this.model.sim = list(new ScilabString(["bit_clear_8"]), new ScilabDouble([4]));
}
} else {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",this.Datatype),msprintf("Must be in the interval %s.","[3, 8]"));
- ok = false;
+ var ok = false;
}
if (ok) {
- it = this.Datatype;
- ot = this.Datatype;
- out = [1,1];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var it = this.Datatype;
+ var ot = this.Datatype;
+ var out = [1,1];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
@@ -4691,8 +4769,8 @@ function BITSET() {
this.model.opar = list(new ScilabDouble([uint32(0)]));
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(3)],[sci2exp(0)]];
- gr_i = [];
+ var exprs = [[sci2exp(3)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -4710,55 +4788,58 @@ function BITSET() {
this.Datatype = arguments[0]["Datatype"]
this.bit = parseFloat(arguments[0]["bit"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.Datatype,this.bit,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","BITSET")],[" "],["Set a bit"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Index of Bit (0 is least significant)"],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- in1 = [this.model.in1,this.model.in2];
+ var in1 = [this.model.in1,this.model.in2];
if (floor(this.bit)!=this.bit) {
block_parameter_error(msprintf("Wrong type for \'%s\' parameter: %5.1f.","Index of Bit",this.bit),"Must be integer.");
- ok = false;
+ var ok = false;
}
if ((this.Datatype==3)||(this.Datatype==6)) {
if (this.bit>31||this.bit<0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 31]"));
- ok = false;
+ var ok = false;
}
this.bit = uint32(this.bit);
- n = 2^this.bit;
- n = uint32(n);
+ var n = 2^this.bit;
+ var n = uint32(n);
this.model.sim = list(new ScilabString(["bit_set_32"]), new ScilabDouble([4]));
} else if ((this.Datatype==4)||(this.Datatype==7)) {
if (this.bit>15||this.bit<0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 15]"));
- ok = false;
+ var ok = false;
}
this.bit = uint16(this.bit);
- n = 2^this.bit;
- n = uint16(n);
+ var n = 2^this.bit;
+ var n = uint16(n);
this.model.sim = list(new ScilabString(["bit_set_16"]), new ScilabDouble([4]));
} else if ((this.Datatype==5)||(this.Datatype==8)) {
if (this.bit>7||this.bit<0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 7]"));
- ok = false;
+ var ok = false;
}
this.bit = uint8(this.bit);
- n = 2^this.bit;
- n = uint8(n);
+ var n = 2^this.bit;
+ var n = uint8(n);
this.model.sim = list(new ScilabString(["bit_set_8"]), new ScilabDouble([4]));
} else {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",this.Datatype),msprintf("Must be in the interval %s.","[3, 8]"));
- ok = false;
+ var ok = false;
}
if (ok) {
- it = this.Datatype;
- ot = this.Datatype;
- out = [1,1];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var it = this.Datatype;
+ var ot = this.Datatype;
+ var out = [1,1];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
@@ -4774,7 +4855,7 @@ function BITSET() {
/* autogenerated from "macros/IntegerOp/CONVERT.sci" */
function CONVERT() {
CONVERT.prototype.define = function CONVERT() {
- sgn = 2;
+ var sgn = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["convert"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1]);
@@ -4787,8 +4868,8 @@ function CONVERT() {
this.model.ipar = new ScilabDouble([sgn]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[sci2exp(3)],[sci2exp(0)]];
- gr_i = [];
+ var exprs = [[sci2exp(1)],[sci2exp(3)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -4808,9 +4889,9 @@ function CONVERT() {
this.ot = parseFloat(arguments[0]["ot"])
this.np = arguments[0]["np"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.it,this.ot,this.np,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CONVERT")],[" "],["Type conversion"],[" "]],["Input Type (1:double, 3:int32, 4:int16, 5:int8, ...)","Output Type (1:double, 3:int32, 4:int16, 5:int8, ...)","Do on Overflow (0:Nothing, 1:Saturate, 2:Error)"],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -4824,13 +4905,13 @@ function CONVERT() {
}
if ((this.np!=0&&this.np!=1&&this.np!=2)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Do on Overflow",this.np),msprintf("Must be in the interval %s.","[0, 2]"));
- ok = false;
+ var ok = false;
} else if ((this.it>8||this.it<1)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Type",this.it),msprintf("Must be in the interval %s.","[1, 8]"));
- ok = false;
+ var ok = false;
} else if ((this.ot>8||this.ot<1)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Output Type",this.ot),msprintf("Must be in the interval %s.","[1, 8]"));
- ok = false;
+ var ok = false;
}
this.model.sim = list(new ScilabString(["convert"]), new ScilabDouble([4]));
if ((this.it==this.ot)) {
@@ -5138,10 +5219,13 @@ function CONVERT() {
}
}
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,this.it),list(out,this.ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,this.it),list(out,this.ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
@@ -5156,7 +5240,7 @@ function CONVERT() {
/* autogenerated from "macros/IntegerOp/DFLIPFLOP.sci" */
function DFLIPFLOP() {
DFLIPFLOP.prototype.define = function DFLIPFLOP() {
- scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["DFLIPFLOP"],tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["DFLIPFLOP"],tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m.objs[1-1] = scicos_block(gui="CONST_m",graphics=scicos_graphics(orig=[109.62561,263.44465],sz=[[20],[20]],flip=true,theta=0,exprs="int8(0)",pin=[],pout=6,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=5,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(int8(0)),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[2-1] = scicos_block(gui="IFTHEL_f",graphics=scicos_graphics(orig=[239.98293,378.2166],sz=[60,60],flip=true,theta=0,exprs=[["1"],["1"]],pin=29,pout=[],pein=22,peout=[[16],[44]],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim=list("ifthel",-1),in1=1,in2=1,intyp=-1,out=[],out2=[],outtyp=1,evtin=1,evtout=[[1],[1]],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="l",firing=[-1,-1],dep_ut=[true,false],label="",nzcross=1,nmode=1,equations=list()),doc=list());
scs_m.objs[3-1] = scicos_block(gui="LOGICAL_OP",graphics=scicos_graphics(orig=[152.88902,260.24498],sz=[60,40],flip=true,theta=0,exprs=[["2"],["1"],["5"],["0"]],pin=[[11],[39]],pout=5,pein=[],peout=[],gr_i=[],id="",in_implicit=[["E"],["E"]],out_implicit="E"),model=scicos_model(sim=list("logicalop_i8",4),in1=[[-1],[-1]],in2=[[-2],[-2]],intyp=[[5],[5]],out=-1,out2=-2,outtyp=5,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[[1],[0]],opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -5171,7 +5255,7 @@ function DFLIPFLOP() {
scs_m.objs[12-1] = scicos_block(gui="OUT_f",graphics=scicos_graphics(orig=[457.40928,320.20131],sz=[20,20],flip=true,theta=0,exprs="2",pin=13,pout=[],pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim="output",in1=-1,in2=[],intyp=-1,out=[],out2=[],outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=2,opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[13-1] = scicos_link(xx=[[441.81249],[457.40928]],yy=[[329.46812],[330.20131]],id="drawlink",thick=[0,0],ct=[1,1],from=[7,1,0],to=[12,1,1]);
scs_m.objs[14-1] = scicos_block(gui="OUT_f",graphics=scicos_graphics(orig=[376.4669,270.83282],sz=[20,20],flip=true,theta=0,exprs="1",pin=37,pout=[],pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim="output",in1=-1,in2=[],intyp=-1,out=[],out2=[],outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title="Untitled",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=[],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title="Untitled",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=[],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="ANDLOG_f",graphics=scicos_graphics(orig=[194,133],sz=[60,60],flip=true,theta=0,exprs=[],pin=[],pout=9,pein=[[4],[11]],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim="andlog",in1=[],in2=[],intyp=1,out=1,out2=[],outtyp=1,evtin=[[1],[1]],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_block(gui="CLKIN_f",graphics=scicos_graphics(orig=[149,287],sz=[20,20],flip=true,theta=0,exprs="1",pin=[],pout=[],pein=[],peout=4,gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="input",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=[],evtout=1,state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="d",firing=-1,dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[3-1] = scicos_block(gui="CLKOUT_f",graphics=scicos_graphics(orig=[450,83],sz=[20,20],flip=true,theta=0,exprs="1",pin=[],pout=[],pein=8,peout=[],gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="output",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=1,evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -5187,7 +5271,7 @@ function DFLIPFLOP() {
scs_m.objs[15-1] = scicos_block(gui="ANDBLK",graphics=scicos_graphics(orig=[233.73039,318.74407],sz=[40,40],flip=true,theta=0,exprs=[],pin=[],pout=[],pein=[[19],[16]],peout=17,gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="csuper",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=[[1],[1]],evtout=1,state=[],dstate=[],odstate=list(),rpar=scs_m_1,ipar=[],opar=list(),blocktype="h",firing=false,dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[16-1] = scicos_link(xx=[[259.98293],[260.39705]],yy=[[372.50232],[364.45835]],id="drawlink",thick=[0,0],ct=[5,-1],from=[2,1,0],to=[15,2,1]);
scs_m.objs[17-1] = scicos_link(xx=[[253.73039],[253.72572]],yy=[[313.02978],[309.29537]],id="drawlink",thick=[0,0],ct=[5,-1],from=[15,1,0],to=[41,1,1]);
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["EDGE_TRIGGER","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=30,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["EDGE_TRIGGER","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=30,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="EDGETRIGGER",graphics=scicos_graphics(orig=[288.58631,257.1131],sz=[60,40],flip=true,theta=0,exprs="1",pin=5,pout=3,pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit="E"),model=scicos_model(sim=list("edgetrig",4),in1=1,in2=[],intyp=1,out=1,out2=[],outtyp=1,evtin=[],evtout=[],state=[],dstate=0,odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=1,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_block(gui="IFTHEL_f",graphics=scicos_graphics(orig=[388.28869,247.1131],sz=[60,60],flip=true,theta=0,exprs=[["0"],["0"]],pin=3,pout=[],pein=[],peout=[[7],[0]],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim=list("ifthel",-1),in1=1,in2=[],intyp=1,out=[],out2=1,outtyp=[],evtin=[],evtout=[[1],[1]],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="l",firing=[-1,-1],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[3-1] = scicos_link(xx=[[357.15774],[362.99107],[379.71726]],yy=[[277.1131],[277.1131],[277.1131]],id="drawlink",thick=[0,0],ct=[1,1],from=[1,1,0],to=[2,1,1]);
@@ -5198,7 +5282,7 @@ function DFLIPFLOP() {
scs_m.objs[18-1] = scicos_block(gui="EDGE_TRIGGER",graphics=scicos_graphics(orig=[133.90637,385.342],sz=[60,40],flip=true,theta=0,exprs=[],pin=26,pout=[],pein=[],peout=19,gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim="csuper",in1=-1,in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=[],evtout=1,state=[],dstate=[],odstate=list(),rpar=scs_m_1,ipar=[],opar=list(),blocktype="h",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[19-1] = scicos_link(xx=[[163.90637],[163.90637],[247.06372]],yy=[[379.62771],[364.45835],[364.45835]],id="drawlink",thick=[0,0],ct=[5,-1],from=[18,1,0],to=[15,1,1]);
scs_m.objs[20-1] = scicos_block(gui="IN_f",graphics=scicos_graphics(orig=[79.594811,395.47647],sz=[20,20],flip=true,theta=0,exprs="2",pin=[],pout=23,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim="input",in1=[],in2=[],intyp=1,out=-1,out2=[],outtyp=-1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=2,opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["Extract_Activation","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=30,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["Extract_Activation","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=30,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="IFTHEL_f",graphics=scicos_graphics(orig=[150.65045,143.82208],sz=[60,60],flip=true,theta=0,exprs=[["0"],["0"]],pin=6,pout=[],pein=[],peout=[[3],[4]],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim=list("ifthel",-1),in1=1,in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=[],evtout=[[1],[1]],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="l",firing=[-1,-1],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_block(gui="CLKSOMV_f",graphics=scicos_graphics(orig=[169.82143,96.146231],sz=[16.666667,16.666667],flip=true,theta=0,exprs=[],pin=[],pout=[],pein=[[3],[4],[0]],peout=8,gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="sum",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=[[1],[1],[1]],evtout=1,state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="d",firing=-1,dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[3-1] = scicos_link(xx=[[170.65045],[170.65045],[150.04302],[150.04302],[169.82143]],yy=[[138.10779],[128.235],[128.235],[104.47956],[104.47956]],id="drawlink",thick=[0,0],ct=[5,-1],from=[1,1,0],to=[2,1,1]);
@@ -5243,7 +5327,7 @@ function DFLIPFLOP() {
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [true,false];
this.model.rpar = new ScilabDouble([scs_m]);
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,3],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -5263,7 +5347,7 @@ function DFLIPFLOP() {
/* autogenerated from "macros/IntegerOp/DLATCH.sci" */
function DLATCH() {
DLATCH.prototype.define = function DLATCH() {
- scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["DLATCH"],tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["DLATCH"],tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m.objs[1-1] = scicos_block(gui="CONST_m",graphics=scicos_graphics(orig=[109.62561,263.44465],sz=[[20],[20]],flip=true,theta=0,exprs="int8(0)",pin=[],pout=7,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=5,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(int8(0)),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[2-1] = scicos_block(gui="IFTHEL_f",graphics=scicos_graphics(orig=[233.37693,320.30536],sz=[60,60],flip=true,theta=0,exprs=[["0"],["1"]],pin=13,pout=[],pein=[],peout=[[6],[0]],gr_i=list([["txt=[\'If in>0\';\' \';\' then else\'];"],["xstringb(orig(1),orig(2),txt,sz(1),sz(2),\'fill\');"]],8),id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim=list("ifthel",-1),in1=1,in2=1,intyp=-1,out=[],out2=[],outtyp=1,evtin=[],evtout=[[1],[1]],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="l",firing=[-1,-1],dep_ut=[true,false],label="",nzcross=1,nmode=1,equations=list()),doc=list());
scs_m.objs[3-1] = scicos_block(gui="LOGICAL_OP",graphics=scicos_graphics(orig=[152.88902,260.24498],sz=[60,40],flip=true,theta=0,exprs=[["2"],["1"],["5"],["0"]],pin=[[15],[7]],pout=5,pein=[],peout=[],gr_i=list("xstringb(orig(1),orig(2),[\'Logical Op \';OPER],sz(1),sz(2),\'fill\');",8),id="",in_implicit=[["E"],["E"]],out_implicit="E"),model=scicos_model(sim=list("logicalop_i8",4),in1=[[-1],[-1]],in2=[[-2],[-2]],intyp=[[5],[5]],out=-1,out2=-2,outtyp=5,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[[1],[0]],opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -5295,7 +5379,7 @@ function DLATCH() {
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [true,false];
this.model.rpar = new ScilabDouble([scs_m]);
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,3],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -5315,7 +5399,7 @@ function DLATCH() {
/* autogenerated from "macros/IntegerOp/EXTRACTBITS.sci" */
function EXTRACTBITS() {
EXTRACTBITS.prototype.define = function EXTRACTBITS() {
- numb = [];
+ var numb = [];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["extract_bit_32_UH0"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -5327,8 +5411,8 @@ function EXTRACTBITS() {
this.model.ipar = [0,numb];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(3)],[sci2exp(1)],[sci2exp(0)],[sci2exp(0)]];
- gr_i = [];
+ var exprs = [[sci2exp(3)],[sci2exp(1)],[sci2exp(0)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -5350,52 +5434,52 @@ function EXTRACTBITS() {
this.bit = parseFloat(arguments[0]["bit"])
this.scal = arguments[0]["scal"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.Datatype,this.rule,this.bit,this.scal,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","EXTRACTBITS")],[" "],["Bits Extraction"],[" "],["&nbsp;- Bits to Extract:"],["&nbsp;&nbsp;&nbsp;&nbsp;1 Upper Half"],["&nbsp;&nbsp;&nbsp;&nbsp;2 Lower Half"],["&nbsp;&nbsp;&nbsp;&nbsp;3 Range from MSB"],["&nbsp;&nbsp;&nbsp;&nbsp;4 Range to LSB"],["&nbsp;&nbsp;&nbsp;&nbsp;5 Range of Bits"],["&nbsp;- Number of Bits or Index of bit : Index 0 is LSB"],["&nbsp;&nbsp;&nbsp;&nbsp;If \'Bits to Extract\' is set to \'Range of bits\': [Start, End]"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Bits to extract","Number of Bits or Index of Bit","Treat Bit Field as an Integer (0:No, 1:Yes)"],list("vec",1,"vec",1,"vec",-1,"vec",1),exprs);
if (!ok) {
break;
}
- bitstr = strcat(string(this.bit.slice())," ");
+ var bitstr = strcat(string(this.bit.slice())," ");
if ((this.rule<1)||(this.rule>5)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Bits to Extract",this.rule),msprintf("Must be in the interval %s.","[1, 5]"));
- ok = false;
+ var ok = false;
} else if (this.scal<0||this.scal>1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Treat Bit Field as an Integer",this.scal),msprintf("Must be in the interval %s.","[0, 1]"));
- ok = false;
+ var ok = false;
} else {
- in1 = [this.model.in1,this.model.in2];
+ var in1 = [this.model.in1,this.model.in2];
this.bit = int(this.bit);
this.rule = int(this.rule);
if ((this.rule==3)||(this.rule==4)) {
if ((size(this.bit,"*")!=1)) {
block_parameter_error(msprintf("Wrong size for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),"Must be a single value.");
- ok = false;
+ var ok = false;
} else {
- numb = this.bit;
+ var numb = this.bit;
}
} else if ((this.rule==5)) {
if ((size(this.bit,"*")!=2)) {
block_parameter_error(msprintf("Wrong size for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),"Must have this form: [Start, End].");
- ok = false;
+ var ok = false;
} else if (this.bit[1-1]>this.bit[2-1]) {
block_parameter_error(msprintf("Wrong values for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),msprintf("\'Start\' must be less than \'End\'."));
- ok = false;
+ var ok = false;
} else {
- numb = this.bit[2-1]-this.bit[1-1];
+ var numb = this.bit[2-1]-this.bit[1-1];
}
} else {
this.bit = 0;
- numb = [];
+ var numb = [];
}
}
if (ok) {
if ((this.Datatype==3||this.Datatype==6)) {
if (or(this.bit.slice()>31)||or(this.bit.slice()<0)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),msprintf("Indexes must be in the interval %s.","[0, 31]"));
- ok = false;
+ var ok = false;
}
switch (this.rule) {
case 1:
@@ -5442,7 +5526,7 @@ function EXTRACTBITS() {
} else if ((this.Datatype==4||this.Datatype==7)) {
if (or(this.bit.slice()>15)||or(this.bit.slice()<0)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),msprintf("Indexes must be in the interval %s.","[0, 15]"));
- ok = false;
+ var ok = false;
}
switch (this.rule) {
case 1:
@@ -5489,7 +5573,7 @@ function EXTRACTBITS() {
} else if ((this.Datatype==5||this.Datatype==8)) {
if (or(this.bit.slice()>7)||or(this.bit.slice()<0)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),msprintf("Indexes must be in the interval %s.","[0, 7]"));
- ok = false;
+ var ok = false;
}
switch (this.rule) {
case 1:
@@ -5535,14 +5619,17 @@ function EXTRACTBITS() {
}
} else {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",this.Datatype),msprintf("Must be in the interval %s.","[3, 8]"));
- ok = false;
+ var ok = false;
}
}
if (ok) {
- it = this.Datatype;
- ot = this.Datatype;
- out = [1,1];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var it = this.Datatype;
+ var ot = this.Datatype;
+ var out = [1,1];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
@@ -5558,7 +5645,7 @@ function EXTRACTBITS() {
/* autogenerated from "macros/IntegerOp/INTMUL.sci" */
function INTMUL() {
INTMUL.prototype.define = function INTMUL() {
- sgn = 0;
+ var sgn = 0;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["matmul_i32"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1],[-2]);
@@ -5571,8 +5658,8 @@ function INTMUL() {
this.model.ipar = new ScilabDouble([sgn]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(3)],[sci2exp(0)]];
- gr_i = [];
+ var exprs = [[sci2exp(3)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -5590,19 +5677,19 @@ function INTMUL() {
this.Datatype = arguments[0]["Datatype"]
this.np = arguments[0]["np"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.Datatype,this.np,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","INTMUL")],[" "],["Integer matrix multiplication"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Do on Overflow (0:Nothing, 1:Saturate, 2:Error)"],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- it = this.Datatype*ones(1,2);
- ot = this.Datatype;
+ var it = this.Datatype*ones(1,2);
+ var ot = this.Datatype;
if ((this.np!=0&&this.np!=1&&this.np!=2)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Do on Overflow",this.np),msprintf("Must be in the interval %s.","[0, 2]"));
- ok = false;
+ var ok = false;
} else if (this.Datatype==3) {
if (this.np==0) {
this.model.sim = list(new ScilabString(["matmul_i32n"]), new ScilabDouble([4]));
@@ -5653,12 +5740,15 @@ function INTMUL() {
}
} else {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",ot),msprintf("Must be in the interval %s.","[3, 8]"));
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.ipar = new ScilabDouble([this.np]);
@@ -5674,9 +5764,9 @@ function INTMUL() {
/* autogenerated from "macros/IntegerOp/JKFLIPFLOP.sci" */
function JKFLIPFLOP() {
JKFLIPFLOP.prototype.define = function JKFLIPFLOP() {
- scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["JKFLIPFLOP"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=60,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["JKFLIPFLOP"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=60,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m.objs[1-1] = scicos_block(gui="DOLLAR_m",graphics=scicos_graphics(orig=[299.96961,261.584],sz=[40,40],flip=false,theta=0,exprs=[["int8(0)"],["1"]],pin=7,pout=5,pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit="E"),model=scicos_model(sim=list("dollar4_m",4),in1=1,in2=1,intyp=5,out=1,out2=1,outtyp=5,evtin=[],evtout=[],state=[],dstate=[],odstate=list(int8(0)),rpar=[],ipar=[],opar=list(),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["EDGE_TRIGGER","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=30,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["EDGE_TRIGGER","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=30,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="EDGETRIGGER",graphics=scicos_graphics(orig=[288.58631,257.1131],sz=[60,40],flip=true,theta=0,exprs="-1",pin=5,pout=3,pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit="E"),model=scicos_model(sim=list("edgetrig",4),in1=1,in2=[],intyp=1,out=1,out2=[],outtyp=1,evtin=[],evtout=[],state=[],dstate=0,odstate=list(),rpar=[],ipar=-1,opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=1,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_block(gui="IFTHEL_f",graphics=scicos_graphics(orig=[388.28869,247.1131],sz=[60,60],flip=true,theta=0,exprs=[["0"],["0"]],pin=3,pout=[],pein=[],peout=[[7],[0]],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim=list("ifthel",-1),in1=1,in2=[],intyp=1,out=[],out2=1,outtyp=[],evtin=[],evtout=[[1],[1]],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="l",firing=[-1,-1],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[3-1] = scicos_link(xx=[[357.15774],[362.99107],[379.71726]],yy=[[277.1131],[277.1131],[277.1131]],id="drawlink",thick=[0,0],ct=[1,1],from=[1,1,0],to=[2,1,1]);
@@ -5717,7 +5807,7 @@ function JKFLIPFLOP() {
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [true,false];
this.model.rpar = new ScilabDouble([scs_m]);
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,3],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -5733,17 +5823,17 @@ function JKFLIPFLOP() {
this.init = parseFloat(arguments[0]["init"])
this.exprs0 = arguments[0]["exprs0"]
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="DOLLAR_m") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- xx = arg1.model.rpar.objs[path-1];
- exprs = xx.graphics.exprs[1-1];
+ var newpar = list();
+ var xx = arg1.model.rpar.objs[path-1];
+ var exprs = xx.graphics.exprs[1-1];
this.model = xx.model;
- init_old = this.model.odstate[1-1];
+ var init_old = this.model.odstate[1-1];
while (true) {
[ok,this.init,this.exprs0] = scicos_getvalue([[msprintf("Set %s block parameters","JKFLIPFLOP")],[" "],["JK flip-flop"],[" "],["The \'Initial Value\' must be 0 or 1 of type int8"],["&nbsp;- Negative values are considered as int8(0)"],["&nbsp;- Positive values are considered as int8(1)"],[" "]],"Initial Value",list("vec",1),exprs);
if (!ok) {
@@ -5762,14 +5852,14 @@ function JKFLIPFLOP() {
break;
}
}
- needcompile = 0;
+ var needcompile = 0;
if (init_old!=this.init) {
newpar[size(newpar)+1-1] = 1;
- needcompile = 2;
+ var needcompile = 2;
}
this.x = arg1;
- y = needcompile;
- typ = newpar;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
@@ -5790,8 +5880,8 @@ function LOGIC() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(this.mat)],[sci2exp(0)]];
- gr_i = [];
+ var exprs = [[sci2exp(this.mat)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -5809,33 +5899,36 @@ function LOGIC() {
this.mat = inverse(arguments[0]["mat"])
this.herit = arguments[0]["herit"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.mat,this.herit,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","LOGIC")],[" "],["Combinatorial logic"],[" "],["&nbsp; Rows of the matrix are the output values"],["&nbsp; Number of rows must be a power of two."],["&nbsp; Number of columns gives the number of outputs."],[" "]],["Truth Table (matrix of outputs)","Accepts Inherited Events (0:No, 1:Yes)"],list("mat",[-1,-2],"vec",1),exprs);
if (!ok) {
break;
}
- nout = size(this.mat,2);
- nin = (log(size(this.mat,1))/log(2));
- u1 = floor(nin);
+ var nout = size(this.mat,2);
+ var nin = (log(size(this.mat,1))/log(2));
+ var u1 = floor(nin);
if ((u1!=nin)) {
block_parameter_error(msprintf("Wrong size for \'%s\' parameter: %d.","Truth Table",size(this.mat,1)),"Number of rows must be a power of two.");
- ok = false;
+ var ok = false;
} else if ((find(this.mat.slice()!=0&&this.mat.slice()!=1)!=[])) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter.","Truth Table"),msprintf("Elements must be in the interval %s.","[0, 1]"));
- ok = false;
+ var ok = false;
} else if (this.herit<0||this.herit>1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Accepts Inherited Events",this.herit),msprintf("Must be in the interval %s.","[0, 1]"));
- ok = false;
+ var ok = false;
}
if (ok) {
- in1 = [ones(nin,1),ones(nin,1)];
- out = [ones(nout,1),ones(nout,1)];
- it = 5*ones(1,nin);
- ot = 5*ones(1,nout);
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.herit,1),[]);
+ var in1 = [ones(nin,1),ones(nin,1)];
+ var out = [ones(nout,1),ones(nout,1)];
+ var it = 5*ones(1,nin);
+ var ot = 5*ones(1,nout);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.herit,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
@@ -5852,8 +5945,8 @@ function LOGIC() {
/* autogenerated from "macros/IntegerOp/SHIFT.sci" */
function SHIFT() {
SHIFT.prototype.define = function SHIFT() {
- sgn = [[0],[0]];
- OPER = 0;
+ var sgn = [[0],[0]];
+ var OPER = 0;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["shift_32_LA"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1]);
@@ -5866,8 +5959,8 @@ function SHIFT() {
this.model.ipar = new ScilabDouble(sgn);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(3)],[sci2exp(0)],[sci2exp(0)]];
- gr_i = [];
+ var exprs = [[sci2exp(3)],[sci2exp(0)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -5887,9 +5980,9 @@ function SHIFT() {
this.nb = arguments[0]["nb"]
this.np = arguments[0]["np"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.Datatype,this.nb,this.np,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","SHIFT")],[" "],["Shift/Rotates bits"]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Number of Bits to Shift Left (Negative number to shift right)","Shift Type (0:Arithmetic, 1:Circular)"],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -5897,10 +5990,10 @@ function SHIFT() {
}
if ((this.np!=0&&this.np!=1)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Shift Type",this.np),msprintf("Must be in the interval %s.","[0, 1]"));
- ok = false;
+ var ok = false;
}
- it = this.Datatype;
- ot = this.Datatype;
+ var it = this.Datatype;
+ var ot = this.Datatype;
if ((this.Datatype==3||this.Datatype==6)) {
if (this.nb>0) {
switch (this.np) {
@@ -5966,10 +6059,13 @@ function SHIFT() {
}
} else {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",this.Datatype),msprintf("Must be in the interval %s.","[3, 8]"));
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([-1,-2],it),list([-1,-2],ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list([-1,-2],it),list([-1,-2],ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.ipar = new ScilabDouble([this.nb]);
@@ -5985,7 +6081,7 @@ function SHIFT() {
/* autogenerated from "macros/IntegerOp/SRFLIPFLOP.sci" */
function SRFLIPFLOP() {
SRFLIPFLOP.prototype.define = function SRFLIPFLOP() {
- scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["SRFLIPFLOP"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=60,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["SRFLIPFLOP"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=60,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m.objs[1-1] = scicos_block(gui="LOGIC",graphics=scicos_graphics(orig=[298.504,201.45067],sz=[40,40],flip=true,theta=0,exprs=[["[0 1;1 0;1 0;1 0;0 1;0 1;0 0;0 0]"],["1"]],pin=[[4],[10],[12]],pout=[[3],[8]],pein=[],peout=[],gr_i=[],id="",in_implicit=[["E"],["E"],["E"]],out_implicit=[["E"],["E"]]),model=scicos_model(sim=list("logic",4),in1=[[1],[1],[1]],in2=[[1],[1],[1]],intyp=[[5],[5],[5]],out=[[1],[1]],out2=[[1],[1]],outtyp=[[5],[5]],evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(int8([[0,1],[1,0],[1,0],[1,0],[0,1],[0,1],[0,0],[0,0]])),blocktype="c",firing=false,dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[2-1] = scicos_block(gui="DOLLAR_m",graphics=scicos_graphics(orig=[299.23733,254.25067],sz=[40,40],flip=false,theta=0,exprs=[["int8(0)"],["1"]],pin=6,pout=4,pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit="E"),model=scicos_model(sim=list("dollar4_m",4),in1=1,in2=1,intyp=5,out=1,out2=1,outtyp=5,evtin=[],evtout=[],state=[],dstate=[],odstate=list(int8(0)),rpar=[],ipar=[],opar=list(),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[3-1] = scicos_link(xx=[[347.07543],[363.03733],[363.03733]],yy=[[228.11733],[228.11733],[248.584]],id="drawlink",thick=[0,0],ct=[1,1],from=[1,1,0],to=[5,1,1]);
@@ -6012,7 +6108,7 @@ function SRFLIPFLOP() {
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [true,false];
this.model.rpar = new ScilabDouble([scs_m]);
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,3],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -6028,17 +6124,17 @@ function SRFLIPFLOP() {
this.init = parseFloat(arguments[0]["init"])
this.exprs0 = arguments[0]["exprs0"]
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="DOLLAR_m") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- xx = arg1.model.rpar.objs[path-1];
- exprs = xx.graphics.exprs[1-1];
+ var newpar = list();
+ var xx = arg1.model.rpar.objs[path-1];
+ var exprs = xx.graphics.exprs[1-1];
this.model = xx.model;
- init_old = this.model.odstate[1-1];
+ var init_old = this.model.odstate[1-1];
while (true) {
[ok,this.init,this.exprs0] = scicos_getvalue([[msprintf("Set %s block parameters","SRFLIPFLOP")],[" "],["SR flip-flop"],[" "],["The \'Initial Value\' must be 0 or 1 of type int8"],["&nbsp;- Negative values are considered as int8(0)"],["&nbsp;- Positive values are considered as int8(1)"],[" "]],"Initial Value",list("vec",1),exprs);
if (!ok) {
@@ -6057,14 +6153,14 @@ function SRFLIPFLOP() {
break;
}
}
- needcompile = 0;
+ var needcompile = 0;
if (init_old!=this.init) {
newpar[size(newpar)+1-1] = path;
- needcompile = 2;
+ var needcompile = 2;
}
this.x = arg1;
- y = needcompile;
- typ = newpar;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
@@ -6079,8 +6175,8 @@ function BIGSOM_f() {
this.model.rpar = new ScilabDouble(this.sgn);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = sci2exp(this.sgn);
- gr_i = [];
+ var exprs = sci2exp(this.sgn);
+ var gr_i = [];
this.x = standard_define([2,3],this.model,exprs,gr_i);
return new BigSom(this.x);
}
@@ -6095,16 +6191,19 @@ function BIGSOM_f() {
BIGSOM_f.prototype.set = function BIGSOM_f() {
this.sgn = inverse(arguments[0]["sgn"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.sgn,exprs] = scicos_getvalue("Set sum block parameters","Inputs ports signs/gain",list("vec",-1),exprs);
if (!ok) {
break;
}
- in1 = -ones(size(this.sgn,"*"),1);
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,-1,[],[]);
+ var in1 = -ones(size(this.sgn,"*"),1);
+ var tmpvar0 = check_io(this.model,graphics,in1,-1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
this.model.rpar = this.sgn.slice();
graphics.exprs = exprs;
@@ -6119,14 +6218,14 @@ function BIGSOM_f() {
/* autogenerated from "macros/Linear/CLINDUMMY_f.sci" */
function CLINDUMMY_f() {
CLINDUMMY_f.prototype.define = function CLINDUMMY_f() {
- x0 = 0;
+ var x0 = 0;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["cdummy"]), new ScilabDouble([4]));
this.model.state = new ScilabDouble([x0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [false,true];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -6146,12 +6245,12 @@ function CLINDUMMY_f() {
/* autogenerated from "macros/Linear/CLR.sci" */
function CLR() {
CLR.prototype.define = function CLR() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
- exprs = [["1"],["1+s"]];
+ var x0 = 0;
+ var A = -1;
+ var B = 1;
+ var C = 1;
+ var D = 0;
+ var exprs = [["1"],["1+s"]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["csslti4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -6160,7 +6259,7 @@ function CLR() {
this.model.rpar = new ScilabDouble([A.slice()],[B.slice()],[C.slice()],[D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -6178,15 +6277,15 @@ function CLR() {
this.num = arguments[0]["num"]
this.den = arguments[0]["den"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- x0 = this.model.state;
- rpar = this.model.rpar;
- ns = prod(size(x0));
- nin = 1;
- nout = 1;
- PREVAR_scicos_context = PREVAR_scicos_context;
+ var x0 = this.model.state;
+ var rpar = this.model.rpar;
+ var ns = prod(size(x0));
+ var nin = 1;
+ var nout = 1;
+ var PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.s = %s;
while (true) {
[ok,this.num,this.den,exprs] = scicos_getvalue("Set continuous SISO transfer parameters",["Numerator (s)","Denominator (s)"],list("pol",1,"pol",1),exprs);
@@ -6195,24 +6294,30 @@ function CLR() {
}
if (degree(this.num)>degree(this.den)) {
message("Transfer function must be proper or strictly proper.");
- ok = false;
+ var ok = false;
}
if (ok) {
- H = cont_frm(this.num,this.den);
- [A,B,C,D] = H.slice(2-1,5);
+ var H = cont_frm(this.num,this.den);
+ var tmpvar0 = H.slice(2-1,5)
+ var A = tmpvar0[0]
+ var B = tmpvar0[1]
+ var C = tmpvar0[2]
+ var D = tmpvar0[3];
graphics.exprs = exprs;
- [ns1,ns1] = size(A);
- rpar = [[matrix(A,ns1*ns1,1)],[matrix(B,ns1,1)],[matrix(C,ns1,1)],[D]];
+ var tmpvar1 = size(A)
+ var ns1 = tmpvar1[0]
+ var ns1 = tmpvar1[1];
+ var rpar = [[matrix(A,ns1*ns1,1)],[matrix(B,ns1,1)],[matrix(C,ns1,1)],[D]];
if (norm(D,1)!=0) {
- mmm = [true,true];
+ var mmm = [true,true];
} else {
- mmm = [false,true];
+ var mmm = [false,true];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
}
if (ns1<=ns) {
- x0 = x0.slice(1-1,ns1);
+ var x0 = x0.slice(1-1,ns1);
} else {
x0[ns1-1][1-1] = 0;
}
@@ -6229,12 +6334,12 @@ function CLR() {
/* autogenerated from "macros/Linear/CLR_f.sci" */
function CLR_f() {
CLR_f.prototype.define = function CLR_f() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
- exprs = [["1"],["1+s"]];
+ var x0 = 0;
+ var A = -1;
+ var B = 1;
+ var C = 1;
+ var D = 0;
+ var exprs = [["1"],["1+s"]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["csslti"]), new ScilabDouble([1]));
this.model.in1 = new ScilabDouble([1]);
@@ -6243,7 +6348,7 @@ function CLR_f() {
this.model.rpar = new ScilabDouble([A.slice()],[B.slice()],[C.slice()],[D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2.5,2.5],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -6261,15 +6366,15 @@ function CLR_f() {
this.num = arguments[0]["num"]
this.den = arguments[0]["den"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- x0 = this.model.state;
- rpar = this.model.rpar;
- ns = prod(size(x0));
- nin = 1;
- nout = 1;
- PREVAR_scicos_context = PREVAR_scicos_context;
+ var x0 = this.model.state;
+ var rpar = this.model.rpar;
+ var ns = prod(size(x0));
+ var nin = 1;
+ var nout = 1;
+ var PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.s = %s;
while (true) {
[ok,this.num,this.den,exprs] = scicos_getvalue("Set continuous SISO transfer parameters",["Numerator (s)","Denominator (s)"],list("pol",1,"pol",1),exprs);
@@ -6278,24 +6383,30 @@ function CLR_f() {
}
if (degree(this.num)>degree(this.den)) {
message("Transfer must be proper or strictly proper");
- ok = false;
+ var ok = false;
}
if (ok) {
- H = cont_frm(this.num,this.den);
- [A,B,C,D] = H.slice(2-1,5);
+ var H = cont_frm(this.num,this.den);
+ var tmpvar0 = H.slice(2-1,5)
+ var A = tmpvar0[0]
+ var B = tmpvar0[1]
+ var C = tmpvar0[2]
+ var D = tmpvar0[3];
graphics.exprs = exprs;
- [ns1,ns1] = size(A);
- rpar = [[matrix(A,ns1*ns1,1)],[matrix(B,ns1,1)],[matrix(C,ns1,1)],[D]];
+ var tmpvar1 = size(A)
+ var ns1 = tmpvar1[0]
+ var ns1 = tmpvar1[1];
+ var rpar = [[matrix(A,ns1*ns1,1)],[matrix(B,ns1,1)],[matrix(C,ns1,1)],[D]];
if (norm(D,1)!=0) {
- mmm = [true,true];
+ var mmm = [true,true];
} else {
- mmm = [false,true];
+ var mmm = [false,true];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
}
if (ns1<=ns) {
- x0 = x0.slice(1-1,ns1);
+ var x0 = x0.slice(1-1,ns1);
} else {
x0[ns1-1][1-1] = 0;
}
@@ -6317,8 +6428,8 @@ function CLSS() {
this.B = 1;
this.C = 1;
this.D = 0;
- in1 = 1;
- out = 1;
+ var in1 = 1;
+ var out = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["csslti4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1]);
@@ -6327,8 +6438,8 @@ function CLSS() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -6352,10 +6463,10 @@ function CLSS() {
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==7) {
- exprs = exprs[[1:4,7]-1];
+ var exprs = exprs[[1:4,7]-1];
}
this.model = arg1.model;
while (true) {
@@ -6363,37 +6474,42 @@ function CLSS() {
if (!ok) {
break;
}
- out = size(this.C,1);
+ var out = size(this.C,1);
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = size(this.B,2);
+ var in1 = size(this.B,2);
if (in1==0) {
- in1 = [];
+ var in1 = [];
}
- [ms,ns] = size(this.A);
- okD = true;
+ var tmpvar0 = size(this.A)
+ var ms = tmpvar0[0]
+ var ns = tmpvar0[1];
+ var okD = true;
if (size(this.D,"*")!=size(this.C,1)*size(this.B,2)) {
if (size(this.D,"*")==1) {
this.D = this.D*ones(this.C*this.B);
} else if (size(this.D,"*")==0) {
this.D = zeros(this.C*this.B);
} else {
- okD = false;
+ var okD = false;
}
}
if (ms!=ns||!okD) {
message(_("Matrix A is not square or D has wrong dimension"));
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,out,[],[]);
+ var tmpvar1 = check_io(this.model,graphics,in1,out,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
- rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
- mmm = [true,true];
+ var mmm = [true,true];
} else {
- mmm = [false,true];
+ var mmm = [false,true];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
@@ -6420,8 +6536,8 @@ function CLSS_f() {
this.B = 1;
this.C = 1;
this.D = 0;
- in1 = 1;
- out = 1;
+ var in1 = 1;
+ var out = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["csslti"]), new ScilabDouble([1]));
this.model.in1 = new ScilabDouble([in1]);
@@ -6430,8 +6546,8 @@ function CLSS_f() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -6455,10 +6571,10 @@ function CLSS_f() {
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==7) {
- exprs = exprs[[1:4,7]-1];
+ var exprs = exprs[[1:4,7]-1];
}
this.model = arg1.model;
while (true) {
@@ -6466,27 +6582,32 @@ function CLSS_f() {
if (!ok) {
break;
}
- out = size(this.C,1);
+ var out = size(this.C,1);
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = size(this.B,2);
+ var in1 = size(this.B,2);
if (in1==0) {
- in1 = [];
+ var in1 = [];
}
- [ms,ns] = size(this.A);
+ var tmpvar0 = size(this.A)
+ var ms = tmpvar0[0]
+ var ns = tmpvar0[1];
if (ms!=ns) {
message("A matrix must be square");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,out,[],[]);
+ var tmpvar1 = check_io(this.model,graphics,in1,out,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
- rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
- mmm = [true,true];
+ var mmm = [true,true];
} else {
- mmm = [false,true];
+ var mmm = [false,true];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
@@ -6509,7 +6630,7 @@ function CLSS_f() {
function DELAYV_f() {
DELAYV_f.prototype.define = function DELAYV_f() {
this.nin = 1;
- z0 = zeros(11,1);
+ var z0 = zeros(11,1);
this.zz0 = z0.slice(1-1,$-1);
this.T = 1;
this.model = scicos_model();
@@ -6523,8 +6644,8 @@ function DELAYV_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [0,-1];
this.model.dep_ut = [true,false];
- exprs = [[string(this.nin)],[strcat(string(z0.slice(1-1,$-1)),";")],[string(this.T)]];
- gr_i = [];
+ var exprs = [[string(this.nin)],[strcat(string(z0.slice(1-1,$-1)),";")],[string(this.T)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -6544,13 +6665,13 @@ function DELAYV_f() {
this.zz0 = inverse(arguments[0]["zz0"])
this.T = parseFloat(arguments[0]["T"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.nin = this.model.in1[1-1];
- z0 = this.model.dstate;
+ var z0 = this.model.dstate;
this.zz0 = z0.slice(1-1,$-1);
- told = z0[$-1];
+ var told = z0[$-1];
while (true) {
[ok,this.nin,this.zz0,this.T,exprs] = scicos_getvalue("Set delay parameters",["Number of inputs","Register initial condition","Max delay"],list("vec",1,"vec",-1,"vec",1),exprs);
if (!ok) {
@@ -6558,14 +6679,17 @@ function DELAYV_f() {
}
if (size(this.zz0,"*")<2) {
message("Register length must be at least 2");
- ok = false;
+ var ok = false;
}
if (this.T<=0) {
message("Delay must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,[[this.nin],[1]],this.nin,1,[[1],[1]]);
+ var tmpvar0 = check_io(this.model,graphics,[[this.nin],[1]],this.nin,1,[[1],[1]])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
@@ -6582,7 +6706,7 @@ function DELAYV_f() {
/* autogenerated from "macros/Linear/DELAY_f.sci" */
function DELAY_f() {
DELAY_f.prototype.define = function DELAY_f() {
- evtdly = EVTDLY_f("define");
+ var evtdly = EVTDLY_f("define");
evtdly.graphics.orig = [243,296];
evtdly.graphics.sz = [40,40];
evtdly.graphics.flip = true;
@@ -6591,7 +6715,7 @@ function DELAY_f() {
evtdly.graphics.peout = 7;
evtdly.model.rpar = 0.1;
evtdly.model.firing = 0;
- register = REGISTER_f("define");
+ var register = REGISTER_f("define");
register.graphics.orig = [238,195];
register.graphics.sz = [50,50];
register.graphics.flip = true;
@@ -6599,25 +6723,25 @@ function DELAY_f() {
register.graphics.pin = 6;
register.graphics.pout = 5;
register.graphics.pein = 9;
- input_port = IN_f("define");
+ var input_port = IN_f("define");
input_port.graphics.orig = [92,210];
input_port.graphics.sz = [20,20];
input_port.graphics.flip = true;
input_port.graphics.exprs = [["1"],["1"]];
input_port.graphics.pout = 6;
input_port.model.ipar = 1;
- output_port = OUT_f("define");
+ var output_port = OUT_f("define");
output_port.graphics.orig = [440,210];
output_port.graphics.sz = [20,20];
output_port.graphics.flip = true;
output_port.graphics.exprs = [["1"],["1"]];
output_port.graphics.pin = 5;
output_port.model.ipar = 1;
- split = CLKSPLIT_f("define");
+ var split = CLKSPLIT_f("define");
split.graphics.orig = [[263],[271.2]];
split.graphics.pein = 7;
split.graphics.peout = [[9],[10]];
- diagram = scicos_diagram();
+ var diagram = scicos_diagram();
diagram.objs[1-1] = input_port;
diagram.objs[2-1] = output_port;
diagram.objs[3-1] = register;
@@ -6659,9 +6783,9 @@ function DELAY_f() {
DELAY_f.prototype.set = function DELAY_f() {
this.dt = arguments[0]["dt"]
this.z0 = arguments[0]["z0"]
- ppath = list(0,0);
+ var ppath = list(0,0);
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="REGISTER_f") {
ppath[1-1] = i;
}
@@ -6673,25 +6797,25 @@ function DELAY_f() {
}
}
this.x = arg1;
- newpar = list();
- register = this.x.model.rpar.objs[ppath[1-1]-1];
- evtdly = this.x.model.rpar.objs[ppath[2-1]-1];
- register_exprs = register.graphics.exprs;
- evtdly_exprs = evtdly.graphics.exprs;
- exprs = [[evtdly_exprs[1-1]],[register_exprs]];
+ var newpar = list();
+ var register = this.x.model.rpar.objs[ppath[1-1]-1];
+ var evtdly = this.x.model.rpar.objs[ppath[2-1]-1];
+ var register_exprs = register.graphics.exprs;
+ var evtdly_exprs = evtdly.graphics.exprs;
+ var exprs = [[evtdly_exprs[1-1]],[register_exprs]];
while (true) {
[ok,this.dt,this.z0,exprs] = scicos_getvalue([["This block implements as a discretized delay"],["it is consist of a shift register and a clock"],["value of the delay is given by;","the discretization time step multiplied by the"],["number-1 of state of the register"]],["Discretization time step","Register initial state"],list("vec",1,"vec",-1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (prod(size(this.z0))<1) {
- mess = [[mess],["Register length must be at least 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Register length must be at least 1"],[" "]];
+ var ok = false;
}
if (this.dt<=0) {
- mess = [[mess],["Discretization time step must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Discretization time step must be positive"],[" "]];
+ var ok = false;
}
if (!ok) {
message(mess);
@@ -6711,9 +6835,9 @@ function DELAY_f() {
break;
}
}
- needcompile = 0;
- y = needcompile;
- typ = newpar;
+ var needcompile = 0;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
@@ -6726,8 +6850,8 @@ function DERIV() {
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["x"]);
this.model.dep_ut = [true,false];
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -6755,8 +6879,8 @@ function DIFF_c() {
this.model.state = new ScilabDouble(this.x0);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -6774,26 +6898,26 @@ function DIFF_c() {
this.x0 = inverse(arguments[0]["x0"])
this.xd0 = inverse(arguments[0]["xd0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
- ask_again = false;
+ var ask_again = false;
[ok,this.x0,this.xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",["Initial state","Initial Derivative"],list("vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
this.x0 = this.x0.slice();
- N = size(this.x0,"*");
+ var N = size(this.x0,"*");
this.xd0 = this.xd0.slice();
- Nxd = size(this.xd0,"*");
+ var Nxd = size(this.xd0,"*");
if ((N!=Nxd)) {
message("Incompatible sizes: states and their derivatives should have the same size ");
- ask_again = true;
+ var ask_again = true;
}
if ((N<=0&&!ask_again)) {
x_message("number of states must be > 0 ");
- ask_again = true;
+ var ask_again = true;
}
if (!ask_again) {
graphics.exprs = exprs;
@@ -6812,12 +6936,12 @@ function DIFF_c() {
/* autogenerated from "macros/Linear/DLR.sci" */
function DLR() {
DLR.prototype.define = function DLR() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
- exprs = [["1"],["1+z"]];
+ var x0 = 0;
+ var A = -1;
+ var B = 1;
+ var C = 1;
+ var D = 0;
+ var exprs = [["1"],["1+z"]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["dsslti4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -6827,7 +6951,7 @@ function DLR() {
this.model.rpar = new ScilabDouble([A.slice()],[B.slice()],[C.slice()],[D.slice()]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -6845,12 +6969,12 @@ function DLR() {
this.num = arguments[0]["num"]
this.den = arguments[0]["den"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- x0 = this.model.dstate;
- ns = prod(size(x0));
- PREVAR_scicos_context = PREVAR_scicos_context;
+ var x0 = this.model.dstate;
+ var ns = prod(size(x0));
+ var PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.z = %z;
while (true) {
[ok,this.num,this.den,exprs] = scicos_getvalue("Set discrete SISO transfer parameters",["Numerator (z)","Denominator (z)"],list("pol",1,"pol",1),exprs);
@@ -6859,25 +6983,31 @@ function DLR() {
}
if (degree(this.num)>degree(this.den)) {
message("Transfer function must be proper");
- ok = false;
+ var ok = false;
}
if (ok) {
- H = cont_frm(this.num,this.den);
- [A,B,C,D] = H.slice(2-1,5);
+ var H = cont_frm(this.num,this.den);
+ var tmpvar0 = H.slice(2-1,5)
+ var A = tmpvar0[0]
+ var B = tmpvar0[1]
+ var C = tmpvar0[2]
+ var D = tmpvar0[3];
graphics.exprs = exprs;
- [ns1,ns1] = size(A);
+ var tmpvar1 = size(A)
+ var ns1 = tmpvar1[0]
+ var ns1 = tmpvar1[1];
if (ns1<=ns) {
- x0 = x0.slice(1-1,ns1);
+ var x0 = x0.slice(1-1,ns1);
} else {
x0[ns1-1][1-1] = 0;
}
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ var rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
this.model.dstate = x0;
this.model.rpar = new ScilabDouble(rpar);
if (norm(D,1)!=0) {
- mmm = [true,false];
+ var mmm = [true,false];
} else {
- mmm = [false,false];
+ var mmm = [false,false];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
@@ -6894,12 +7024,12 @@ function DLR() {
/* autogenerated from "macros/Linear/DLR_f.sci" */
function DLR_f() {
DLR_f.prototype.define = function DLR_f() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
- exprs = [["1"],["1+z"]];
+ var x0 = 0;
+ var A = -1;
+ var B = 1;
+ var C = 1;
+ var D = 0;
+ var exprs = [["1"],["1+z"]];
this.model = scicos_model();
this.model.sim = new ScilabString(["dsslti"]);
this.model.in1 = new ScilabDouble([1]);
@@ -6909,7 +7039,7 @@ function DLR_f() {
this.model.rpar = new ScilabDouble([A.slice()],[B.slice()],[C.slice()],[D.slice()]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2.5,2.5],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -6927,12 +7057,12 @@ function DLR_f() {
this.num = arguments[0]["num"]
this.den = arguments[0]["den"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- x0 = this.model.dstate;
- ns = prod(size(x0));
- PREVAR_scicos_context = PREVAR_scicos_context;
+ var x0 = this.model.dstate;
+ var ns = prod(size(x0));
+ var PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.z = %z;
while (true) {
[ok,this.num,this.den,exprs] = scicos_getvalue("Set discrete SISO transfer parameters",["Numerator (z)","Denominator (z)"],list("pol",1,"pol",1),exprs);
@@ -6941,25 +7071,31 @@ function DLR_f() {
}
if (degree(this.num)>degree(this.den)) {
message("Transfer must be proper");
- ok = false;
+ var ok = false;
}
if (ok) {
- H = cont_frm(this.num,this.den);
- [A,B,C,D] = H.slice(2-1,5);
+ var H = cont_frm(this.num,this.den);
+ var tmpvar0 = H.slice(2-1,5)
+ var A = tmpvar0[0]
+ var B = tmpvar0[1]
+ var C = tmpvar0[2]
+ var D = tmpvar0[3];
graphics.exprs = exprs;
- [ns1,ns1] = size(A);
+ var tmpvar1 = size(A)
+ var ns1 = tmpvar1[0]
+ var ns1 = tmpvar1[1];
if (ns1<=ns) {
- x0 = x0.slice(1-1,ns1);
+ var x0 = x0.slice(1-1,ns1);
} else {
x0[ns1-1][1-1] = 0;
}
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ var rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
this.model.dstate = x0;
this.model.rpar = new ScilabDouble(rpar);
if (norm(D,1)!=0) {
- mmm = [true,false];
+ var mmm = [true,false];
} else {
- mmm = [false,false];
+ var mmm = [false,false];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
@@ -6990,8 +7126,8 @@ function DLSS() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -7015,10 +7151,10 @@ function DLSS() {
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==7) {
- exprs = exprs[[1:4,7]-1];
+ var exprs = exprs[[1:4,7]-1];
}
this.model = arg1.model;
while (true) {
@@ -7026,37 +7162,42 @@ function DLSS() {
if (!ok) {
break;
}
- out = size(this.C,1);
+ var out = size(this.C,1);
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = size(this.B,2);
+ var in1 = size(this.B,2);
if (in1==0) {
- in1 = [];
+ var in1 = [];
}
- [ms,ns] = size(this.A);
- okD = true;
+ var tmpvar0 = size(this.A)
+ var ms = tmpvar0[0]
+ var ns = tmpvar0[1];
+ var okD = true;
if (size(this.D,"*")!=size(this.C,1)*size(this.B,2)) {
if (size(this.D,"*")==1) {
this.D = this.D*ones(this.C*this.B);
} else if (size(this.D,"*")==0) {
this.D = zeros(this.C*this.B);
} else {
- okD = false;
+ var okD = false;
}
}
if (ms!=ns||!okD) {
message(_("Matrix A is not square or D has wrong dimension"));
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,out,1,[]);
+ var tmpvar1 = check_io(this.model,graphics,in1,out,1,[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
- rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
- mmm = [true,false];
+ var mmm = [true,false];
} else {
- mmm = [false,false];
+ var mmm = [false,false];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
@@ -7092,8 +7233,8 @@ function DLSS_f() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -7117,10 +7258,10 @@ function DLSS_f() {
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==7) {
- exprs = exprs[[1:4,7]-1];
+ var exprs = exprs[[1:4,7]-1];
}
this.model = arg1.model;
while (true) {
@@ -7128,27 +7269,32 @@ function DLSS_f() {
if (!ok) {
break;
}
- out = size(this.C,1);
+ var out = size(this.C,1);
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = size(this.B,2);
+ var in1 = size(this.B,2);
if (in1==0) {
- in1 = [];
+ var in1 = [];
}
- [ms,ns] = size(this.A);
+ var tmpvar0 = size(this.A)
+ var ms = tmpvar0[0]
+ var ns = tmpvar0[1];
if (ms!=ns) {
message("A matrix must be square");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,out,1,[]);
+ var tmpvar1 = check_io(this.model,graphics,in1,out,1,[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
- rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
- mmm = [true,false];
+ var mmm = [true,false];
} else {
- mmm = [false,false];
+ var mmm = [false,false];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
@@ -7170,10 +7316,10 @@ function DLSS_f() {
/* autogenerated from "macros/Linear/DOLLAR.sci" */
function DOLLAR() {
DOLLAR.prototype.define = function DOLLAR() {
- z = 0;
+ var z = 0;
this.inh = 0;
- in1 = 1;
- exprs = string([[z],[this.inh]]);
+ var in1 = 1;
+ var exprs = string([[z],[this.inh]]);
this.model = scicos_model();
this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1]);
@@ -7182,7 +7328,7 @@ function DOLLAR() {
this.model.dstate = new ScilabDouble([z]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -7200,8 +7346,8 @@ function DOLLAR() {
this.a = arguments[0]["a"]
this.inh = parseFloat(arguments[0]["inh"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")<2) {
exprs[2-1] = "0";
@@ -7211,51 +7357,54 @@ function DOLLAR() {
if (!ok) {
break;
}
- out = [size(this.a,1),size(this.a,2)];
+ var out = [size(this.a,1),size(this.a,2)];
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = out;
+ var in1 = out;
this.model.sim = list(new ScilabString(["dollar4_m"]), new ScilabDouble([4]));
this.model.odstate = list(new ScilabDouble([this.a]));
this.model.dstate = [];
if (this.type[(this.a)==1-1]) {
if (isreal(this.a)) {
- it = 1;
- ot = 1;
+ var it = 1;
+ var ot = 1;
if ((size(this.a,1)==1||size(this.a,2)==1)) {
this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4]));
this.model.dstate = this.a.slice();
this.model.odstate = list();
}
} else {
- it = 2;
- ot = 2;
+ var it = 2;
+ var ot = 2;
}
} else if ((typeof(this.a)=="int32")) {
- it = 3;
- ot = 3;
+ var it = 3;
+ var ot = 3;
} else if ((typeof(this.a)=="int16")) {
- it = 4;
- ot = 4;
+ var it = 4;
+ var ot = 4;
} else if ((typeof(this.a)=="int8")) {
- it = 5;
- ot = 5;
+ var it = 5;
+ var ot = 5;
} else if ((typeof(this.a)=="uint32")) {
- it = 6;
- ot = 6;
+ var it = 6;
+ var ot = 6;
} else if ((typeof(this.a)=="uint16")) {
- it = 7;
- ot = 7;
+ var it = 7;
+ var ot = 7;
} else if ((typeof(this.a)=="uint8")) {
- it = 8;
- ot = 8;
+ var it = 8;
+ var ot = 8;
} else {
message("type is not recognized");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
@@ -7270,10 +7419,10 @@ function DOLLAR() {
/* autogenerated from "macros/Linear/DOLLAR_f.sci" */
function DOLLAR_f() {
DOLLAR_f.prototype.define = function DOLLAR_f() {
- z = 0;
+ var z = 0;
this.inh = 0;
- in1 = 1;
- exprs = string([[z],[this.inh]]);
+ var in1 = 1;
+ var exprs = string([[z],[this.inh]]);
this.model = scicos_model();
this.model.sim = new ScilabString(["dollar"]);
this.model.in1 = new ScilabDouble([in1]);
@@ -7282,7 +7431,7 @@ function DOLLAR_f() {
this.model.dstate = new ScilabDouble([z]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -7300,8 +7449,8 @@ function DOLLAR_f() {
this.a = arguments[0]["a"]
this.inh = parseFloat(arguments[0]["inh"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")<2) {
exprs[2-1] = "0";
@@ -7311,13 +7460,16 @@ function DOLLAR_f() {
if (!ok) {
break;
}
- out = size(this.a,"*");
+ var out = size(this.a,"*");
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = out;
+ var in1 = out;
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,-1,-1,ones(1-this.inh,1),[]);
+ var tmpvar0 = check_io(this.model,graphics,-1,-1,ones(1-this.inh,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
@@ -7335,10 +7487,10 @@ function DOLLAR_f() {
/* autogenerated from "macros/Linear/DOLLAR_m.sci" */
function DOLLAR_m() {
DOLLAR_m.prototype.define = function DOLLAR_m() {
- z = 0;
+ var z = 0;
this.inh = 0;
- in1 = 1;
- exprs = string([[z],[this.inh]]);
+ var in1 = 1;
+ var exprs = string([[z],[this.inh]]);
this.model = scicos_model();
this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1]);
@@ -7347,7 +7499,7 @@ function DOLLAR_m() {
this.model.dstate = new ScilabDouble([z]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -7365,8 +7517,8 @@ function DOLLAR_m() {
this.a = arguments[0]["a"]
this.inh = parseFloat(arguments[0]["inh"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")<2) {
exprs[2-1] = "0";
@@ -7376,51 +7528,54 @@ function DOLLAR_m() {
if (!ok) {
break;
}
- out = [size(this.a,1),size(this.a,2)];
+ var out = [size(this.a,1),size(this.a,2)];
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = out;
+ var in1 = out;
this.model.sim = list(new ScilabString(["dollar4_m"]), new ScilabDouble([4]));
this.model.odstate = list(new ScilabDouble([this.a]));
this.model.dstate = [];
if ((this.type[this.a-1]==1)) {
if (isreal(this.a)) {
- it = 1;
- ot = 1;
+ var it = 1;
+ var ot = 1;
if ((size(this.a,1)==1||size(this.a,2)==1)) {
this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4]));
this.model.dstate = this.a.slice();
this.model.odstate = list();
}
} else {
- it = 2;
- ot = 2;
+ var it = 2;
+ var ot = 2;
}
} else if ((typeof(this.a)=="int32")) {
- it = 3;
- ot = 3;
+ var it = 3;
+ var ot = 3;
} else if ((typeof(this.a)=="int16")) {
- it = 4;
- ot = 4;
+ var it = 4;
+ var ot = 4;
} else if ((typeof(this.a)=="int8")) {
- it = 5;
- ot = 5;
+ var it = 5;
+ var ot = 5;
} else if ((typeof(this.a)=="uint32")) {
- it = 6;
- ot = 6;
+ var it = 6;
+ var ot = 6;
} else if ((typeof(this.a)=="uint16")) {
- it = 7;
- ot = 7;
+ var it = 7;
+ var ot = 7;
} else if ((typeof(this.a)=="uint8")) {
- it = 8;
- ot = 8;
+ var it = 8;
+ var ot = 8;
} else {
message("type is not recognized");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
@@ -7436,10 +7591,10 @@ function DOLLAR_m() {
function GAINBLK() {
GAINBLK.prototype.define = function GAINBLK() {
this.gain = 1;
- in1 = -1;
- out = -1;
- in2 = -2;
- out2 = -2;
+ var in1 = -1;
+ var out = -1;
+ var in2 = -2;
+ var out2 = -2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["gainblk"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1]);
@@ -7449,8 +7604,8 @@ function GAINBLK() {
this.model.rpar = new ScilabDouble([this.gain]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [strcat(sci2exp(this.gain))];
- gr_i = [];
+ var exprs = [strcat(sci2exp(this.gain))];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -7468,11 +7623,11 @@ function GAINBLK() {
this.gain = parseFloat(arguments[0]["gain"])
this.over = arguments[0]["over"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==1) {
- exprs = [[exprs],[sci2exp(0)]];
+ var exprs = [[exprs],[sci2exp(0)]];
}
while (true) {
[ok,this.gain,this.over,exprs] = scicos_getvalue("Set gain block parameters",["Gain","Do On Overflow(0=Nothing 1=Saturate 2=Error)"],list("mat",[-1,-1],"vec",1),exprs);
@@ -7484,98 +7639,106 @@ function GAINBLK() {
} else {
if (typeof(this.gain)=="constant") {
if (isreal(this.gain)) {
- it = 1;
- ot = 1;
+ var it = 1;
+ var ot = 1;
this.model.sim = list(new ScilabString(["gainblk"]), new ScilabDouble([4]));
this.model.rpar = this.gain.slice();
this.model.opar = list();
} else {
message("type is not supported");
- ok = false;
+ var ok = false;
}
} else {
if ((this.over==0)) {
if ((typeof(this.gain)=="int32")) {
- ot = 3;
+ var ot = 3;
this.model.sim = list(new ScilabString(["gainblk_i32n"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="int16")) {
- ot = 4;
+ var ot = 4;
this.model.sim = list(new ScilabString(["gainblk_i16n"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="int8")) {
- ot = 5;
+ var ot = 5;
this.model.sim = list(new ScilabString(["gainblk_i8n"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint32")) {
- ot = 6;
+ var ot = 6;
this.model.sim = list(new ScilabString(["gainblk_ui32n"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint16")) {
- ot = 7;
+ var ot = 7;
this.model.sim = list(new ScilabString(["gainblk_ui16n"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint8")) {
- ot = 8;
+ var ot = 8;
this.model.sim = list(new ScilabString(["gainblk_ui8n"]), new ScilabDouble([4]));
} else {
message("type is not supported.");
- ok = false;
+ var ok = false;
}
} else if ((this.over==1)) {
if ((typeof(this.gain)=="int32")) {
- ot = 3;
+ var ot = 3;
this.model.sim = list(new ScilabString(["gainblk_i32s"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="int16")) {
- ot = 4;
+ var ot = 4;
this.model.sim = list(new ScilabString(["gainblk_i16s"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="int8")) {
- ot = 5;
+ var ot = 5;
this.model.sim = list(new ScilabString(["gainblk_i8s"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint32")) {
- ot = 6;
+ var ot = 6;
this.model.sim = list(new ScilabString(["gainblk_ui32s"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint16")) {
- ot = 7;
+ var ot = 7;
this.model.sim = list(new ScilabString(["gainblk_ui16s"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint8")) {
- ot = 8;
+ var ot = 8;
this.model.sim = list(new ScilabString(["gainblk_ui8s"]), new ScilabDouble([4]));
} else {
message("type is not supported.");
- ok = false;
+ var ok = false;
}
} else if ((this.over==2)) {
if ((typeof(this.gain)=="int32")) {
- ot = 3;
+ var ot = 3;
this.model.sim = list(new ScilabString(["gainblk_i32e"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="int16")) {
- ot = 4;
+ var ot = 4;
this.model.sim = list(new ScilabString(["gainblk_i16e"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="int8")) {
- ot = 5;
+ var ot = 5;
this.model.sim = list(new ScilabString(["gainblk_i8e"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint32")) {
- ot = 6;
+ var ot = 6;
this.model.sim = list(new ScilabString(["gainblk_ui32e"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint16")) {
- ot = 7;
+ var ot = 7;
this.model.sim = list(new ScilabString(["gainblk_ui16e"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint8")) {
- ot = 8;
+ var ot = 8;
this.model.sim = list(new ScilabString(["gainblk_ui8e"]), new ScilabDouble([4]));
} else {
message("type is not an integer.");
- ok = false;
+ var ok = false;
}
} else {
message("Do on Overflow must be 0,1,2");
- ok = false;
+ var ok = false;
}
this.model.rpar = [];
this.model.opar = list(this.gain.slice());
}
if (ok) {
- [out,in1] = size(this.gain);
+ var tmpvar0 = size(this.gain)
+ var out = tmpvar0[0]
+ var in1 = tmpvar0[1];
if (out*in1!=1) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([in1,-1],ot),list([out,-1],ot),[],[]);
+ var tmpvar1 = set_io(this.model,graphics,list([in1,-1],ot),list([out,-1],ot),[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
} else {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([-1,-2],ot),list([-1,-2],ot),[],[]);
+ var tmpvar2 = set_io(this.model,graphics,list([-1,-2],ot),list([-1,-2],ot),[],[])
+ this.model = tmpvar2[0]
+ var graphics = tmpvar2[1]
+ var ok = tmpvar2[2];
}
}
if (ok) {
@@ -7593,8 +7756,8 @@ function GAINBLK() {
function GAINBLK_f() {
GAINBLK_f.prototype.define = function GAINBLK_f() {
this.gain = 1;
- in1 = 1;
- out = 1;
+ var in1 = 1;
+ var out = 1;
this.model = scicos_model();
this.model.sim = new ScilabString(["gain"]);
this.model.in1 = new ScilabDouble([in1]);
@@ -7602,8 +7765,8 @@ function GAINBLK_f() {
this.model.rpar = new ScilabDouble([this.gain]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [strcat(sci2exp(this.gain))];
- gr_i = [];
+ var exprs = [strcat(sci2exp(this.gain))];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -7619,8 +7782,8 @@ function GAINBLK_f() {
GAINBLK_f.prototype.set = function GAINBLK_f() {
this.gain = parseFloat(arguments[0]["gain"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
@@ -7630,8 +7793,13 @@ function GAINBLK_f() {
if (this.gain==[]) {
message("Gain must have at least one element");
} else {
- [out,in1] = size(this.gain);
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,out,[],[]);
+ var tmpvar0 = size(this.gain)
+ var out = tmpvar0[0]
+ var in1 = tmpvar0[1];
+ var tmpvar1 = check_io(this.model,graphics,in1,out,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
this.model.rpar = this.gain.slice();
@@ -7648,8 +7816,8 @@ function GAINBLK_f() {
function GAIN_f() {
GAIN_f.prototype.define = function GAIN_f() {
this.gain = 1;
- in1 = 1;
- out = 1;
+ var in1 = 1;
+ var out = 1;
this.model = scicos_model();
this.model.sim = new ScilabString(["gain"]);
this.model.in1 = new ScilabDouble([1]);
@@ -7657,8 +7825,8 @@ function GAIN_f() {
this.model.rpar = new ScilabDouble([this.gain]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(sci2exp(this.gain))],[strcat(sci2exp(in1))],[strcat(sci2exp(out))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.gain))],[strcat(sci2exp(in1))],[strcat(sci2exp(out))]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -7674,8 +7842,8 @@ function GAIN_f() {
GAIN_f.prototype.set = function GAIN_f() {
this.gain = parseFloat(arguments[0]["gain"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
@@ -7685,8 +7853,13 @@ function GAIN_f() {
if (this.gain==[]) {
message("Gain must have at least one element");
} else {
- [out,in1] = size(this.gain);
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,out,[],[]);
+ var tmpvar0 = size(this.gain)
+ var out = tmpvar0[0]
+ var in1 = tmpvar0[1];
+ var tmpvar1 = check_io(this.model,graphics,in1,out,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
this.model.rpar = this.gain.slice();
@@ -7703,8 +7876,8 @@ function GAIN_f() {
function INTEGRAL() {
INTEGRAL.prototype.define = function INTEGRAL() {
this.maxp = 1;
- minp = -1;
- rpar = [];
+ var minp = -1;
+ var rpar = [];
this.model = scicos_model();
this.model.state = new ScilabDouble([0]);
this.model.sim = list(new ScilabString(["integral_func"]), new ScilabDouble([4]));
@@ -7713,8 +7886,8 @@ function INTEGRAL() {
this.model.rpar = rpar;
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = string([[0],[0],[0],[this.maxp],[minp]]);
- gr_i = [];
+ var exprs = string([[0],[0],[0],[this.maxp],[minp]]);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.id = "1/s";
return new BasicBlock(this.x);
@@ -7739,8 +7912,8 @@ function INTEGRAL() {
this.maxp = parseFloat(arguments[0]["maxp"])
this.lowp = arguments[0]["lowp"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.x0,this.reinit,this.satur,this.maxp,this.lowp,exprs] = scicos_getvalue("Set Integral block parameters",["Initial Condition","With re-intialization (1:yes, 0:no)","With saturation (1:yes, 0:no)","Upper limit","Lower limit"],list("vec",-1,"vec",1,"vec",1,"vec",-1,"vec",-1),exprs);
@@ -7763,27 +7936,30 @@ function INTEGRAL() {
}
if ((size(this.x0,1)!=size(this.maxp,1)||size(this.x0,1)!=size(this.lowp,1))) {
message("x0 and Upper limit and Lower limit must have same size");
- ok = false;
+ var ok = false;
} else if (or(this.maxp<=this.lowp)) {
message("Upper limits must be > Lower limits");
- ok = false;
+ var ok = false;
} else if (or(this.x0>this.maxp)||or(this.x0<this.lowp)) {
message("Initial condition x0 should be inside the limits");
- ok = false;
+ var ok = false;
} else {
- rpar = [[this.maxp],[this.lowp]];
+ var rpar = [[this.maxp],[this.lowp]];
this.model.nzcross = new ScilabDouble([size(this.x0,1)]);
this.model.nmode = new ScilabDouble([size(this.x0,1)]);
}
} else {
- rpar = [];
+ var rpar = [];
this.model.nzcross = new ScilabDouble([0]);
this.model.nmode = new ScilabDouble([0]);
}
if (ok) {
this.model.rpar = rpar;
this.model.state = this.x0;
- [this.model,graphics,ok] = check_io(this.model,graphics,size(this.x0,1)*[[1],[ones(this.reinit,1)]],size(this.x0,1),ones(this.reinit,1),[]);
+ var tmpvar0 = check_io(this.model,graphics,size(this.x0,1)*[[1],[ones(this.reinit,1)]],size(this.x0,1),ones(this.reinit,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
@@ -7806,8 +7982,8 @@ function INTEGRAL_f() {
this.model.state = new ScilabDouble([this.x0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = strcat(sci2exp(this.x0));
- gr_i = [];
+ var exprs = strcat(sci2exp(this.x0));
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -7822,8 +7998,8 @@ function INTEGRAL_f() {
INTEGRAL_f.prototype.set = function INTEGRAL_f() {
this.x0 = parseFloat(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters","Initial state",list("vec",1),exprs);
@@ -7844,8 +8020,8 @@ function INTEGRAL_f() {
function INTEGRAL_m() {
INTEGRAL_m.prototype.define = function INTEGRAL_m() {
this.maxp = 1;
- minp = -1;
- rpar = [];
+ var minp = -1;
+ var rpar = [];
this.model = scicos_model();
this.model.state = new ScilabDouble([0]);
this.model.sim = list(new ScilabString(["integral_func"]), new ScilabDouble([4]));
@@ -7856,8 +8032,8 @@ function INTEGRAL_m() {
this.model.rpar = rpar;
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = string([[0],[0],[0],[this.maxp],[minp]]);
- gr_i = [];
+ var exprs = string([[0],[0],[0],[this.maxp],[minp]]);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -7881,8 +8057,8 @@ function INTEGRAL_m() {
this.maxp = parseFloat(arguments[0]["maxp"])
this.lowp = parseFloat(arguments[0]["lowp"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.x0,this.reinit,this.satur,this.maxp,this.lowp,exprs] = scicos_getvalue("Set Integral block parameters",["Initial Condition","With re-intialization (1:yes, 0:no)","With saturation (1:yes, 0:no)","Upper limit","Lower limit"],list("mat",[-1,-1],"vec",1,"vec",1,"mat",[-1,-1],"mat",[-1,-1]),exprs);
@@ -7890,9 +8066,9 @@ function INTEGRAL_m() {
break;
}
if (isreal(this.x0)) {
- Datatype = 1;
+ var Datatype = 1;
} else {
- Datatype = 2;
+ var Datatype = 2;
}
if (this.reinit!=0) {
this.reinit = 1;
@@ -7908,15 +8084,15 @@ function INTEGRAL_m() {
}
if ((size(this.x0)!=size(this.maxp)||size(this.x0)!=size(this.lowp))) {
message("x0 and Upper limit and Lower limit must have same size");
- ok = false;
+ var ok = false;
} else if (or(this.maxp<=this.lowp)) {
message("Upper limits must be > Lower limits");
- ok = false;
+ var ok = false;
} else if (or(this.x0>this.maxp)||or(this.x0<this.lowp)) {
message("Initial condition x0 should be inside the limits");
- ok = false;
+ var ok = false;
} else {
- rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())]];
+ var rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())]];
this.model.nzcross = new ScilabDouble([size(this.x0,"*")]);
this.model.nmode = new ScilabDouble([size(this.x0,"*")]);
}
@@ -7929,21 +8105,21 @@ function INTEGRAL_m() {
}
if ((size(this.x0)!=size(this.maxp)||size(this.x0)!=size(this.lowp))) {
message("x0 and Upper limit and Lower limit must have same size");
- ok = false;
+ var ok = false;
} else if (or(real(this.maxp)<=real(this.lowp))||or(imag(this.maxp)<=imag(this.lowp))) {
message("Upper limits must be > Lower limits");
- ok = false;
+ var ok = false;
} else if (or(real(this.x0)>real(this.maxp))||or(real(this.x0)<real(this.lowp))||or(imag(this.x0)>imag(this.maxp))||or(imag(this.x0)<imag(this.lowp))) {
message("Initial condition x0 should be inside the limits");
- ok = false;
+ var ok = false;
} else {
- rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())],[imag(this.maxp.slice())],[imag(this.lowp.slice())]];
+ var rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())],[imag(this.maxp.slice())],[imag(this.lowp.slice())]];
this.model.nzcross = new ScilabDouble([2*size(this.x0,"*")]);
this.model.nmode = new ScilabDouble([2*size(this.x0,"*")]);
}
}
} else {
- rpar = [];
+ var rpar = [];
this.model.nzcross = new ScilabDouble([0]);
this.model.nmode = new ScilabDouble([0]);
}
@@ -7952,21 +8128,24 @@ function INTEGRAL_m() {
if ((Datatype==1)) {
this.model.state = new ScilabDouble([real(this.x0.slice())]);
this.model.sim = list(new ScilabString(["integral_func"]), new ScilabDouble([4]));
- it = [[1],[ones(this.reinit,1)]];
- ot = 1;
+ var it = [[1],[ones(this.reinit,1)]];
+ var ot = 1;
} else if ((Datatype==2)) {
this.model.state = new ScilabDouble([real(this.x0.slice())],[imag(this.x0.slice())]);
this.model.sim = list(new ScilabString(["integralz_func"]), new ScilabDouble([4]));
- it = [[2],[2*ones(this.reinit,1)]];
- ot = 2;
+ var it = [[2],[2*ones(this.reinit,1)]];
+ var ot = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
- in1 = [size(this.x0,1)*[[1],[ones(this.reinit,1)]],size(this.x0,2)*[[1],[ones(this.reinit,1)]]];
- out = size(this.x0);
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(this.reinit,1),[]);
+ var in1 = [size(this.x0,1)*[[1],[ones(this.reinit,1)]],size(this.x0,2)*[[1],[ones(this.reinit,1)]]];
+ var out = size(this.x0);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(this.reinit,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
}
if (ok) {
@@ -7982,7 +8161,7 @@ function INTEGRAL_m() {
/* autogenerated from "macros/Linear/PID.sci" */
function PID() {
PID.prototype.define = function PID() {
- scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["PID"],tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["PID"],tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m.objs[1-1] = scicos_block(gui="INTEGRAL_m",graphics=scicos_graphics(orig=[318.304,183.11733],sz=[40,40],flip=true,theta=0,exprs=[["0"],["0"],["0"],["1"],["-1"]],pin=7,pout=9,pein=[],peout=[],gr_i=[],id="1/s",in_implicit="E",out_implicit="E"),model=scicos_model(sim=list("integral_func",4),in1=1,in2=1,intyp=1,out=1,out2=1,outtyp=1,evtin=[],evtout=[],state=0,dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="c",firing=[],dep_ut=[false,true],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[2-1] = scicos_block(gui="SUMMATION",graphics=scicos_graphics(orig=[387.97067,172.85067],sz=[40,60],flip=true,theta=0,exprs=[["1"],["[1;1;1]"]],pin=[[10],[9],[11]],pout=19,pein=[],peout=[],gr_i=[],id="",in_implicit=[["E"],["E"],["E"]],out_implicit="E"),model=scicos_model(sim=list("summation",4),in1=[[-1],[-1],[-1]],in2=[[-2],[-2],[-2]],intyp=[[1],[1],[1]],out=-1,out2=-2,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[[1],[1],[1]],opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[3-1] = scicos_block(gui="GAINBLK",graphics=scicos_graphics(orig=[321.23733,235.91733],sz=[40,40],flip=true,theta=0,exprs="1",pin=17,pout=10,pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit="E"),model=scicos_model(sim=list("gainblk",4),in1=-1,in2=-2,intyp=1,out=-1,out2=-2,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=1,ipar=[],opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -8016,7 +8195,7 @@ function PID() {
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [false,false];
this.model.rpar = new ScilabDouble([scs_m]);
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -8036,12 +8215,12 @@ function PID() {
this.i = arguments[0]["i"]
this.d = arguments[0]["d"]
this.exprs0 = arguments[0]["exprs0"]
- ppath = list(0,0,0);
+ var ppath = list(0,0,0);
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[this.i-1];
+ var o = arg1.model.rpar.objs[this.i-1];
if (typeof(o)=="Link") {
- from = arg1.model.rpar.objs[o.from[1-1]-1];
- to = arg1.model.rpar.objs[o.to[1-1]-1];
+ var from = arg1.model.rpar.objs[o.from[1-1]-1];
+ var to = arg1.model.rpar.objs[o.to[1-1]-1];
if (from.gui=="GAINBLK") {
switch (to.gui) {
case "SUMMATION":
@@ -8066,17 +8245,17 @@ function PID() {
}
}
}
- newpar = list();
- xx1 = arg1.model.rpar.objs[ppath[1-1]-1];
+ var newpar = list();
+ var xx1 = arg1.model.rpar.objs[ppath[1-1]-1];
exprs[1-1] = xx1.graphics.exprs[1-1];
- p_old = xx1.model.rpar;
- xx2 = arg1.model.rpar.objs[ppath[2-1]-1];
+ var p_old = xx1.model.rpar;
+ var xx2 = arg1.model.rpar.objs[ppath[2-1]-1];
exprs[2-1] = xx2.graphics.exprs[1-1];
- i_old = xx2.model.rpar;
- xx3 = arg1.model.rpar.objs[ppath[3-1]-1];
+ var i_old = xx2.model.rpar;
+ var xx3 = arg1.model.rpar.objs[ppath[3-1]-1];
exprs[3-1] = xx3.graphics.exprs[1-1];
- d_old = xx3.model.rpar;
- y = 0;
+ var d_old = xx3.model.rpar;
+ var y = 0;
while (true) {
[ok,this.p,this.i,this.d,this.exprs0] = scicos_getvalue("Set PID parameters",["Proportional","Integral","Derivation"],list("vec",-1,"vec",-1,"vec",-1),exprs);
if (!ok) {
@@ -8095,16 +8274,16 @@ function PID() {
break;
}
}
- needcompile = 0;
+ var needcompile = 0;
if (!(p_old==this.p&&i_old==this.i&&d_old==this.d)) {
newpar[size(newpar)+1-1] = ppath[1-1];
newpar[size(newpar)+1-1] = ppath[2-1];
newpar[size(newpar)+1-1] = ppath[3-1];
- needcompile = 2;
+ var needcompile = 2;
}
this.x = arg1;
- y = max(y,needcompile);
- typ = newpar;
+ var y = max(y,needcompile);
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
@@ -8120,8 +8299,8 @@ function REGISTER() {
this.model.dstate = new ScilabDouble([this.z0]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = strcat(string(this.z0),";");
- gr_i = [];
+ var exprs = strcat(string(this.z0),";");
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -8139,11 +8318,11 @@ function REGISTER() {
this.z0 = parseFloat(arguments[0]["z0"])
this.it = arguments[0]["it"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,1)==1) {
- exprs = [[exprs],[sci2exp(1)]];
+ var exprs = [[exprs],[sci2exp(1)]];
}
while (true) {
[ok,this.z0,this.it,exprs] = scicos_getvalue("Set delay parameters",["Register initial condition","Datatype (1=double 3=int32 ...)"],list("vec",-1,"vec",1),exprs);
@@ -8152,7 +8331,7 @@ function REGISTER() {
}
if (prod(size(this.z0))<1) {
message("Register length must be at least 1");
- ok = false;
+ var ok = false;
}
if (this.it==1) {
this.model.sim = list(new ScilabString(["delay4"]), new ScilabDouble([4]));
@@ -8180,14 +8359,17 @@ function REGISTER() {
this.z0 = uint8(this.z0);
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
this.model.odstate = list(new ScilabDouble([this.z0]));
this.model.dstate = [];
}
if (ok) {
- in1 = [1,1];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,this.it),list(in1,this.it),1,[]);
+ var in1 = [1,1];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,this.it),list(in1,this.it),1,[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
@@ -8211,8 +8393,8 @@ function REGISTER_f() {
this.model.dstate = new ScilabDouble([this.z0]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = strcat(string(this.z0),";");
- gr_i = [];
+ var exprs = strcat(string(this.z0),";");
+ var gr_i = [];
this.x = standard_define([2.5,2.5],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -8227,8 +8409,8 @@ function REGISTER_f() {
REGISTER_f.prototype.set = function REGISTER_f() {
this.z0 = parseFloat(arguments[0]["z0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.z0,exprs] = scicos_getvalue("Set delay parameters","Register initial condition",list("vec",-1),exprs);
@@ -8237,7 +8419,7 @@ function REGISTER_f() {
}
if (prod(size(this.z0))<1) {
message("Register length must be at least 1");
- ok = false;
+ var ok = false;
}
if (ok) {
graphics.exprs = exprs;
@@ -8253,7 +8435,7 @@ function REGISTER_f() {
/* autogenerated from "macros/Linear/SAMPHOLD.sci" */
function SAMPHOLD() {
SAMPHOLD.prototype.define = function SAMPHOLD() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["samphold4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1]);
@@ -8261,7 +8443,7 @@ function SAMPHOLD() {
this.model.evtin = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [true,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model," ",gr_i);
return new BasicBlock(this.x);
}
@@ -8293,8 +8475,8 @@ function SAMPHOLD_m() {
this.model.evtin = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -8311,8 +8493,8 @@ function SAMPHOLD_m() {
this.it = arguments[0]["it"]
this.x = arg1;
this.x.model.firing = [];
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.it,exprs] = scicos_getvalue("Set parameters Block",["Datatype(1=real double 2=Complex 3=int32 ...)"],list("vec",1),label);
@@ -8321,11 +8503,14 @@ function SAMPHOLD_m() {
}
if (((this.it<1)||(this.it>8))) {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
- in1 = [this.model.in1,this.model.in2];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,this.it),list(in1,this.it),1,[]);
+ var in1 = [this.model.in1,this.model.in2];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,this.it),list(in1,this.it),1,[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
arg1.graphics = graphics;
@@ -8341,7 +8526,7 @@ function SAMPHOLD_m() {
/* autogenerated from "macros/Linear/SAMPLEHOLD_f.sci" */
function SAMPLEHOLD_f() {
SAMPLEHOLD_f.prototype.define = function SAMPLEHOLD_f() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = new ScilabString(["samphold"]);
this.model.in1 = new ScilabDouble([-1]);
@@ -8349,7 +8534,7 @@ function SAMPLEHOLD_f() {
this.model.evtin = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [true,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model," ",gr_i);
return new BasicBlock(this.x);
}
@@ -8370,7 +8555,7 @@ function SAMPLEHOLD_f() {
/* autogenerated from "macros/Linear/SOM_f.sci" */
function SOM_f() {
SOM_f.prototype.define = function SOM_f() {
- sgn = [[1],[1],[1]];
+ var sgn = [[1],[1],[1]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["sum"]), new ScilabDouble([2]));
this.model.in1 = new ScilabDouble([-1],[-1],[-1]);
@@ -8378,8 +8563,8 @@ function SOM_f() {
this.model.rpar = new ScilabDouble(sgn);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[sci2exp(sgn)]];
- gr_i = [];
+ var exprs = [[sci2exp(1)],[sci2exp(sgn)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -8393,22 +8578,22 @@ function SOM_f() {
}
SOM_f.prototype.set = function SOM_f() {
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==2) {
- exprs = exprs[2-1];
+ var exprs = exprs[2-1];
}
if (size(exprs,"*")!=3) {
- exprs = string(this.model.rpar);
+ var exprs = string(this.model.rpar);
}
if (graphics.flip) {
- labs = ["down","left","up"];
+ var labs = ["down","left","up"];
} else {
- labs = ["down","right","up"];
+ var labs = ["down","right","up"];
}
- str = [["This sum block is obsolete","parameters cannot be modified. Please replace it with new sum block"],["and gain blocks in the linear palette"," ","Input ports are located at up, side and down positions.","Current gains are:"]];
- str = [[str],[(part(labs.slice(),1,7)+exprs.slice())]];
+ var str = [["This sum block is obsolete","parameters cannot be modified. Please replace it with new sum block"],["and gain blocks in the linear palette"," ","Input ports are located at up, side and down positions.","Current gains are:"]];
+ var str = [[str],[(part(labs.slice(),1,7)+exprs.slice())]];
message(str);
return new BasicBlock(this.x);
}
@@ -8426,8 +8611,8 @@ function SUMMATION() {
this.model.ipar = new ScilabDouble(this.sgn);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = sci2exp(this.sgn);
- gr_i = [];
+ var exprs = sci2exp(this.sgn);
+ var gr_i = [];
this.x = standard_define([2,3],this.model,exprs,gr_i);
return new Summation(this.x);
}
@@ -8447,13 +8632,13 @@ function SUMMATION() {
this.sgn = inverse(arguments[0]["sgn"])
this.satur = arguments[0]["satur"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
if (size(exprs,1)==1) {
- exprs = [[sci2exp(1)],[exprs],[sci2exp(0)]];
+ var exprs = [[sci2exp(1)],[exprs],[sci2exp(0)]];
} else if (size(exprs,1)==2) {
- exprs = [[exprs],[sci2exp(0)]];
+ var exprs = [[exprs],[sci2exp(0)]];
}
while (true) {
[ok,this.Datatype,this.sgn,this.satur,exprs] = scicos_getvalue("Set sum block parameters",["Datatype (1=real double 2=complex 3=int32 ...)","Number of inputs or sign vector (of +1, -1)","Do on Overflow(0=Nothing 1=Saturate 2=Error)"],list("vec",1,"vec",-1,"vec",1),exprs);
@@ -8463,45 +8648,45 @@ function SUMMATION() {
this.sgn = this.sgn.slice();
if ((this.satur!=0&&this.satur!=1&&this.satur!=2)) {
message("Do on overflow must be 0,1,2");
- ok = false;
+ var ok = false;
}
if (size(this.sgn,1)==1) {
if (this.sgn<1) {
message("Number of inputs must be > 0");
- ok = false;
+ var ok = false;
} else if (this.sgn==1) {
- in1 = -1;
- in2 = -2;
+ var in1 = -1;
+ var in2 = -2;
this.sgn = [];
- nout = 1;
- nout2 = 1;
+ var nout = 1;
+ var nout2 = 1;
} else {
- in1 = -ones(this.sgn,1);
- in2 = 2*in1;
+ var in1 = -ones(this.sgn,1);
+ var in2 = 2*in1;
this.sgn = ones(this.sgn,1);
- nout = -1;
- nout2 = -2;
+ var nout = -1;
+ var nout2 = -2;
}
} else {
if (!and(abs(this.sgn)==1)) {
message("Signs can only be +1 or -1");
- ok = false;
+ var ok = false;
} else {
- in1 = -ones(size(this.sgn,1),1);
- in2 = 2*in1;
- nout = -1;
- nout2 = -2;
+ var in1 = -ones(size(this.sgn,1),1);
+ var in2 = 2*in1;
+ var nout = -1;
+ var nout2 = -2;
}
}
- it = this.Datatype*ones(1,size(in1,1));
- ot = this.Datatype;
+ var it = this.Datatype*ones(1,size(in1,1));
+ var ot = this.Datatype;
if (this.Datatype==1) {
this.model.sim = list(new ScilabString(["summation"]), new ScilabDouble([4]));
} else if (this.Datatype==2) {
this.model.sim = list(new ScilabString(["summation_z"]), new ScilabDouble([4]));
} else if (((this.Datatype<1)||(this.Datatype>8))) {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
} else {
if (this.satur==0) {
if (this.Datatype==3) {
@@ -8548,7 +8733,10 @@ function SUMMATION() {
}
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],it),list([nout,nout2],ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list([in1,in2],it),list([nout,nout2],ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.rpar = new ScilabDouble([this.satur]);
@@ -8571,8 +8759,8 @@ function SUM_f() {
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- gr_i = [];
- exprs = [];
+ var gr_i = [];
+ var exprs = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -8597,9 +8785,9 @@ function TCLSS() {
this.B = 1;
this.C = 1;
this.D = 0;
- in1 = 1;
- nx = size(this.x0,"*");
- out = 1;
+ var in1 = 1;
+ var nx = size(this.x0,"*");
+ var out = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["tcslti4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1],[nx]);
@@ -8609,8 +8797,8 @@ function TCLSS() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -8634,38 +8822,43 @@ function TCLSS() {
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==7) {
- exprs = exprs[[1:4,7]-1];
+ var exprs = exprs[[1:4,7]-1];
}
while (true) {
[ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters",["A matrix","B matrix","C matrix","D matrix","Initial state"],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
if (!ok) {
break;
}
- out = size(this.C,1);
+ var out = size(this.C,1);
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = size(this.B,2);
+ var in1 = size(this.B,2);
if (in1==0) {
- in1 = [];
+ var in1 = [];
}
- [ms,ns] = size(this.A);
+ var tmpvar0 = size(this.A)
+ var ms = tmpvar0[0]
+ var ns = tmpvar0[1];
if (ms!=ns) {
message("A matrix must be square");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,[[in1],[ms]],out,1,[]);
+ var tmpvar1 = check_io(this.model,graphics,[[in1],[ms]],out,1,[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
- rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
- mmm = [true,true];
+ var mmm = [true,true];
} else {
- mmm = [false,true];
+ var mmm = [false,true];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
@@ -8697,9 +8890,9 @@ function TCLSS_f() {
this.B = 1;
this.C = 1;
this.D = 0;
- in1 = 1;
- nx = size(this.x0,"*");
- out = 1;
+ var in1 = 1;
+ var nx = size(this.x0,"*");
+ var out = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["tcslti"]), new ScilabDouble([1]));
this.model.in1 = new ScilabDouble([in1],[nx]);
@@ -8709,8 +8902,8 @@ function TCLSS_f() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -8734,38 +8927,43 @@ function TCLSS_f() {
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==7) {
- exprs = exprs[[1:4,7]-1];
+ var exprs = exprs[[1:4,7]-1];
}
while (true) {
[ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters",["A matrix","B matrix","C matrix","D matrix","Initial state"],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
if (!ok) {
break;
}
- out = size(this.C,1);
+ var out = size(this.C,1);
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = size(this.B,2);
+ var in1 = size(this.B,2);
if (in1==0) {
- in1 = [];
+ var in1 = [];
}
- [ms,ns] = size(this.A);
+ var tmpvar0 = size(this.A)
+ var ms = tmpvar0[0]
+ var ns = tmpvar0[1];
if (ms!=ns) {
message("A matrix must be square");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,[[in1],[ms]],out,1,[]);
+ var tmpvar1 = check_io(this.model,graphics,[[in1],[ms]],out,1,[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
- rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
- mmm = [true,true];
+ var mmm = [true,true];
} else {
- mmm = [false,true];
+ var mmm = [false,true];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
@@ -8792,7 +8990,7 @@ function TCLSS_f() {
/* autogenerated from "macros/Linear/TIME_DELAY.sci" */
function TIME_DELAY() {
TIME_DELAY.prototype.define = function TIME_DELAY() {
- nin = 1;
+ var nin = 1;
this.T = 1;
this.init = 0;
this.N = 1024;
@@ -8804,8 +9002,8 @@ function TIME_DELAY() {
this.model.ipar = new ScilabDouble([this.N]);
this.model.blocktype = new ScilabString(["x"]);
this.model.dep_ut = [false,true];
- exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
- gr_i = [];
+ var exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
+ var gr_i = [];
this.x = standard_define([3.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -8825,10 +9023,10 @@ function TIME_DELAY() {
this.init = parseFloat(arguments[0]["init"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- nin = this.model.in1[1-1];
+ var nin = this.model.in1[1-1];
while (true) {
[ok,this.T,this.init,this.N,exprs] = scicos_getvalue("Set delay parameters",["Delay","initial input","Buffer size"],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -8836,14 +9034,17 @@ function TIME_DELAY() {
}
if (this.N<2) {
message("Buffer must be larger than 2");
- ok = false;
+ var ok = false;
}
if (this.T<=0) {
message("Delay must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,[-1],-1,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,[-1],-1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
@@ -8861,7 +9062,7 @@ function TIME_DELAY() {
/* autogenerated from "macros/Linear/VARIABLE_DELAY.sci" */
function VARIABLE_DELAY() {
VARIABLE_DELAY.prototype.define = function VARIABLE_DELAY() {
- nin = 1;
+ var nin = 1;
this.T = 1;
this.init = 0;
this.N = 1024;
@@ -8873,8 +9074,8 @@ function VARIABLE_DELAY() {
this.model.ipar = new ScilabDouble([this.N]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
- gr_i = [];
+ var exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -8894,10 +9095,10 @@ function VARIABLE_DELAY() {
this.init = parseFloat(arguments[0]["init"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- nin = this.model.in1[1-1];
+ var nin = this.model.in1[1-1];
while (true) {
[ok,this.T,this.init,this.N,exprs] = scicos_getvalue("Set delay parameters",["Max delay","initial input","Buffer size"],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -8905,14 +9106,17 @@ function VARIABLE_DELAY() {
}
if (this.N<2) {
message("Buffer must be larger than 2");
- ok = false;
+ var ok = false;
}
if (this.T<=0) {
message("Delay must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,[[-1],[1]],-1,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,[[-1],[1]],-1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
@@ -8930,8 +9134,8 @@ function VARIABLE_DELAY() {
function CUMSUM() {
CUMSUM.prototype.define = function CUMSUM() {
this.model = scicos_model();
- function_name = "cumsum_m";
- funtyp = 4;
+ var function_name = "cumsum_m";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -8948,8 +9152,8 @@ function CUMSUM() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(0)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -8969,8 +9173,8 @@ function CUMSUM() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -8979,45 +9183,48 @@ function CUMSUM() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
if ((this.typ==1)) {
if ((this.decomptyp==0)) {
- function_name = "cumsum_m";
- out = [-1,-2];
+ var function_name = "cumsum_m";
+ var out = [-1,-2];
} else if ((this.decomptyp==1)) {
- function_name = "cumsum_r";
- out = [-1,1];
+ var function_name = "cumsum_r";
+ var out = [-1,1];
} else if ((this.decomptyp==2)) {
- function_name = "cumsum_c";
- out = [1,-2];
+ var function_name = "cumsum_c";
+ var out = [1,-2];
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 1;
- ot = 1;
+ var it = 1;
+ var ot = 1;
} else if ((this.typ==2)) {
if ((this.decomptyp==0)) {
- function_name = "cumsumz_m";
+ var function_name = "cumsumz_m";
} else if ((this.decomptyp==1)) {
- function_name = "cumsumz_r";
+ var function_name = "cumsumz_r";
} else if ((this.decomptyp==2)) {
- function_name = "cumsumz_c";
+ var function_name = "cumsumz_c";
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 2;
- ot = 2;
+ var it = 2;
+ var ot = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
@@ -9035,8 +9242,8 @@ function CUMSUM() {
function EXTRACT() {
EXTRACT.prototype.define = function EXTRACT() {
this.model = scicos_model();
- function_name = "extract";
- funtyp = 4;
+ var function_name = "extract";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -9053,8 +9260,8 @@ function EXTRACT() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp([1])],[sci2exp([1])]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp([1])],[sci2exp([1])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -9074,8 +9281,8 @@ function EXTRACT() {
this.a = inverse(arguments[0]["a"])
this.b = inverse(arguments[0]["b"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -9088,42 +9295,45 @@ function EXTRACT() {
break;
}
if ((this.typ==1)) {
- function_name = "extract";
- ot = 1;
- it = 1;
+ var function_name = "extract";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "extractz";
- ot = 2;
- it = 2;
+ var function_name = "extractz";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- ma = size(this.a,1);
- mb = size(this.b,1);
+ var ma = size(this.a,1);
+ var mb = size(this.b,1);
if ((ma==0||mb==0)) {
message("empty field");
- ok = false;
+ var ok = false;
}
for (i=1;i<=ma;i+=1) {
if ((this.a[i-1]<=0)) {
message("invalid index");
- ok = false;
+ var ok = false;
}
}
for (j=1;j<=mb;j+=1) {
if ((this.b[j-1]<=0)) {
message("invalid index");
- ok = false;
+ var ok = false;
}
}
this.model.ipar = new ScilabDouble([this.a],[this.b],[ma],[mb]);
- in1 = [this.model.in1,this.model.in2];
- out = [ma,mb];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [ma,mb];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -9139,8 +9349,8 @@ function EXTRACT() {
function EXTTRI() {
EXTTRI.prototype.define = function EXTTRI() {
this.model = scicos_model();
- function_name = "extrilz";
- funtyp = 4;
+ var function_name = "extrilz";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -9157,8 +9367,8 @@ function EXTTRI() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(1)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -9178,8 +9388,8 @@ function EXTTRI() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -9188,42 +9398,45 @@ function EXTTRI() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
if ((this.typ==1)) {
if ((this.decomptyp==1)) {
- function_name = "exttril";
+ var function_name = "exttril";
} else if ((this.decomptyp==2)) {
- function_name = "exttriu";
+ var function_name = "exttriu";
} else if ((this.decomptyp==3)) {
- function_name = "extdiag";
+ var function_name = "extdiag";
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 1;
- ot = 1;
+ var it = 1;
+ var ot = 1;
} else if ((this.typ==2)) {
if ((this.decomptyp==1)) {
- function_name = "exttrilz";
+ var function_name = "exttrilz";
} else if ((this.decomptyp==2)) {
- function_name = "exttriuz";
+ var function_name = "exttriuz";
} else if ((this.decomptyp==3)) {
- function_name = "extdiagz";
+ var function_name = "extdiagz";
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 2;
- ot = 2;
+ var it = 2;
+ var ot = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
@@ -9241,8 +9454,8 @@ function EXTTRI() {
function MATBKSL() {
MATBKSL.prototype.define = function MATBKSL() {
this.model = scicos_model();
- function_name = "mat_bksl";
- funtyp = 4;
+ var function_name = "mat_bksl";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1],[-1]);
this.model.in2 = new ScilabDouble([-2],[-3]);
@@ -9259,8 +9472,8 @@ function MATBKSL() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -9276,8 +9489,8 @@ function MATBKSL() {
MATBKSL.prototype.set = function MATBKSL() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -9288,23 +9501,26 @@ function MATBKSL() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_bksl";
- ot = 1;
- it = [1,1];
+ var function_name = "mat_bksl";
+ var ot = 1;
+ var it = [1,1];
} else if ((this.typ==2)) {
- function_name = "matz_bksl";
- ot = 2;
- it = [2,2];
+ var function_name = "matz_bksl";
+ var ot = 2;
+ var it = [2,2];
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -9320,8 +9536,8 @@ function MATBKSL() {
function MATCATH() {
MATCATH.prototype.define = function MATCATH() {
this.model = scicos_model();
- function_name = "mat_cath";
- funtyp = 4;
+ var function_name = "mat_cath";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1],[-1]);
this.model.in2 = new ScilabDouble([-2],[-3]);
@@ -9338,8 +9554,8 @@ function MATCATH() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(2)];
- gr_i = [];
+ var label = [sci2exp(2)];
+ var gr_i = [];
this.x = standard_define([2,3],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -9357,24 +9573,27 @@ function MATCATH() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")>1) {
- label = "size(evstr("+label[2-1]+"),\'*\')";
+ var label = "size(evstr("+label[2-1]+"),\'*\')";
}
while (true) {
[ok,this.nin,this.lab] = scicos_getvalue("Set MATCATH block parameters",["Number of input"],list("vec",1),label);
if (!ok) {
break;
}
- label = this.lab;
- in1 = [-1*(ones(this.nin,1)),-(transpose([2:this.nin+1]))];
- out = [-1,0];
- it = -1*(ones(this.nin,1));
- ot = -1;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = this.lab;
+ var in1 = [-1*(ones(this.nin,1)),-(transpose([2:this.nin+1]))];
+ var out = [-1,0];
+ var it = -1*(ones(this.nin,1));
+ var ot = -1;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
- funtyp = 4;
+ var funtyp = 4;
this.model.sim = list(new ScilabString(["mat_cath"]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -9389,10 +9608,10 @@ function MATCATH() {
/* autogenerated from "macros/MatrixOp/MATCATV.sci" */
function MATCATV() {
MATCATV.prototype.define = function MATCATV() {
- l1 = [[2],[2]];
+ var l1 = [[2],[2]];
this.model = scicos_model();
- function_name = "mat_catv";
- funtyp = 4;
+ var function_name = "mat_catv";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in2 = new ScilabDouble([-1],[-1]);
this.model.in1 = new ScilabDouble([-2],[-3]);
@@ -9409,8 +9628,8 @@ function MATCATV() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(2)];
- gr_i = [];
+ var label = [sci2exp(2)];
+ var gr_i = [];
this.x = standard_define([2,3],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -9428,24 +9647,27 @@ function MATCATV() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")>1) {
- label = "size(evstr("+label[2-1]+"),\'*\')";
+ var label = "size(evstr("+label[2-1]+"),\'*\')";
}
while (true) {
[ok,this.nin,this.lab] = scicos_getvalue("Set MATCATV block parameters",["Number od inputs"],list("vec",1),label);
if (!ok) {
break;
}
- label = this.lab;
- in1 = [-(transpose([2:this.nin+1])),-ones(this.nin,1)];
- it = -ones(this.nin,1);
- ot = -1;
- out = [0,-1];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = this.lab;
+ var in1 = [-(transpose([2:this.nin+1])),-ones(this.nin,1)];
+ var it = -ones(this.nin,1);
+ var ot = -1;
+ var out = [0,-1];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
- funtyp = 4;
+ var funtyp = 4;
this.model.sim = list(new ScilabString(["mat_catv"]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -9461,8 +9683,8 @@ function MATCATV() {
function MATDET() {
MATDET.prototype.define = function MATDET() {
this.model = scicos_model();
- function_name = "mat_det";
- funtyp = 4;
+ var function_name = "mat_det";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-1]);
@@ -9479,8 +9701,8 @@ function MATDET() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -9496,8 +9718,8 @@ function MATDET() {
MATDET.prototype.set = function MATDET() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -9508,23 +9730,26 @@ function MATDET() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_det";
- ot = 1;
- it = 1;
+ var function_name = "mat_det";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "matz_det";
- ot = 2;
- it = 2;
+ var function_name = "matz_det";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -9540,8 +9765,8 @@ function MATDET() {
function MATDIAG() {
MATDIAG.prototype.define = function MATDIAG() {
this.model = scicos_model();
- function_name = "mat_diag";
- funtyp = 4;
+ var function_name = "mat_diag";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([1]);
@@ -9558,8 +9783,8 @@ function MATDIAG() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -9575,8 +9800,8 @@ function MATDIAG() {
MATDIAG.prototype.set = function MATDIAG() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -9587,23 +9812,26 @@ function MATDIAG() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_diag";
- ot = 1;
- it = 1;
+ var function_name = "mat_diag";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "matz_diag";
- ot = 2;
- it = 2;
+ var function_name = "matz_diag";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -9619,8 +9847,8 @@ function MATDIAG() {
function MATDIV() {
MATDIV.prototype.define = function MATDIV() {
this.model = scicos_model();
- function_name = "mat_div";
- funtyp = 4;
+ var function_name = "mat_div";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1],[-2]);
this.model.in2 = new ScilabDouble([-3],[-3]);
@@ -9637,8 +9865,8 @@ function MATDIV() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -9654,8 +9882,8 @@ function MATDIV() {
MATDIV.prototype.set = function MATDIV() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -9666,23 +9894,26 @@ function MATDIV() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_div";
- ot = 1;
- it = [1,1];
+ var function_name = "mat_div";
+ var ot = 1;
+ var it = [1,1];
} else if ((this.typ==2)) {
- function_name = "matz_div";
- ot = 2;
- it = [2,2];
+ var function_name = "matz_div";
+ var ot = 2;
+ var it = [2,2];
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -9698,8 +9929,8 @@ function MATDIV() {
function MATEIG() {
MATEIG.prototype.define = function MATEIG() {
this.model = scicos_model();
- function_name = "mat_vps";
- funtyp = 4;
+ var function_name = "mat_vps";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-1]);
@@ -9716,8 +9947,8 @@ function MATEIG() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(1)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -9737,8 +9968,8 @@ function MATEIG() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -9747,43 +9978,46 @@ function MATEIG() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
if ((this.typ==1)) {
if ((this.decomptyp==1)) {
- function_name = "mat_vps";
- out = [-1,1];
- ot = 2;
+ var function_name = "mat_vps";
+ var out = [-1,1];
+ var ot = 2;
} else if ((this.decomptyp==2)) {
- function_name = "mat_vpv";
- out = [[-1,-1],[-1,-1]];
- ot = [2,2];
+ var function_name = "mat_vpv";
+ var out = [[-1,-1],[-1,-1]];
+ var ot = [2,2];
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 1;
+ var it = 1;
} else if ((this.typ==2)) {
if ((this.decomptyp==1)) {
- function_name = "matz_vps";
- out = [-1,1];
- ot = 2;
+ var function_name = "matz_vps";
+ var out = [-1,1];
+ var ot = 2;
} else if ((this.decomptyp==2)) {
- function_name = "matz_vpv";
- out = [[-1,-1],[-1,-1]];
- ot = [2,2];
+ var function_name = "matz_vpv";
+ var out = [[-1,-1],[-1,-1]];
+ var ot = [2,2];
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [-1,-1];
- funtyp = 4;
+ var in1 = [-1,-1];
+ var funtyp = 4;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
@@ -9801,8 +10035,8 @@ function MATEIG() {
function MATEXPM() {
MATEXPM.prototype.define = function MATEXPM() {
this.model = scicos_model();
- function_name = "mat_expm";
- funtyp = 4;
+ var function_name = "mat_expm";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-1]);
@@ -9819,8 +10053,8 @@ function MATEXPM() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -9836,8 +10070,8 @@ function MATEXPM() {
MATEXPM.prototype.set = function MATEXPM() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -9848,23 +10082,26 @@ function MATEXPM() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_expm";
- ot = 1;
- it = 1;
+ var function_name = "mat_expm";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "matz_expm";
- ot = 2;
- it = 2;
+ var function_name = "matz_expm";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -9880,8 +10117,8 @@ function MATEXPM() {
function MATINV() {
MATINV.prototype.define = function MATINV() {
this.model = scicos_model();
- function_name = "mat_inv";
- funtyp = 4;
+ var function_name = "mat_inv";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-1]);
@@ -9898,8 +10135,8 @@ function MATINV() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -9915,8 +10152,8 @@ function MATINV() {
MATINV.prototype.set = function MATINV() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -9927,23 +10164,26 @@ function MATINV() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_inv";
- ot = 1;
- it = 1;
+ var function_name = "mat_inv";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "matz_inv";
- ot = 2;
- it = 2;
+ var function_name = "matz_inv";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -9959,8 +10199,8 @@ function MATINV() {
function MATLU() {
MATLU.prototype.define = function MATLU() {
this.model = scicos_model();
- function_name = "mat_lu";
- funtyp = 4;
+ var function_name = "mat_lu";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-1]);
@@ -9977,8 +10217,8 @@ function MATLU() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = sci2exp(1);
- gr_i = [];
+ var label = sci2exp(1);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -9996,8 +10236,8 @@ function MATLU() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -10007,22 +10247,25 @@ function MATLU() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_lu";
- ot = [1,1];
- it = 1;
+ var function_name = "mat_lu";
+ var ot = [1,1];
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "matz_lu";
- ot = [2,2];
- it = 2;
+ var function_name = "matz_lu";
+ var ot = [2,2];
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([this.model.in1,this.model.in2],it),list([this.model.out,this.model.out2],ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list([this.model.in1,this.model.in2],it),list([this.model.out,this.model.out2],ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
- funtyp = 4;
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = this.lab;
this.x.graphics = graphics;
@@ -10037,8 +10280,8 @@ function MATLU() {
function MATMAGPHI() {
MATMAGPHI.prototype.define = function MATMAGPHI() {
this.model = scicos_model();
- function_name = "matz_abs";
- funtyp = 4;
+ var function_name = "matz_abs";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -10055,8 +10298,8 @@ function MATMAGPHI() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -10074,8 +10317,8 @@ function MATMAGPHI() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -10084,26 +10327,29 @@ function MATMAGPHI() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
if ((this.decomptyp==1)) {
- function_name = "matz_abs";
- in1 = [-1,-2];
- it = 2;
- out = [[-1,-2],[-1,-2]];
- ot = [1,1];
+ var function_name = "matz_abs";
+ var in1 = [-1,-2];
+ var it = 2;
+ var out = [[-1,-2],[-1,-2]];
+ var ot = [1,1];
} else if ((this.decomptyp==2)) {
- function_name = "matz_absc";
- in1 = [[-1,-2],[-1,-2]];
- it = [1,1];
- out = [-1,-2];
- ot = 2;
+ var function_name = "matz_absc";
+ var in1 = [[-1,-2],[-1,-2]];
+ var it = [1,1];
+ var out = [-1,-2];
+ var ot = 2;
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- funtyp = 4;
+ var funtyp = 4;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
@@ -10128,8 +10374,8 @@ function MATMUL() {
this.model.out2 = new ScilabDouble([-3]);
this.model.dep_ut = [true,false];
this.model.ipar = new ScilabDouble([1]);
- label = [sci2exp(this.model.ipar)];
- gr_i = [];
+ var label = [sci2exp(this.model.ipar)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -10149,8 +10395,8 @@ function MATMUL() {
this.rule = parseFloat(arguments[0]["rule"])
this.np = parseFloat(arguments[0]["np"])
this.x = arg1;
- graphics = this.x.graphics;
- label = graphics.exprs;
+ var graphics = this.x.graphics;
+ var label = graphics.exprs;
this.model = this.x.model;
if (this.model.ipar==[]) {
this.model.ipar = new ScilabDouble([1]);
@@ -10169,17 +10415,17 @@ function MATMUL() {
this.rule = int(this.rule);
if ((this.dtype<1||this.dtype>8)) {
message("type is not supported");
- ok = false;
+ var ok = false;
}
if ((this.rule<1||this.rule>3)) {
message("Multiplication rule must be only 1,2 or 3");
- ok = false;
+ var ok = false;
}
if ((this.dtype==1||this.dtype==2)) {
this.np = 0;
}
- TABMIN = [[0],[0],[-(2^31)],[-(2^15)],[-(2^7)],[0],[0],[0]];
- TABMAX = [[0],[0],[(2^31)-1],[(2^15)-1],[(2^7)-1],[(2^32)-1],[(2^16)-1],[(2^8)-1]];
+ var TABMIN = [[0],[0],[-(2^31)],[-(2^15)],[-(2^7)],[0],[0],[0]];
+ var TABMAX = [[0],[0],[(2^31)-1],[(2^15)-1],[(2^7)-1],[(2^32)-1],[(2^16)-1],[(2^8)-1]];
if (this.rule==2) {
if (this.np==0) {
this.model.sim = list(new ScilabString(["matmul2_m"]), new ScilabDouble([4]));
@@ -10251,29 +10497,32 @@ function MATMUL() {
}
}
}
- kmin = TABMIN[this.dtype-1];
- kmax = TABMAX[this.dtype-1];
- it = this.dtype*ones(1,2);
- ot = this.dtype;
+ var kmin = TABMIN[this.dtype-1];
+ var kmax = TABMAX[this.dtype-1];
+ var it = this.dtype*ones(1,2);
+ var ot = this.dtype;
if (this.rule==1) {
- in1 = [[-1,-2],[-2,-3]];
- out = [-1,-3];
+ var in1 = [[-1,-2],[-2,-3]];
+ var out = [-1,-3];
} else if (this.rule==2) {
- in1 = [[-1,-2],[-1,-2]];
- out = [-1,-2];
+ var in1 = [[-1,-2],[-1,-2]];
+ var out = [-1,-2];
} else {
- in1 = [[-1,-2],[1,1]];
- out = [-1,-2];
+ var in1 = [[-1,-2],[1,1]];
+ var out = [-1,-2];
}
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
- label = exprs;
+ var label = exprs;
this.model.ipar = new ScilabDouble([this.rule]);
this.model.rpar = new ScilabDouble([kmin],[kmax]);
graphics.exprs = label;
this.x.graphics = graphics;
this.x.model = this.model;
- arg1 = this.x;
+ var arg1 = this.x;
break;
}
}
@@ -10284,8 +10533,8 @@ function MATMUL() {
function MATPINV() {
MATPINV.prototype.define = function MATPINV() {
this.model = scicos_model();
- function_name = "mat_pinv";
- funtyp = 4;
+ var function_name = "mat_pinv";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -10302,8 +10551,8 @@ function MATPINV() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -10319,8 +10568,8 @@ function MATPINV() {
MATPINV.prototype.set = function MATPINV() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -10331,23 +10580,26 @@ function MATPINV() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_pinv";
- ot = 1;
- it = 1;
+ var function_name = "mat_pinv";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "matz_pinv";
- ot = 2;
- it = 2;
+ var function_name = "matz_pinv";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -10363,8 +10615,8 @@ function MATPINV() {
function MATRESH() {
MATRESH.prototype.define = function MATRESH() {
this.model = scicos_model();
- function_name = "mat_reshape";
- funtyp = 4;
+ var function_name = "mat_reshape";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -10381,8 +10633,8 @@ function MATRESH() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp([1,1])],[sci2exp([1,1])]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp([1,1])],[sci2exp([1,1])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -10404,8 +10656,8 @@ function MATRESH() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -10414,48 +10666,51 @@ function MATRESH() {
if (!ok) {
break;
}
- nout = size(this.out);
- nin = size(this.l1);
+ var nout = size(this.out);
+ var nin = size(this.l1);
if (nout==0) {
message("output must have at least one element");
- ok = false;
+ var ok = false;
}
if (nin==0) {
message("input must have at least one element");
- ok = false;
+ var ok = false;
}
if (ok) {
if (((this.out[1-1]>(this.l1[1-1]*this.l1[2-1])))) {
message("the first dimension of the output is too big");
- ok = false;
+ var ok = false;
}
if (((this.out[2-1]>(this.l1[1-1]*this.l1[2-1])))) {
message("the second dimension of the output is too big");
- ok = false;
+ var ok = false;
}
if ((((this.out[2-1]*this.out[1-1])>(this.l1[1-1]*this.l1[2-1])))) {
message("the dimensions of the output are too big");
- ok = false;
+ var ok = false;
}
}
if ((this.typ==1)) {
- function_name = "mat_reshape";
- ot = 1;
- it = 1;
+ var function_name = "mat_reshape";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "matz_reshape";
- ot = 2;
- it = 2;
+ var function_name = "matz_reshape";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
- label = this.lab;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(this.l1,it),list(this.out,ot),[],[]);
+ var label = this.lab;
+ var tmpvar0 = set_io(this.model,graphics,list(this.l1,it),list(this.out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
- funtyp = 4;
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -10472,8 +10727,8 @@ function MATRESH() {
function MATSING() {
MATSING.prototype.define = function MATSING() {
this.model = scicos_model();
- function_name = "mat_sing";
- funtyp = 4;
+ var function_name = "mat_sing";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -10490,8 +10745,8 @@ function MATSING() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(1)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -10511,8 +10766,8 @@ function MATSING() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -10521,46 +10776,49 @@ function MATSING() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
if ((this.typ==1)) {
if ((this.decomptyp==1)) {
- function_name = "mat_sing";
- in1 = [-1,-2];
- out = [-1,1];
- ot = 1;
+ var function_name = "mat_sing";
+ var in1 = [-1,-2];
+ var out = [-1,1];
+ var ot = 1;
} else if ((this.decomptyp==2)) {
- function_name = "mat_svd";
- in1 = [-1,-2];
- out = [[-1,-1],[-1,-2],[-2,-2]];
- ot = [1,1,1];
+ var function_name = "mat_svd";
+ var in1 = [-1,-2];
+ var out = [[-1,-1],[-1,-2],[-2,-2]];
+ var ot = [1,1,1];
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 1;
+ var it = 1;
} else if ((this.typ==2)) {
if ((this.decomptyp==1)) {
- function_name = "matz_sing";
- in1 = [-1,-2];
- out = [-1,1];
- ot = 1;
+ var function_name = "matz_sing";
+ var in1 = [-1,-2];
+ var out = [-1,1];
+ var ot = 1;
} else if ((this.decomptyp==2)) {
- function_name = "matz_svd";
- in1 = [-1,-2];
- out = [[-1,-1],[-1,-2],[-2,-2]];
- ot = [2,1,2];
+ var function_name = "matz_svd";
+ var in1 = [-1,-2];
+ var out = [[-1,-1],[-1,-2],[-2,-2]];
+ var ot = [2,1,2];
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- funtyp = 4;
+ var funtyp = 4;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
@@ -10578,8 +10836,8 @@ function MATSING() {
function MATSUM() {
MATSUM.prototype.define = function MATSUM() {
this.model = scicos_model();
- function_name = "mat_sum";
- funtyp = 4;
+ var function_name = "mat_sum";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -10596,8 +10854,8 @@ function MATSUM() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(0)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -10617,8 +10875,8 @@ function MATSUM() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -10627,47 +10885,50 @@ function MATSUM() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
if ((this.typ==1)) {
if ((this.decomptyp==0)) {
- function_name = "mat_sum";
- out = [1,1];
+ var function_name = "mat_sum";
+ var out = [1,1];
} else if ((this.decomptyp==2)) {
- function_name = "mat_suml";
- out = [-1,1];
+ var function_name = "mat_suml";
+ var out = [-1,1];
} else if ((this.decomptyp==1)) {
- function_name = "mat_sumc";
- out = [1,-2];
+ var function_name = "mat_sumc";
+ var out = [1,-2];
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 1;
- ot = 1;
+ var it = 1;
+ var ot = 1;
} else if ((this.typ==2)) {
if ((this.decomptyp==0)) {
- function_name = "matz_sum";
- out = [1,1];
+ var function_name = "matz_sum";
+ var out = [1,1];
} else if ((this.decomptyp==2)) {
- function_name = "matz_suml";
- out = [-1,1];
+ var function_name = "matz_suml";
+ var out = [-1,1];
} else if ((this.decomptyp==1)) {
- function_name = "matz_sumc";
- out = [1,-2];
+ var function_name = "matz_sumc";
+ var out = [1,-2];
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 2;
- ot = 2;
+ var it = 2;
+ var ot = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var funtyp = 4;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
@@ -10691,8 +10952,8 @@ function MATTRAN() {
this.model.out = new ScilabDouble([-2]);
this.model.out2 = new ScilabDouble([-1]);
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -10710,8 +10971,8 @@ function MATTRAN() {
this.typ = inverse(arguments[0]["typ"])
this.rule = arguments[0]["rule"]
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==1) {
label[2-1] = sci2exp(1);
@@ -10722,27 +10983,30 @@ function MATTRAN() {
break;
}
if ((this.typ==1)) {
- function_name = "mattran_m";
- ot = 1;
- it = 1;
+ var function_name = "mattran_m";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
if (this.rule==1) {
- function_name = "matztran_m";
+ var function_name = "matztran_m";
} else {
- function_name = "mathermit_m";
+ var function_name = "mathermit_m";
}
- ot = 2;
- it = 2;
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -10758,8 +11022,8 @@ function MATTRAN() {
function MATZCONJ() {
MATZCONJ.prototype.define = function MATZCONJ() {
this.model = scicos_model();
- function_name = "matz_conj";
- funtyp = 4;
+ var function_name = "matz_conj";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -10776,8 +11040,8 @@ function MATZCONJ() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [];
- gr_i = [];
+ var label = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -10798,8 +11062,8 @@ function MATZCONJ() {
function MATZREIM() {
MATZREIM.prototype.define = function MATZREIM() {
this.model = scicos_model();
- function_name = "matz_reim";
- funtyp = 4;
+ var function_name = "matz_reim";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -10816,8 +11080,8 @@ function MATZREIM() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = sci2exp(1);
- gr_i = [];
+ var label = sci2exp(1);
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -10835,8 +11099,8 @@ function MATZREIM() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -10845,26 +11109,29 @@ function MATZREIM() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
if ((this.decomptyp==1)) {
- function_name = "matz_reim";
- in1 = [-1,-2];
- it = 2;
- out = [[-1,-2],[-1,-2]];
- ot = [1,1];
+ var function_name = "matz_reim";
+ var in1 = [-1,-2];
+ var it = 2;
+ var out = [[-1,-2],[-1,-2]];
+ var ot = [1,1];
} else if ((this.decomptyp==2)) {
- function_name = "matz_reimc";
- in1 = [[-1,-2],[-1,-2]];
- it = [1,1];
- out = [-1,-2];
- ot = 2;
+ var function_name = "matz_reimc";
+ var in1 = [[-1,-2],[-1,-2]];
+ var it = [1,1];
+ var out = [-1,-2];
+ var ot = 2;
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- funtyp = 4;
+ var funtyp = 4;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
@@ -10882,8 +11149,8 @@ function MATZREIM() {
function RICC() {
RICC.prototype.define = function RICC() {
this.model = scicos_model();
- function_name = "ricc_m";
- funtyp = 4;
+ var function_name = "ricc_m";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1],[-1],[-1]);
this.model.in2 = new ScilabDouble([-1],[-1],[-1]);
@@ -10900,8 +11167,8 @@ function RICC() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(1)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -10919,8 +11186,8 @@ function RICC() {
this.tpe = arguments[0]["tpe"]
this.mod = arguments[0]["mod"]
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -10930,12 +11197,15 @@ function RICC() {
if (!ok) {
break;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- it = [1,1,1];
- ot = 1;
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var it = [1,1,1];
+ var ot = 1;
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
this.model.ipar = new ScilabDouble([this.tpe],[this.mod]);
graphics.exprs = label;
@@ -10952,8 +11222,8 @@ function RICC() {
function ROOTCOEF() {
ROOTCOEF.prototype.define = function ROOTCOEF() {
this.model = scicos_model();
- function_name = "root_coef";
- funtyp = 4;
+ var function_name = "root_coef";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([1]);
@@ -10970,8 +11240,8 @@ function ROOTCOEF() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(1)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -10989,8 +11259,8 @@ function ROOTCOEF() {
this.typ = inverse(arguments[0]["typ"])
this.inp = arguments[0]["inp"]
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -11001,23 +11271,26 @@ function ROOTCOEF() {
break;
}
if ((this.typ==1)) {
- function_name = "root_coef";
- ot = 1;
- it = 1;
+ var function_name = "root_coef";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "rootz_coef";
- ot = 2;
- it = 2;
+ var function_name = "rootz_coef";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.inp,this.model.in2];
- out = [this.inp+1,this.model.out2];
- funtyp = 4;
+ var in1 = [this.inp,this.model.in2];
+ var out = [this.inp+1,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -11041,8 +11314,8 @@ function SQRT() {
this.model.out = new ScilabDouble([-1]);
this.model.out2 = new ScilabDouble([-2]);
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -11058,8 +11331,8 @@ function SQRT() {
SQRT.prototype.set = function SQRT() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.typ,exprs] = scicos_getvalue("Set SQRT Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
@@ -11067,21 +11340,24 @@ function SQRT() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_sqrt";
+ var function_name = "mat_sqrt";
} else if ((this.typ==2)) {
- function_name = "matz_sqrt";
+ var function_name = "matz_sqrt";
} else {
message("type is not supported");
- ok = false;
+ var ok = false;
}
- it = this.typ;
- ot = this.typ;
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var it = this.typ;
+ var ot = this.typ;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -11097,8 +11373,8 @@ function SQRT() {
function SUBMAT() {
SUBMAT.prototype.define = function SUBMAT() {
this.model = scicos_model();
- function_name = "submat";
- funtyp = 4;
+ var function_name = "submat";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -11115,8 +11391,8 @@ function SUBMAT() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(1)],[sci2exp(1)],[sci2exp(1)],[sci2exp(1)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(1)],[sci2exp(1)],[sci2exp(1)],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([2.5,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -11142,8 +11418,8 @@ function SUBMAT() {
this.d = arguments[0]["d"]
this.inp = arguments[0]["inp"]
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==5) {
label[6-1] = sci2exp([1,1]);
@@ -11154,44 +11430,47 @@ function SUBMAT() {
break;
}
if ((this.typ==1)) {
- function_name = "submat";
- ot = 1;
- it = 1;
+ var function_name = "submat";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "submatz";
- ot = 2;
- it = 2;
+ var function_name = "submatz";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if ((this.a<=0)||(this.b<=0)||(this.c<=0)||(this.d<=0)) {
message("invalid index");
- ok = false;
+ var ok = false;
}
if (this.b<this.a) {
message("ending row must be greater than starting row");
- ok = false;
+ var ok = false;
}
if (this.d<this.c) {
message("ending column must be greater than starting column");
- ok = false;
+ var ok = false;
}
if (this.b>this.inp[1-1]) {
message("index of ending row is out of range");
- ok = false;
+ var ok = false;
}
if (this.d>this.inp[2-1]) {
message("index of ending column is out of range");
- ok = false;
+ var ok = false;
}
this.model.ipar = new ScilabDouble([this.a],[this.b],[this.c],[this.d]);
- in1 = [this.inp[1-1],this.inp[2-1]];
- out = [(this.b-this.a)+1,(this.d-this.c)+1];
- funtyp = 4;
- label = exprs;
+ var in1 = [this.inp[1-1],this.inp[2-1]];
+ var out = [(this.b-this.a)+1,(this.d-this.c)+1];
+ var funtyp = 4;
+ var label = exprs;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
@@ -11206,16 +11485,16 @@ function SUBMAT() {
/* autogenerated from "macros/Misc/AUTOMAT.sci" */
function AUTOMAT() {
AUTOMAT.prototype.define = function AUTOMAT() {
- NMode = 2;
+ var NMode = 2;
this.Minitial = 1;
- NX = 1;
+ var NX = 1;
this.X0 = [0.0];
this.XP = [[1],[1]];
- C1 = [2];
- C2 = [1];
- exprs = [[string(NMode)],[string(this.Minitial)],[string(NX)],[sci2exp(this.X0)],[sci2exp(this.XP)],[sci2exp(C1)],[sci2exp(C2)]];
- ipar = [[NMode],[this.Minitial],[NX],[this.XP],[C1],[C2]];
- rpar = [this.X0];
+ var C1 = [2];
+ var C2 = [1];
+ var exprs = [[string(NMode)],[string(this.Minitial)],[string(NX)],[sci2exp(this.X0)],[sci2exp(this.XP)],[sci2exp(C1)],[sci2exp(C2)]];
+ var ipar = [[NMode],[this.Minitial],[NX],[this.XP],[C1],[C2]];
+ var rpar = [this.X0];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["automat"]), new ScilabDouble([10004]));
this.model.in1 = new ScilabDouble([2*NX+1],[2*NX+1]);
@@ -11228,7 +11507,7 @@ function AUTOMAT() {
this.model.dep_ut = [false,true];
this.model.ipar = new ScilabDouble(ipar);
this.model.rpar = rpar;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -11242,50 +11521,52 @@ function AUTOMAT() {
}
AUTOMAT.prototype.set = function AUTOMAT() {
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- ipar = this.model.ipar;
- NMode = ipar[1-1];
- NX = ipar[3-1];
+ var ipar = this.model.ipar;
+ var NMode = ipar[1-1];
+ var NX = ipar[3-1];
while (true) {
- CX = "C1";
- MSG0 = "\'Jump from Mode ";
- MSG2 = ":[..;M_final(Guard=In(";
- MSG3 = ").i);..]\'";
- MSG = MSG0+"1"+MSG2+"1"+MSG3;
- VEC = "\'mat\',[-1,1]";
+ var CX = "C1";
+ var MSG0 = "\'Jump from Mode ";
+ var MSG2 = ":[..;M_final(Guard=In(";
+ var MSG3 = ").i);..]\'";
+ var MSG = MSG0+"1"+MSG2+"1"+MSG3;
+ var VEC = "\'mat\',[-1,1]";
for (i=2;i<=NMode;i+=1) {
- CX = CX+","+"C"+string(i);
- MSG = MSG+";"+MSG0+string(i)+MSG2+string(i)+MSG3;
- VEC = VEC+","+"\'mat\',[-1,1]";
+ var CX = CX+","+"C"+string(i);
+ var MSG = MSG+";"+MSG0+string(i)+MSG2+string(i)+MSG3;
+ var VEC = VEC+","+"\'mat\',[-1,1]";
}
- GTV = "[ok,NMode,Minitial,NX,X0,XP,"+CX+",exprs]=scicos_getvalue(\'Set Finite state machine model\', [\'Number (finite-state) Modes\';\'Initial Mode\';\'Number of continuous-time states\';\'Continuous-time states intial values\';\'Xproperties of continuous-time states in each Mode\';"+MSG+"], list(\'vec\',1,\'vec\',1,\'vec\',1,\'mat\',[-1,-1],\'mat\',[-1,-1],"+VEC+"),exprs)";
+ var GTV = "[ok,NMode,Minitial,NX,X0,XP,"+CX+",exprs]=scicos_getvalue(\'Set Finite state machine model\', [\'Number (finite-state) Modes\';\'Initial Mode\';\'Number of continuous-time states\';\'Continuous-time states intial values\';\'Xproperties of continuous-time states in each Mode\';"+MSG+"], list(\'vec\',1,\'vec\',1,\'vec\',1,\'mat\',[-1,-1],\'mat\',[-1,-1],"+VEC+"),exprs)";
execstr(GTV);
if (!this.ok) {
break;
}
- NMode_old = size(exprs,"*")-5;
- ModifEncore = false;
+ var NMode_old = size(exprs,"*")-5;
+ var ModifEncore = false;
if ((NMode_old>NMode)) {
exprs.slice(NMode+6-1,NMode_old+5) = [];
- ModifEncore = true;
+ var ModifEncore = true;
}
if ((NMode_old<NMode)) {
exprs.slice(NMode_old+6-1,NMode+5) = exprs[NMode_old+4-1];
- ModifEncore = true;
+ var ModifEncore = true;
}
if ((NX!=size(this.X0,"*"))) {
messagebox("the size of intial continuous-time states should be NX="+string(NX),"modal","error");
- ModifEncore = true;
+ var ModifEncore = true;
}
- [rXP,cXP] = size(this.XP);
+ var tmpvar0 = size(this.XP)
+ var rXP = tmpvar0[0]
+ var cXP = tmpvar0[1];
if (cXP!=NX) {
messagebox("Xproperty matrix is not valid: it should have NX="+string(NX)+" columns","modal","error");
- ModifEncore = true;
+ var ModifEncore = true;
} else if (((rXP!=NMode)&&(rXP>1))) {
messagebox("Xproperty matrix is not valid: it should have NMode="+string(NMode)+" or 1 row(s)","modal","error");
- ModifEncore = true;
+ var ModifEncore = true;
} else if ((rXP==1)) {
for (i=1;i<=NMode-1;i+=1) {
this.XP = [[this.XP],[this.XP[1-1].slice()]];
@@ -11293,39 +11574,42 @@ function AUTOMAT() {
}
if ((NMode_old==NMode)&&(!ModifEncore)) {
this.XP = matrix(transpose(this.XP),NMode*NX,1);
- ipar = [[NMode],[this.Minitial],[NX],[this.XP]];
- rpar = matrix(this.X0,NX,1);
- INP = ones(NMode,1);
+ var ipar = [[NMode],[this.Minitial],[NX],[this.XP]];
+ var rpar = matrix(this.X0,NX,1);
+ var INP = ones(NMode,1);
if (NX>0) {
- OUT = [[2],[2*NX]];
+ var OUT = [[2],[2*NX]];
} else {
- OUT = [2];
+ var OUT = [2];
}
- MaxModes = 1;
- nzcross = 0;
+ var MaxModes = 1;
+ var nzcross = 0;
for (i=1;i<=NMode;i+=1) {
- Ci = evstr(exprs[5+i-1]);
- ipar = [[ipar],[Ci]];
+ var Ci = evstr(exprs[5+i-1]);
+ var ipar = [[ipar],[Ci]];
INP[i-1][1-1] = 2*NX+length(Ci);
if ((nzcross<length(Ci))) {
- nzcross = length(Ci);
+ var nzcross = length(Ci);
}
if ((MaxModes<max(Ci))) {
- MaxModes = max(Ci);
- imax = i;
+ var MaxModes = max(Ci);
+ var imax = i;
}
}
if (MaxModes>NMode) {
messagebox([["Number of Modes should be "+string(MaxModes)],["A destination Mode in Mode#"+string(imax)+"\'s targets is invalid!"]],"modal","error");
- ModifEncore = true;
+ var ModifEncore = true;
}
if (MaxModes<NMode) {
messagebox(["There is an unused Mode or the Number of Modes should be "+string(MaxModes)],"modal","error");
- ModifEncore = true;
+ var ModifEncore = true;
}
}
if (!ModifEncore) {
- [this.model,graphics,this.ok] = check_io(this.model,graphics,INP,OUT,[],[1]);
+ var tmpvar1 = check_io(this.model,graphics,INP,OUT,[],[1])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ this.ok = tmpvar1[2];
if (!this.ok) {
break;
}
@@ -11346,7 +11630,7 @@ function AUTOMAT() {
/* autogenerated from "macros/Misc/BACKLASH.sci" */
function BACKLASH() {
BACKLASH.prototype.define = function BACKLASH() {
- exprs = [["0"],["1"],["1"]];
+ var exprs = [["0"],["1"],["1"]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["backlash"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -11355,7 +11639,7 @@ function BACKLASH() {
this.model.nzcross = new ScilabDouble([2]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -11375,10 +11659,10 @@ function BACKLASH() {
this.gap = arguments[0]["gap"]
this.zcr = arguments[0]["zcr"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- rpar = this.model.rpar;
+ var rpar = this.model.rpar;
while (true) {
[ok,this.ini,this.gap,this.zcr,exprs] = scicos_getvalue("Set backlash parameters",["initial output","gap","use zero-crossing (0:no, 1:yes)"],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -11405,15 +11689,15 @@ function BACKLASH() {
/* autogenerated from "macros/Misc/BOUNCE.sci" */
function BOUNCE() {
BOUNCE.prototype.define = function BOUNCE() {
- n = 2;
- k = 1;
- ipar = [];
+ var n = 2;
+ var k = 1;
+ var ipar = [];
for (i=1;i<=n;i+=1) {
for (j=i+1;j<=n;j+=1) {
ipar[k-1] = i;
- k = k+1;
+ var k = k+1;
ipar[k-1] = j;
- k = k+1;
+ var k = k+1;
}
}
this.walls = [[0],[5],[0],[5]];
@@ -11425,8 +11709,8 @@ function BOUNCE() {
this.C = 0;
this.rpar1 = ones(n,1);
this.rpar2 = this.rpar1;
- state = [this.x,this.xd,this.y,this.yd];
- state = transpose(state);
+ var state = [this.x,this.xd,this.y,this.yd];
+ var state = transpose(state);
this.model = scicos_model();
this.model.sim = list(new ScilabString(["bounce_ball"]), new ScilabDouble([4]));
this.model.in1 = [];
@@ -11437,8 +11721,8 @@ function BOUNCE() {
this.model.nzcross = new ScilabDouble([n*(n-1)/2+4*n]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(this.rpar1))],[strcat(sci2exp(this.rpar2))],[strcat(sci2exp(this.walls))],[strcat(sci2exp(this.x))],[strcat(sci2exp(this.xd))],[strcat(sci2exp(this.y))],[strcat(sci2exp(this.yd))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.rpar1))],[strcat(sci2exp(this.rpar2))],[strcat(sci2exp(this.walls))],[strcat(sci2exp(this.x))],[strcat(sci2exp(this.xd))],[strcat(sci2exp(this.y))],[strcat(sci2exp(this.yd))]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -11470,8 +11754,8 @@ function BOUNCE() {
this.g = parseFloat(arguments[0]["g"])
this.C = parseFloat(arguments[0]["C"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")<9) {
exprs[8-1] = "9.81";
@@ -11488,7 +11772,7 @@ function BOUNCE() {
this.yd = this.yd.slice();
this.rpar1 = this.rpar1.slice();
this.rpar2 = this.rpar2.slice();
- n = size(this.xt,"*");
+ var n = size(this.xt,"*");
this.walls = this.walls.slice();
if (this.walls[1-1]>this.walls[2-1]) {
this.walls = this.walls[[2,1]-1];
@@ -11498,30 +11782,33 @@ function BOUNCE() {
}
if (n!=size(this.y,"*")||n!=size(this.rpar1,"*")||n!=size(this.rpar2,"*")||n!=size(this.xd,"*")||n!=size(this.yd,"*")) {
message("All vectors must have equal size");
- ok = false;
+ var ok = false;
} else if (!(min([[this.rpar1],[this.rpar2]])>0)) {
message("Mass and radius must be >0");
- ok = false;
+ var ok = false;
}
if (!ok) {
break;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,[],[n,n],[],[]);
+ var tmpvar0 = check_io(this.model,graphics,[],[n,n],[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
- k = 1;
- ipar = [];
+ var k = 1;
+ var ipar = [];
for (i=1;i<=n;i+=1) {
for (j=i+1;j<=n;j+=1) {
ipar[k-1] = i;
- k = k+1;
+ var k = k+1;
ipar[k-1] = j;
- k = k+1;
+ var k = k+1;
}
}
this.model.rpar = new ScilabDouble([this.rpar1],[this.rpar2],[this.walls],[this.g],[this.C]);
this.model.ipar = ipar;
- state = [this.xt,this.xd,this.y,this.yd];
- state = transpose(state);
+ var state = [this.xt,this.xd,this.y,this.yd];
+ var state = transpose(state);
this.model.state = state.slice();
this.model.nzcross = new ScilabDouble([n*(n-1)/2+4*n]);
graphics.exprs = exprs;
@@ -11550,7 +11837,7 @@ function BOUNCEXY() {
this.model.in2 = new ScilabDouble([1],[1]);
this.model.intyp = new ScilabDouble([1],[1]);
this.model.evtin = new ScilabDouble([1]);
- z = [];
+ var z = [];
for (i=1;i<=size(this.clrs,"*");i+=1) {
z[6*(i-1)+1-1] = 0;
z[6*(i-1)+2-1] = 0;
@@ -11565,8 +11852,8 @@ function BOUNCEXY() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- exprs = [[strcat(sci2exp(this.clrs))],[strcat(sci2exp(this.siz))],[strcat(sci2exp(this.win))],[strcat(sci2exp(1))],[strcat(sci2exp(this.xmin))],[strcat(sci2exp(this.xmax))],[strcat(sci2exp(this.ymin))],[strcat(sci2exp(this.ymax))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.clrs))],[strcat(sci2exp(this.siz))],[strcat(sci2exp(this.win))],[strcat(sci2exp(1))],[strcat(sci2exp(this.xmin))],[strcat(sci2exp(this.xmax))],[strcat(sci2exp(this.ymin))],[strcat(sci2exp(this.ymax))]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -11596,38 +11883,38 @@ function BOUNCEXY() {
this.ymin = parseFloat(arguments[0]["ymin"])
this.ymax = parseFloat(arguments[0]["ymax"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- dstate = this.model.dstate;
+ var dstate = this.model.dstate;
while (true) {
[ok,this.clrs,this.siz,this.win,this.imode,this.xmin,this.xmax,this.ymin,this.ymax,exprs] = scicos_getvalue("Set Scope parameters",["colors","radii","window number (-1 for automatic)","animation mode (0,1)","Xmin","Xmax","Ymin","Ymax"],list("vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.clrs,"*")!=size(this.siz,"*")) {
- mess = [[mess],["colors and radii must have equal size (number of balls)"],[" "]];
- ok = false;
+ var mess = [[mess],["colors and radii must have equal size (number of balls)"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
+ var ok = false;
}
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (this.xmin>=this.xmax) {
- mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
+ var ok = false;
}
if (!ok) {
message(mess);
} else {
- rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
- ipar = [[this.win],[this.imode],[this.clrs.slice()]];
- z = [];
+ var rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ var ipar = [[this.win],[this.imode],[this.clrs.slice()]];
+ var z = [];
for (i=1;i<=size(this.clrs,"*");i+=1) {
z[6*(i-1)+1-1] = 0;
z[6*(i-1)+2-1] = 0;
@@ -11666,8 +11953,8 @@ function BPLATFORM() {
this.model.rpar = new ScilabDouble([this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = string(this.model.rpar);
- gr_i = [];
+ var exprs = string(this.model.rpar);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -11695,32 +11982,32 @@ function BPLATFORM() {
this.ymin = parseFloat(arguments[0]["ymin"])
this.ymax = parseFloat(arguments[0]["ymax"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- dstate = this.model.dstate;
+ var dstate = this.model.dstate;
while (true) {
[ok,this.plen,this.csiz,this.phi,this.xmin,this.xmax,this.ymin,this.ymax,exprs] = scicos_getvalue("Set Scope parameters",["pendulum length","cart size (square side)","slope","Xmin","Xmax","Ymin","Ymax"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (this.plen<=0||this.csiz<=0) {
- mess = [[mess],["Pendulum length and cart size must be positive."],[" "]];
- ok = false;
+ var mess = [[mess],["Pendulum length and cart size must be positive."],[" "]];
+ var ok = false;
}
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (this.xmin>=this.xmax) {
- mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
+ var ok = false;
}
if (!ok) {
message(mess);
} else {
- rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ var rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
this.model.rpar = new ScilabDouble(rpar);
graphics.exprs = exprs;
this.x.graphics = graphics;
@@ -11734,17 +12021,17 @@ function BPLATFORM() {
/* autogenerated from "macros/Misc/CBLOCK.sci" */
function CBLOCK() {
CBLOCK.prototype.define = function CBLOCK() {
- in1 = 1;
- out = 1;
- clkin = [];
- clkout = [];
- x0 = [];
- z0 = [];
- typ = "c";
- auto = [];
+ var in1 = 1;
+ var out = 1;
+ var clkin = [];
+ var clkout = [];
+ var x0 = [];
+ var z0 = [];
+ var typ = "c";
+ var auto = [];
this.rpar = [];
this.ipar = [];
- funam = "toto";
+ var funam = "toto";
this.ng = 0;
this.model = scicos_model();
this.model.sim = list(new ScilabString([" "]), new ScilabDouble([2004]));
@@ -11760,8 +12047,8 @@ function CBLOCK() {
this.model.firing = auto;
this.model.dep_ut = [true,false];
this.model.nzcross = new ScilabDouble([this.ng]);
- label = list(transpose([funam,"n",sci2exp(in1),sci2exp(out),sci2exp(clkin),sci2exp(clkout),sci2exp(x0),sci2exp(0),sci2exp(z0),sci2exp(this.rpar),sci2exp(this.ipar),sci2exp(auto),"y","n"]),[]);
- gr_i = [];
+ var label = list(transpose([funam,"n",sci2exp(in1),sci2exp(out),sci2exp(clkin),sci2exp(clkout),sci2exp(x0),sci2exp(0),sci2exp(z0),sci2exp(this.rpar),sci2exp(this.ipar),sci2exp(auto),"y","n"]),[]);
+ var gr_i = [];
this.x = standard_define([4,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -11805,37 +12092,37 @@ function CBLOCK() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
while (true) {
[ok,this.function_name,this.impli,this.i,this.o,this.ci,this.co,this.xx,this.ng,this.z,this.rpar,this.ipar,this.auto0,this.depu,this.dept,this.lab] = scicos_getvalue("Set C-Block2 block parameters",["simulation function","is block implicit? (y,n)","input ports sizes","output ports sizes","input event ports sizes","output events ports sizes","initial continuous state","number of zero crossing surfaces","initial discrete state","Real parameters vector","Integer parameters vector","initial firing vector (<0 for no firing)","direct feedthrough (y or n)","time dependence (y or n)"],list("str",1,"str",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec","sum(%6)","str",1,"str",1),label[1-1]);
if (!ok) {
break;
}
label[1-1] = this.lab;
- funam = stripblanks(this.function_name);
+ var funam = stripblanks(this.function_name);
this.xx = this.xx.slice();
this.z = this.z.slice();
this.rpar = this.rpar.slice();
this.ipar = int(this.ipar.slice());
- nx = size(this.xx,1);
- nz = size(this.z,1);
+ var nx = size(this.xx,1);
+ var nz = size(this.z,1);
this.i = int(this.i.slice());
this.o = int(this.o.slice());
- nout = size(this.o,1);
+ var nout = size(this.o,1);
this.ci = int(this.ci.slice());
- nevin = size(this.ci,1);
+ var nevin = size(this.ci,1);
this.co = int(this.co.slice());
- nevout = size(this.co,1);
+ var nevout = size(this.co,1);
if (part(this.impli,1)=="y") {
- funtyp = 12004;
+ var funtyp = 12004;
} else {
- funtyp = 2004;
+ var funtyp = 2004;
}
if ([[this.ci],[this.co]]!=[]) {
if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
- ok = false;
+ var ok = false;
}
}
this.depu = stripblanks(this.depu);
@@ -11850,22 +12137,28 @@ function CBLOCK() {
} else {
this.dept = false;
}
- dep_ut = [this.depu,this.dept];
+ var dep_ut = [this.depu,this.dept];
if (funam==" ") {
break;
}
if (this.model.sim[1-1]!=funam||sign(size(this.model.state,"*"))!=sign(nx)||sign(size(this.model.dstate,"*"))!=sign(nz)||this.model.nzcross!=this.ng||sign(size(this.model.evtout,"*"))!=sign(nevout)) {
- tt = [];
+ var tt = [];
}
- tt = label[2-1];
+ var tt = label[2-1];
while (true) {
- [ok,tt,cancel] = CFORTR2(funam,tt);
+ var tmpvar0 = CFORTR2(funam,tt)
+ var ok = tmpvar0[0]
+ var tt = tmpvar0[1]
+ var cancel = tmpvar0[2];
if (!ok) {
if (cancel) {
break;
}
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,this.ci,this.co);
+ var tmpvar1 = check_io(this.model,graphics,this.i,this.o,this.ci,this.co)
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
this.model.sim = list(new ScilabDouble([funam]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([this.i]);
@@ -11897,7 +12190,7 @@ function CBLOCK() {
/* autogenerated from "macros/Misc/CBLOCK4.sci" */
function CBLOCK4() {
CBLOCK4.prototype.define = function CBLOCK4() {
- funam = "toto";
+ var funam = "toto";
this.model = scicos_model();
this.model.sim = list(new ScilabString([" "]), new ScilabDouble([2004]));
this.model.in1 = new ScilabDouble([1]);
@@ -11907,8 +12200,8 @@ function CBLOCK4() {
this.model.out2 = new ScilabDouble([1]);
this.model.outtyp = new ScilabDouble([1]);
this.model.dep_ut = [true,false];
- label = list([[funam],["n"],[sci2exp([this.model.in1,this.model.in2])],[sci2exp(this.model.intyp)],[sci2exp([this.model.out,this.model.out2])],[sci2exp(this.model.outtyp)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.odstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.opar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]],[]);
- gr_i = [];
+ var label = list([[funam],["n"],[sci2exp([this.model.in1,this.model.in2])],[sci2exp(this.model.intyp)],[sci2exp([this.model.out,this.model.out2])],[sci2exp(this.model.outtyp)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.odstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.opar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]],[]);
+ var gr_i = [];
this.x = standard_define([4,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -11962,34 +12255,34 @@ function CBLOCK4() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
while (true) {
[ok,this.function_name,this.impli,this.in1,this.it,this.out,this.ot,this.ci,this.co,this.xx,this.z,this.oz,this.rpar,this.ipar,this.opar,this.nmode,this.nzcr,this.auto0,this.depu,this.dept,this.lab] = scicos_getvalue("Set C-Block4 block parameters",["Simulation function","Is block implicit? (y,n)","Input ports sizes","Input ports type","Output port sizes","Output ports type","Input event ports sizes","Output events ports sizes","Initial continuous state","Initial discrete state","Initial object state","Real parameters vector","Integer parameters vector","Object parameters list","Number of modes","Number of zero crossings","Initial firing vector (<0 for no firing)","Direct feedthrough (y or n)","Time dependence (y or n)"],list("str",1,"str",1,"mat",[-1,2],"vec",-1,"mat",[-1,2],"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"lis",-1,"vec",-1,"vec",-1,"lis",-1,"vec",1,"vec",1,"vec","sum(%8)","str",1,"str",1),label[1-1]);
if (!ok) {
break;
}
label[1-1] = this.lab;
- funam = stripblanks(this.function_name);
+ var funam = stripblanks(this.function_name);
this.xx = this.xx.slice();
this.z = this.z.slice();
this.rpar = this.rpar.slice();
this.ipar = int(this.ipar.slice());
- nx = size(this.xx,1);
- nz = size(this.z,1);
+ var nx = size(this.xx,1);
+ var nz = size(this.z,1);
this.ci = int(this.ci.slice());
- nevin = size(this.ci,1);
+ var nevin = size(this.ci,1);
this.co = int(this.co.slice());
- nevout = size(this.co,1);
+ var nevout = size(this.co,1);
if (part(this.impli,1)=="y") {
- funtyp = 12004;
+ var funtyp = 12004;
} else {
- funtyp = 2004;
+ var funtyp = 2004;
}
if ([[this.ci],[this.co]]!=[]) {
if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
- ok = false;
+ var ok = false;
}
}
if (ok) {
@@ -12005,19 +12298,25 @@ function CBLOCK4() {
} else {
this.dept = false;
}
- dep_ut = [this.depu,this.dept];
+ var dep_ut = [this.depu,this.dept];
if (funam==" ") {
break;
}
if (this.model.sim[1-1]!=funam||sign(size(this.model.state,"*"))!=sign(nx)||sign(size(this.model.dstate,"*"))!=sign(nz)||this.model.nzcross!=this.nzcr||sign(size(this.model.evtout,"*"))!=sign(nevout)) {
- tt = [];
+ var tt = [];
}
- tt = label[2-1];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(this.in1,this.it),list(this.out,this.ot),this.ci,this.co);
+ var tt = label[2-1];
+ var tmpvar0 = set_io(this.model,graphics,list(this.in1,this.it),list(this.out,this.ot),this.ci,this.co)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
while (true) {
- [ok,tt,cancel] = this.CC4[funam-1][tt-1];
+ var tmpvar1 = CC4(funam,tt)
+ var ok = tmpvar1[0]
+ var tt = tmpvar1[1]
+ var cancel = tmpvar1[2];
if (!ok) {
if (cancel) {
break;
@@ -12063,8 +12362,8 @@ function CONSTRAINT2_c() {
this.model.ipar = this.id;
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = list(strcat(sci2exp(this.x0)),strcat(sci2exp(this.xd0)),strcat(sci2exp(this.id)));
- gr_i = [];
+ var exprs = list(strcat(sci2exp(this.x0)),strcat(sci2exp(this.xd0)),strcat(sci2exp(this.id)));
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -12084,33 +12383,33 @@ function CONSTRAINT2_c() {
this.xd0 = inverse(arguments[0]["xd0"])
this.id = inverse(arguments[0]["id"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
- ask_again = false;
+ var ask_again = false;
[ok,this.x0,this.xd0,this.id,exprs] = scicos_getvalue("Set Constraint block parameters",["Initial guess values of states x","Initial guess values of derivative x\'","Id(i)=1: if x\'(i) is present in the feedback, else Id(i)=0"],list("vec",-1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
this.x0 = this.x0.slice();
- N = size(this.x0,"*");
+ var N = size(this.x0,"*");
this.xd0 = this.xd0.slice();
- Nxd = size(this.xd0,"*");
+ var Nxd = size(this.xd0,"*");
this.id = this.id.slice();
- Nid = size(this.id,"*");
+ var Nid = size(this.id,"*");
if ((N!=Nxd)||(N!=Nid)) {
message("incompatible sizes, states, their derivatives, and ID should be the same size ");
- ask_again = true;
+ var ask_again = true;
}
if ((N<=0&&!ask_again)) {
x_message("number of states (constraints) must be > 0 ");
- ask_again = true;
+ var ask_again = true;
}
if ((!ask_again)) {
for (i=1;i<=N;i+=1) {
if (!((this.id[i-1]==0)||(this.id[i-1]==1))) {
- ask_again = true;
+ var ask_again = true;
x_message([["Id(i) must be either"],["0 when x\'(i) is not present in the feedback"],["1: when x\'(i) is present in the feedback"]]);
break;
}
@@ -12145,8 +12444,8 @@ function CONSTRAINT_c() {
this.model.state = new ScilabDouble(this.x0);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = "0";
- gr_i = [];
+ var exprs = "0";
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -12161,8 +12460,8 @@ function CONSTRAINT_c() {
CONSTRAINT_c.prototype.set = function CONSTRAINT_c() {
this.x0 = inverse(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.x0,exprs] = scicos_getvalue("Set solver block parameters","Initial guess values",list("vec",-1),exprs);
@@ -12170,11 +12469,14 @@ function CONSTRAINT_c() {
break;
}
this.x0 = this.x0.slice();
- N = size(this.x0,"*");
+ var N = size(this.x0,"*");
if (N<=0) {
message("number of states (constraints) must be > 0 ");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,N,N,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,N,N,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.state = new ScilabDouble([this.x0],[zeros(N,1)]);
@@ -12195,7 +12497,7 @@ function DEADBAND() {
DEADBAND.prototype.define = function DEADBAND() {
this.minp = -.5;
this.maxp = .5;
- rpar = [[this.maxp],[this.minp]];
+ var rpar = [[this.maxp],[this.minp]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["deadband"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -12205,8 +12507,8 @@ function DEADBAND() {
this.model.rpar = new ScilabDouble(rpar);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.maxp)],[string(this.minp)],[string(this.model.nmode)]];
- gr_i = [];
+ var exprs = [[string(this.maxp)],[string(this.minp)],[string(this.model.nmode)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -12226,8 +12528,8 @@ function DEADBAND() {
this.minp = parseFloat(arguments[0]["minp"])
this.zeroc = arguments[0]["zeroc"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.maxp,this.minp,this.zeroc,exprs] = scicos_getvalue("Set Deadband parameters",["End of dead band","Start of dead band","zero crossing (0:no, 1:yes)"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -12237,7 +12539,7 @@ function DEADBAND() {
if (this.maxp<=this.minp) {
message("Upper limit must be > Lower limit");
} else {
- rpar = [[this.maxp],[this.minp]];
+ var rpar = [[this.maxp],[this.minp]];
this.model.rpar = new ScilabDouble(rpar);
if (this.zeroc!=0) {
this.model.nzcross = new ScilabDouble([2]);
@@ -12261,8 +12563,8 @@ function DEBUG() {
this.model = scicos_model();
this.model.sim = list(new ScilabString(["%debug_scicos"]), new ScilabDouble([99]));
this.model.blocktype = new ScilabString(["d"]);
- exprs = list("","xcos_debug_gui(flag,block);");
- gr_i = [];
+ var exprs = list("","xcos_debug_gui(flag,block);");
+ var gr_i = [];
this.x = standard_define([8,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -12276,16 +12578,17 @@ function DEBUG() {
}
DEBUG.prototype.set = function DEBUG() {
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- textmp = exprs[2-1];
- ok = true;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var textmp = exprs[2-1];
+ var ok = true;
while (1==1) {
- [txt] = this.dialog[[["Enter scilab instructions for debugging."],[" Inputs are block and flag, output is block"]]-1][textmp-1];
+ var tmpvar0 = dialog([["Enter scilab instructions for debugging."],[" Inputs are block and flag, output is block"]],textmp)
+ var txt = tmpvar0[0];
if (txt!=[]) {
- tt = ["block=debug_scicos(block,flag)"];
+ var tt = ["block=debug_scicos(block,flag)"];
if (execstr("deff(tt,txt)","errcatch")==0) {
- warnMode = warning("query");
+ var warnMode = warning("query");
warning("off");
save(this.TMPDIR+"/debug_scicos",this.debug_scicos);
warning(warnMode);
@@ -12298,7 +12601,7 @@ function DEBUG() {
message([["Error in the instructions"],[lasterror()]]);
}
} else {
- ok = false;
+ var ok = false;
break;
}
}
@@ -12325,7 +12628,10 @@ function DEBUG_SCICOS() {
}
DEBUG_SCICOS.prototype.set = function DEBUG_SCICOS() {
arg1.gui = "DEBUG";
- [this.x,y,typ] = DEBUG("set",arg1);
+ var tmpvar0 = DEBUG("set",arg1)
+ this.x = tmpvar0[0]
+ var y = tmpvar0[1]
+ var typ = tmpvar0[2];
return new BasicBlock(this.x);
}
}
@@ -12340,8 +12646,8 @@ function DIFF_f() {
this.model.state = new ScilabDouble(this.x0);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -12359,8 +12665,8 @@ function DIFF_f() {
this.x0 = inverse(arguments[0]["x0"])
this.xd0 = arguments[0]["xd0"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.x0,this.xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",["Initial state","Initial Derivative"],list("vec",1,"vec",1),exprs);
@@ -12391,41 +12697,47 @@ function DSUPER() {
return options;
}
DSUPER.prototype.set = function DSUPER() {
- y = this.needcompile;
- typ = list();
- graphics = arg1.graphics;
+ var y = this.needcompile;
+ var typ = list();
+ var graphics = arg1.graphics;
if ((length(graphics.exprs)==0)) {
warnBlockByUID(arg1.model.label,"Invalid masked block.");
this.x = arg1;
return;
}
- exprs = graphics.exprs[1-1];
- exprs0 = graphics.exprs[2-1][1-1];
- btitre = graphics.exprs[2-1][2-1][1-1];
- bitems = graphics.exprs[2-1][2-1].slice(2-1,$);
+ var exprs = graphics.exprs[1-1];
+ var exprs0 = graphics.exprs[2-1][1-1];
+ var btitre = graphics.exprs[2-1][2-1][1-1];
+ var bitems = graphics.exprs[2-1][2-1].slice(2-1,$);
if (exprs0==[]) {
this.x = arg1;
return;
}
- context = [arg1.model.rpar.props.context];
- [PREVAR_scicos_context,ierr] = script2var(context,PREVAR_scicos_context);
+ var context = [arg1.model.rpar.props.context];
+ var tmpvar0 = script2var(context,PREVAR_scicos_context)
+ var PREVAR_scicos_context = tmpvar0[0]
+ var ierr = tmpvar0[1];
if (ierr!=0) {
this.x = arg1;
return;
}
- tt = "scicos_context."+exprs0[1-1];
+ var tt = "scicos_context."+exprs0[1-1];
for (i=2;i<=size(exprs0,1);i+=1) {
- tt = tt+",scicos_context."+exprs0[i-1];
+ var tt = tt+",scicos_context."+exprs0[i-1];
}
- ss = graphics.exprs[2-1][3-1];
- scicos_context = PREVAR_scicos_context;
+ var ss = graphics.exprs[2-1][3-1];
+ var scicos_context = PREVAR_scicos_context;
execstr("[ok,"+tt+",exprs]=scicos_getvalue(btitre,bitems,ss,exprs)");
if (this.ok) {
this.x = arg1;
- PREVAR_scicos_context = scicos_context;
- sblock = this.x.model.rpar;
- [sblock,%w,needcompile2,this.ok] = do_eval(sblock,list(),scicos_context);
- y = max(2,this.needcompile,needcompile2);
+ var PREVAR_scicos_context = scicos_context;
+ var sblock = this.x.model.rpar;
+ var tmpvar1 = do_eval(sblock,list(),scicos_context)
+ var sblock = tmpvar1[0]
+ %w = tmpvar1[1]
+ var needcompile2 = tmpvar1[2]
+ this.ok = tmpvar1[3];
+ var y = max(2,this.needcompile,needcompile2);
this.x.graphics.exprs[1-1] = exprs;
this.x.model.rpar = sblock;
} else {
@@ -12447,8 +12759,8 @@ function EDGETRIGGER() {
this.model.ipar = new ScilabDouble([sign(this.edge)]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [string(this.edge)];
- gr_i = [];
+ var exprs = [string(this.edge)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -12464,8 +12776,8 @@ function EDGETRIGGER() {
EDGETRIGGER.prototype.set = function EDGETRIGGER() {
this.edge = parseFloat(arguments[0]["edge"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.edge,exprs] = scicos_getvalue("Set edge trigger block parameters",["rising (1), falling (-1), both (0)"],list("vec",1),exprs);
@@ -12484,7 +12796,7 @@ function EDGETRIGGER() {
/* autogenerated from "macros/Misc/EDGE_TRIGGER.sci" */
function EDGE_TRIGGER() {
EDGE_TRIGGER.prototype.define = function EDGE_TRIGGER() {
- scs_m_1 = scicos_diagram();
+ var scs_m_1 = scicos_diagram();
scs_m_1.objs[1-1] = EDGETRIGGER("define");
scs_m_1.objs[2-1] = IFTHEL_f("define");
scs_m_1.objs[3-1] = IN_f("define");
@@ -12492,8 +12804,8 @@ function EDGE_TRIGGER() {
scs_m_1.objs[5-1] = scicos_link();
scs_m_1.objs[6-1] = scicos_link();
scs_m_1.objs[7-1] = scicos_link();
- blk = scs_m_1.objs[1-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[1-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [60,0];
graphics.sz = [60,40];
@@ -12504,8 +12816,8 @@ function EDGE_TRIGGER() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[1-1] = blk;
- blk = scs_m_1.objs[2-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[2-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [160,0];
graphics.sz = [60,40];
@@ -12518,8 +12830,8 @@ function EDGE_TRIGGER() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[2-1] = blk;
- blk = scs_m_1.objs[3-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[3-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [0,10];
graphics.sz = [20,20];
@@ -12529,8 +12841,8 @@ function EDGE_TRIGGER() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[3-1] = blk;
- blk = scs_m_1.objs[4-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[4-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [170,-60];
graphics.sz = [20,20];
@@ -12540,15 +12852,15 @@ function EDGE_TRIGGER() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[4-1] = blk;
- lnk = scs_m_1.objs[5-1];
+ var lnk = scs_m_1.objs[5-1];
lnk.from = [3,1,0];
lnk.to = [1,1,1];
scs_m_1.objs[5-1] = lnk;
- lnk = scs_m_1.objs[6-1];
+ var lnk = scs_m_1.objs[6-1];
lnk.from = [1,1,0];
lnk.to = [2,1,1];
scs_m_1.objs[6-1] = lnk;
- lnk = scs_m_1.objs[7-1];
+ var lnk = scs_m_1.objs[7-1];
lnk.ct = [5,-1];
lnk.from = [2,1,0];
lnk.to = [4,1,1];
@@ -12560,7 +12872,7 @@ function EDGE_TRIGGER() {
this.model.in1 = new ScilabDouble([1]);
this.model.evtout = new ScilabDouble([1]);
this.model.rpar = scs_m_1;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -12574,83 +12886,83 @@ function EDGE_TRIGGER() {
}
EDGE_TRIGGER.prototype.set = function EDGE_TRIGGER() {
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="EDGETRIGGER") {
- ppath = list(i);
+ var ppath = list(i);
break;
}
}
- newpar = list();
- y = 0;
+ var newpar = list();
+ var y = 0;
for (path in ppath) {
- np = size(path,"*");
- spath = list();
+ var np = size(path,"*");
+ var spath = list();
for (k=1;k<=np;k+=1) {
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path[k-1];
}
- xx = arg1[spath-1];
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (diffobjs(this.xxn,xx)) {
this.model = xx.model;
- model_n = this.xxn.model;
+ var model_n = this.xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if ((size(this.model.in1,"*")!=size(model_n.in1,"*"))||(size(this.model.out,"*")!=size(model_n.out,"*"))) {
- needcompile = 4;
+ var needcompile = 4;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = this.xxn;
newpar[size(newpar)+1-1] = path;
- y = max(y,needcompile);
+ var y = max(y,needcompile);
}
}
this.x = arg1;
- typ = newpar;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
/* autogenerated from "macros/Misc/ENDBLK.sci" */
function ENDBLK() {
ENDBLK.prototype.define = function ENDBLK() {
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-159.096,811.104,-121.216,617.984,1323,1008,331,284,630,480,0,7,1.4],Title="ENDBLK",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-159.096,811.104,-121.216,617.984,1323,1008,331,284,630,480,0,7,1.4],Title="ENDBLK",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="END_c",graphics=scicos_graphics(orig=[272.104,249.11733],sz=[40,40],flip=true,theta=0,exprs="1.000E+08",pin=[],pout=[],pein=2,peout=2,gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim=list("scicosexit",4),in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=1,evtout=1,state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="d",firing=1.000e+08,dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_link(xx=[[292.104],[292.104],[261.83733],[261.83733],[292.104],[292.104]],yy=[[243.40305],[234.45067],[234.45067],[305.584],[305.584],[294.83162]],id="drawlink",thick=[0,0],ct=[5,-1],from=[1,1,0],to=[1,1,1]);
this.model = scicos_model(sim="csuper",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=scs_m_1,ipar=[],opar=list(),blocktype="h",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list());
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -12664,79 +12976,79 @@ function ENDBLK() {
}
ENDBLK.prototype.set = function ENDBLK() {
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="END_c") {
- ppath = list(i);
+ var ppath = list(i);
break;
}
}
- newpar = list();
- y = 0;
+ var newpar = list();
+ var y = 0;
for (path in ppath) {
- np = size(path,"*");
- spath = list();
+ var np = size(path,"*");
+ var spath = list();
for (k=1;k<=np;k+=1) {
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path[k-1];
}
- xx = arg1[spath-1];
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (!isequalbitwise(this.xxn,xx)) {
this.model = xx.model;
- model_n = this.xxn.model;
+ var model_n = this.xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)||or(this.model.in2!=model_n.in2)||or(this.model.out2!=model_n.out2)||or(this.model.outtyp!=model_n.outtyp)||or(this.model.intyp!=model_n.intyp)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if ((size(this.model.in1,"*")!=size(model_n.in1,"*"))||(size(this.model.out,"*")!=size(model_n.out,"*"))||(size(this.model.evtin,"*")!=size(model_n.evtin,"*"))) {
- needcompile = 4;
+ var needcompile = 4;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = this.xxn;
newpar[size(newpar)+1-1] = path;
- y = max(y,needcompile);
+ var y = max(y,needcompile);
}
}
this.x = arg1;
- typ = newpar;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
/* autogenerated from "macros/Misc/Extract_Activation.sci" */
function Extract_Activation() {
Extract_Activation.prototype.define = function Extract_Activation() {
- scs_m_1 = scicos_diagram();
+ var scs_m_1 = scicos_diagram();
scs_m_1.objs[1-1] = IFTHEL_f("define");
scs_m_1.objs[2-1] = CLKSOMV_f("define");
scs_m_1.objs[3-1] = IN_f("define");
@@ -12745,8 +13057,8 @@ function Extract_Activation() {
scs_m_1.objs[6-1] = scicos_link();
scs_m_1.objs[7-1] = scicos_link();
scs_m_1.objs[8-1] = scicos_link();
- blk = scs_m_1.objs[1-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[1-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [80,0];
graphics.sz = [60,40];
@@ -12759,8 +13071,8 @@ function Extract_Activation() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[1-1] = blk;
- blk = scs_m_1.objs[2-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[2-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [80,-80];
graphics.sz = [80,40];
@@ -12769,8 +13081,8 @@ function Extract_Activation() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[2-1] = blk;
- blk = scs_m_1.objs[3-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[3-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [0,10];
graphics.sz = [20,20];
@@ -12780,8 +13092,8 @@ function Extract_Activation() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[3-1] = blk;
- blk = scs_m_1.objs[4-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[4-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [110,-140];
graphics.sz = [20,20];
@@ -12791,21 +13103,21 @@ function Extract_Activation() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[4-1] = blk;
- lnk = scs_m_1.objs[5-1];
+ var lnk = scs_m_1.objs[5-1];
lnk.ct = [5,-1];
lnk.from = [1,1,0];
lnk.to = [2,1,1];
scs_m_1.objs[5-1] = lnk;
- lnk = scs_m_1.objs[6-1];
+ var lnk = scs_m_1.objs[6-1];
lnk.ct = [5,-1];
lnk.from = [1,2,0];
lnk.to = [2,2,1];
scs_m_1.objs[6-1] = lnk;
- lnk = scs_m_1.objs[7-1];
+ var lnk = scs_m_1.objs[7-1];
lnk.from = [3,1,0];
lnk.to = [1,1,1];
scs_m_1.objs[7-1] = lnk;
- lnk = scs_m_1.objs[8-1];
+ var lnk = scs_m_1.objs[8-1];
lnk.ct = [5,-1];
lnk.from = [2,1,0];
lnk.to = [4,1,1];
@@ -12817,7 +13129,7 @@ function Extract_Activation() {
this.model.in1 = new ScilabDouble([1]);
this.model.evtout = new ScilabDouble([1]);
this.model.rpar = scs_m_1;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -12837,10 +13149,10 @@ function Extract_Activation() {
/* autogenerated from "macros/Misc/HYSTHERESIS.sci" */
function HYSTHERESIS() {
HYSTHERESIS.prototype.define = function HYSTHERESIS() {
- in1 = 1;
- ipar = [0];
+ var in1 = 1;
+ var ipar = [0];
this.nzz = 2;
- rpar = [[1],[0],[1],[0]];
+ var rpar = [[1],[0],[1],[0]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["hystheresis"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1]);
@@ -12850,8 +13162,8 @@ function HYSTHERESIS() {
this.model.nmode = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(rpar)],[string(sign(this.nzz))]];
- gr_i = [];
+ var exprs = [[string(rpar)],[string(sign(this.nzz))]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -12875,8 +13187,8 @@ function HYSTHERESIS() {
this.out_low = arguments[0]["out_low"]
this.nzz = parseFloat(arguments[0]["nzz"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.high_lim,this.low_lim,this.out_high,this.out_low,this.nzz,exprs] = scicos_getvalue("Set parameters",["switch on at","switch off at","output when on","output when off","use zero crossing: yes (1), no (0)"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
@@ -12905,7 +13217,7 @@ function IMPSPLIT_f() {
IMPSPLIT_f.prototype.define = function IMPSPLIT_f() {
this.model = scicos_model();
this.model.sim = new ScilabString(["limpsplit"]);
- mo = modelica();
+ var mo = modelica();
mo.model = "limpsplit";
mo.inputs = "n";
mo.outputs = [["n"],["n"]];
@@ -12933,8 +13245,8 @@ function IMPSPLIT_f() {
/* autogenerated from "macros/Misc/LOGICAL_OP.sci" */
function LOGICAL_OP() {
LOGICAL_OP.prototype.define = function LOGICAL_OP() {
- in1 = [[-1],[-1]];
- ipar = [0];
+ var in1 = [[-1],[-1]];
+ var ipar = [0];
this.nin = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["logicalop"]), new ScilabDouble([4]));
@@ -12943,8 +13255,8 @@ function LOGICAL_OP() {
this.model.ipar = ipar;
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.nin)],[string(ipar)]];
- gr_i = [];
+ var exprs = [[string(this.nin)],[string(ipar)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -12966,11 +13278,11 @@ function LOGICAL_OP() {
this.Datatype = arguments[0]["Datatype"]
this.tp = parseFloat(arguments[0]["tp"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,1)==2) {
- exprs = [[exprs],[sci2exp(1)],[sci2exp(0)]];
+ var exprs = [[exprs],[sci2exp(1)],[sci2exp(0)]];
}
while (true) {
[ok,this.nin,this.rule,this.Datatype,this.tp,exprs] = scicos_getvalue("Set parameters",["number of inputs","Operator: AND (0), OR (1), NAND (2), NOR (3), XOR (4), NOT (5)","Datatype (1=double 3=int32 ...)","Bitwise Rule(0=No 1=yes)"],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
@@ -12982,16 +13294,16 @@ function LOGICAL_OP() {
this.tp = int(this.tp);
if (this.nin<1) {
message("Number of inputs must be >=1 ");
- ok = false;
+ var ok = false;
} else if ((this.rule<0)||(this.rule>5)) {
message("Incorrect operator "+string(this.rule)+" ; must be 0 to 5.");
- ok = false;
+ var ok = false;
} else if ((this.rule==5)&&(this.nin>1)) {
message("Only one input allowed for NOT operation");
this.nin = 1;
} else if (((this.Datatype==1)&&(this.tp!=0))) {
message("Bitwise Rule is only activated when Data type is integer");
- ok = false;
+ var ok = false;
}
if (ok) {
if ((this.tp!=0)) {
@@ -13015,35 +13327,41 @@ function LOGICAL_OP() {
this.model.sim = list(new ScilabString(["logicalop_ui8"]), new ScilabDouble([4]));
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
this.model.ipar = new ScilabDouble([this.rule],[this.tp]);
}
if (ok) {
- it = this.Datatype*ones(this.nin,1);
- ot = this.Datatype;
- in1 = [-ones(this.nin,1),-2*ones(this.nin,1)];
+ var it = this.Datatype*ones(this.nin,1);
+ var ot = this.Datatype;
+ var in1 = [-ones(this.nin,1),-2*ones(this.nin,1)];
if ((this.rule!=5)&&(this.nin==1)) {
- out = [1,1];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var out = [1,1];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
} else {
- out = [-1,-2];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var out = [-1,-2];
+ var tmpvar1 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
}
}
if (ok) {
if (this.rule==0) {
- label = "AND";
+ var label = "AND";
} else if (this.rule==1) {
- label = "OR";
+ var label = "OR";
} else if (this.rule==2) {
- label = "NAND";
+ var label = "NAND";
} else if (this.rule==3) {
- label = "NOR";
+ var label = "NOR";
} else if (this.rule==4) {
- label = "XOR";
+ var label = "XOR";
} else if (this.rule==5) {
- label = "NOT";
+ var label = "NOT";
}
graphics.exprs = exprs;
graphics.style = ["blockWithLabel;displayedLabel="+label];
@@ -13063,11 +13381,11 @@ function MBLOCK() {
this.intype = ["I"];
this.out = [["y1"],["y2"]];
this.outtype = [["I"],["E"]];
- param = [["R"],["L"]];
- paramv = list(0.1,.0001);
+ var param = [["R"],["L"]];
+ var paramv = list(0.1,.0001);
this.pprop = [[0],[0]];
- nameF = "generic";
- exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in1.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(this.pprop.slice()),nameF,[]);
+ var nameF = "generic";
+ var exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in1.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(this.pprop.slice()),nameF,[]);
this.model = scicos_model();
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
@@ -13075,7 +13393,7 @@ function MBLOCK() {
for (i=1;i<=lstsize(paramv);i+=1) {
this.model.rpar = new ScilabDouble([this.model.rpar],[paramv[i-1].slice()]);
}
- mo = modelica();
+ var mo = modelica();
mo.model = nameF;
mo.parameters = list(param,paramv);
this.model.sim = list(new ScilabString([mo.model]), new ScilabDouble([30004]));
@@ -13084,7 +13402,7 @@ function MBLOCK() {
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"r"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"r"),1)]);
this.model.equations = mo;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
this.x.graphics.in_implicit = this.intype;
this.x.graphics.out_implicit = this.outtype;
@@ -13116,35 +13434,35 @@ function MBLOCK() {
this.lab_1 = arguments[0]["lab_1"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (this.type[exprs-1]==15) {
- paramv = list();
+ var paramv = list();
this.pprop = [];
for (i=1;i<=size(this.model.rpar,"*");i+=1) {
paramv[$+1-1] = string(this.model.rpar[i-1]);
this.pprop[$+1-1] = 0;
}
- exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],exprs[1-1][1-1],exprs[1-1][2-1],exprs[1-1][3-1],exprs[1-1][4-1],exprs[1-1][5-1],paramv,sci2exp(this.pprop.slice()),exprs[1-1][7-1],exprs[2-1]);
+ var exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],exprs[1-1][1-1],exprs[1-1][2-1],exprs[1-1][3-1],exprs[1-1][4-1],exprs[1-1][5-1],paramv,sci2exp(this.pprop.slice()),exprs[1-1][7-1],exprs[2-1]);
}
this.lab_1 = list(exprs.in1,exprs.intype,exprs.out,exprs.outtype,exprs.param,exprs.pprop,exprs.nameF);
- lab_2 = exprs.paramv;
+ var lab_2 = exprs.paramv;
while (true) {
[ok,this.Tin,this.Tintype,this.Tout,this.Touttype,this.Tparam,this.pprop,this.Tfunam,this.lab_1] = scicos_getvalue("Set Modelica generic block parameters",["Input variables: ","Input variables types: ","Output variables: ","Output variables types:","Parameters in Modelica:","Parameters properties: ","Function name: "],list("str",-1,"str",-1,"str",-1,"str",-1,"str",-1,"vec",-1,"str",-1),this.lab_1);
if (!ok) {
break;
}
- ierr = execstr("in=stripblanks(evstr(Tin)); intype=stripblanks(evstr(Tintype)); out=stripblanks(evstr(Tout)); outtype=stripblanks(evstr(Touttype)); param=stripblanks(evstr(Tparam)); funam=stripblanks(Tfunam)","errcatch");
+ var ierr = execstr("in=stripblanks(evstr(Tin)); intype=stripblanks(evstr(Tintype)); out=stripblanks(evstr(Tout)); outtype=stripblanks(evstr(Touttype)); param=stripblanks(evstr(Tparam)); funam=stripblanks(Tfunam)","errcatch");
if (ierr!=0) {
messagebox("Error in evaluation of variables.","modal","error");
- ok = false;
+ var ok = false;
}
if (ok) {
for (i=1;i<=size(this.in1,"*");i+=1) {
- r = false;
- ierr = execstr("r=validvar(in(i))","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(in(i))","errcatch");
if (!r) {
- ok = false;
+ var ok = false;
break;
}
}
@@ -13154,10 +13472,10 @@ function MBLOCK() {
}
if (ok) {
for (i=1;i<=size(this.out,"*");i+=1) {
- r = false;
- ierr = execstr("r=validvar(out(i))","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(out(i))","errcatch");
if (!r) {
- ok = false;
+ var ok = false;
break;
}
}
@@ -13166,12 +13484,12 @@ function MBLOCK() {
}
}
if (ok) {
- param = param.slice();
+ var param = param.slice();
for (i=1;i<=size(param,"*");i+=1) {
- r = false;
- ierr = execstr("r=validvar(param(i))","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(param(i))","errcatch");
if (!r) {
- ok = false;
+ var ok = false;
break;
}
}
@@ -13183,7 +13501,7 @@ function MBLOCK() {
for (i=1;i<=size(this.intype,"*");i+=1) {
if (this.intype[i-1]!="E"&&this.intype[i-1]!="I") {
messagebox("Input type should be \'E\' or \'I\'!","modal","error");
- ok = false;
+ var ok = false;
break;
}
}
@@ -13192,7 +13510,7 @@ function MBLOCK() {
for (i=1;i<=size(this.outtype,"*");i+=1) {
if (this.outtype[i-1]!="E"&&this.outtype[i-1]!="I") {
messagebox("Output type should be \'E\' or \'I\'!","modal","error");
- ok = false;
+ var ok = false;
break;
}
}
@@ -13200,110 +13518,118 @@ function MBLOCK() {
if (ok) {
if (or(size(this.intype)!=size(this.in1))) {
messagebox("Input variables are not well defined!","modal","error");
- ok = false;
+ var ok = false;
}
}
if (ok) {
if (or(size(this.outtype)!=size(this.out))) {
messagebox("Output variables are not well defined!","modal","error");
- ok = false;
+ var ok = false;
}
}
if (ok) {
this.pprop = this.pprop.slice();
if ((size(param,"*")!=size(this.pprop,"*"))) {
messagebox([["There is differences in"],["size of param and size "],["of param properties."]],"modal","error");
- ok = false;
+ var ok = false;
}
}
if (ok) {
if (max(this.pprop)>2||min(this.pprop)<0) {
messagebox([["Parameters properties must be :"],["0 : for simple paramater,"],["1 : for initial state value,"],["2 : for a fixed initial state value."]],"modal","error");
- ok = false;
+ var ok = false;
}
}
if (ok) {
if (this.funam=="") {
messagebox("The filename is not defined!","modal","error");
- ok = false;
+ var ok = false;
}
}
if (ok) {
- [dirF,nameF,extF] = fileparts(this.funam);
+ var tmpvar0 = fileparts(this.funam)
+ var dirF = tmpvar0[0]
+ var nameF = tmpvar0[1]
+ var extF = tmpvar0[2];
if ((extF!=""&&extF!=".mo")||(dirF!=""&&extF!=".mo")) {
messagebox("Filename extention should be \'.mo \' !","modal","error");
- ok = false;
+ var ok = false;
}
}
if (ok) {
- intypex = find(this.intype=="I");
- outtypex = find(this.outtype=="I");
- [this.model,graphics,ok] = set_io(this.model,graphics,list([ones(this.in1),ones(this.in1)],ones(this.in1)),list([ones(this.out),ones(this.out)],ones(this.out)),[],[],intypex,outtypex);
+ var intypex = find(this.intype=="I");
+ var outtypex = find(this.outtype=="I");
+ var tmpvar1 = set_io(this.model,graphics,list([ones(this.in1),ones(this.in1)],ones(this.in1)),list([ones(this.out),ones(this.out)],ones(this.out)),[],[],intypex,outtypex)
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
}
if (ok) {
- Tparam_lab = evstr(this.Tparam);
- Tparam_sz = size(Tparam_lab,"*");
+ var Tparam_lab = evstr(this.Tparam);
+ var Tparam_sz = size(Tparam_lab,"*");
if (Tparam_sz>lstsize(lab_2)) {
for (i=1;i<=(Tparam_sz-lstsize(lab_2));i+=1) {
lab_2[$+1-1] = "0";
}
} else if (Tparam_sz<lstsize(lab_2)) {
- lab_2_tmp = list();
+ var lab_2_tmp = list();
if (Tparam_sz!=0) {
for (i=1;i<=(lstsize(lab_2)-Tparam_sz);i+=1) {
lab_2_tmp[i-1] = lab_2[i-1];
}
}
- lab_2 = lab_2_tmp;
+ var lab_2 = lab_2_tmp;
}
if (Tparam_sz!=0) {
- lhs_txt = "";
- lab_txt = "";
- rhs_txt = "";
+ var lhs_txt = "";
+ var lab_txt = "";
+ var rhs_txt = "";
for (i=1;i<=Tparam_sz;i+=1) {
- lhs_txt = lhs_txt+"%v"+string(i)+",";
+ var lhs_txt = lhs_txt+"%v"+string(i)+",";
if (this.pprop[i-1]==0) {
- lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+"\';";
+ var lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+"\';";
} else if (this.pprop[i-1]==1) {
- lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (state) \';";
+ var lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (state) \';";
} else if (this.pprop[i-1]==2) {
- lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (fixed state) \';";
+ var lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (fixed state) \';";
}
- rhs_txt = rhs_txt+"\'vec\',-1,";
+ var rhs_txt = rhs_txt+"\'vec\',-1,";
}
- lhs_txt = part(lhs_txt,1,length(lhs_txt)-1);
- lab_txt = part(lab_txt,1,length(lab_txt)-1);
- rhs_txt = part(rhs_txt,1,length(rhs_txt)-1);
- getvalue_txt = "[ok,"+lhs_txt+",lab_2]=scicos_getvalue(\'Set parameters values\',["+lab_txt+"],"+"list("+rhs_txt+"),lab_2)";
+ var lhs_txt = part(lhs_txt,1,length(lhs_txt)-1);
+ var lab_txt = part(lab_txt,1,length(lab_txt)-1);
+ var rhs_txt = part(rhs_txt,1,length(rhs_txt)-1);
+ var getvalue_txt = "[ok,"+lhs_txt+",lab_2]=scicos_getvalue(\'Set parameters values\',["+lab_txt+"],"+"list("+rhs_txt+"),lab_2)";
execstr(getvalue_txt);
if (!ok) {
- lab_2 = exprs.paramv;
+ var lab_2 = exprs.paramv;
}
}
}
if (ok) {
- paramv = list();
+ var paramv = list();
for (i=1;i<=Tparam_sz;i+=1) {
execstr("paramv("+string(i)+")=%v"+string(i));
}
}
if (ok) {
if (extF==".mo"&&fileinfo(this.funam)!=[]) {
- tt = mgetl(this.funam);
+ var tt = mgetl(this.funam);
} else {
- tt = exprs.funtxt;
- mo = this.model.equations;
+ var tt = exprs.funtxt;
+ var mo = this.model.equations;
if (mo.model!=nameF) {
- tt = [];
+ var tt = [];
}
}
- [ok,tt] = MODCOM(this.funam,tt,this.in1,this.out,param,paramv,this.pprop);
+ var tmpvar2 = MODCOM(this.funam,tt,this.in1,this.out,param,paramv,this.pprop)
+ var ok = tmpvar2[0]
+ var tt = tmpvar2[1];
if (!ok) {
break;
}
}
if (ok) {
- mo = modelica();
+ var mo = modelica();
mo.model = nameF;
mo.inputs = this.in1;
mo.outputs = this.out;
@@ -13353,9 +13679,9 @@ function MBLOCK() {
/* autogenerated from "macros/Misc/MEMORY_f.sci" */
function MEMORY_f() {
MEMORY_f.prototype.define = function MEMORY_f() {
- z = 0;
- in1 = 1;
- exprs = [[string(z)],[string(1)]];
+ var z = 0;
+ var in1 = 1;
+ var exprs = [[string(z)],[string(1)]];
this.model = scicos_model();
this.model.sim = new ScilabString(["memo"]);
this.model.in1 = new ScilabDouble([in1]);
@@ -13365,7 +13691,7 @@ function MEMORY_f() {
this.model.rpar = new ScilabDouble([z]);
this.model.blocktype = new ScilabString(["m"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -13383,8 +13709,8 @@ function MEMORY_f() {
this.a = arguments[0]["a"]
this.inh = parseFloat(arguments[0]["inh"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.a,this.inh,exprs] = scicos_getvalue("Set memory block parameters",["initial condition","Inherit (1: no, 0: yes)"],list("vec",-1,"vec",1),exprs);
@@ -13396,13 +13722,16 @@ function MEMORY_f() {
} else {
this.inh = 1;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,-1,-1,this.inh,[]);
- out = size(this.a,"*");
+ var tmpvar0 = check_io(this.model,graphics,-1,-1,this.inh,[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
+ var out = size(this.a,"*");
if (out==0) {
- ok = false;
+ var ok = false;
messagebox("Initial condition empty","modal","error");
}
- in1 = out;
+ var in1 = out;
if (ok) {
graphics.exprs = exprs;
this.model.rpar = new ScilabDouble([this.a]);
@@ -13423,11 +13752,11 @@ function MPBLOCK() {
this.intype = ["I"];
this.out = [["y1"],["y2"]];
this.outtype = [["I"],["I"]];
- param = [];
- paramv = list();
- pprop = [];
- nameF = "myModel";
- exprs = tlist(["MPBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in1.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(pprop.slice()),nameF,[]);
+ var param = [];
+ var paramv = list();
+ var pprop = [];
+ var nameF = "myModel";
+ var exprs = tlist(["MPBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in1.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(pprop.slice()),nameF,[]);
this.model = scicos_model();
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,true];
@@ -13435,7 +13764,7 @@ function MPBLOCK() {
for (i=1;i<=lstsize(paramv);i+=1) {
this.model.rpar = new ScilabDouble([this.model.rpar],[paramv[i-1].slice()]);
}
- mo = modelica();
+ var mo = modelica();
mo.model = nameF;
mo.parameters = list(param,paramv);
this.model.sim = list(new ScilabString([mo.model]), new ScilabDouble([10004]));
@@ -13444,7 +13773,7 @@ function MPBLOCK() {
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"r"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"r"),1)]);
this.model.equations = mo;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
this.x.graphics.in_implicit = this.intype;
this.x.graphics.out_implicit = this.outtype;
@@ -13461,35 +13790,44 @@ function MPBLOCK() {
MPBLOCK.prototype.set = function MPBLOCK() {
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (this.type[exprs-1]==15) {
- paramv = list();
- pprop = [];
+ var paramv = list();
+ var pprop = [];
for (i=1;i<=size(this.model.rpar,"*");i+=1) {
paramv[$+1-1] = string(this.model.rpar[i-1]);
pprop[$+1-1] = 0;
}
- exprs = tlist(["MPBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],exprs[1-1][1-1],exprs[1-1][2-1],exprs[1-1][3-1],exprs[1-1][4-1],exprs[1-1][5-1],paramv,sci2exp(pprop.slice()),exprs[1-1][7-1],exprs[2-1]);
+ var exprs = tlist(["MPBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],exprs[1-1][1-1],exprs[1-1][2-1],exprs[1-1][3-1],exprs[1-1][4-1],exprs[1-1][5-1],paramv,sci2exp(pprop.slice()),exprs[1-1][7-1],exprs[2-1]);
}
- lab_1 = list(exprs.in1,exprs.intype,exprs.out,exprs.outtype,exprs.param,exprs.pprop,exprs.nameF);
- lab_2 = exprs.paramv;
+ var lab_1 = list(exprs.in1,exprs.intype,exprs.out,exprs.outtype,exprs.param,exprs.pprop,exprs.nameF);
+ var lab_2 = exprs.paramv;
while (true) {
- [ok,Tin,Tintype,Tout,Touttype,Tparam,pprop,Tfunam,lab_1] = getvalue("Set Modelica generic block parameters",[["Input variables: "],["Input variables types: "],["Output variables: "],["Output variables types:"],["Parameters in Modelica:"],["Parameters properties: "],["Model name in packages:"]],list("str",-1,"str",-1,"str",-1,"str",-1,"str",-1,"vec",-1,"str",-1),lab_1);
+ var tmpvar0 = getvalue("Set Modelica generic block parameters",[["Input variables: "],["Input variables types: "],["Output variables: "],["Output variables types:"],["Parameters in Modelica:"],["Parameters properties: "],["Model name in packages:"]],list("str",-1,"str",-1,"str",-1,"str",-1,"str",-1,"vec",-1,"str",-1),lab_1)
+ var ok = tmpvar0[0]
+ var Tin = tmpvar0[1]
+ var Tintype = tmpvar0[2]
+ var Tout = tmpvar0[3]
+ var Touttype = tmpvar0[4]
+ var Tparam = tmpvar0[5]
+ var pprop = tmpvar0[6]
+ var Tfunam = tmpvar0[7]
+ var lab_1 = tmpvar0[8];
if (!ok) {
break;
}
- ierr = execstr("in=stripblanks(evstr(Tin)); intype=stripblanks(evstr(Tintype)); out=stripblanks(evstr(Tout)); outtype=stripblanks(evstr(Touttype)); param=stripblanks(evstr(Tparam)); funam=stripblanks(Tfunam)","errcatch");
+ var ierr = execstr("in=stripblanks(evstr(Tin)); intype=stripblanks(evstr(Tintype)); out=stripblanks(evstr(Tout)); outtype=stripblanks(evstr(Touttype)); param=stripblanks(evstr(Tparam)); funam=stripblanks(Tfunam)","errcatch");
if (ierr!=0) {
x_message("Error in evaluation of variables.");
- ok = false;
+ var ok = false;
}
if (ok) {
for (i=1;i<=size(this.in1,"*");i+=1) {
- r = false;
- ierr = execstr("r=validvar(in(i))","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(in(i))","errcatch");
if (!r) {
- ok = false;
+ var ok = false;
break;
}
}
@@ -13499,10 +13837,10 @@ function MPBLOCK() {
}
if (ok) {
for (i=1;i<=size(this.out,"*");i+=1) {
- r = false;
- ierr = execstr("r=validvar(out(i))","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(out(i))","errcatch");
if (!r) {
- ok = false;
+ var ok = false;
break;
}
}
@@ -13511,12 +13849,12 @@ function MPBLOCK() {
}
}
if (ok) {
- param = param.slice();
+ var param = param.slice();
for (i=1;i<=size(param,"*");i+=1) {
- r = false;
- ierr = execstr("r=validvar(param(i))","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(param(i))","errcatch");
if (!r) {
- ok = false;
+ var ok = false;
break;
}
}
@@ -13528,7 +13866,7 @@ function MPBLOCK() {
for (i=1;i<=size(this.intype,"*");i+=1) {
if (this.intype[i-1]!="E"&&this.intype[i-1]!="I") {
x_message("Input type should be \'E\' or \'I\'!");
- ok = false;
+ var ok = false;
break;
}
}
@@ -13537,7 +13875,7 @@ function MPBLOCK() {
for (i=1;i<=size(this.outtype,"*");i+=1) {
if (this.outtype[i-1]!="E"&&this.outtype[i-1]!="I") {
x_message("Output type should be \'E\' or \'I\'!");
- ok = false;
+ var ok = false;
break;
}
}
@@ -13545,100 +13883,106 @@ function MPBLOCK() {
if (ok) {
if (or(size(this.intype)!=size(this.in1))) {
x_message("Input variables are not well defined!");
- ok = false;
+ var ok = false;
}
}
if (ok) {
if (or(size(this.outtype)!=size(this.out))) {
x_message("Output variables are not well defined!");
- ok = false;
+ var ok = false;
}
}
if (ok) {
- pprop = pprop.slice();
+ var pprop = pprop.slice();
if ((size(param,"*")!=size(pprop,"*"))) {
x_message([["There is differences in"],["size of param and size "],["of param properties."]]);
- ok = false;
+ var ok = false;
}
}
if (ok) {
if (max(pprop)>2||min(pprop)<0) {
x_message([["Parameters properties must be :"],["0 : if it is a paramaters"],["1 : if it is an initial value of state,"],["2 : it it is a fixed initial state value."]]);
- ok = false;
+ var ok = false;
}
}
if (ok) {
if (this.funam=="") {
x_message("The model name is not defined!");
- ok = false;
+ var ok = false;
}
}
if (ok) {
- [dirF,nameF,extF] = fileparts(this.funam);
+ var tmpvar1 = fileparts(this.funam)
+ var dirF = tmpvar1[0]
+ var nameF = tmpvar1[1]
+ var extF = tmpvar1[2];
if ((extF!="")||(dirF!="")) {
x_message("Invalid model name!");
- ok = false;
+ var ok = false;
}
}
if (ok) {
- intypex = find(this.intype=="I");
- outtypex = find(this.outtype=="I");
- [this.model,graphics,ok] = set_io(this.model,graphics,list([ones(this.in1),ones(this.in1)],ones(this.in1)),list([ones(this.out),ones(this.out)],ones(this.out)),[],[],intypex,outtypex);
+ var intypex = find(this.intype=="I");
+ var outtypex = find(this.outtype=="I");
+ var tmpvar2 = set_io(this.model,graphics,list([ones(this.in1),ones(this.in1)],ones(this.in1)),list([ones(this.out),ones(this.out)],ones(this.out)),[],[],intypex,outtypex)
+ this.model = tmpvar2[0]
+ var graphics = tmpvar2[1]
+ var ok = tmpvar2[2];
}
if (ok) {
- Tparam_lab = evstr(Tparam);
- Tparam_sz = size(Tparam_lab,"*");
+ var Tparam_lab = evstr(Tparam);
+ var Tparam_sz = size(Tparam_lab,"*");
if (Tparam_sz>lstsize(lab_2)) {
for (i=1;i<=(Tparam_sz-lstsize(lab_2));i+=1) {
lab_2[$+1-1] = "0";
}
} else if (Tparam_sz<lstsize(lab_2)) {
- lab_2_tmp = list();
+ var lab_2_tmp = list();
if (Tparam_sz!=0) {
for (i=1;i<=Tparam_sz;i+=1) {
- ee = evstr(exprs.param);
+ var ee = evstr(exprs.param);
for (j=1;j<=size(ee,"r");j+=1) {
if (ee[j-1]==Tparam_lab[i-1]) {
lab_2_tmp[i-1] = lab_2[j-1];
}
}
}
- lab_2 = lab_2_tmp;
+ var lab_2 = lab_2_tmp;
}
}
if (Tparam_sz!=0) {
- lhs_txt = "";
- lab_txt = "";
- rhs_txt = "";
+ var lhs_txt = "";
+ var lab_txt = "";
+ var rhs_txt = "";
for (i=1;i<=Tparam_sz;i+=1) {
- lhs_txt = lhs_txt+"%v"+string(i)+",";
+ var lhs_txt = lhs_txt+"%v"+string(i)+",";
if (pprop[i-1]==0) {
- lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+"\';";
+ var lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+"\';";
} else if (pprop[i-1]==1) {
- lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (state) \';";
+ var lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (state) \';";
} else if (pprop[i-1]==2) {
- lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (fixed state) \';";
+ var lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (fixed state) \';";
}
- rhs_txt = rhs_txt+"\'vec\',-1,";
+ var rhs_txt = rhs_txt+"\'vec\',-1,";
}
- lhs_txt = part(lhs_txt,1,length(lhs_txt)-1);
- lab_txt = part(lab_txt,1,length(lab_txt)-1);
- rhs_txt = part(rhs_txt,1,length(rhs_txt)-1);
- getvalue_txt = "[ok,"+lhs_txt+",lab_2]=scicos_getvalue(\'Set parameters values\',["+lab_txt+"],"+"list("+rhs_txt+"),lab_2)";
+ var lhs_txt = part(lhs_txt,1,length(lhs_txt)-1);
+ var lab_txt = part(lab_txt,1,length(lab_txt)-1);
+ var rhs_txt = part(rhs_txt,1,length(rhs_txt)-1);
+ var getvalue_txt = "[ok,"+lhs_txt+",lab_2]=scicos_getvalue(\'Set parameters values\',["+lab_txt+"],"+"list("+rhs_txt+"),lab_2)";
execstr(getvalue_txt);
if (!ok) {
- lab_2 = exprs.paramv;
+ var lab_2 = exprs.paramv;
}
}
}
if (ok) {
- paramv = list();
+ var paramv = list();
for (i=1;i<=Tparam_sz;i+=1) {
execstr("paramv("+string(i)+")=%v"+string(i));
}
}
if (ok) {
- mo = modelica();
+ var mo = modelica();
mo.model = nameF;
mo.inputs = this.in1;
mo.outputs = this.out;
@@ -13690,7 +14034,7 @@ function MPBLOCK() {
/* autogenerated from "macros/Misc/PAL_f.sci" */
function PAL_f() {
PAL_f.prototype.define = function PAL_f() {
- scs = scicos_diagram();
+ var scs = scicos_diagram();
scs.props.title = "Palette";
this.model = scicos_model();
this.model.sim = new ScilabString(["palette"]);
@@ -13699,7 +14043,7 @@ function PAL_f() {
this.model.rpar = new ScilabDouble([scs]);
this.model.blocktype = new ScilabString(["h"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
this.x.graphics.id = scs.props.title[1-1];
return new BasicBlock(this.x);
@@ -13713,12 +14057,16 @@ function PAL_f() {
return options;
}
PAL_f.prototype.set = function PAL_f() {
- [this.x,newparameters,needcompile,edited] = scicos(arg1.model.rpar);
+ var tmpvar0 = scicos(arg1.model.rpar)
+ this.x = tmpvar0[0]
+ var newparameters = tmpvar0[1]
+ var needcompile = tmpvar0[2]
+ var edited = tmpvar0[3];
arg1.graphics.id = this.x.props.title[1-1];
arg1.model.rpar = this.x;
this.x = arg1;
- y = [];
- typ = [];
+ var y = [];
+ var typ = [];
%exit = resume(false)
return new BasicBlock(this.x);
}
@@ -13741,8 +14089,8 @@ function PENDULUM_ANIM() {
this.model.rpar = new ScilabDouble([this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = string(this.model.rpar);
- gr_i = [];
+ var exprs = string(this.model.rpar);
+ var gr_i = [];
this.x = standard_define([3,3],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -13770,32 +14118,32 @@ function PENDULUM_ANIM() {
this.ymin = parseFloat(arguments[0]["ymin"])
this.ymax = parseFloat(arguments[0]["ymax"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- dstate = this.model.dstate;
+ var dstate = this.model.dstate;
while (true) {
[ok,this.plen,this.csiz,this.phi,this.xmin,this.xmax,this.ymin,this.ymax,exprs] = scicos_getvalue("Set Scope parameters",["pendulum length","cart size (square side)","slope","Xmin","Xmax","Ymin","Ymax"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (this.plen<=0||this.csiz<=0) {
- mess = [[mess],["Pendulum length and cart size must be positive."],[" "]];
- ok = false;
+ var mess = [[mess],["Pendulum length and cart size must be positive."],[" "]];
+ var ok = false;
}
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (this.xmin>=this.xmax) {
- mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
+ var ok = false;
}
if (!ok) {
message(mess);
} else {
- rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ var rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
this.model.rpar = new ScilabDouble(rpar);
graphics.exprs = exprs;
this.x.graphics = graphics;
@@ -13811,7 +14159,7 @@ function RATELIMITER() {
RATELIMITER.prototype.define = function RATELIMITER() {
this.minp = -1;
this.maxp = 1;
- rpar = [[this.maxp],[this.minp]];
+ var rpar = [[this.maxp],[this.minp]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["ratelimiter"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -13819,8 +14167,8 @@ function RATELIMITER() {
this.model.rpar = new ScilabDouble(rpar);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.maxp)],[string(this.minp)]];
- gr_i = [];
+ var exprs = [[string(this.maxp)],[string(this.minp)]];
+ var gr_i = [];
this.x = standard_define([3.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -13838,8 +14186,8 @@ function RATELIMITER() {
this.maxp = parseFloat(arguments[0]["maxp"])
this.minp = parseFloat(arguments[0]["minp"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.maxp,this.minp,exprs] = scicos_getvalue("Set rate limiter parameters",["max slope","min slope"],list("vec",1,"vec",1),exprs);
@@ -13849,7 +14197,7 @@ function RATELIMITER() {
if (this.maxp<=this.minp||this.maxp<=0||this.minp>=0) {
message("We must have max_slope> 0 > min_slope.");
} else {
- rpar = [[this.maxp],[this.minp]];
+ var rpar = [[this.maxp],[this.minp]];
this.model.rpar = new ScilabDouble(rpar);
graphics.exprs = exprs;
this.x.graphics = graphics;
@@ -13863,8 +14211,8 @@ function RATELIMITER() {
/* autogenerated from "macros/Misc/RELATIONALOP.sci" */
function RELATIONALOP() {
RELATIONALOP.prototype.define = function RELATIONALOP() {
- ipar = [2];
- label = "&lt";
+ var ipar = [2];
+ var label = "&lt";
this.model = scicos_model();
this.model.sim = list(new ScilabString(["relationalop"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1],[1]);
@@ -13872,8 +14220,8 @@ function RELATIONALOP() {
this.model.ipar = ipar;
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(ipar)],[string(0)]];
- gr_i = [];
+ var exprs = [[string(ipar)],[string(0)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.style = ["fontSize=13;fontStyle=1;displayedLabel="+label];
return new BasicBlock(this.x);
@@ -13894,11 +14242,11 @@ function RELATIONALOP() {
this.zcr = parseFloat(arguments[0]["zcr"])
this.Datatype = arguments[0]["Datatype"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,1)==2) {
- exprs = [[exprs],[sci2exp(1)]];
+ var exprs = [[exprs],[sci2exp(1)]];
}
while (true) {
[ok,this.rule,this.zcr,this.Datatype,exprs] = scicos_getvalue("Set parameters",["Operator: == (0), ~= (1), < (2), <= (3), > (4), >= (5)","Use zero crossing (no: 0), (yes: 1)","Datatype (1=double 3=int32 ...)"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -13911,7 +14259,7 @@ function RELATIONALOP() {
}
if ((this.rule<0)||(this.rule>5)) {
message("Incorrect operator "+string(this.rule)+" ; must be 0 to 5.");
- ok = false;
+ var ok = false;
}
if ((this.Datatype==1)) {
this.model.sim = list(new ScilabString(["relational_op"]), new ScilabDouble([4]));
@@ -13929,28 +14277,31 @@ function RELATIONALOP() {
this.model.sim = list(new ScilabString(["relational_op_ui8"]), new ScilabDouble([4]));
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
- it = this.Datatype*ones(1,2);
- ot = this.Datatype;
- in1 = [[-1,-2],[-1,-2]];
- out = [-1,-2];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var it = this.Datatype*ones(1,2);
+ var ot = this.Datatype;
+ var in1 = [[-1,-2],[-1,-2]];
+ var out = [-1,-2];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
if (this.rule==0) {
- label = "==";
+ var label = "==";
} else if (this.rule==1) {
- label = "~=";
+ var label = "~=";
} else if (this.rule==2) {
- label = "&#60;";
+ var label = "&#60;";
} else if (this.rule==3) {
- label = "&#8804;";
+ var label = "&#8804;";
} else if (this.rule==4) {
- label = "&#62;";
+ var label = "&#62;";
} else if (this.rule==5) {
- label = "&#8805;";
+ var label = "&#8805;";
}
graphics.exprs = exprs;
graphics.style = ["fontSize=13;fontStyle=1;displayedLabel="+label];
@@ -13993,12 +14344,12 @@ function SPLIT_f() {
/* autogenerated from "macros/Misc/SUPER_f.sci" */
function SUPER_f() {
SUPER_f.prototype.define = function SUPER_f() {
- scs = scicos_diagram();
+ var scs = scicos_diagram();
scs.props.title = "Super Block";
- in1 = IN_f("define");
+ var in1 = IN_f("define");
in1.graphics.orig = [40,40];
in1.graphics.sz = [20,20];
- out = OUT_f("define");
+ var out = OUT_f("define");
out.graphics.orig = [240,40];
out.graphics.sz = [20,20];
scs.objs[1-1] = in1;
@@ -14010,7 +14361,7 @@ function SUPER_f() {
this.model.rpar = new ScilabDouble([scs]);
this.model.blocktype = new ScilabString(["h"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new SuperBlock(this.x);
}
@@ -14036,8 +14387,8 @@ function TEXT_f() {
this.model.sim = new ScilabString(["text"]);
this.model.rpar = new ScilabString(["Text"]);
this.model.ipar = new ScilabDouble([this.font],[this.siz]);
- exprs = [["Text"],[string(this.font)],[string(this.siz)]];
- graphics = scicos_graphics();
+ var exprs = [["Text"],[string(this.font)],[string(this.siz)]];
+ var graphics = scicos_graphics();
graphics.orig = [0,0];
graphics.sz = [2,1];
graphics.exprs = exprs;
@@ -14060,12 +14411,12 @@ function TEXT_f() {
this.font = parseFloat(arguments[0]["font"])
this.siz = parseFloat(arguments[0]["siz"])
this.x = arg1;
- graphics = arg1.graphics;
- orig = graphics.orig;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var orig = graphics.orig;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==1) {
- exprs = [[exprs],["3"],["1"]];
+ var exprs = [[exprs],["3"],["1"]];
}
while (true) {
[ok,this.txt,this.font,this.siz,exprs] = scicos_getvalue("Set Text block parameters",["Text","Font number","Font size"],list("str",-1,"vec",1,"vec",1),exprs);
@@ -14074,28 +14425,28 @@ function TEXT_f() {
}
if (this.font<=0||this.font>6) {
message("Font number must be greater than 0 and less than 7");
- ok = false;
+ var ok = false;
}
if (this.siz<0) {
message("Font size must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
graphics.exprs = exprs;
- gh_winpal = gca();
- default_font_style = gh_winpal.font_style;
- default_font_size = gh_winpal.font_size;
- default_font_color = gh_winpal.font_color;
+ var gh_winpal = gca();
+ var default_font_style = gh_winpal.font_style;
+ var default_font_size = gh_winpal.font_size;
+ var default_font_color = gh_winpal.font_color;
gh_winpal.font_style = this.font;
gh_winpal.font_size = this.siz;
- r = xstringl(0,0,exprs[1-1],evstr(exprs[2-1]),evstr(exprs[3-1]));
+ var r = xstringl(0,0,exprs[1-1],evstr(exprs[2-1]),evstr(exprs[3-1]));
gh_winpal.font_style = default_font_style;
gh_winpal.font_size = default_font_size;
gh_winpal.font_color = default_font_color;
- sz = r.slice(3-1,4);
+ var sz = r.slice(3-1,4);
graphics.sz = sz;
this.x.graphics = graphics;
- ipar = [[this.font],[this.siz]];
+ var ipar = [[this.font],[this.siz]];
this.model.rpar = new ScilabDouble([this.txt]);
this.model.ipar = new ScilabDouble(ipar);
this.x.model = this.model;
@@ -14108,14 +14459,14 @@ function TEXT_f() {
/* autogenerated from "macros/Misc/c_block.sci" */
function c_block() {
c_block.prototype.define = function c_block() {
- in1 = 1;
- out = 1;
- clkin = [];
- clkout = [];
- x0 = [];
- z0 = [];
- typ = "c";
- auto = [];
+ var in1 = 1;
+ var out = 1;
+ var clkin = [];
+ var clkout = [];
+ var x0 = [];
+ var z0 = [];
+ var typ = "c";
+ var auto = [];
this.rpar = [];
this.funam = "toto";
this.model = scicos_model();
@@ -14131,8 +14482,8 @@ function c_block() {
this.model.blocktype = new ScilabString([typ]);
this.model.firing = auto;
this.model.dep_ut = [true,false];
- label = list([[sci2exp(in1)],[sci2exp(out)],[strcat(sci2exp(this.rpar))],[this.funam]],list([]));
- gr_i = [];
+ var label = list([[sci2exp(in1)],[sci2exp(out)],[strcat(sci2exp(this.rpar))],[this.funam]],list([]));
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -14156,8 +14507,8 @@ function c_block() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
while (true) {
[ok,this.i,this.o,this.rpar,this.funam,this.lab] = scicos_getvalue("Set C_block parameters",["input ports sizes","output port sizes","System parameters vector","function name"],list("vec",-1,"vec",-1,"vec",-1,"str",-1),label[1-1]);
if (!ok) {
@@ -14169,18 +14520,23 @@ function c_block() {
label[1-1] = this.lab;
this.rpar = this.rpar.slice();
this.i = int(this.i.slice());
- ni = size(this.i,1);
+ var ni = size(this.i,1);
this.o = int(this.o.slice());
- no = size(this.o,1);
- tt = label[2-1];
+ var no = size(this.o,1);
+ var tt = label[2-1];
if (this.model.sim[1-1]!=this.funam||size(this.model.in1,"*")!=size(this.i,"*")||size(this.model.out,"*")!=size(this.o,"*")) {
- tt = [];
+ var tt = [];
}
- [ok,tt] = CFORTR(this.funam,tt,this.i,this.o);
+ var tmpvar0 = CFORTR(this.funam,tt,this.i,this.o)
+ var ok = tmpvar0[0]
+ var tt = tmpvar0[1];
if (!ok) {
break;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,[],[]);
+ var tmpvar1 = check_io(this.model,graphics,this.i,this.o,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
this.model.sim[1] = new ScilabString([this.funam]);
this.model.rpar = this.rpar;
@@ -14211,8 +14567,8 @@ function fortran_block() {
this.model.firing = [];
this.model.dep_ut = [true,false];
this.funam = "forty";
- label = list([[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[strcat(sci2exp(this.model.rpar))],[this.funam]],list([]));
- gr_i = [];
+ var label = list([[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[strcat(sci2exp(this.model.rpar))],[this.funam]],list([]));
+ var gr_i = [];
this.x = standard_define([4,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -14236,8 +14592,8 @@ function fortran_block() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
while (true) {
[ok,this.i,this.o,this.rpar,this.funam,this.lab] = scicos_getvalue("Set fortran_block parameters",["input ports sizes","output port sizes","System parameters vector","function name"],list("vec",-1,"vec",-1,"vec",-1,"str",-1),label[1-1]);
if (!ok) {
@@ -14249,18 +14605,23 @@ function fortran_block() {
label[1-1] = this.lab;
this.rpar = this.rpar.slice();
this.i = int(this.i.slice());
- ni = size(this.i,1);
+ var ni = size(this.i,1);
this.o = int(this.o.slice());
- no = size(this.o,1);
- tt = label[2-1];
+ var no = size(this.o,1);
+ var tt = label[2-1];
if (this.model.sim[1-1]!=this.funam||size(this.model.in1,"*")!=size(this.i,"*")||size(this.model.out,"*")!=size(this.o,"*")) {
- tt = [];
+ var tt = [];
}
- [ok,tt] = FORTR(this.funam,tt,this.i,this.o);
+ var tmpvar0 = FORTR(this.funam,tt,this.i,this.o)
+ var ok = tmpvar0[0]
+ var tt = tmpvar0[1];
if (!ok) {
break;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,[],[]);
+ var tmpvar1 = check_io(this.model,graphics,this.i,this.o,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
this.model.sim[1] = new ScilabString([this.funam]);
this.model.rpar = this.rpar;
@@ -14283,8 +14644,8 @@ function func_block() {
this.model.out = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = "v=sin(u);y=u*v";
- gr_i = [];
+ var exprs = "v=sin(u);y=u*v";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -14298,11 +14659,14 @@ function func_block() {
}
func_block.prototype.set = function func_block() {
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.x = arg1;
this.model = this.x.model;
- [ok,mac,exprs] = this.genfunc[exprs-1];
+ var tmpvar0 = genfunc(exprs)
+ var ok = tmpvar0[0]
+ var mac = tmpvar0[1]
+ var exprs = tmpvar0[2];
if (ok) {
this.model.sim = new ScilabDouble([mac]);
graphics.exprs = exprs;
@@ -14330,8 +14694,8 @@ function generic_block() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.firing)],["y"],["n"]];
- gr_i = [];
+ var label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.firing)],["y"],["n"]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -14373,8 +14737,8 @@ function generic_block() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -14383,7 +14747,7 @@ function generic_block() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
this.function_name = stripblanks(this.function_name);
this.xx = this.xx.slice();
this.z = this.z.slice();
@@ -14396,12 +14760,12 @@ function generic_block() {
this.funtyp = int(this.funtyp);
if (this.funtyp<0) {
message("function type cannot be negative");
- ok = false;
+ var ok = false;
}
if ([[this.ci],[this.co]]!=[]) {
if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
- ok = false;
+ var ok = false;
}
}
this.depu = stripblanks(this.depu);
@@ -14416,13 +14780,16 @@ function generic_block() {
} else {
this.dept = false;
}
- dep_ut = [this.depu,this.dept];
+ var dep_ut = [this.depu,this.dept];
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,this.ci,this.co);
+ var tmpvar0 = check_io(this.model,graphics,this.i,this.o,this.ci,this.co)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
if (this.funtyp==3) {
- needcompile = 4;
+ var needcompile = 4;
}
this.model.sim = list(new ScilabDouble([this.function_name]), new ScilabDouble([this.funtyp]));
this.model.state = this.xx;
@@ -14460,8 +14827,8 @@ function generic_block2() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]];
- gr_i = [];
+ var label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -14507,8 +14874,8 @@ function generic_block2() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -14517,7 +14884,7 @@ function generic_block2() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
this.function_name = stripblanks(this.function_name);
this.xx = this.xx.slice();
this.z = this.z.slice();
@@ -14530,12 +14897,12 @@ function generic_block2() {
this.funtyp = int(this.funtyp);
if (this.funtyp<0) {
message("function type cannot be negative");
- ok = false;
+ var ok = false;
}
if ([[this.ci],[this.co]]!=[]) {
if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
- ok = false;
+ var ok = false;
}
}
this.depu = stripblanks(this.depu);
@@ -14550,13 +14917,16 @@ function generic_block2() {
} else {
this.dept = false;
}
- dep_ut = [this.depu,this.dept];
+ var dep_ut = [this.depu,this.dept];
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,this.ci,this.co);
+ var tmpvar0 = check_io(this.model,graphics,this.i,this.o,this.ci,this.co)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
if (this.funtyp==3) {
- needcompile = 4;
+ var needcompile = 4;
}
this.model.sim = list(new ScilabDouble([this.function_name]), new ScilabDouble([this.funtyp]));
this.model.state = this.xx;
@@ -14592,8 +14962,8 @@ function generic_block3() {
this.model.out2 = new ScilabDouble([1]);
this.model.outtyp = new ScilabDouble([1]);
this.model.dep_ut = [true,false];
- label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp([this.model.in1,this.model.in2])],[sci2exp(this.model.intyp)],[sci2exp([this.model.out,this.model.out2]),sci2exp(this.model.outtyp)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.odstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.opar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]];
- gr_i = [];
+ var label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp([this.model.in1,this.model.in2])],[sci2exp(this.model.intyp)],[sci2exp([this.model.out,this.model.out2]),sci2exp(this.model.outtyp)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.odstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.opar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -14647,8 +15017,8 @@ function generic_block3() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -14657,7 +15027,7 @@ function generic_block3() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
this.function_name = stripblanks(this.function_name);
this.xx = this.xx.slice();
this.z = this.z.slice();
@@ -14668,21 +15038,21 @@ function generic_block3() {
this.funtyp = this.funtyp;
if (this.funtyp<0) {
message("function type cannot be negative");
- ok = false;
+ var ok = false;
}
if ([[this.ci],[this.co]]!=[]) {
if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
- ok = false;
+ var ok = false;
}
}
if (this.type[this.opar-1]!=15) {
message("object parameter must be a list");
- ok = false;
+ var ok = false;
}
if (this.type[this.oz-1]!=15) {
message("discrete object state must be a list");
- ok = false;
+ var ok = false;
}
this.depu = stripblanks(this.depu);
if (part(this.depu,1)=="y") {
@@ -14696,13 +15066,16 @@ function generic_block3() {
} else {
this.dept = false;
}
- dep_ut = [this.depu,this.dept];
+ var dep_ut = [this.depu,this.dept];
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(this.in1,this.it),list(this.out,this.ot),this.ci,this.co);
+ var tmpvar0 = set_io(this.model,graphics,list(this.in1,this.it),list(this.out,this.ot),this.ci,this.co)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
if (this.funtyp==3) {
- needcompile = 4;
+ var needcompile = 4;
}
this.model.sim = list(new ScilabDouble([this.function_name]), new ScilabDouble([this.funtyp]));
this.model.state = this.xx;
@@ -14729,14 +15102,14 @@ function generic_block3() {
/* autogenerated from "macros/Misc/scifunc_block.sci" */
function scifunc_block() {
scifunc_block.prototype.define = function scifunc_block() {
- in1 = 1;
- out = 1;
- clkin = [];
- clkout = [];
- x0 = [];
- z0 = [];
- typ = "c";
- auto = [];
+ var in1 = 1;
+ var out = 1;
+ var clkin = [];
+ var clkout = [];
+ var x0 = [];
+ var z0 = [];
+ var typ = "c";
+ var auto = [];
this.rpar = [];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["scifunc"]), new ScilabDouble([3]));
@@ -14752,8 +15125,8 @@ function scifunc_block() {
this.model.blocktype = new ScilabString([typ]);
this.model.firing = auto;
this.model.dep_ut = [true,false];
- exprs = list([[sci2exp(in1)],[sci2exp(out)],[sci2exp(clkin)],[sci2exp(clkout)],[strcat(sci2exp(x0))],[strcat(sci2exp(z0))],[strcat(sci2exp(this.rpar))],[sci2exp(auto)]],list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
- gr_i = [];
+ var exprs = list([[sci2exp(in1)],[sci2exp(out)],[sci2exp(clkin)],[sci2exp(clkout)],[strcat(sci2exp(x0))],[strcat(sci2exp(z0))],[strcat(sci2exp(this.rpar))],[sci2exp(auto)]],list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -14785,11 +15158,11 @@ function scifunc_block() {
this.auto0 = arguments[0]["auto0"]
this.deptime = arguments[0]["deptime"]
this.lab = arguments[0]["lab"]
- needcompile = 0;
+ var needcompile = 0;
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (size(exprs[1-1],"*")==8) {
exprs[1-1][9-1] = "0";
}
@@ -14802,23 +15175,29 @@ function scifunc_block() {
this.xx = this.xx.slice();
this.z = this.z.slice();
this.rpar = this.rpar.slice();
- nrp = prod(size(this.rpar));
+ var nrp = prod(size(this.rpar));
this.i = int(this.i.slice());
- ni = size(this.i,1);
+ var ni = size(this.i,1);
this.o = int(this.o.slice());
- no = size(this.o,1);
+ var no = size(this.o,1);
this.ci = int(this.ci.slice());
- nci = size(this.ci,1);
+ var nci = size(this.ci,1);
this.co = int(this.co.slice());
- nco = size(this.co,1);
- [ok,tt,dep_ut] = genfunc1(exprs[2-1],this.i,this.o,nci,nco,size(this.xx,1),size(this.z,1),nrp,"c");
+ var nco = size(this.co,1);
+ var tmpvar0 = genfunc1(exprs[2-1],this.i,this.o,nci,nco,size(this.xx,1),size(this.z,1),nrp,"c")
+ var ok = tmpvar0[0]
+ var tt = tmpvar0[1]
+ var dep_ut = tmpvar0[2];
dep_ut[2-1] = (1==this.deptime);
if (!ok) {
break;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,this.ci,this.co);
+ var tmpvar1 = check_io(this.model,graphics,this.i,this.o,this.ci,this.co)
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
- auto = this.auto0;
+ var auto = this.auto0;
this.model.state = this.xx;
this.model.dstate = this.z;
this.model.rpar = this.rpar;
@@ -14827,7 +15206,7 @@ function scifunc_block() {
this.model.ipar = new ScilabDouble([0]);
}
if (or(this.model.opar!=tt)) {
- needcompile = 4;
+ var needcompile = 4;
}
this.model.opar = new ScilabDouble([tt]);
this.model.firing = new ScilabDouble([auto]);
@@ -14846,16 +15225,16 @@ function scifunc_block() {
/* autogenerated from "macros/Misc/scifunc_block_m.sci" */
function scifunc_block_m() {
scifunc_block_m.prototype.define = function scifunc_block_m() {
- in1 = 1;
- out = 1;
- clkin = [];
- clkout = [];
- x0 = [];
- z0 = [];
- typ = "c";
- auto = [];
+ var in1 = 1;
+ var out = 1;
+ var clkin = [];
+ var clkout = [];
+ var x0 = [];
+ var z0 = [];
+ var typ = "c";
+ var auto = [];
this.rpar = [];
- it = 1;
+ var it = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["scifunc"]), new ScilabDouble([3]));
this.model.in1 = new ScilabDouble([in1]);
@@ -14874,8 +15253,8 @@ function scifunc_block_m() {
this.model.blocktype = new ScilabString([typ]);
this.model.firing = auto;
this.model.dep_ut = [true,false];
- exprs = list([[sci2exp([in1,in1])],[sci2exp([out,out])],[sci2exp(clkin)],[sci2exp(clkout)],[strcat(sci2exp(x0))],[strcat(sci2exp(z0))],[strcat(sci2exp(this.rpar))],[sci2exp(auto)],[sci2exp(0)]],list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
- gr_i = [];
+ var exprs = list([[sci2exp([in1,in1])],[sci2exp([out,out])],[sci2exp(clkin)],[sci2exp(clkout)],[strcat(sci2exp(x0))],[strcat(sci2exp(z0))],[strcat(sci2exp(this.rpar))],[sci2exp(auto)],[sci2exp(0)]],list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -14907,11 +15286,11 @@ function scifunc_block_m() {
this.auto0 = arguments[0]["auto0"]
this.deptime = arguments[0]["deptime"]
this.lab = arguments[0]["lab"]
- needcompile = 0;
+ var needcompile = 0;
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.i,this.o,this.ci,this.co,this.xx,this.z,this.rpar,this.auto0,this.deptime,this.lab] = scicos_getvalue([["Set scifunc_block parameters"],["only regular blocks supported"]],["input ports sizes","output port sizes","input event ports sizes","output events ports sizes","initial continuous state","initial discrete state","System parameters vector","initial firing vector (<0 for no firing)","is block always active (0:no, 1:yes)"],list("mat",[-1,2],"mat",[-2,2],"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1),exprs[1-1]);
if (!ok) {
@@ -14921,23 +15300,29 @@ function scifunc_block_m() {
this.xx = this.xx.slice();
this.z = this.z.slice();
this.rpar = this.rpar.slice();
- it = ones(1,size(this.i,1));
- ot = ones(1,size(this.o,1));
- nrp = prod(size(this.rpar));
- ni = size(this.i,1);
- no = size(this.o,1);
+ var it = ones(1,size(this.i,1));
+ var ot = ones(1,size(this.o,1));
+ var nrp = prod(size(this.rpar));
+ var ni = size(this.i,1);
+ var no = size(this.o,1);
this.ci = int(this.ci.slice());
- nci = size(this.ci,1);
+ var nci = size(this.ci,1);
this.co = int(this.co.slice());
- nco = size(this.co,1);
- [ok,tt,dep_ut] = genfunc2(exprs[2-1],this.i,this.o,nci,nco,size(this.xx,1),size(this.z,1),nrp,"c");
+ var nco = size(this.co,1);
+ var tmpvar0 = genfunc2(exprs[2-1],this.i,this.o,nci,nco,size(this.xx,1),size(this.z,1),nrp,"c")
+ var ok = tmpvar0[0]
+ var tt = tmpvar0[1]
+ var dep_ut = tmpvar0[2];
dep_ut[2-1] = (1==this.deptime);
if (!ok) {
break;
}
- [this.model,graphics,ok] = set_io(this.model,graphics,list(this.i,it),list(this.o,ot),this.ci,this.co);
+ var tmpvar1 = set_io(this.model,graphics,list(this.i,it),list(this.o,ot),this.ci,this.co)
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
- auto = this.auto0;
+ var auto = this.auto0;
this.model.state = this.xx;
this.model.dstate = this.z;
this.model.rpar = this.rpar;
@@ -14946,7 +15331,7 @@ function scifunc_block_m() {
this.model.ipar = new ScilabDouble([0]);
}
if (or(this.model.opar!=tt)) {
- needcompile = 4;
+ var needcompile = 4;
}
this.model.opar = new ScilabDouble([tt]);
this.model.firing = new ScilabDouble([auto]);
@@ -14971,7 +15356,7 @@ function ABSBLK_f() {
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -14991,7 +15376,7 @@ function ABSBLK_f() {
/* autogenerated from "macros/NonLinear/ABS_VALUE.sci" */
function ABS_VALUE() {
ABS_VALUE.prototype.define = function ABS_VALUE() {
- nu = -1;
+ var nu = -1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["absolute_value"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([nu]);
@@ -15000,8 +15385,8 @@ function ABS_VALUE() {
this.model.nmode = new ScilabDouble([nu]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [string([1])];
- gr_i = [];
+ var exprs = [string([1])];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -15017,8 +15402,8 @@ function ABS_VALUE() {
ABS_VALUE.prototype.set = function ABS_VALUE() {
this.zcr = arguments[0]["zcr"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.zcr,exprs] = scicos_getvalue("Set block parameters",["use zero_crossing (1: yes) (0:no)"],list("vec",1),exprs);
@@ -15045,14 +15430,14 @@ function ABS_VALUE() {
/* autogenerated from "macros/NonLinear/COSBLK_f.sci" */
function COSBLK_f() {
COSBLK_f.prototype.define = function COSBLK_f() {
- in1 = 1;
+ var in1 = 1;
this.model = scicos_model();
this.model.sim = new ScilabString(["cosblk"]);
this.model.in1 = new ScilabDouble([-1]);
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -15089,8 +15474,8 @@ function DLRADAPT_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(this.p)],[sci2exp(this.rn)],[sci2exp(this.rd,0)],[sci2exp(this.g)],[sci2exp(this.last_u)],[sci2exp(this.last_y)]];
- gr_i = [];
+ var exprs = [[sci2exp(this.p)],[sci2exp(this.rn)],[sci2exp(this.rd,0)],[sci2exp(this.g)],[sci2exp(this.last_u)],[sci2exp(this.last_y)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -15116,23 +15501,25 @@ function DLRADAPT_f() {
this.last_u = inverse(arguments[0]["last_u"])
this.last_y = inverse(arguments[0]["last_y"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.p,this.rn,this.rd,this.g,this.last_u,this.last_y,exprs] = scicos_getvalue("Set block parameters",["Vector of p mesh points","Numerator roots (one line for each mesh)","Denominator roots (one line for each mesh)","Vector of gain at mesh points","past inputs (Num degree values)","past outputs (Den degree values)"],list("vec",-1,"mat",[-1,-1],"mat",["size(%1,\'*\')","-1"],"vec","size(%1,\'*\')","vec","size(%2,2)","vec","size(%3,2)"),exprs);
if (!ok) {
break;
}
- m = size(this.rn,2);
- [npt,n] = size(this.rd);
+ var m = size(this.rn,2);
+ var tmpvar0 = size(this.rd)
+ var npt = tmpvar0[0]
+ var n = tmpvar0[1];
if (m>=n) {
message("Transfer must be strictly proper");
} else if (size(this.rn,1)!=0&&size(this.rn,1)!=size(this.p,"*")) {
message("Numerator roots matrix row size\'s is incorrect");
} else {
- rpar = [[this.p.slice()],[real(this.rn.slice())],[imag(this.rn.slice())],[real(this.rd.slice())],[imag(this.rd.slice())],[this.g.slice()]];
- ipar = [[m],[n],[npt]];
+ var rpar = [[this.p.slice()],[real(this.rn.slice())],[imag(this.rn.slice())],[real(this.rd.slice())],[imag(this.rd.slice())],[this.g.slice()]];
+ var ipar = [[m],[n],[npt]];
this.model.dstate = new ScilabDouble([this.last_u.slice()],[this.last_y.slice()]);
this.model.rpar = new ScilabDouble(rpar);
this.model.ipar = new ScilabDouble(ipar);
@@ -15148,7 +15535,7 @@ function DLRADAPT_f() {
/* autogenerated from "macros/NonLinear/EXPBLK_f.sci" */
function EXPBLK_f() {
EXPBLK_f.prototype.define = function EXPBLK_f() {
- in1 = 1;
+ var in1 = 1;
this.a = math.E;
this.model = scicos_model();
this.model.sim = new ScilabString(["expblk"]);
@@ -15157,8 +15544,8 @@ function EXPBLK_f() {
this.model.rpar = new ScilabDouble([this.a]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = ["%e"];
- gr_i = [];
+ var exprs = ["%e"];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -15173,11 +15560,11 @@ function EXPBLK_f() {
EXPBLK_f.prototype.set = function EXPBLK_f() {
this.a = parseFloat(arguments[0]["a"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[2-1];
+ var exprs = exprs[2-1];
}
while (true) {
[ok,this.a,exprs] = scicos_getvalue("Set a^u block parameters","a (>0)",list("vec",1),exprs);
@@ -15200,7 +15587,7 @@ function EXPBLK_f() {
/* autogenerated from "macros/NonLinear/EXPBLK_m.sci" */
function EXPBLK_m() {
EXPBLK_m.prototype.define = function EXPBLK_m() {
- in1 = 1;
+ var in1 = 1;
this.a = math.E;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["expblk_m"]), new ScilabDouble([4]));
@@ -15213,8 +15600,8 @@ function EXPBLK_m() {
this.model.rpar = new ScilabDouble([this.a]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = ["%e"];
- gr_i = [];
+ var exprs = ["%e"];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -15229,11 +15616,11 @@ function EXPBLK_m() {
EXPBLK_m.prototype.set = function EXPBLK_m() {
this.a = parseFloat(arguments[0]["a"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[2-1];
+ var exprs = exprs[2-1];
}
while (true) {
[ok,this.a,exprs] = scicos_getvalue("Set a^u block parameters","a (>0)",list("vec",1),exprs);
@@ -15256,15 +15643,15 @@ function EXPBLK_m() {
/* autogenerated from "macros/NonLinear/FSV_f.sci" */
function FSV_f() {
FSV_f.prototype.define = function FSV_f() {
- in1 = 1;
+ var in1 = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["fsv"]), new ScilabDouble([1]));
this.model.in1 = new ScilabDouble([in1]);
this.model.out = new ScilabDouble([in1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -15295,8 +15682,8 @@ function INTRP2BLK_f() {
this.model.ipar = new ScilabDouble([2],[2]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(sci2exp(this.a))],[strcat(sci2exp(this.b))],[strcat(sci2exp(this.c,0))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.a))],[strcat(sci2exp(this.b))],[strcat(sci2exp(this.c,0))]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -15316,8 +15703,8 @@ function INTRP2BLK_f() {
this.b = inverse(arguments[0]["b"])
this.c = inverse(arguments[0]["c"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.a,this.b,this.c,exprs] = scicos_getvalue("Set Interpolation block parameters",["X coord.","Y coord.","Z values"],list("vec",-1,"vec",-1,"mat",[-1,-1]),exprs);
@@ -15354,8 +15741,8 @@ function INTRPLBLK_f() {
this.model.rpar = new ScilabDouble([this.a],[this.b]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(sci2exp(this.a))],[strcat(sci2exp(this.b))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.a))],[strcat(sci2exp(this.b))]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -15373,8 +15760,8 @@ function INTRPLBLK_f() {
this.a = inverse(arguments[0]["a"])
this.b = inverse(arguments[0]["b"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.a,this.b,exprs] = scicos_getvalue("Set Interpolation block parameters",["X coord.","Y coord."],list("vec",-1,"vec",-1),exprs);
@@ -15401,15 +15788,15 @@ function INTRPLBLK_f() {
/* autogenerated from "macros/NonLinear/INVBLK.sci" */
function INVBLK() {
INVBLK.prototype.define = function INVBLK() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["invblk4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1]);
this.model.out = new ScilabDouble([in1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -15429,15 +15816,15 @@ function INVBLK() {
/* autogenerated from "macros/NonLinear/INVBLK_f.sci" */
function INVBLK_f() {
INVBLK_f.prototype.define = function INVBLK_f() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = new ScilabString(["invblk"]);
this.model.in1 = new ScilabDouble([in1]);
this.model.out = new ScilabDouble([in1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -15457,7 +15844,7 @@ function INVBLK_f() {
/* autogenerated from "macros/NonLinear/LOGBLK_f.sci" */
function LOGBLK_f() {
LOGBLK_f.prototype.define = function LOGBLK_f() {
- in1 = 1;
+ var in1 = 1;
this.a = math.E;
this.model = scicos_model();
this.model.sim = new ScilabString(["logblk"]);
@@ -15466,8 +15853,8 @@ function LOGBLK_f() {
this.model.rpar = new ScilabDouble([this.a]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = "%e";
- gr_i = [];
+ var exprs = "%e";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -15482,11 +15869,11 @@ function LOGBLK_f() {
LOGBLK_f.prototype.set = function LOGBLK_f() {
this.a = parseFloat(arguments[0]["a"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[2-1];
+ var exprs = exprs[2-1];
}
while (true) {
[ok,this.a,exprs] = scicos_getvalue("Set log block parameters","Basis (>1)",list("vec",1),exprs);
@@ -15516,9 +15903,9 @@ function LOOKUP2D() {
this.yy = [1:3];
this.zz = [[4,5,6],[16,19,20],[10,18,23],[6,3,-1]];
this.Method = 1;
- Graf = "n";
- Nx = length(this.xx);
- Ny = length(this.yy);
+ var Graf = "n";
+ var Nx = length(this.xx);
+ var Ny = length(this.yy);
this.model.sim = list(new ScilabString(["lookup2d"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1],[1]);
this.model.out = new ScilabDouble([1]);
@@ -15526,8 +15913,8 @@ function LOOKUP2D() {
this.model.ipar = new ScilabDouble([Nx],[Ny],[this.Method]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = list(strcat(sci2exp(this.xx)),strcat(sci2exp(this.yy)),strcat(sci2exp(this.zz)),sci2exp(this.Method),Graf);
- gr_i = [];
+ var exprs = list(strcat(sci2exp(this.xx)),strcat(sci2exp(this.yy)),strcat(sci2exp(this.zz)),sci2exp(this.Method),Graf);
+ var gr_i = [];
this.x = standard_define([2.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -15552,63 +15939,71 @@ function LOOKUP2D() {
this.graf = arguments[0]["graf"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- ok = false;
- SaveExit = false;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var ok = false;
+ var SaveExit = false;
while (true) {
- Ask_again = false;
+ var Ask_again = false;
[ok,this.xx,this.yy,this.zz,this.Method,this.graf,exprs] = scicos_getvalue("2D Lookup table parameters",["Row index input values","Column index input values","Table data","Lookup method(1..5)","Launch graphic window(y/n)?"],list("vec",-1,"vec",-1,"mat",[-1,-1],"vec",1,"str",1),exprs);
if (!ok) {
break;
}
- mtd = int(this.Method);
+ var mtd = int(this.Method);
if (mtd<1) {
- mtd = 1;
+ var mtd = 1;
}
if (mtd>6) {
- mtd = 6;
+ var mtd = 6;
}
if (this.graf!="y"&&this.graf!="Y") {
this.graf = "n";
}
exprs[5-1] = "n";
exprs[4-1] = sci2exp(mtd);
- METHOD = getmethod(mtd);
+ var METHOD = getmethod(mtd);
if (!Ask_again) {
this.xx = this.xx.slice();
this.yy = this.yy.slice();
- [nx,mx] = size(this.xx);
- [ny,my] = size(this.yy);
- [nz,mz] = size(this.zz);
+ var tmpvar0 = size(this.xx)
+ var nx = tmpvar0[0]
+ var mx = tmpvar0[1];
+ var tmpvar1 = size(this.yy)
+ var ny = tmpvar1[0]
+ var my = tmpvar1[1];
+ var tmpvar2 = size(this.zz)
+ var nz = tmpvar2[0]
+ var mz = tmpvar2[1];
if (((nx<=1)||(ny<=1))) {
x_message("input row/column data size should be greater than one");
- Ask_again = true;
+ var Ask_again = true;
}
if (!((nx==nz)&&(ny==mz))) {
x_message("incompatible size of x and y");
- Ask_again = true;
+ var Ask_again = true;
}
- [ok] = test_increasing(this.xx);
+ var tmpvar3 = test_increasing(this.xx)
+ var ok = tmpvar3[0];
if ((!ok)) {
x_message("Row input values must be monotonically increasing");
- Ask_again = true;
+ var Ask_again = true;
}
- [ok] = test_increasing(this.yy);
+ var tmpvar4 = test_increasing(this.yy)
+ var ok = tmpvar4[0];
if ((!ok)) {
x_message("Column input values must be monotonically increasing");
- Ask_again = true;
+ var Ask_again = true;
}
}
if (!Ask_again) {
if ((this.graf=="Y"||this.graf=="y")) {
- gh = gcf();
- curwin = gh.figure_id;
- save_curwin = curwin;
- gh2 = scf();
- curwin = max(winsid())+1;
+ var gh = gcf();
+ var curwin = gh.figure_id;
+ var save_curwin = curwin;
+ var gh2 = scf();
+ var curwin = max(winsid())+1;
plot3d(this.xx,this.yy,this.zz,35,45,"X@Y@Z",[5,2,4]);
- curwin = save_curwin;
+ var curwin = save_curwin;
gh.figure_id = curwin;
}
this.model.rpar = new ScilabDouble([this.xx.slice()],[this.yy.slice()],[this.zz.slice()]);
@@ -15628,9 +16023,9 @@ function LOOKUP_c() {
this.model = scicos_model();
this.xx = [[-1],[0.5],[1],[1.5],[2.5]];
this.yy = [[-6],[-1],[-3],[3],[-4]];
- N = length(this.xx);
+ var N = length(this.xx);
this.Method = 1;
- Graf = "n";
+ var Graf = "n";
this.model.sim = list(new ScilabString(["lookup_c"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -15645,8 +16040,8 @@ function LOOKUP_c() {
this.model.evtin = [];
this.model.evtout = [];
this.model.firing = new ScilabDouble([0]);
- exprs = [[sci2exp(this.Method)],[sci2exp(this.xx)],[sci2exp(this.yy)],[sci2exp(0)],[Graf]];
- gr_i = [];
+ var exprs = [[sci2exp(this.Method)],[sci2exp(this.xx)],[sci2exp(this.yy)],[sci2exp(0)],[Graf]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -15671,30 +16066,30 @@ function LOOKUP_c() {
this.graf = arguments[0]["graf"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- ok = false;
- SaveExit = false;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var ok = false;
+ var SaveExit = false;
while (true) {
- Ask_again = false;
+ var Ask_again = false;
[ok,this.Method,this.xx,this.yy,this.extrapo,this.graf,exprs] = scicos_getvalue("Lookup table parameters",["Spline Interpolation method (0..9)","x","y","Extrapolate method (0,1)","Launch graphic window(y/n)?"],list("vec",1,"vec",-1,"vec",-1,"vec",1,"str",1),exprs);
if (!ok) {
break;
}
- PeriodicOption = "n";
+ var PeriodicOption = "n";
if (PeriodicOption=="y"||PeriodicOption=="Y") {
- PO = 1;
+ var PO = 1;
} else {
- PO = 0;
+ var PO = 0;
}
- mtd = int(this.Method);
+ var mtd = int(this.Method);
if (mtd<0) {
- mtd = 0;
+ var mtd = 0;
}
if (mtd>9) {
- mtd = 9;
+ var mtd = 9;
}
- METHOD = getmethod(mtd);
+ var METHOD = getmethod(mtd);
this.extrapo = int(this.extrapo);
if (this.extrapo<0) {
this.extrapo = 0;
@@ -15705,45 +16100,53 @@ function LOOKUP_c() {
if (!Ask_again) {
this.xx = this.xx.slice();
this.yy = this.yy.slice();
- [nx,mx] = size(this.xx);
- [ny,my] = size(this.yy);
+ var tmpvar0 = size(this.xx)
+ var nx = tmpvar0[0]
+ var mx = tmpvar0[1];
+ var tmpvar1 = size(this.yy)
+ var ny = tmpvar1[0]
+ var my = tmpvar1[1];
if (!((nx==ny)&&(mx==my))) {
x_message("incompatible size of x and y");
- Ask_again = true;
+ var Ask_again = true;
}
}
if (!Ask_again) {
this.xy = [this.xx,this.yy];
- [this.xy] = cleandata(this.xy);
- N = size(this.xy,"r");
+ var tmpvar2 = cleandata(this.xy)
+ this.xy = tmpvar2[0];
+ var N = size(this.xy,"r");
exprs[5-1] = "n";
if (this.graf=="y"||this.graf=="Y") {
- ipar = [[N],[mtd],[PO],[this.extrapo]];
- rpar = [];
+ var ipar = [[N],[mtd],[PO],[this.extrapo]];
+ var rpar = [];
if (!exists("curwin")) {
- gh = gcf();
+ var gh = gcf();
this.curwin = gh.figure_id;
}
- save_curwin = this.curwin;
+ var save_curwin = this.curwin;
this.curwin = max(winsid())+1;
- [orpar,oipar,ok] = poke_point(this.xy,ipar,rpar);
+ var tmpvar3 = poke_point(this.xy,ipar,rpar)
+ var orpar = tmpvar3[0]
+ var oipar = tmpvar3[1]
+ var ok = tmpvar3[2];
this.curwin = save_curwin;
if (!ok) {
break;
}
- N2 = oipar[1-1];
- xy2 = [orpar.slice(1-1,N2),orpar.slice(N2+1-1,2*N2)];
- New_methhod = oipar[2-1];
- DChange = false;
- METHOD = getmethod(New_methhod);
+ var N2 = oipar[1-1];
+ var xy2 = [orpar.slice(1-1,N2),orpar.slice(N2+1-1,2*N2)];
+ var New_methhod = oipar[2-1];
+ var DChange = false;
+ var METHOD = getmethod(New_methhod);
if (or(this.xy.slice()[1-1]!=xy2.slice()[1-1])) {
- DChange = true;
+ var DChange = true;
}
if (or(this.xy.slice(1-1,N-1)[2-1]!=xy2.slice(1-1,N2-1)[2-1])) {
- DChange = true;
+ var DChange = true;
}
if ((this.xy[N-1][2-1]!=xy2[N2-1][2-1]&&(METHOD!="periodic"))) {
- DChange = true;
+ var DChange = true;
}
if (DChange) {
exprs[2-1] = strcat(sci2exp(xy2.slice()[1-1]));
@@ -15752,30 +16155,33 @@ function LOOKUP_c() {
exprs[1-1] = sci2exp(New_methhod);
exprs[4-1] = sci2exp(oipar[4-1]);
if (oipar[3-1]==1) {
- perop = "y";
+ var perop = "y";
} else {
- perop = "n";
+ var perop = "n";
}
- SaveExit = true;
+ var SaveExit = true;
} else {
- [Xdummy,Ydummy,orpar] = Do_Spline(N,mtd,this.xy.slice()[1-1],this.xy.slice()[2-1],this.xy[$-1][1-1],this.xy[1-1][1-1],0);
+ var tmpvar4 = Do_Spline(N,mtd,this.xy.slice()[1-1],this.xy.slice()[2-1],this.xy[$-1][1-1],this.xy[1-1][1-1],0)
+ var Xdummy = tmpvar4[0]
+ var Ydummy = tmpvar4[1]
+ var orpar = tmpvar4[2];
if ((METHOD=="periodic")) {
this.xy[N-1][2-1] = this.xy[1-1][2-1];
}
if ((METHOD=="order 2"||METHOD=="not_a_knot"||METHOD=="periodic"||METHOD=="monotone"||METHOD=="fast"||METHOD=="clamped")) {
- orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]],[orpar]];
+ var orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]],[orpar]];
} else {
if ((METHOD=="zero order-below"||METHOD=="linear"||METHOD=="zero order-above"||METHOD=="zero order-nearest")) {
- orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]]];
+ var orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]]];
}
}
exprs[1-1] = sci2exp(mtd);
- oipar = [[N],[mtd],[PO],[this.extrapo]];
- SaveExit = true;
+ var oipar = [[N],[mtd],[PO],[this.extrapo]];
+ var SaveExit = true;
}
}
if ((SaveExit)) {
- xp = find(orpar.slice(1-1,oipar[1-1])>=0);
+ var xp = find(orpar.slice(1-1,oipar[1-1])>=0);
if ((xp!=[])) {
this.model.firing = new ScilabDouble([orpar[xp[1-1]-1]]);
} else {
@@ -15802,7 +16208,7 @@ function LOOKUP_f() {
this.model.rpar = new ScilabDouble([-2],[-1],[1],[2],[-1],[1],[-1],[1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -15816,27 +16222,31 @@ function LOOKUP_f() {
}
LOOKUP_f.prototype.set = function LOOKUP_f() {
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- rpar = this.model.rpar;
- n = size(rpar,"*")/2;
- xx = rpar.slice(1-1,n);
- yy = rpar.slice(n+1-1,2*n);
+ var rpar = this.model.rpar;
+ var n = size(rpar,"*")/2;
+ var xx = rpar.slice(1-1,n);
+ var yy = rpar.slice(n+1-1,2*n);
while (true) {
[ln,fun]=where()
if (!or(fun=="do_eval")) {
- [xx,yy,ok,gc] = edit_curv(xx,yy,"axy");
+ var tmpvar0 = edit_curv(xx,yy,"axy")
+ var xx = tmpvar0[0]
+ var yy = tmpvar0[1]
+ var ok = tmpvar0[2]
+ var gc = tmpvar0[3];
} else {
- ok = true;
+ var ok = true;
}
if (!ok) {
break;
}
- n = size(xx,"*");
+ var n = size(xx,"*");
if (or(xx.slice(2-1,n)-xx.slice(1-1,n-1)<=0)) {
message("You have not defined a function");
- ok = false;
+ var ok = false;
}
if (ok) {
this.model.rpar = new ScilabDouble([xx.slice()],[yy.slice()]);
@@ -15858,8 +16268,8 @@ function MAXMIN() {
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
this.model.ipar = new ScilabDouble([0]);
- exprs = [string(transpose([2,1,1]))];
- gr_i = [];
+ var exprs = [string(transpose([2,1,1]))];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.style = "MAXMIN;displayedLabel=MAX";
return new BasicBlock(this.x);
@@ -15880,8 +16290,8 @@ function MAXMIN() {
this.nin = arguments[0]["nin"]
this.zcr = parseFloat(arguments[0]["zcr"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.mm,this.nin,this.zcr,exprs] = scicos_getvalue("Set Max/Min block parameters",["Min (1) or Max (2) ","Number of input vectors (1 or 2)","zero-crossing (1: yes, 0;no)"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -15896,13 +16306,19 @@ function MAXMIN() {
}
if (this.nin!=1&&this.nin!=2) {
message("Wrong number of inputs, only 1 and 2 allowed");
- ok = false;
+ var ok = false;
}
if (ok) {
if (this.nin==1) {
- [this.model,graphics,ok] = check_io(this.model,graphics,-1,1,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,-1,1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,[-1,-1],-1,[],[]);
+ var tmpvar1 = check_io(this.model,graphics,[-1,-1],-1,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
}
}
if (ok) {
@@ -15914,9 +16330,9 @@ function MAXMIN() {
}
this.model.ipar = new ScilabDouble([this.mm]);
if (this.mm==1) {
- label = "MIN";
+ var label = "MIN";
} else {
- label = "MAX";
+ var label = "MAX";
}
graphics.style = "MAXMIN;displayedLabel="+label;
graphics.exprs = exprs;
@@ -15931,7 +16347,7 @@ function MAXMIN() {
/* autogenerated from "macros/NonLinear/MAX_f.sci" */
function MAX_f() {
MAX_f.prototype.define = function MAX_f() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = new ScilabString(["maxblk"]);
this.model.in1 = new ScilabDouble([in1]);
@@ -15939,8 +16355,8 @@ function MAX_f() {
this.model.dstate = new ScilabDouble([0],[0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -15960,7 +16376,7 @@ function MAX_f() {
/* autogenerated from "macros/NonLinear/MIN_f.sci" */
function MIN_f() {
MIN_f.prototype.define = function MIN_f() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = new ScilabString(["minblk"]);
this.model.in1 = new ScilabDouble([in1]);
@@ -15968,8 +16384,8 @@ function MIN_f() {
this.model.dstate = new ScilabDouble([0],[0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = sci2exp(in1);
- gr_i = [];
+ var exprs = sci2exp(in1);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -15989,7 +16405,7 @@ function MIN_f() {
/* autogenerated from "macros/NonLinear/POWBLK_f.sci" */
function POWBLK_f() {
POWBLK_f.prototype.define = function POWBLK_f() {
- in1 = 1;
+ var in1 = 1;
this.a = 1.5;
this.model = scicos_model();
this.model.sim = new ScilabString(["powblk"]);
@@ -15998,8 +16414,8 @@ function POWBLK_f() {
this.model.rpar = new ScilabDouble([this.a]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = string(this.a);
- gr_i = [];
+ var exprs = string(this.a);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -16014,11 +16430,11 @@ function POWBLK_f() {
POWBLK_f.prototype.set = function POWBLK_f() {
this.a = parseFloat(arguments[0]["a"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[2-1];
+ var exprs = exprs[2-1];
}
while (true) {
[ok,this.a,exprs] = scicos_getvalue("Set u^a block parameters","to the power of",list("vec",1),exprs);
@@ -16052,8 +16468,8 @@ function PRODUCT() {
this.model.ipar = new ScilabDouble(this.sgn);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = sci2exp(this.sgn);
- gr_i = [];
+ var exprs = sci2exp(this.sgn);
+ var gr_i = [];
this.x = standard_define([2,3],this.model,exprs,gr_i);
return new Product(this.x);
}
@@ -16068,9 +16484,9 @@ function PRODUCT() {
PRODUCT.prototype.set = function PRODUCT() {
this.sgn = inverse(arguments[0]["sgn"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.sgn,exprs] = scicos_getvalue([[" Set multiplication block parameters"],["(multiplication is set with + 1, division with -1)"],[""]],"Number of inputs or sign vector",list("vec",-1),exprs);
if (!ok) {
@@ -16080,27 +16496,30 @@ function PRODUCT() {
if (size(this.sgn,1)==1) {
if (this.sgn<1) {
message("Number of inputs must be > 0");
- ok = false;
+ var ok = false;
} else if (this.sgn==1) {
- in1 = -1;
+ var in1 = -1;
this.sgn = [];
- nout = 1;
+ var nout = 1;
} else {
- in1 = -ones(this.sgn,1);
+ var in1 = -ones(this.sgn,1);
this.sgn = ones(this.sgn,1);
- nout = -1;
+ var nout = -1;
}
} else {
if (!and(abs(this.sgn)==1)) {
message("Signs can only be +1 or -1");
- ok = false;
+ var ok = false;
} else {
- in1 = -ones(size(this.sgn,1),1);
- nout = -1;
+ var in1 = -ones(size(this.sgn,1),1);
+ var nout = -1;
}
}
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,nout,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,in1,nout,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.ipar = new ScilabDouble([this.sgn]);
@@ -16151,8 +16570,8 @@ function QUANT_f() {
this.model.ipar = new ScilabDouble([this.meth]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.pas)],[string(this.meth)]];
- gr_i = [];
+ var exprs = [[string(this.pas)],[string(this.meth)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -16170,8 +16589,8 @@ function QUANT_f() {
this.pas = parseFloat(arguments[0]["pas"])
this.meth = parseFloat(arguments[0]["meth"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.pas,this.meth,exprs] = scicos_getvalue("Set parameters",["Step","Quantization Type (1-4)"],list("vec",1,"vec",1),exprs);
@@ -16181,7 +16600,7 @@ function QUANT_f() {
if (this.meth<1||this.meth>4) {
message("Quantization Type must be from 1 to 4");
} else {
- rpar = this.pas;
+ var rpar = this.pas;
this.model.rpar = new ScilabDouble([rpar]);
this.model.ipar = new ScilabDouble([this.meth]);
switch (this.meth) {
@@ -16208,7 +16627,7 @@ function SATURATION() {
SATURATION.prototype.define = function SATURATION() {
this.minp = -1;
this.maxp = 1;
- rpar = [[this.maxp],[this.minp]];
+ var rpar = [[this.maxp],[this.minp]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["satur"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -16218,8 +16637,8 @@ function SATURATION() {
this.model.rpar = new ScilabDouble(rpar);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.maxp)],[string(this.minp)],[string(this.model.nmode)]];
- gr_i = [];
+ var exprs = [[string(this.maxp)],[string(this.minp)],[string(this.model.nmode)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -16239,8 +16658,8 @@ function SATURATION() {
this.minp = parseFloat(arguments[0]["minp"])
this.zeroc = arguments[0]["zeroc"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.maxp,this.minp,this.zeroc,exprs] = scicos_getvalue("Set Saturation parameters",["Upper limit","Lower limit","zero crossing (0:no, 1:yes)"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -16250,7 +16669,7 @@ function SATURATION() {
if (this.maxp<=this.minp) {
message("Upper limit must be > Lower limit");
} else {
- rpar = [[this.maxp],[this.minp]];
+ var rpar = [[this.maxp],[this.minp]];
this.model.rpar = new ScilabDouble(rpar);
if (this.zeroc!=0) {
this.model.nzcross = new ScilabDouble([2]);
@@ -16273,8 +16692,8 @@ function SAT_f() {
SAT_f.prototype.define = function SAT_f() {
this.minp = -1;
this.maxp = 1;
- slope = 1;
- rpar = [[this.minp],[this.maxp],[slope]];
+ var slope = 1;
+ var rpar = [[this.minp],[this.maxp],[slope]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["lusat"]), new ScilabDouble([1]));
this.model.in1 = new ScilabDouble([1]);
@@ -16283,8 +16702,8 @@ function SAT_f() {
this.model.rpar = new ScilabDouble([this.minp],[this.maxp],[slope]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.minp)],[string(this.maxp)],[string(slope)]];
- gr_i = [];
+ var exprs = [[string(this.minp)],[string(this.maxp)],[string(slope)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -16304,8 +16723,8 @@ function SAT_f() {
this.maxp = parseFloat(arguments[0]["maxp"])
this.pente = arguments[0]["pente"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.minp,this.maxp,this.pente,exprs] = scicos_getvalue("Set Saturation parameters",["Min","Max","Slope"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -16317,7 +16736,7 @@ function SAT_f() {
} else if (this.pente<=0) {
message("Slope must be strictly positive");
} else {
- rpar = [[this.minp/this.pente],[this.maxp/this.pente],[this.pente]];
+ var rpar = [[this.minp/this.pente],[this.maxp/this.pente],[this.pente]];
this.model.rpar = new ScilabDouble(rpar);
this.model.firing = [];
graphics.exprs = exprs;
@@ -16332,7 +16751,7 @@ function SAT_f() {
/* autogenerated from "macros/NonLinear/SIGNUM.sci" */
function SIGNUM() {
SIGNUM.prototype.define = function SIGNUM() {
- nu = -1;
+ var nu = -1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["signum"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([nu]);
@@ -16341,8 +16760,8 @@ function SIGNUM() {
this.model.nmode = new ScilabDouble([nu]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [string([1])];
- gr_i = [];
+ var exprs = [string([1])];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -16358,8 +16777,8 @@ function SIGNUM() {
SIGNUM.prototype.set = function SIGNUM() {
this.zcr = arguments[0]["zcr"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.zcr,exprs] = scicos_getvalue("Set block parameters",["use zero_crossing (1: yes) (0:no)"],list("vec",1),exprs);
@@ -16392,8 +16811,8 @@ function SINBLK_f() {
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -16413,15 +16832,15 @@ function SINBLK_f() {
/* autogenerated from "macros/NonLinear/TANBLK_f.sci" */
function TANBLK_f() {
TANBLK_f.prototype.define = function TANBLK_f() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = new ScilabString(["tanblk"]);
this.model.in1 = new ScilabDouble([in1]);
this.model.out = new ScilabDouble([in1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = sci2exp(in1);
- gr_i = [];
+ var exprs = sci2exp(in1);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -16448,8 +16867,8 @@ function TrigFun() {
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = "sin";
- gr_i = [];
+ var exprs = "sin";
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -16464,11 +16883,11 @@ function TrigFun() {
TrigFun.prototype.set = function TrigFun() {
this.fun = arguments[0]["fun"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- PREVAR_FF = [["sin"],["cos"],["tan"],["asin"],["acos"],["atan"],["sinh"],["cosh"],["tanh"],["asinh"],["acosh"],["atanh"]];
- PREVAR_GG = [["Choose among "+strcat(PREVAR_FF.slice(1-1,4),", ")],[strcat(PREVAR_FF.slice(5-1,$),", ")]];
+ var PREVAR_FF = [["sin"],["cos"],["tan"],["asin"],["acos"],["atan"],["sinh"],["cosh"],["tanh"],["asinh"],["acosh"],["atanh"]];
+ var PREVAR_GG = [["Choose among "+strcat(PREVAR_FF.slice(1-1,4),", ")],[strcat(PREVAR_FF.slice(5-1,$),", ")]];
while (true) {
[ok,this.fun,exprs] = scicos_getvalue(PREVAR_GG,"Function",list("str",1),exprs);
if (!ok) {
@@ -16497,9 +16916,9 @@ function PDE() {
this.model.out = new ScilabDouble([10],[0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- params_pde = tlist([["paramspde"],["a"],["b"],["txt_exp"],["check_op1"],["a1"],["b1"],["check_op2"],["a2"],["b2"],["check_op3"],["a3"],["b3"],["check_op4"],["a4"],["b4"],["check_op5"],["a5"],["b5"],["check_op6"],["a6"],["b6"],["check_op7"],["a7"],["b7"],["discr_cst"],["discr_non_cst"],["signe"],["rad_automatique"],["rad_manuel"],["methode"],["ord1"],["ord2"],["ord3"],["degre"],["nnode"],["txt_pas"],["CI"],["dCI"],["CLa"],["CLa_exp"],["CLb"],["CLb_exp"],["points"]],"","","","0","","IN_EDP1(t)","0","","IN_EDP2(t)","0","","IN_EDP3(t)","0","","IN_EDP4(t)","0","","IN_EDP5(t)","0","","IN_EDP6(t)","0","","IN_EDP7(t)","0","0","0","0","0","0","","","","","","","","","0","IN_CL1(t)","0","IN_CL2(t)","");
- label = list(params_pde,[],"");
- gr_i = [];
+ var params_pde = tlist([["paramspde"],["a"],["b"],["txt_exp"],["check_op1"],["a1"],["b1"],["check_op2"],["a2"],["b2"],["check_op3"],["a3"],["b3"],["check_op4"],["a4"],["b4"],["check_op5"],["a5"],["b5"],["check_op6"],["a6"],["b6"],["check_op7"],["a7"],["b7"],["discr_cst"],["discr_non_cst"],["signe"],["rad_automatique"],["rad_manuel"],["methode"],["ord1"],["ord2"],["ord3"],["degre"],["nnode"],["txt_pas"],["CI"],["dCI"],["CLa"],["CLa_exp"],["CLb"],["CLb_exp"],["points"]],"","","","0","","IN_EDP1(t)","0","","IN_EDP2(t)","0","","IN_EDP3(t)","0","","IN_EDP4(t)","0","","IN_EDP5(t)","0","","IN_EDP6(t)","0","","IN_EDP7(t)","0","0","0","0","0","0","","","","","","","","","0","IN_CL1(t)","0","IN_CL2(t)","");
+ var label = list(params_pde,[],"");
+ var gr_i = [];
this.x = standard_define([3,3],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -16516,35 +16935,101 @@ function PDE() {
this.rdnom = arguments[0]["rdnom"]
this.lab = arguments[0]["lab"]
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
- params_pde = label[1-1];
+ var params_pde = label[1-1];
while (true) {
[ln,fun]=where()
if (!or(fun=="do_eval")) {
- [ok,a_domaine,b_domaine,discr,signe,choix,type_meth,degre,Nbr_maillage,CI,CI1,CLa_type,CLa_exp,CLb_type,CLb_exp,oper,a1,b1,a2,b2,a3,b3,a4,b4,a5,b5,a6,b6,a7,b7,k,mesures,params_pde] = IHM_EDP(params_pde);
+ var tmpvar0 = IHM_EDP(params_pde)
+ var ok = tmpvar0[0]
+ var a_domaine = tmpvar0[1]
+ var b_domaine = tmpvar0[2]
+ var discr = tmpvar0[3]
+ var signe = tmpvar0[4]
+ var choix = tmpvar0[5]
+ var type_meth = tmpvar0[6]
+ var degre = tmpvar0[7]
+ var Nbr_maillage = tmpvar0[8]
+ var CI = tmpvar0[9]
+ var CI1 = tmpvar0[10]
+ var CLa_type = tmpvar0[11]
+ var CLa_exp = tmpvar0[12]
+ var CLb_type = tmpvar0[13]
+ var CLb_exp = tmpvar0[14]
+ var oper = tmpvar0[15]
+ var a1 = tmpvar0[16]
+ var b1 = tmpvar0[17]
+ var a2 = tmpvar0[18]
+ var b2 = tmpvar0[19]
+ var a3 = tmpvar0[20]
+ var b3 = tmpvar0[21]
+ var a4 = tmpvar0[22]
+ var b4 = tmpvar0[23]
+ var a5 = tmpvar0[24]
+ var b5 = tmpvar0[25]
+ var a6 = tmpvar0[26]
+ var b6 = tmpvar0[27]
+ var a7 = tmpvar0[28]
+ var b7 = tmpvar0[29]
+ var k = tmpvar0[30]
+ var mesures = tmpvar0[31]
+ var params_pde = tmpvar0[32];
if (ok) {
return;
}
} else {
if (exists("%scicos_context")) {
- [ok,a_domaine,b_domaine,discr,signe,choix,type_meth,degre,Nbr_maillage,CI,CI1,CLa_type,CLa_exp,CLb_type,CLb_exp,oper,a1,b1,a2,b2,a3,b3,a4,b4,a5,b5,a6,b6,a7,b7,k,mesures,params_pde] = setvalue_IHM_EDP(params_pde);
+ var tmpvar1 = setvalue_IHM_EDP(params_pde)
+ var ok = tmpvar1[0]
+ var a_domaine = tmpvar1[1]
+ var b_domaine = tmpvar1[2]
+ var discr = tmpvar1[3]
+ var signe = tmpvar1[4]
+ var choix = tmpvar1[5]
+ var type_meth = tmpvar1[6]
+ var degre = tmpvar1[7]
+ var Nbr_maillage = tmpvar1[8]
+ var CI = tmpvar1[9]
+ var CI1 = tmpvar1[10]
+ var CLa_type = tmpvar1[11]
+ var CLa_exp = tmpvar1[12]
+ var CLb_type = tmpvar1[13]
+ var CLb_exp = tmpvar1[14]
+ var oper = tmpvar1[15]
+ var a1 = tmpvar1[16]
+ var b1 = tmpvar1[17]
+ var a2 = tmpvar1[18]
+ var b2 = tmpvar1[19]
+ var a3 = tmpvar1[20]
+ var b3 = tmpvar1[21]
+ var a4 = tmpvar1[22]
+ var b4 = tmpvar1[23]
+ var a5 = tmpvar1[24]
+ var b5 = tmpvar1[25]
+ var a6 = tmpvar1[26]
+ var b6 = tmpvar1[27]
+ var a7 = tmpvar1[28]
+ var b7 = tmpvar1[29]
+ var k = tmpvar1[30]
+ var mesures = tmpvar1[31]
+ var params_pde = tmpvar1[32];
}
}
this.okk = false;
this.rdnom = "PDE";
- ok1 = true;
+ var ok1 = true;
while (true) {
[this.okk,this.rdnom,this.lab] = scicos_getvalue("PLEASE, GIVE US THE BLOCK\'s NAME. ","New block\'s name :",list("str",1),label[3-1]);
if (this.okk==false) {
- ok1 = false;
+ var ok1 = false;
return;
}
label[3-1] = this.lab;
this.rdnom = stripblanks(this.rdnom);
if (this.rdnom==emptystr()) {
- ok1 = false;
+ var ok1 = false;
x_message("sorry C file name not defined");
}
if (ok1) {
@@ -16552,37 +17037,41 @@ function PDE() {
}
}
if ((choix==0)) {
- ind4 = strindex(a4,"x");
- ind1 = strindex(a1,"x");
- ind2 = strindex(a2,"x");
+ var ind4 = strindex(a4,"x");
+ var ind1 = strindex(a1,"x");
+ var ind2 = strindex(a2,"x");
if ((ind4!=[]||ind1!=[]||ind2!=[])) {
if ((signe==1)) {
- delta = 1;
+ var delta = 1;
} else if ((signe==2)) {
- delta = -1;
+ var delta = -1;
} else if ((signe==0)) {
- delta = 0;
+ var delta = 0;
} else {
x_message([["le discriminant n\'est pas constant,"],["Vous devez choisir son signe dans l\'IHM"]]);
return;
}
} else {
- delta = evstr(a4)^2-4*evstr(a1)*evstr(a2);
+ var delta = evstr(a4)^2-4*evstr(a1)*evstr(a2);
}
if ((delta==[])) {
- delta = 0;
+ var delta = 0;
}
- type_meth = this.arbre_decision[delta-1];
+ var type_meth = arbre_decision(delta);
}
- [flag_type,this.rdnom,DF_type,tt] = translate(CI,CI1,CLa_type,CLa_exp,CLb_type,CLb_exp,oper,type_meth,degre,a_domaine,b_domaine,Nbr_maillage,a1,b1,a2,b2,a3,b3,a4,b4,a5,b5,a6,b6,a7,b7,this.rdnom,mesures);
- Nbr = Nbr_maillage;
+ var tmpvar2 = translate(CI,CI1,CLa_type,CLa_exp,CLb_type,CLb_exp,oper,type_meth,degre,a_domaine,b_domaine,Nbr_maillage,a1,b1,a2,b2,a3,b3,a4,b4,a5,b5,a6,b6,a7,b7,this.rdnom,mesures)
+ var flag_type = tmpvar2[0]
+ this.rdnom = tmpvar2[1]
+ var DF_type = tmpvar2[2]
+ var tt = tmpvar2[3];
+ var Nbr = Nbr_maillage;
if (((CLa_type==1)&&(DF_type==0||DF_type==1))||((CLb_type==1)&&(DF_type==0||DF_type==2))) {
- Nbr = Nbr+1;
+ var Nbr = Nbr+1;
}
if ((mesures==[])) {
- out = Nbr_maillage;
+ var out = Nbr_maillage;
} else {
- out = [[Nbr_maillage],[size(mesures,"*")]];
+ var out = [[Nbr_maillage],[size(mesures,"*")]];
}
if ((flag_type==1)) {
this.model.sim = list(new ScilabDouble([this.rdnom]), new ScilabDouble([2004]));
@@ -16611,12 +17100,16 @@ function PDE() {
}
}
}
- [ok1] = CFORTREDP(this.rdnom,tt);
+ var tmpvar3 = CFORTREDP(this.rdnom,tt)
+ var ok1 = tmpvar3[0];
if (!ok1) {
break;
}
if (!ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,ones(k,1),out.slice(),[],[]);
+ var tmpvar4 = check_io(this.model,graphics,ones(k,1),out.slice(),[],[])
+ this.model = tmpvar4[0]
+ var graphics = tmpvar4[1]
+ var ok = tmpvar4[2];
}
label[1-1] = params_pde;
label[2-1] = tt;
@@ -16648,8 +17141,8 @@ function AFFICH_m() {
this.model.firing = [];
this.model.dep_ut = [true,false];
this.model.label = new ScilabString([""]);
- exprs = [[sci2exp([this.model.in1,this.model.in2])],[string(this.font)],[string(this.fontsize)],[string(this.colr)],[string(this.nt)],[string(this.nd)],[string(0)]];
- gr_i = [];
+ var exprs = [[sci2exp([this.model.in1,this.model.in2])],[string(this.font)],[string(this.fontsize)],[string(this.colr)],[string(this.nt)],[string(this.nd)],[string(0)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new AfficheBlock(this.x);
}
@@ -16677,43 +17170,46 @@ function AFFICH_m() {
this.nd = parseFloat(arguments[0]["nd"])
this.herit = arguments[0]["herit"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.in1,this.font,this.fontsize,this.colr,this.nt,this.nd,this.herit,exprs] = scicos_getvalue("Set parameters",["Input Size","Font number","Font size","Color","Total number of digits","Number of rational part digits","Block inherits (1) or not (0)"],list("mat",[1,2],"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (this.font<=0) {
- mess = [[mess],["Font number must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Font number must be positive"],[" "]];
+ var ok = false;
}
if (this.fontsize<=0) {
- mess = [[mess],["Font size must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Font size must be positive"],[" "]];
+ var ok = false;
}
if (this.nt<=3) {
- mess = [[mess],["Total number of digits must be greater than 3"],[" "]];
- ok = false;
+ var mess = [[mess],["Total number of digits must be greater than 3"],[" "]];
+ var ok = false;
}
if (this.nd<0) {
- mess = [[mess],["Number of rational part digits must be ","greater or equal 0"],[" "]];
- ok = false;
+ var mess = [[mess],["Number of rational part digits must be ","greater or equal 0"],[" "]];
+ var ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (!or(this.herit==[0,1])) {
- mess = [[mess],["Accept inherited values are 0 and 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Accept inherited values are 0 and 1"],[" "]];
+ var ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(this.in1,1),list(),ones(1-this.herit,1),[]);
+ var tmpvar0 = set_io(this.model,graphics,list(this.in1,1),list(),ones(1-this.herit,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.ipar = new ScilabDouble([this.font],[this.fontsize],[this.colr],[this.nt],[this.nd],[this.in1[1-1][1-1]]);
@@ -16771,26 +17267,26 @@ function BARXY() {
this.ymax = parseFloat(arguments[0]["ymax"])
this.thickness = arguments[0]["thickness"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.xmin,this.xmax,this.ymin,this.ymax,this.thickness,exprs] = scicos_getvalue("Set Scope parameters",["Xmin","Xmax","Ymin","Ymax","Segs Thickness"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (this.xmin>=this.xmax) {
- mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
+ var ok = false;
}
if (this.thickness<=0) {
- mess = [[mess],["Thickness must be strictly positive."]];
- ok = false;
+ var mess = [[mess],["Thickness must be strictly positive."]];
+ var ok = false;
}
if (!ok) {
message(mess);
@@ -16831,8 +17327,8 @@ function CANIMXY() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- exprs = [[string(this.nbr_curves)],[string(this.clrs)],[string(this.siz)],[string(this.win)],["[]"],["[]"],[string(this.xmin)],[string(this.xmax)],[string(this.ymin)],[string(this.ymax)],[string(this.N)]];
- gr_i = [];
+ var exprs = [[string(this.nbr_curves)],[string(this.clrs)],[string(this.siz)],[string(this.win)],["[]"],["[]"],[string(this.xmin)],[string(this.xmax)],[string(this.ymin)],[string(this.ymax)],[string(this.N)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -16868,61 +17364,64 @@ function CANIMXY() {
this.ymax = parseFloat(arguments[0]["ymax"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.xmin,this.xmax,this.ymin,this.ymax,this.N,exprs] = scicos_getvalue("Set Scope parameters",["Number of Curves","color (>0) or mark (<0)","line or mark size","Output window number (-1 for automatic)","Output window position","Output window sizes","Xmin","Xmax","Ymin","Ymax","Buffer size"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
+ var ok = false;
}
if (this.nbr_curves<=0) {
- mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
- ok = false;
+ var mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
+ var ok = false;
}
if (this.N<1) {
- mess = [[mess],["Buffer size must be at least 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 1"],[" "]];
+ var ok = false;
}
if (this.N==1&&this.clrs>0) {
- mess = [[mess],["Buffer size must be at least 2"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 2"],[" "]];
+ var ok = false;
}
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (this.xmin>=this.xmax) {
- mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
+ var ok = false;
}
if (!ok) {
message(mess);
} else {
- in1 = this.nbr_curves*ones(2,1);
- in2 = ones(2,1);
- [this.model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],ones(2,1)),list(),ones(1,1),[]);
+ var in1 = this.nbr_curves*ones(2,1);
+ var in2 = ones(2,1);
+ var tmpvar0 = set_io(this.model,graphics,list([in1,in2],ones(2,1)),list(),ones(1,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (this.wpos==[]) {
this.wpos = [[-1],[-1]];
}
if (this.wdim==[]) {
this.wdim = [[-1],[-1]];
}
- rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
- ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[0],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
+ var rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ var ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[0],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
this.model.rpar = new ScilabDouble(rpar);
this.model.ipar = new ScilabDouble(ipar);
graphics.exprs = exprs;
@@ -16959,8 +17458,8 @@ function CANIMXY3D() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- exprs = [[string(this.nbr_curves)],[strcat(string(this.clrs)," ")],[strcat(string(this.siz)," ")],[string(this.win)],["[]"],["[]"],[strcat(string(this.vec_x)," ")],[strcat(string(this.vec_y)," ")],[strcat(string(this.vec_z)," ")],[strcat(string(this.param3ds)," ")],[string(this.N)]];
- gr_i = [];
+ var exprs = [[string(this.nbr_curves)],[strcat(string(this.clrs)," ")],[strcat(string(this.siz)," ")],[string(this.win)],["[]"],["[]"],[strcat(string(this.vec_x)," ")],[strcat(string(this.vec_y)," ")],[strcat(string(this.vec_z)," ")],[strcat(string(this.param3ds)," ")],[string(this.N)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -16996,78 +17495,81 @@ function CANIMXY3D() {
this.param3ds = inverse(arguments[0]["param3ds"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.vec_x,this.vec_y,this.vec_z,this.param3ds,this.N,exprs] = scicos_getvalue("Set Scope parameters",["Number of curves","color (>0) or mark (<0)","line or mark size","Output window number (-1 for automatic)","Output window position","Output window sizes","Xmin and Xmax","Ymin and Ymax","Zmin and Zmax","Alpha and Theta","Buffer size"],list("vec",1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
+ var ok = false;
}
if (size(this.clrs,"*")!=size(this.siz,"*")) {
- mess = [[mess],["Colors and Size must have same size"],[" "]];
- ok = false;
+ var mess = [[mess],["Colors and Size must have same size"],[" "]];
+ var ok = false;
}
if (this.nbr_curves<=0) {
- mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
- ok = false;
+ var mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
+ var ok = false;
}
if (size(this.clrs,"*")<this.nbr_curves) {
- mess = [[mess],["You must have at least same size for clrs and the number of curves"],[" "]];
- ok = false;
+ var mess = [[mess],["You must have at least same size for clrs and the number of curves"],[" "]];
+ var ok = false;
}
if (this.N<1) {
- mess = [[mess],["Buffer size must be at least 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 1"],[" "]];
+ var ok = false;
}
if (this.N<2) {
for (i=1;i<=this.nbr_curves;i+=1) {
if (this.clrs[i-1]>0) {
- mess = [[mess],["Buffer size must be at least 2 or Change a color (must be <0)"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 2 or Change a color (must be <0)"],[" "]];
+ var ok = false;
}
}
}
if (this.vec_y[1-1]>=this.vec_y[2-1]) {
- mess = [[mess],["Ymax must be higher than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be higher than Ymin"],[" "]];
+ var ok = false;
}
if (this.vec_x[1-1]>=this.vec_x[2-1]) {
- mess = [[mess],["Xmax must be higher than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be higher than Xmin"],[" "]];
+ var ok = false;
}
if (this.vec_z[1-1]>=this.vec_z[2-1]) {
- mess = [[mess],["Zmax must be higher than Zmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Zmax must be higher than Zmin"],[" "]];
+ var ok = false;
}
if (!ok) {
message(mess);
} else {
- in1 = this.nbr_curves*ones(3,1);
- in2 = ones(3,1);
- [this.model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],ones(3,1)),list(),ones(1,1),[]);
+ var in1 = this.nbr_curves*ones(3,1);
+ var in2 = ones(3,1);
+ var tmpvar0 = set_io(this.model,graphics,list([in1,in2],ones(3,1)),list(),ones(1,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (this.wpos==[]) {
this.wpos = [[-1],[-1]];
}
if (this.wdim==[]) {
this.wdim = [[-1],[-1]];
}
- rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
- size_siz = size(this.siz,"*");
- ipar = [[this.win],[size_siz],[this.N],[this.clrs.slice()],[this.siz.slice()],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
+ var rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
+ var size_siz = size(this.siz,"*");
+ var ipar = [[this.win],[size_siz],[this.N],[this.clrs.slice()],[this.siz.slice()],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
this.model.rpar = new ScilabDouble(rpar);
this.model.ipar = new ScilabDouble(ipar);
graphics.exprs = exprs;
@@ -17095,8 +17597,8 @@ function CEVENTSCOPE() {
this.model.ipar = new ScilabDouble([this.win],[1],[this.clrs[this.nclock-1]],[this.wpos.slice()],[this.wdim.slice()]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[sci2exp(this.nclock)],[strcat(sci2exp(this.clrs[this.nclock-1])," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.per)]];
- gr_i = [];
+ var exprs = [[sci2exp(this.nclock)],[strcat(sci2exp(this.clrs[this.nclock-1])," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.per)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -17122,8 +17624,8 @@ function CEVENTSCOPE() {
this.wdim = inverse(arguments[0]["wdim"])
this.per = parseFloat(arguments[0]["per"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nclock,this.clrs,this.win,this.wpos,this.wdim,this.per,exprs] = scicos_getvalue("Set Scope parameters",["Number of event inputs","colors c (>0) or mark (<0)","Output window number (-1 for automatic)","Output window position","Output window sizes","Refresh period"],list("vec",1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",1),exprs);
@@ -17133,33 +17635,36 @@ function CEVENTSCOPE() {
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (this.nclock<=0) {
- mess = [[mess],["Block must have at least one input event"],[" "]];
- ok = false;
+ var mess = [[mess],["Block must have at least one input event"],[" "]];
+ var ok = false;
}
if (size(this.clrs,"*")!=this.nclock) {
- mess = [[mess],["Inputs color c size must be equal to Number of inputs"],[" "]];
- ok = false;
+ var mess = [[mess],["Inputs color c size must be equal to Number of inputs"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
+ var ok = false;
}
if (this.per<=0) {
- mess = [[mess],["Refresh period must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Refresh period must be positive"],[" "]];
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(),list(),ones(this.nclock,1),[]);
+ var tmpvar0 = set_io(this.model,graphics,list(),list(),ones(this.nclock,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
} else {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
@@ -17170,8 +17675,8 @@ function CEVENTSCOPE() {
if (this.wdim==[]) {
this.wdim = [[-1],[-1]];
}
- rpar = this.per;
- ipar = [[this.win],[1],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()]];
+ var rpar = this.per;
+ var ipar = [[this.win],[1],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()]];
this.model.rpar = new ScilabDouble([rpar]);
this.model.ipar = new ScilabDouble(ipar);
graphics.exprs = exprs;
@@ -17201,8 +17706,8 @@ function CFSCOPE() {
this.model.ipar = new ScilabDouble([this.win],[1],[this.N],[this.clrs],[this.wpos],[this.wdim],[1],[1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.ymin)],[string(this.ymax)],[string(this.per)],[string(this.N)],[string([1])]];
- gr_i = [];
+ var exprs = [[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.ymin)],[string(this.ymax)],[string(this.per)],[string(this.N)],[string([1])]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -17234,42 +17739,42 @@ function CFSCOPE() {
this.N = parseFloat(arguments[0]["N"])
this.wu = arguments[0]["wu"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.wu,exprs] = scicos_getvalue("Set Scope parameters",["Color (>0) or mark (<0) vector (8 entries)","Output window number (-1 for automatic)","Output window position","Output window sizes","Ymin","Ymax","Refresh period","Buffer size","Links to view"],list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",-1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
+ var ok = false;
}
if (this.per<=0) {
- mess = [[mess],["Refresh period must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Refresh period must be positive"],[" "]];
+ var ok = false;
}
if (this.N<2) {
- mess = [[mess],["Buffer size must be at least 2"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 2"],[" "]];
+ var ok = false;
}
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (this.wu<0) {
- mess = [[mess],["Link to view must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Link to view must be positive"],[" "]];
+ var ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
@@ -17281,14 +17786,14 @@ function CFSCOPE() {
if (this.wdim==[]) {
this.wdim = [[-1],[-1]];
}
- rpar = [[0],[this.ymin],[this.ymax],[this.per]];
+ var rpar = [[0],[this.ymin],[this.ymax],[this.per]];
if (size(this.clrs,"*")>8) {
this.clrs = this.clrs.slice(1-1,8);
}
if (size(this.clrs,"*")<8) {
this.clrs[8-1] = 0;
}
- ipar = [[this.win],[1],[this.N],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()],[size(this.wu,"*")],[this.wu.slice()]];
+ var ipar = [[this.win],[1],[this.N],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()],[size(this.wu,"*")],[this.wu.slice()]];
this.model.rpar = new ScilabDouble(rpar);
this.model.ipar = new ScilabDouble(ipar);
this.model.firing = [];
@@ -17313,7 +17818,7 @@ function CLKOUTV_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- exprs = string(this.prt);
+ var exprs = string(this.prt);
this.x = standard_define([1,1],this.model,exprs," ");
return new EventOutBlock(this.x);
}
@@ -17328,9 +17833,9 @@ function CLKOUTV_f() {
CLKOUTV_f.prototype.set = function CLKOUTV_f() {
this.prt = arguments[0]["prt"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.prt,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CLKOUTV_f")],[" "],["Event output port"]],"Port number",list("vec",1),exprs);
if (!ok) {
@@ -17351,39 +17856,41 @@ function CLKOUTV_f() {
return new EventOutBlock(this.x);
}
CLKOUTV_f.prototype.getinputs = function CLKOUTV_f() {
- orig = arg1.graphics.orig;
- sz = arg1.graphics.sz;
+ var orig = arg1.graphics.orig;
+ var sz = arg1.graphics.sz;
this.x = orig[1-1]+sz[1-1]/2;
- y = orig[2-1]+sz[2-1];
- typ = -ones(this.x);
+ var y = orig[2-1]+sz[2-1];
+ var typ = -ones(this.x);
}
CLKOUTV_f.prototype.getorigin = function CLKOUTV_f() {
- [this.x,y] = this.standard_origin[arg1-1];
+ var tmpvar0 = standard_origin(arg1)
+ this.x = tmpvar0[0]
+ var y = tmpvar0[1];
}
CLKOUTV_f.prototype.getoutputs = function CLKOUTV_f() {
this.x = [];
- y = [];
- typ = [];
+ var y = [];
+ var typ = [];
}
CLKOUTV_f.prototype.plot = function CLKOUTV_f() {
- xf = 60;
- yf = 40;
- orig = arg1.graphics.orig;
- sz = arg1.graphics.sz;
- orient = arg1.graphics.flip;
+ var xf = 60;
+ var yf = 40;
+ var orig = arg1.graphics.orig;
+ var sz = arg1.graphics.sz;
+ var orient = arg1.graphics.flip;
this.prt = arg1.model.ipar;
- pat = xget("pattern");
+ var pat = xget("pattern");
xset("pattern",this.default_color[-1-1]);
- thick = xget("thickness");
+ var thick = xget("thickness");
xset("thickness",2);
this.x = orig[1-1]+sz[1-1]*[[1/2],[1],[1],[0],[0]];
- y = orig[2-1]+sz[2-1]*[[0],[1/3],[1],[1],[1/3]];
- xo = orig[1-1];
- yo = orig[2-1]+sz[2-1]/3;
- gr_i = arg1.graphics.gr_i;
+ var y = orig[2-1]+sz[2-1]*[[0],[1/3],[1],[1],[1/3]];
+ var xo = orig[1-1];
+ var yo = orig[2-1]+sz[2-1]/3;
+ var gr_i = arg1.graphics.gr_i;
if (this.type[gr_i-1]==15) {
- coli = gr_i[2-1];
- pcoli = xget("pattern");
+ var coli = gr_i[2-1];
+ var pcoli = xget("pattern");
xfpolys(this.x,y,coli);
xset("pattern",coli);
xstringb(xo,yo,string(this.prt),sz[1-1],sz[2-1]/1.5);
@@ -17393,22 +17900,22 @@ function CLKOUTV_f() {
xstringb(xo,yo,string(this.prt),sz[1-1],sz[2-1]/1.5);
xpoly(this.x,y,"lines",1);
}
- in1 = [-1/14,1/7,0,0,1/14,1/7,-1/14,1/7]*this.diag[[xf,yf]-1];
+ var in1 = [-1/14,1/7,0,0,1/14,1/7,-1/14,1/7]*this.diag[[xf,yf]-1];
xfpoly(in1.slice()[1-1]+ones(4,1)*(orig[1-1]+sz[1-1]/2),in1.slice()[2-1]+ones(4,1)*(orig[2-1]+sz[2-1]),1);
xset("thickness",thick);
xset("pattern",pat);
- ident = arg1.graphics.id;
+ var ident = arg1.graphics.id;
if (ident!=[]&&ident!="") {
- font = xget("font");
+ var font = xget("font");
xset("font",this.options.ID[1-1][1-1],this.options.ID[1-1][2-1]);
- rectangle = xstringl(orig[1-1],orig[2-1],ident);
- w = rectangle[3-1];
- h = rectangle[4-1];
+ var rectangle = xstringl(orig[1-1],orig[2-1],ident);
+ var w = rectangle[3-1];
+ var h = rectangle[4-1];
xstringb(orig[1-1]+sz[1-1]/2-w/2,orig[2-1]-3*h/2,ident,w,h);
xset("font",font[1-1],font[2-1]);
}
this.x = [];
- y = [];
+ var y = [];
}
}
/* autogenerated from "macros/Sinks/CLKOUT_f.sci" */
@@ -17422,7 +17929,7 @@ function CLKOUT_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- exprs = string(this.prt);
+ var exprs = string(this.prt);
this.x = standard_define([1,1],this.model,exprs," ");
return new BasicBlock(this.x);
}
@@ -17437,10 +17944,10 @@ function CLKOUT_f() {
CLKOUT_f.prototype.set = function CLKOUT_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
- exprs = exprs[1-1];
+ var exprs = graphics.exprs;
+ var exprs = exprs[1-1];
while (true) {
[ok,this.prt,exprs] = scicos_getvalue("Set Event Output block parameters","Port number",list("vec",1),exprs);
if (!ok) {
@@ -17467,12 +17974,12 @@ function CMAT3D() {
CMAT3D.prototype.define = function CMAT3D() {
this.cmin = 0;
this.cmax = 100;
- this.colormap = this.jetcolormap[25-1];
- size_c = 25;
+ this.colormap = jetcolormap(25);
+ var size_c = 25;
this.x = -1;
- y = -1;
- size_x = 1;
- size_y = 1;
+ var y = -1;
+ var size_x = 1;
+ var size_y = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["cmat3d"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1]);
@@ -17483,8 +17990,8 @@ function CMAT3D() {
this.model.rpar = new ScilabDouble([this.colormap.slice()],[this.x],[y]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(string(this.x)," ")],[strcat(string(y)," ")],[string("jetcolormap(25)")],[string(this.cmin)],[string(this.cmax)]];
- gr_i = [];
+ var exprs = [[strcat(string(this.x)," ")],[strcat(string(y)," ")],[string("jetcolormap(25)")],[string(this.cmin)],[string(this.cmax)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -17508,31 +18015,31 @@ function CMAT3D() {
this.cmin = parseFloat(arguments[0]["cmin"])
this.cmax = parseFloat(arguments[0]["cmax"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.vec_x,this.vec_y,this.colormap,this.cmin,this.cmax,exprs] = scicos_getvalue("Set Scope parameters",["Bounds Vector X (-1 for standard)","Bounds Vector Y (-1 for standard)","ColorMap","Zmin","Zmax"],list("vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.vec_x,"*")!=size(this.vec_y,"*")) {
- mess = [[mess],["Vector X and Vector Y must have the same size"],[" "]];
- ok = false;
+ var mess = [[mess],["Vector X and Vector Y must have the same size"],[" "]];
+ var ok = false;
}
if (this.cmax<=this.cmin) {
- mess = [[mess],["Error with minimum and maximum value"],[" "]];
- ok = false;
+ var mess = [[mess],["Error with minimum and maximum value"],[" "]];
+ var ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- size_x = size(this.vec_x,"*");
- size_c = size(this.colormap.slice(),1);
- ipar = [[this.cmin],[this.cmax],[size_c],[size_x]];
- rpar = [[this.colormap.slice()],[this.vec_x.slice()],[this.vec_y.slice()]];
+ var size_x = size(this.vec_x,"*");
+ var size_c = size(this.colormap.slice(),1);
+ var ipar = [[this.cmin],[this.cmax],[size_c],[size_x]];
+ var rpar = [[this.colormap.slice()],[this.vec_x.slice()],[this.vec_y.slice()]];
this.model.ipar = new ScilabDouble(ipar);
this.model.rpar = new ScilabDouble(rpar);
graphics.exprs = exprs;
@@ -17549,10 +18056,10 @@ function CMATVIEW() {
CMATVIEW.prototype.define = function CMATVIEW() {
this.cmin = 0;
this.cmax = 100;
- size_c = 25;
- this.colormap = this.jetcolormap[size_c-1];
- alpha_c = 0.24;
- beta_c = 1;
+ var size_c = 25;
+ this.colormap = jetcolormap(size_c);
+ var alpha_c = 0.24;
+ var beta_c = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["cmatview"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1]);
@@ -17563,8 +18070,8 @@ function CMATVIEW() {
this.model.rpar = new ScilabDouble([alpha_c],[beta_c],[this.colormap.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string("jetcolormap(25)")],[string(this.cmin)],[string(this.cmax)]];
- gr_i = [];
+ var exprs = [[string("jetcolormap(25)")],[string(this.cmin)],[string(this.cmax)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -17584,29 +18091,29 @@ function CMATVIEW() {
this.cmin = parseFloat(arguments[0]["cmin"])
this.cmax = parseFloat(arguments[0]["cmax"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.colormap,this.cmin,this.cmax,exprs] = scicos_getvalue("Set Scope parameters",["ColorMap","Minimum level range","Maximum level range"],list("vec",-1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (this.cmax<=this.cmin) {
- mess = [[mess],["Error with minimum and maximum value"],[" "]];
- ok = false;
+ var mess = [[mess],["Error with minimum and maximum value"],[" "]];
+ var ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- size_c = size(this.colormap.slice(),1);
- sol = inv([[this.cmin,1],[this.cmax,1]])*[[1],[size_c/3]];
- alpha_c = sol[1-1];
- beta_c = sol[2-1];
- ipar = [[this.cmin],[this.cmax],[size_c]];
- rpar = [[alpha_c],[beta_c],[this.colormap.slice()]];
+ var size_c = size(this.colormap.slice(),1);
+ var sol = inv([[this.cmin,1],[this.cmax,1]])*[[1],[size_c/3]];
+ var alpha_c = sol[1-1];
+ var beta_c = sol[2-1];
+ var ipar = [[this.cmin],[this.cmax],[size_c]];
+ var rpar = [[alpha_c],[beta_c],[this.colormap.slice()]];
this.model.ipar = new ScilabDouble(ipar);
this.model.rpar = new ScilabDouble(rpar);
graphics.exprs = exprs;
@@ -17630,8 +18137,8 @@ function CMSCOPE() {
this.ymin = [[-1],[-5]];
this.ymax = [[1],[5]];
this.per = [[30],[30]];
- yy = [[transpose(this.ymin.slice())],[transpose(this.ymax.slice())]];
- period = transpose(this.per.slice());
+ var yy = [[transpose(this.ymin.slice())],[transpose(this.ymax.slice())]];
+ var period = transpose(this.per.slice());
this.model = scicos_model();
this.model.sim = list(new ScilabString(["cmscope"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble(this.in1);
@@ -17642,8 +18149,8 @@ function CMSCOPE() {
this.model.ipar = new ScilabDouble([this.win],[size(this.in1,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in1.slice()],[this.clrs.slice(1-1,sum(this.in1))]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(string(this.in1)," ")],[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp([])],[strcat(string(this.ymin)," ")],[strcat(string(this.ymax)," ")],[strcat(string(this.per)," ")],[string(this.N)],[string(0)],[emptystr()]];
- gr_i = [];
+ var exprs = [[strcat(string(this.in1)," ")],[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp([])],[strcat(string(this.ymin)," ")],[strcat(string(this.ymax)," ")],[strcat(string(this.per)," ")],[string(this.N)],[string(0)],[emptystr()]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -17679,69 +18186,72 @@ function CMSCOPE() {
this.heritance = arguments[0]["heritance"]
this.nom = arguments[0]["nom"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.in1,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.heritance,this.nom,exprs] = scicos_getvalue("Set Scope parameters",["Input ports sizes","Drawing colors (>0) or mark (<0)","Output window number (-1 for automatic)","Output window position","Output window sizes","Ymin vector","Ymax vector","Refresh period","Buffer size","Accept herited events 0/1","Name of Scope (label&Id)"],list("vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec","size(%1,\'*\')","vec","size(%1,\'*\')","vec","size(%1,\'*\')","vec",1,"vec",1,"str",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.in1,"*")<=0) {
- mess = [[mess],["Block must have at least one input port"],[" "]];
- ok = false;
+ var mess = [[mess],["Block must have at least one input port"],[" "]];
+ var ok = false;
}
if (min(this.in1)<=0) {
- mess = [[mess],["Port sizes must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Port sizes must be positive"],[" "]];
+ var ok = false;
}
if (size(this.clrs,"*")<sum(this.in1)) {
- mess = [[mess],["Not enough colors defined (at least "+string(sum(this.in1))+")"],[" "]];
- ok = false;
+ var mess = [[mess],["Not enough colors defined (at least "+string(sum(this.in1))+")"],[" "]];
+ var ok = false;
}
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number can\'t be < -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number can\'t be < -1"],[" "]];
+ var ok = false;
}
if (size(this.per,"*")!=size(this.ymin,"*")) {
- mess = [[mess],["Size of Refresh Period must equal size of Ymin/Ymax vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Size of Refresh Period must equal size of Ymin/Ymax vector"],[" "]];
+ var ok = false;
}
for (i=1;i<=size(this.per,"*");i+=1) {
if ((this.per[i-1]<=0)) {
- mess = [[mess],["Refresh Period must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Refresh Period must be positive"],[" "]];
+ var ok = false;
}
}
if (this.N<2) {
- mess = [[mess],["Buffer size must be at least 2"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 2"],[" "]];
+ var ok = false;
}
if (or(this.ymin>=this.ymax)) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (!or(this.heritance==[0,1])) {
- mess = [[mess],["Accept herited events must be 0 or 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Accept herited events must be 0 or 1"],[" "]];
+ var ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
this.in1 = this.in1.slice();
- a = size(this.in1,1);
- in2 = ones(a,1);
- [this.model,graphics,ok] = set_io(this.model,graphics,list([this.in1,in2],ones(a,1)),list(),ones(1-this.heritance,1),[]);
+ var a = size(this.in1,1);
+ var in2 = ones(a,1);
+ var tmpvar0 = set_io(this.model,graphics,list([this.in1,in2],ones(a,1)),list(),ones(1-this.heritance,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
if (this.wpos==[]) {
@@ -17751,11 +18261,11 @@ function CMSCOPE() {
this.wdim = [[-1],[-1]];
}
if (ok) {
- period = transpose(this.per.slice());
- yy = [[transpose(this.ymin.slice())],[transpose(this.ymax.slice())]];
- rpar = [[0],[period.slice()],[yy.slice()]];
+ var period = transpose(this.per.slice());
+ var yy = [[transpose(this.ymin.slice())],[transpose(this.ymax.slice())]];
+ var rpar = [[0],[period.slice()],[yy.slice()]];
this.clrs = this.clrs.slice(1-1,sum(this.in1));
- ipar = [[this.win],[size(this.in1,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in1.slice()],[this.clrs.slice()],[this.heritance]];
+ var ipar = [[this.win],[size(this.in1,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in1.slice()],[this.clrs.slice()],[this.heritance]];
this.model.evtin = new ScilabDouble([ones(1-this.heritance,1)]);
this.model.dstate = [];
this.model.rpar = new ScilabDouble(rpar);
@@ -17792,8 +18302,8 @@ function CSCOPE() {
this.model.ipar = new ScilabDouble([this.win],[1],[this.N],[this.clrs],[this.wpos],[this.wdim]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.ymin)],[string(this.ymax)],[string(this.per)],[string(this.N)],[transpose(string(0))],[emptystr()]];
- gr_i = [];
+ var exprs = [[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.ymin)],[string(this.ymax)],[string(this.per)],[string(this.N)],[transpose(string(0))],[emptystr()]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -17827,48 +18337,51 @@ function CSCOPE() {
this.heritance = arguments[0]["heritance"]
this.nom = arguments[0]["nom"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.heritance,this.nom,exprs] = scicos_getvalue("Set Scope parameters",["Color (>0) or mark (<0) vector (8 entries)","Output window number (-1 for automatic)","Output window position","Output window sizes","Ymin","Ymax","Refresh period","Buffer size","Accept herited events 0/1","Name of Scope (label&Id)"],list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"str",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number can\'t be < -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number can\'t be < -1"],[" "]];
+ var ok = false;
}
if (this.per<=0) {
- mess = [[mess],["Refresh period must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Refresh period must be positive"],[" "]];
+ var ok = false;
}
if (this.N<2) {
- mess = [[mess],["Buffer size must be at least 2"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 2"],[" "]];
+ var ok = false;
}
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (!or(this.heritance==[0,1])) {
- mess = [[mess],["Accept herited events must be 0 or 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Accept herited events must be 0 or 1"],[" "]];
+ var ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([-1,1],1),list(),ones(1-this.heritance,1),[]);
+ var tmpvar0 = set_io(this.model,graphics,list([-1,1],1),list(),ones(1-this.heritance,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
if (this.wpos==[]) {
@@ -17877,8 +18390,8 @@ function CSCOPE() {
if (this.wdim==[]) {
this.wdim = [[-1],[-1]];
}
- rpar = [[0],[this.ymin],[this.ymax],[this.per]];
- ipar = [[this.win],[1],[this.N],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()]];
+ var rpar = [[0],[this.ymin],[this.ymax],[this.per]];
+ var ipar = [[this.win],[1],[this.N],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()]];
this.model.rpar = new ScilabDouble(rpar);
this.model.ipar = new ScilabDouble(ipar);
this.model.evtin = new ScilabDouble([ones(1-this.heritance,1)]);
@@ -17917,8 +18430,8 @@ function CSCOPXY() {
this.model.ipar = new ScilabDouble([this.win],[1],[this.N],[this.clrs],[this.siz],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.nbr_curves)],[sci2exp(this.clrs)],[sci2exp(this.siz)],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.xmin)],[string(this.xmax)],[string(this.ymin)],[string(this.ymax)],[string(this.N)]];
- gr_i = [];
+ var exprs = [[string(this.nbr_curves)],[sci2exp(this.clrs)],[sci2exp(this.siz)],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.xmin)],[string(this.xmax)],[string(this.ymin)],[string(this.ymax)],[string(this.N)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -17954,61 +18467,64 @@ function CSCOPXY() {
this.ymax = parseFloat(arguments[0]["ymax"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.xmin,this.xmax,this.ymin,this.ymax,this.N,exprs] = scicos_getvalue("Set Scope parameters",["Number of Curves","color (>0) or mark (<0)","line or mark size","Output window number (-1 for automatic)","Output window position","Output window sizes","Xmin","Xmax","Ymin","Ymax","Buffer size"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (this.nbr_curves<=0) {
- mess = [[mess],["Number of Curves cannot be negative or null"],[" "]];
- ok = false;
+ var mess = [[mess],["Number of Curves cannot be negative or null"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
+ var ok = false;
}
if (this.N<1) {
- mess = [[mess],["Buffer size must be at least 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 1"],[" "]];
+ var ok = false;
}
if (this.N==1&&this.clrs>0) {
- mess = [[mess],["Buffer size must be at least 2"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 2"],[" "]];
+ var ok = false;
}
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (this.xmin>=this.xmax) {
- mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
+ var ok = false;
}
if (!ok) {
message(mess);
} else {
- in1 = this.nbr_curves*ones(2,1);
- in2 = ones(2,1);
- [this.model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],ones(2,1)),list(),ones(1,1),[]);
+ var in1 = this.nbr_curves*ones(2,1);
+ var in2 = ones(2,1);
+ var tmpvar0 = set_io(this.model,graphics,list([in1,in2],ones(2,1)),list(),ones(1,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (this.wpos==[]) {
this.wpos = [[-1],[-1]];
}
if (this.wdim==[]) {
this.wdim = [[-1],[-1]];
}
- rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
- ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
+ var rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ var ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
this.model.rpar = new ScilabDouble(rpar);
this.model.ipar = new ScilabDouble(ipar);
graphics.exprs = exprs;
@@ -18044,8 +18560,8 @@ function CSCOPXY3D() {
this.model.ipar = new ScilabDouble([this.win],[8],[this.N],[this.clrs.slice()],[this.siz.slice()],[8],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.nbr_curves)],[strcat(string(this.clrs)," ")],[strcat(string(this.siz)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[strcat(string(this.vec_x)," ")],[strcat(string(this.vec_y)," ")],[strcat(string(this.vec_z)," ")],[strcat(string(this.param3ds)," ")],[string(this.N)]];
- gr_i = [];
+ var exprs = [[string(this.nbr_curves)],[strcat(string(this.clrs)," ")],[strcat(string(this.siz)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[strcat(string(this.vec_x)," ")],[strcat(string(this.vec_y)," ")],[strcat(string(this.vec_z)," ")],[strcat(string(this.param3ds)," ")],[string(this.N)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -18081,72 +18597,75 @@ function CSCOPXY3D() {
this.param3ds = inverse(arguments[0]["param3ds"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.vec_x,this.vec_y,this.vec_z,this.param3ds,this.N,exprs] = scicos_getvalue("Set Scope parameters",["Number of curves","color (>0) or mark (<0)","Line or Mark Size","Output window number (-1 for automatic)","Output window position","Output window sizes","Xmin and Xmax","Ymin and Ymax","Zmin and Zmax","Alpha and Theta","Buffer size"],list("vec",1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",2,"vec",2,"vec",2,"vec",2,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.clrs,"*")!=size(this.siz,"*")) {
- mess = [[mess],["Colors and Size must have same size"],[" "]];
- ok = false;
+ var mess = [[mess],["Colors and Size must have same size"],[" "]];
+ var ok = false;
}
if (this.nbr_curves<=0) {
- mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
- ok = false;
+ var mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
+ var ok = false;
}
if (this.N<1) {
- mess = [[mess],["Buffer size must be at least 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 1"],[" "]];
+ var ok = false;
}
if (this.N<2) {
for (i=1;i<=size(this.clrs,"*");i+=1) {
if (this.clrs[i-1]>0) {
- mess = [[mess],["Buffer size must be at least 2 or Change a color (must be >0)"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 2 or Change a color (must be >0)"],[" "]];
+ var ok = false;
}
}
}
if (this.vec_y[1-1]>=this.vec_y[2-1]) {
- mess = [[mess],["Ymax must be higher than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be higher than Ymin"],[" "]];
+ var ok = false;
}
if (this.vec_x[1-1]>=this.vec_x[2-1]) {
- mess = [[mess],["Xmax must be higher than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be higher than Xmin"],[" "]];
+ var ok = false;
}
if (this.vec_z[1-1]>=this.vec_z[2-1]) {
- mess = [[mess],["Zmax must be higher than Zmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Zmax must be higher than Zmin"],[" "]];
+ var ok = false;
}
if (ok) {
- in1 = this.nbr_curves*ones(3,1);
- in2 = ones(3,1);
- [this.model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],ones(3,1)),list(),ones(1,1),[]);
+ var in1 = this.nbr_curves*ones(3,1);
+ var in2 = ones(3,1);
+ var tmpvar0 = set_io(this.model,graphics,list([in1,in2],ones(3,1)),list(),ones(1,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (this.wpos==[]) {
this.wpos = [[-1],[-1]];
}
if (this.wdim==[]) {
this.wdim = [[-1],[-1]];
}
- rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
- size_siz = size(this.siz,"*");
- ipar = [[this.win],[size_siz],[this.N],[this.clrs.slice()],[this.siz.slice()],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
+ var rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
+ var size_siz = size(this.siz,"*");
+ var ipar = [[this.win],[size_siz],[this.N],[this.clrs.slice()],[this.siz.slice()],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
this.model.rpar = new ScilabDouble(rpar);
this.model.ipar = new ScilabDouble(ipar);
graphics.exprs = exprs;
@@ -18171,12 +18690,12 @@ function OUTIMPL_f() {
this.model.ipar = [1];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "PORT";
mo.inputs = "n";
this.model.equations = new ScilabDouble([mo]);
- exprs = "1";
- gr_i = [];
+ var exprs = "1";
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
return new ImplicitOutBlock(this.x);
@@ -18192,11 +18711,11 @@ function OUTIMPL_f() {
OUTIMPL_f.prototype.set = function OUTIMPL_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[1-1];
+ var exprs = exprs[1-1];
}
while (true) {
[ok,this.prt,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","OUTIMPL_f")],[" "],["Implicit output port"]],"Port number",list("vec",1),exprs);
@@ -18208,8 +18727,8 @@ function OUTIMPL_f() {
block_parameter_error(msprintf("Wrong value for \'Port Number\' parameter: %d.",this.prt),"Strictly positive integer expected.");
} else {
if (this.model.ipar!=this.prt) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.ipar = new ScilabDouble([this.prt]);
graphics.exprs = exprs;
@@ -18224,7 +18743,7 @@ function OUTIMPL_f() {
/* autogenerated from "macros/Sinks/OUT_f.sci" */
function OUT_f() {
OUT_f.prototype.define = function OUT_f() {
- n = -1;
+ var n = -1;
this.prt = 1;
this.model = scicos_model();
this.model.sim = new ScilabString(["output"]);
@@ -18234,8 +18753,8 @@ function OUT_f() {
this.model.ipar = new ScilabDouble([this.prt]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = string(this.prt);
- gr_i = [];
+ var exprs = string(this.prt);
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
return new ExplicitOutBlock(this.x);
}
@@ -18250,11 +18769,11 @@ function OUT_f() {
OUT_f.prototype.set = function OUT_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==2) {
- exprs = exprs[1-1];
+ var exprs = exprs[1-1];
}
while (true) {
[ok,this.prt,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","OUT_f")],[" "],["Regular output port"]],"Port number",list("vec",1),exprs);
@@ -18278,7 +18797,7 @@ function OUT_f() {
/* autogenerated from "macros/Sinks/TOWS_c.sci" */
function TOWS_c() {
TOWS_c.prototype.define = function TOWS_c() {
- nu = -1;
+ var nu = -1;
this.nz = 128;
this.varnam = "A";
this.herit = 0;
@@ -18295,8 +18814,8 @@ function TOWS_c() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- gr_i = [];
- exprs = [[string(this.nz)],[string(this.varnam)],[string(this.herit)]];
+ var gr_i = [];
+ var exprs = [[string(this.nz)],[string(this.varnam)],[string(this.herit)]];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -18316,9 +18835,9 @@ function TOWS_c() {
this.varnam = arguments[0]["varnam"]
this.herit = parseFloat(arguments[0]["herit"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.nz,this.varnam,this.herit,exprs] = scicos_getvalue("Set Xcos buffer block",["Size of buffer","Scilab variable name","Inherit (no:0, yes:1)"],list("vec",1,"str",1,"vec",1),exprs);
if (!ok) {
@@ -18326,17 +18845,20 @@ function TOWS_c() {
}
if ((this.nz<=0)) {
message("Size of buffer must be positive");
- ok = false;
+ var ok = false;
}
- r = false;
- ierr = execstr("r = validvar(varnam)","errcatch");
+ var r = false;
+ var ierr = execstr("r = validvar(varnam)","errcatch");
if (!r||ierr!=0||length(this.varnam)>19) {
message([["Invalid variable name."],["Please choose another variable name."]]);
- ok = false;
+ var ok = false;
}
execstr("if type("+this.varnam+") <> 17 | or(fieldnames("+this.varnam+") <> [\"values\"; \"time\"]) then"+" message([\"Protected variable name.\"; \"Please choose another variable name.\"]);"+" ok = %f;"+" end","errcatch");
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([-1,-2],-1),list(),ones(1-this.herit,1),[]);
+ var tmpvar0 = set_io(this.model,graphics,list([-1,-2],-1),list(),ones(1-this.herit,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (this.herit==1) {
this.model.blocktype = new ScilabString(["x"]);
} else {
@@ -18355,15 +18877,15 @@ function TOWS_c() {
/* autogenerated from "macros/Sinks/TRASH_f.sci" */
function TRASH_f() {
TRASH_f.prototype.define = function TRASH_f() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = new ScilabString(["trash"]);
this.model.in1 = new ScilabDouble([in1]);
this.model.evtin = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -18384,10 +18906,10 @@ function TRASH_f() {
function WFILE_f() {
WFILE_f.prototype.define = function WFILE_f() {
this.in1 = 1;
- nin = sum(this.in1);
- frmt = "(7(e10.3,1x))";
- fname = "foo";
- lunit = 0;
+ var nin = sum(this.in1);
+ var frmt = "(7(e10.3,1x))";
+ var fname = "foo";
+ var lunit = 0;
this.N = 2;
this.model = scicos_model();
this.model.sim = new ScilabString(["writef"]);
@@ -18397,8 +18919,8 @@ function WFILE_f() {
this.model.ipar = new ScilabDouble([length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N)]];
- gr_i = [];
+ var exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -18420,56 +18942,59 @@ function WFILE_f() {
this.frmt1 = parseFloat(arguments[0]["frmt1"])
this.N = parseFloat(arguments[0]["N"])
warnobsolete("WRITEC_f","6.0.0");
- warnMessage = msprintf(_("Feature %s is obsolete."),"WFILE_f");
- warnAdvise = msprintf(_("Please use %s instead."),"WRITEC_f");
- warnXcosMessage = msprintf("%s %s",warnMessage,warnAdvise);
+ var warnMessage = msprintf(_("Feature %s is obsolete."),"WFILE_f");
+ var warnAdvise = msprintf(_("Please use %s instead."),"WRITEC_f");
+ var warnXcosMessage = msprintf("%s %s",warnMessage,warnAdvise);
warnBlockByUID(arg1.model.label,warnXcosMessage);
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- dstate = this.model.dstate;
- lunit = dstate[2-1];
- fname = exprs[2-1];
- frmt = exprs[3-1];
+ var dstate = this.model.dstate;
+ var lunit = dstate[2-1];
+ var fname = exprs[2-1];
+ var frmt = exprs[3-1];
while (true) {
[ok,this.in1,this.fname1,this.frmt1,this.N,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","WFILE_f")],[" "],["Write to output file"],[" "],["Write is done on:"],["&nbsp; - A binary file if no format given"],["&nbsp; - A formatted text file if a format (Fortran type) is given"]],["Input Size","Output File Name","Output Format","Buffer Size"],list("vec",1,"str",1,"str",1,"vec",1),exprs);
if (!ok) {
break;
}
this.in1 = int(this.in1);
- nin = this.in1;
+ var nin = this.in1;
this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
this.frmt1 = stripblanks(this.frmt1);
if (lunit>0&&min(length(frmt),1)!=min(length(this.frmt1),1)) {
block_parameter_error("Simulation running !!! You cannot switch<br />between formatted and unformatted when running","End current simulation first.");
- ok = false;
+ var ok = false;
} else if (lunit>0&&this.fname1!=fname) {
block_parameter_error("You cannot modify \'Output File Name\' when running.","End current simulation first.");
- ok = false;
+ var ok = false;
} else if (this.fname1=="") {
block_parameter_error("Wrong value for \'Output File Name\' parameter","You must provide a filename.");
- ok = false;
+ var ok = false;
} else if (fileparts(this.fname1)!="") {
- [pa,fn,ex] = fileparts(this.fname1);
+ var tmpvar0 = fileparts(this.fname1)
+ var pa = tmpvar0[0]
+ var fn = tmpvar0[1]
+ var ex = tmpvar0[2];
if (!this.isdir[pa-1]) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter.","Output File Name"),msprintf("Directory \'%s\' does not exist",pa));
- ok = false;
+ var ok = false;
}
} else if (this.frmt1!=""&&(part(this.frmt1,1)!="("||part(this.frmt1,length(this.frmt1))!=")")) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Input Format",this.frmt1),"You must enclose the format\'s string between parentheses.");
- ok = false;
+ var ok = false;
} else if (this.N<2) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Buffer Size",this.N),"Must be greater than 1.");
- ok = false;
+ var ok = false;
} else if (this.in1<=0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Size",this.in1),"Strictly positive integer expected.");
- ok = false;
+ var ok = false;
}
if (ok) {
- ipar = [[length(this.fname1)],[length(this.frmt1)],[0],[this.N],[this._str2code[this.fname1-1]],[this._str2code[this.frmt1-1]]];
+ var ipar = [[length(this.fname1)],[length(this.frmt1)],[0],[this.N],[this._str2code[this.fname1-1]],[this._str2code[this.frmt1-1]]];
if (prod(size(dstate))!=(nin+1)*this.N+2) {
- dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
+ var dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
}
this.model.in1 = new ScilabDouble([nin]);
this.model.dstate = new ScilabDouble(dstate);
@@ -18487,12 +19012,12 @@ function WFILE_f() {
/* autogenerated from "macros/Sinks/WRITEAU_f.sci" */
function WRITEAU_f() {
WRITEAU_f.prototype.define = function WRITEAU_f() {
- in1 = 1;
- nin = sum(in1);
- frmt = "uc ";
- fname = "/dev/audio";
+ var in1 = 1;
+ var nin = sum(in1);
+ var frmt = "uc ";
+ var fname = "/dev/audio";
this.swap = 0;
- lunit = 0;
+ var lunit = 0;
this.N = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["writeau"]), new ScilabDouble([2]));
@@ -18502,8 +19027,8 @@ function WRITEAU_f() {
this.model.ipar = new ScilabDouble([length(fname)],[this._str2code[frmt-1]],[this.N],[this.swap],[this._str2code[fname-1]]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [true,false];
- exprs = [string(this.N),string(this.swap)];
- gr_i = [];
+ var exprs = [string(this.N),string(this.swap)];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -18521,35 +19046,35 @@ function WRITEAU_f() {
this.N = parseFloat(arguments[0]["N"])
this.swap = parseFloat(arguments[0]["swap"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- ipar = this.model.ipar;
- dstate = this.model.dstate;
- lunit = dstate[2-1];
+ var ipar = this.model.ipar;
+ var dstate = this.model.dstate;
+ var lunit = dstate[2-1];
while (true) {
[ok,this.N,this.swap,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","WRITEAU_f")],[" "],["Write \'.au\' sound file on audio device"]],["Buffer Size","Swap Mode (0:No, 1:Yes)"],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- nin = 1;
- fname1 = "/dev/audio";
- frmt1 = "uc ";
+ var nin = 1;
+ var fname1 = "/dev/audio";
+ var frmt1 = "uc ";
if (this.alreadyran&&(this.N!=ipar[5-1])) {
block_parameter_error(msprintf("You cannot modify \'%s\' when running.","Buffer Size"),"End current simulation first");
- ok = false;
+ var ok = false;
} else if (this.N<1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Buffer Size",this.N),"Strictly positive integer expected.");
- ok = false;
+ var ok = false;
}
if (this.swap!=0&&this.swap!=1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Swap Mode",this.swap),msprintf("Must be in the interval %s.","[0, 1]"));
- ok = false;
+ var ok = false;
}
if (ok) {
- ipar = [[length(fname1)],[this._str2code[frmt1-1]],[this.N],[this.swap],[this._str2code[fname1-1]]];
+ var ipar = [[length(fname1)],[this._str2code[frmt1-1]],[this.N],[this.swap],[this._str2code[fname1-1]]];
if (prod(size(dstate))!=(nin+1)*this.N+2) {
- dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
+ var dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
}
this.model.in1 = new ScilabDouble([1]);
this.model.dstate = new ScilabDouble(dstate);
@@ -18567,11 +19092,11 @@ function WRITEAU_f() {
function WRITEC_f() {
WRITEC_f.prototype.define = function WRITEC_f() {
this.in1 = 1;
- nin = sum(this.in1);
- frmt = "c ";
- fname = "foo";
+ var nin = sum(this.in1);
+ var frmt = "c ";
+ var fname = "foo";
this.swap = 0;
- lunit = 0;
+ var lunit = 0;
this.N = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["writec"]), new ScilabDouble([2]));
@@ -18581,8 +19106,8 @@ function WRITEC_f() {
this.model.ipar = new ScilabDouble([length(fname)],[this._str2code[frmt-1]],[this.N],[this.swap],[this._str2code[fname-1]]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N),string(this.swap)]];
- gr_i = [];
+ var exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N),string(this.swap)]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -18606,56 +19131,59 @@ function WRITEC_f() {
this.N = parseFloat(arguments[0]["N"])
this.swap = parseFloat(arguments[0]["swap"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- ipar = this.model.ipar;
- dstate = this.model.dstate;
- lunit = dstate[2-1];
- fname = exprs[2-1];
- frmt = exprs[3-1];
+ var ipar = this.model.ipar;
+ var dstate = this.model.dstate;
+ var lunit = dstate[2-1];
+ var fname = exprs[2-1];
+ var frmt = exprs[3-1];
while (true) {
[ok,this.in1,this.fname1,this.frmt1,this.N,this.swap,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","WRITEC_f")],[" "],["Write to C binary file"]],["Input Size","Output File Name","Output Format","Buffer Size","Swap Mode (0:No, 1:Yes)"],list("vec",1,"str",1,"str",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
this.in1 = int(this.in1);
- nin = this.in1;
+ var nin = this.in1;
this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
this.frmt1 = stripblanks(this.frmt1);
- fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
+ var fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
if (and(this.frmt1!=fmts)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Input Format",this.frmt1),"Valid formats are: "+strcat(fmts,", "));
- ok = false;
+ var ok = false;
} else if (this.alreadyran&&this.fname1!=fname) {
block_parameter_error(msprintf("You cannot modify \'%s\' when running","Input Format"),"End current simulation first.");
- ok = false;
+ var ok = false;
} else if (this.alreadyran&&this.N!=ipar[5-1]) {
block_parameter_error(msprintf("You cannot modify \'Buffer Size\' when running.","Buffer Size"),"End current simulation first");
- ok = false;
+ var ok = false;
} else if (this.fname1=="") {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter.","Output File Name"),"You must provide a filename.");
} else if (fileparts(this.fname1)!="") {
- [pa,fn,ex] = fileparts(this.fname1);
+ var tmpvar0 = fileparts(this.fname1)
+ var pa = tmpvar0[0]
+ var fn = tmpvar0[1]
+ var ex = tmpvar0[2];
if (!this.isdir[pa-1]) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter.","Output File Name"),msprintf("Directory \'%s\' does not exist",pa));
- ok = false;
+ var ok = false;
}
} else if (this.N<1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Buffer Size",this.N),"Strictly positive integer expected.");
- ok = false;
+ var ok = false;
} else if (this.in1<=0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Size",this.in1),"Strictly positive integer expected.");
- ok = false;
+ var ok = false;
} else if (this.swap!=0&&this.swap!=1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Swap Mode",this.swap),msprintf("Must be in the interval %s.","[0, 1]"));
- ok = false;
+ var ok = false;
}
this.frmt1 = part(this.frmt1,1,3);
if (ok) {
- ipar = [[length(this.fname1)],[this._str2code[this.frmt1-1]],[this.N],[this.swap],[this._str2code[this.fname1-1]]];
+ var ipar = [[length(this.fname1)],[this._str2code[this.frmt1-1]],[this.N],[this.swap],[this._str2code[this.fname1-1]]];
if (prod(size(dstate))!=(nin+1)*this.N+2) {
- dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
+ var dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
}
this.model.in1 = new ScilabDouble([nin]);
this.model.dstate = new ScilabDouble(dstate);
@@ -18680,8 +19208,8 @@ function CLKINV_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = string(this.prt);
- gr_i = [];
+ var exprs = string(this.prt);
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
return new EventInBlock(this.x);
}
@@ -18696,10 +19224,10 @@ function CLKINV_f() {
CLKINV_f.prototype.set = function CLKINV_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
- exprs = exprs[1-1];
+ var exprs = graphics.exprs;
+ var exprs = exprs[1-1];
while (true) {
[ok,this.prt,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CLKINV_f")],[" "],["Event input port"],[" "]],"Port Number",list("vec",1),exprs);
this.prt = int(this.prt);
@@ -18732,7 +19260,7 @@ function CLKIN_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = string(this.prt);
+ var exprs = string(this.prt);
this.x = standard_define([1,1],this.model,exprs," ");
return new BasicBlock(this.x);
}
@@ -18747,10 +19275,10 @@ function CLKIN_f() {
CLKIN_f.prototype.set = function CLKIN_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
- exprs = exprs[1-1];
+ var exprs = graphics.exprs;
+ var exprs = exprs[1-1];
while (true) {
[ok,this.prt,exprs] = scicos_getvalue("Set Event Input block parameters","Port number",list("vec",1),exprs);
this.prt = int(this.prt);
@@ -18775,7 +19303,7 @@ function CLKIN_f() {
/* autogenerated from "macros/Sources/CLOCK_c.sci" */
function CLOCK_c() {
CLOCK_c.prototype.define = function CLOCK_c() {
- evtdly = EVTDLY_c("define");
+ var evtdly = EVTDLY_c("define");
evtdly.graphics.orig = [320,232];
evtdly.graphics.sz = [40,40];
evtdly.graphics.flip = true;
@@ -18784,19 +19312,19 @@ function CLOCK_c() {
evtdly.graphics.peout = 3;
evtdly.model.rpar = [[0.1],[0.1]];
evtdly.model.firing = 0.1;
- output_port = CLKOUT_f("define");
+ var output_port = CLKOUT_f("define");
output_port.graphics.orig = [399,162];
output_port.graphics.sz = [20,20];
output_port.graphics.flip = true;
output_port.graphics.exprs = "1";
output_port.graphics.pein = 5;
output_port.model.ipar = 1;
- split = CLKSPLIT_f("define");
+ var split = CLKSPLIT_f("define");
split.graphics.orig = [[380.71066],[172]];
split.graphics.pein = 3;
split.graphics.peout = [[5],[6]];
- gr_i = [];
- diagram = scicos_diagram();
+ var gr_i = [];
+ var diagram = scicos_diagram();
diagram.objs[1-1] = output_port;
diagram.objs[2-1] = evtdly;
diagram.objs[3-1] = scicos_link(xx=[[340],[340],[380.71]],yy=[[226.29],[172],[172]],ct=[5,-1],from=[2,1],to=[4,1]);
@@ -18831,19 +19359,19 @@ function CLOCK_c() {
this.t0 = arguments[0]["t0"]
this.exprs0 = arguments[0]["exprs0"]
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="EVTDLY_c") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- xx = arg1.model.rpar.objs[path-1];
- exprs = xx.graphics.exprs;
+ var newpar = list();
+ var xx = arg1.model.rpar.objs[path-1];
+ var exprs = xx.graphics.exprs;
this.model = xx.model;
- t0_old = this.model.firing;
- dt_old = this.model.rpar[1-1];
- model_n = this.model;
+ var t0_old = this.model.firing;
+ var dt_old = this.model.rpar[1-1];
+ var model_n = this.model;
while (true) {
[ok,this.dt,this.t0,this.exprs0] = scicos_getvalue([[msprintf("Set %s block parameters","CLOCK_c")],[" "],["Event clock generator"],[" "],["&nbsp; Do not start if \'Initialisation Time\' is negative"],[" "]],["Period","Initialisation Time"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -18851,7 +19379,7 @@ function CLOCK_c() {
}
if (this.dt<=0) {
block_parameter_error(msprintf("Wrong values for \'%s\' parameter: %5.1e.","Period",this.dt),"Strictly positive number expected.");
- ok = false;
+ var ok = false;
}
if (ok) {
xx.graphics.exprs = this.exprs0;
@@ -18866,20 +19394,20 @@ function CLOCK_c() {
newpar[size(newpar)+1-1] = path;
}
if (t0_old!=this.t0) {
- needcompile = 2;
+ var needcompile = 2;
} else {
- needcompile = 0;
+ var needcompile = 0;
}
this.x = arg1;
- y = needcompile;
- typ = newpar;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
/* autogenerated from "macros/Sources/CLOCK_f.sci" */
function CLOCK_f() {
CLOCK_f.prototype.define = function CLOCK_f() {
- evtdly = EVTDLY_f("define");
+ var evtdly = EVTDLY_f("define");
evtdly.graphics.orig = [320,232];
evtdly.graphics.sz = [40,40];
evtdly.graphics.flip = true;
@@ -18888,19 +19416,19 @@ function CLOCK_f() {
evtdly.graphics.peout = 3;
evtdly.model.rpar = 0.1;
evtdly.model.firing = 0.1;
- output_port = CLKOUT_f("define");
+ var output_port = CLKOUT_f("define");
output_port.graphics.orig = [399,162];
output_port.graphics.sz = [20,20];
output_port.graphics.flip = true;
output_port.graphics.exprs = "1";
output_port.graphics.pein = 5;
output_port.model.ipar = 1;
- split = CLKSPLIT_f("define");
+ var split = CLKSPLIT_f("define");
split.graphics.orig = [[380.71066],[172]];
split.graphics.pein = 3;
split.graphics.peout = [[5],[6]];
- gr_i = [];
- diagram = scicos_diagram();
+ var gr_i = [];
+ var diagram = scicos_diagram();
diagram.objs[1-1] = output_port;
diagram.objs[2-1] = evtdly;
diagram.objs[3-1] = scicos_link(xx=[[340],[340],[380.71]],yy=[[226.29],[172],[172]],ct=[5,-1],from=[2,1],to=[4,1]);
@@ -18935,19 +19463,19 @@ function CLOCK_f() {
this.t0 = arguments[0]["t0"]
this.exprs0 = arguments[0]["exprs0"]
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="EVTDLY_f") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- xx = arg1.model.rpar.objs[path-1];
- exprs = xx.graphics.exprs;
+ var newpar = list();
+ var xx = arg1.model.rpar.objs[path-1];
+ var exprs = xx.graphics.exprs;
this.model = xx.model;
- t0_old = this.model.firing;
- dt_old = this.model.rpar;
- model_n = this.model;
+ var t0_old = this.model.firing;
+ var dt_old = this.model.rpar;
+ var model_n = this.model;
while (true) {
[ok,this.dt,this.t0,this.exprs0] = scicos_getvalue("Set Clock block parameters",["Period","Init time"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -18955,7 +19483,7 @@ function CLOCK_f() {
}
if (this.dt<=0) {
message("period must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
xx.graphics.exprs = this.exprs0;
@@ -18970,13 +19498,13 @@ function CLOCK_f() {
newpar[size(newpar)+1-1] = path;
}
if (t0_old!=this.t0) {
- needcompile = 2;
+ var needcompile = 2;
} else {
- needcompile = 0;
+ var needcompile = 0;
}
this.x = arg1;
- y = needcompile;
- typ = newpar;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
@@ -18991,8 +19519,8 @@ function CONST() {
this.model.rpar = new ScilabDouble([this.C]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = strcat(sci2exp(this.C));
- gr_i = [];
+ var exprs = strcat(sci2exp(this.C));
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -19007,16 +19535,16 @@ function CONST() {
CONST.prototype.set = function CONST() {
this.C = parseFloat(arguments[0]["C"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.C,exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),exprs);
if (!ok) {
break;
}
- sz = size(this.C);
- nout = size(this.C,"*");
+ var sz = size(this.C);
+ var nout = size(this.C,"*");
if (nout==0) {
message("C must have at least one element");
} else if (and(sz>1)) {
@@ -19044,8 +19572,8 @@ function CONST_f() {
this.model.rpar = new ScilabDouble([this.C]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = strcat(sci2exp(this.C));
- gr_i = [];
+ var exprs = strcat(sci2exp(this.C));
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -19060,15 +19588,15 @@ function CONST_f() {
CONST_f.prototype.set = function CONST_f() {
this.C = parseFloat(arguments[0]["C"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.C,exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),exprs);
if (!ok) {
break;
}
- nout = size(this.C,"*");
+ var nout = size(this.C,"*");
if (nout==0) {
message("C must have at least one element");
} else {
@@ -19097,8 +19625,8 @@ function CONST_m() {
this.model.opar = list();
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = sci2exp(this.C);
- gr_i = [];
+ var exprs = sci2exp(this.C);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -19113,15 +19641,15 @@ function CONST_m() {
CONST_m.prototype.set = function CONST_m() {
this.C = inverse(arguments[0]["C"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.C,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CONST_m")],[" "],["Constant value generator"],[" "]],"Constant Value",list("vec",-1),exprs);
if (!ok) {
break;
}
- nout = size(this.C);
+ var nout = size(this.C);
if (find(nout==0)!=[]) {
block_parameter_error(msprintf("Wrong size for \'%s\' parameter","Constant Value"),"Constant value must have at least one element.");
} else {
@@ -19129,29 +19657,32 @@ function CONST_m() {
this.model.opar = list(this.C);
if ((this.type[this.C-1]==1)) {
if (isreal(this.C)) {
- ot = 1;
+ var ot = 1;
} else {
- ot = 2;
+ var ot = 2;
}
} else if ((typeof(this.C)=="int32")) {
- ot = 3;
+ var ot = 3;
} else if ((typeof(this.C)=="int16")) {
- ot = 4;
+ var ot = 4;
} else if ((typeof(this.C)=="int8")) {
- ot = 5;
+ var ot = 5;
} else if ((typeof(this.C)=="uint32")) {
- ot = 6;
+ var ot = 6;
} else if ((typeof(this.C)=="uint16")) {
- ot = 7;
+ var ot = 7;
} else if ((typeof(this.C)=="uint8")) {
- ot = 8;
+ var ot = 8;
} else {
block_parameter_error(msprintf("Wrong type for \'%s\' parameter","Constant Value"),"Value type must be a numeric type (double, complex, int, int8, ...).");
- ok = false;
+ var ok = false;
}
if (ok) {
this.model.rpar = [];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(),list(nout,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(),list(nout,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = this.model;
@@ -19168,10 +19699,10 @@ function CURVE_c() {
this.model = scicos_model();
this.xx = [0,1,2];
this.yy = [10,20,-30];
- N = 3;
+ var N = 3;
this.Method = 3;
this.PeriodicOption = "y";
- Graf = "n";
+ var Graf = "n";
this.model.sim = list(new ScilabString(["curve_c"]), new ScilabDouble([4]));
this.model.in1 = [];
this.model.out = new ScilabDouble([1]);
@@ -19182,8 +19713,8 @@ function CURVE_c() {
this.model.evtin = new ScilabDouble([1]);
this.model.evtout = new ScilabDouble([1]);
this.model.firing = new ScilabDouble([0]);
- exprs = [[sci2exp(this.Method)],[sci2exp(this.xx)],[sci2exp(this.yy)],[this.PeriodicOption],[Graf]];
- gr_i = [];
+ var exprs = [[sci2exp(this.Method)],[sci2exp(this.xx)],[sci2exp(this.yy)],[this.PeriodicOption],[Graf]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -19208,70 +19739,78 @@ function CURVE_c() {
this.graf = arguments[0]["graf"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- ok = false;
- SaveExit = false;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var ok = false;
+ var SaveExit = false;
while (true) {
- Ask_again = false;
+ var Ask_again = false;
[ok,this.Method,this.xx,this.yy,this.PeriodicOption,this.graf,exprs] = scicos_getvalue("Spline data",["Spline Method (0..7)","x","y","Periodic signal(y/n)?","Launch graphic window(y/n)?"],list("vec",1,"vec",-1,"vec",-1,"str",1,"str",1),exprs);
if (!ok) {
break;
}
if (this.PeriodicOption=="y"||this.PeriodicOption=="Y") {
- PO = 1;
+ var PO = 1;
} else {
exprs[4-1] = "n";
- PO = 0;
+ var PO = 0;
}
- mtd = int(this.Method);
+ var mtd = int(this.Method);
if (mtd<0) {
- mtd = 0;
+ var mtd = 0;
}
if (mtd>7) {
- mtd = 7;
+ var mtd = 7;
}
- METHOD = getmethod(mtd);
+ var METHOD = getmethod(mtd);
if (!Ask_again) {
this.xx = this.xx.slice();
this.yy = this.yy.slice();
- [nx,mx] = size(this.xx);
- [ny,my] = size(this.yy);
+ var tmpvar0 = size(this.xx)
+ var nx = tmpvar0[0]
+ var mx = tmpvar0[1];
+ var tmpvar1 = size(this.yy)
+ var ny = tmpvar1[0]
+ var my = tmpvar1[1];
if (!((nx==ny)&&(mx==my))) {
messagebox("Incompatible size of [x] and [y]","modal","error");
- Ask_again = true;
+ var Ask_again = true;
}
}
if (!Ask_again) {
this.xy = [this.xx,this.yy];
- [this.xy] = cleandata(this.xy);
- N = size(this.xy,"r");
+ var tmpvar2 = cleandata(this.xy)
+ this.xy = tmpvar2[0];
+ var N = size(this.xy,"r");
exprs[5-1] = "n";
if (this.graf=="y"||this.graf=="Y") {
- ipar = [[N],[mtd],[PO]];
- rpar = [];
+ var ipar = [[N],[mtd],[PO]];
+ var rpar = [];
if ((winsid()==[])) {
this.curwin = 0;
} else {
this.curwin = max(winsid())+1;
}
- [orpar,oipar,ok] = poke_point(this.xy,ipar,rpar);
+ var tmpvar3 = poke_point(this.xy,ipar,rpar)
+ var orpar = tmpvar3[0]
+ var oipar = tmpvar3[1]
+ var ok = tmpvar3[2];
if (!ok) {
break;
}
- N2 = oipar[1-1];
- xy2 = [orpar.slice(1-1,N2),orpar.slice(N2+1-1,2*N2)];
- New_methhod = oipar[2-1];
- DChange = false;
- METHOD = getmethod(New_methhod);
+ var N2 = oipar[1-1];
+ var xy2 = [orpar.slice(1-1,N2),orpar.slice(N2+1-1,2*N2)];
+ var New_methhod = oipar[2-1];
+ var DChange = false;
+ var METHOD = getmethod(New_methhod);
if (or(this.xy.slice()[1-1]!=xy2.slice()[1-1])) {
- DChange = true;
+ var DChange = true;
}
if (or(this.xy.slice(1-1,N-1)[2-1]!=xy2.slice(1-1,N2-1)[2-1])) {
- DChange = true;
+ var DChange = true;
}
if ((this.xy[N-1][2-1]!=xy2[N2-1][2-1]&&(METHOD!="periodic"))) {
- DChange = true;
+ var DChange = true;
}
if (DChange) {
exprs[2-1] = strcat(sci2exp(xy2.slice()[1-1]));
@@ -19279,31 +19818,34 @@ function CURVE_c() {
}
exprs[1-1] = sci2exp(New_methhod);
if (oipar[3-1]==1) {
- perop = "y";
+ var perop = "y";
} else {
- perop = "n";
+ var perop = "n";
}
exprs[4-1] = perop;
- SaveExit = true;
+ var SaveExit = true;
} else {
- [Xdummy,Ydummy,orpar] = Do_Spline(N,mtd,this.xy.slice()[1-1],this.xy.slice()[2-1]);
+ var tmpvar4 = Do_Spline(N,mtd,this.xy.slice()[1-1],this.xy.slice()[2-1])
+ var Xdummy = tmpvar4[0]
+ var Ydummy = tmpvar4[1]
+ var orpar = tmpvar4[2];
if ((METHOD=="periodic")) {
this.xy[N-1][2-1] = this.xy[1-1][2-1];
}
if ((METHOD=="order 2"||METHOD=="not_a_knot"||METHOD=="periodic"||METHOD=="monotone"||METHOD=="fast"||METHOD=="clamped")) {
- orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]],[orpar]];
+ var orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]],[orpar]];
} else {
if ((METHOD=="zero order"||METHOD=="linear")) {
- orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]]];
+ var orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]]];
}
}
exprs[1-1] = sci2exp(mtd);
- oipar = [[N],[mtd],[PO]];
- SaveExit = true;
+ var oipar = [[N],[mtd],[PO]];
+ var SaveExit = true;
}
}
if ((SaveExit)) {
- xp = find(orpar.slice(1-1,oipar[1-1])>=0);
+ var xp = find(orpar.slice(1-1,oipar[1-1])>=0);
if ((xp!=[])) {
this.model.firing = new ScilabDouble([orpar[xp[1-1]-1]]);
} else {
@@ -19323,12 +19865,12 @@ function CURVE_c() {
/* autogenerated from "macros/Sources/CURV_f.sci" */
function CURV_f() {
CURV_f.prototype.define = function CURV_f() {
- xx = [[0],[1],[2]];
- yy = [[-5],[5],[0]];
- rect = [0,-5,2,5];
- axisdata = [[2],[10],[2],[10]];
- ipar = [[size(xx,1)],[axisdata.slice()]];
- rpar = [[xx],[yy],[rect.slice()]];
+ var xx = [[0],[1],[2]];
+ var yy = [[-5],[5],[0]];
+ var rect = [0,-5,2,5];
+ var axisdata = [[2],[10],[2],[10]];
+ var ipar = [[size(xx,1)],[axisdata.slice()]];
+ var rpar = [[xx],[yy],[rect.slice()]];
this.model = scicos_model();
this.model.sim = new ScilabString(["intplt"]);
this.model.in1 = [];
@@ -19337,7 +19879,7 @@ function CURV_f() {
this.model.ipar = new ScilabDouble([size(xx,1)],[axisdata.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -19352,34 +19894,38 @@ function CURV_f() {
CURV_f.prototype.set = function CURV_f() {
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- rpar = this.model.rpar;
- ipar = this.model.ipar;
- n = ipar[1-1];
- xx = rpar.slice(1-1,n);
- yy = rpar.slice(n+1-1,2*n);
- gc = list(rpar.slice(2*n+1-1,2*n+4),ipar.slice(2-1,5));
+ var graphics = arg1.graphics;
+ var rpar = this.model.rpar;
+ var ipar = this.model.ipar;
+ var n = ipar[1-1];
+ var xx = rpar.slice(1-1,n);
+ var yy = rpar.slice(n+1-1,2*n);
+ var gc = list(rpar.slice(2*n+1-1,2*n+4),ipar.slice(2-1,5));
while (true) {
[ln,fun]=where()
if (!or(fun=="do_eval")) {
- [xx,yy,ok,gc] = edit_curv(xx,yy,"axy",[" "," "," "],gc);
+ var tmpvar0 = edit_curv(xx,yy,"axy",[" "," "," "],gc)
+ var xx = tmpvar0[0]
+ var yy = tmpvar0[1]
+ var ok = tmpvar0[2]
+ var gc = tmpvar0[3];
} else {
- ok = true;
+ var ok = true;
}
if (!ok) {
break;
}
- n = size(xx,"*");
+ var n = size(xx,"*");
if (or(xx.slice(2-1,n)-xx.slice(1-1,n-1)<0)) {
message("You have not defined a function");
- ok = false;
+ var ok = false;
}
if (ok) {
this.model.sim = new ScilabString(["intplt"]);
this.model.firing = [];
- rect = gc[1-1];
+ var rect = gc[1-1];
this.model.rpar = new ScilabDouble([xx.slice()],[yy.slice()],[rect.slice()]);
- axisdata = gc[2-1];
+ var axisdata = gc[2-1];
this.model.ipar = new ScilabDouble([size(xx,"*")],[axisdata.slice()]);
this.x.graphics = graphics;
this.x.model = this.model;
@@ -19404,8 +19950,8 @@ function Counter() {
this.model.ipar = new ScilabDouble([this.rule],[this.maxim],[this.minim]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.minim)],[string(this.maxim)],[string(this.rule)]];
- gr_i = [];
+ var exprs = [[string(this.minim)],[string(this.maxim)],[string(this.rule)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -19425,8 +19971,8 @@ function Counter() {
this.maxim = parseFloat(arguments[0]["maxim"])
this.rule = parseFloat(arguments[0]["rule"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.minim,this.maxim,this.rule,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","Counter")],[" "],["Integer counter generator"],[" "]],["Minimum","Maximum","Rule (1:Increment, 2:Decrement)"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -19454,13 +20000,13 @@ function Counter() {
/* autogenerated from "macros/Sources/FROMWSB.sci" */
function FROMWSB() {
FROMWSB.prototype.define = function FROMWSB() {
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-159.096,811.104,-121.216,617.984,1323,1008,331,284,630,480,1426,231,1.4],Title="FROMWSB",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-159.096,811.104,-121.216,617.984,1323,1008,331,284,630,480,1426,231,1.4],Title="FROMWSB",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="FROMWS_c",graphics=scicos_graphics(orig=[260.37067,261.584],sz=[70,40],flip=true,theta=0,exprs=[["V"],["1"],["1"],["0"]],pin=[],pout=4,pein=2,peout=2,gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("fromws_c",4),in1=[],in2=[],intyp=1,out=-1,out2=-2,outtyp=-1,evtin=1,evtout=1,state=[],dstate=[],odstate=list(),rpar=[],ipar=[[1],[-31],[1],[1],[0]],opar=list(),blocktype="d",firing=0,dep_ut=[false,true],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_link(xx=[[295.37067],[295.37067],[233.23733],[233.23733],[295.37067],[295.37067]],yy=[[255.86971],[223.45067],[223.45067],[337.85067],[337.85067],[307.29829]],id="drawlink",thick=[0,0],ct=[5,-1],from=[1,1,0],to=[1,1,1]);
scs_m_1.objs[3-1] = scicos_block(gui="OUT_f",graphics=scicos_graphics(orig=[358.9421,271.584],sz=[20,20],flip=true,theta=0,exprs="1",pin=4,pout=[],pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim="output",in1=-1,in2=-2,intyp=-1,out=[],out2=[],outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[4-1] = scicos_link(xx=[[338.9421],[358.9421]],yy=[[281.584],[281.584]],id="drawlink",thick=[0,0],ct=[1,1],from=[1,1,0],to=[3,1,1]);
this.model = scicos_model(sim="csuper",in1=[],in2=[],intyp=1,out=-1,out2=-2,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=scs_m_1,ipar=[],opar=list(),blocktype="h",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list());
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([5,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -19474,72 +20020,72 @@ function FROMWSB() {
}
FROMWSB.prototype.set = function FROMWSB() {
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="FROMWS_c") {
- ppath = list(i);
+ var ppath = list(i);
break;
}
}
- newpar = list();
- y = 0;
+ var newpar = list();
+ var y = 0;
for (path in ppath) {
- np = size(path,"*");
- spath = list();
+ var np = size(path,"*");
+ var spath = list();
for (k=1;k<=np;k+=1) {
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path[k-1];
}
- xx = arg1[spath-1];
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (!isequalbitwise(this.xxn,xx)) {
this.model = xx.model;
- model_n = this.xxn.model;
+ var model_n = this.xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)||or(this.model.in2!=model_n.in2)||or(this.model.out2!=model_n.out2)||or(this.model.outtyp!=model_n.outtyp)||or(this.model.intyp!=model_n.intyp)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if ((size(this.model.in1,"*")!=size(model_n.in1,"*"))||(size(this.model.out,"*")!=size(model_n.out,"*"))) {
- needcompile = 4;
+ var needcompile = 4;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = this.xxn;
newpar[size(newpar)+1-1] = path;
- y = max(y,needcompile);
+ var y = max(y,needcompile);
}
}
this.x = arg1;
- typ = newpar;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
@@ -19561,8 +20107,8 @@ function FROMWS_c() {
this.model.firing = [0];
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,true];
- gr_i = [];
- exprs = [[string(this.varnam)],[string(this.Method)],[string(this.ZC)],[string(this.OutEnd)]];
+ var gr_i = [];
+ var exprs = [[string(this.varnam)],[string(this.Method)],[string(this.ZC)],[string(this.OutEnd)]];
this.x = standard_define([3.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -19584,8 +20130,8 @@ function FROMWS_c() {
this.ZC = parseFloat(arguments[0]["ZC"])
this.OutEnd = parseFloat(arguments[0]["OutEnd"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.varnam,this.Method,this.ZC,this.OutEnd,exprs] = scicos_getvalue("Set From_Workspace block parameters",["Variable name","Interpolation Method","Enable zero crossing(0:No, 1:Yes)?","Output at end(0:Zero, 1:Hold, 2:Repeat)"],list("str",1,"vec",1,"vec",1,"vec",1),exprs);
@@ -19594,25 +20140,28 @@ function FROMWS_c() {
}
if (!(this.Method==0||this.Method==1||this.Method==2||this.Method==3)) {
message("Interpolation method should be chosen in [0,1,2,3]");
- ok = false;
+ var ok = false;
}
if (!(this.ZC==0||this.ZC==1)) {
message("Zero crossing should be either 0 or 1");
- ok = false;
+ var ok = false;
}
if (!(this.OutEnd==0||this.OutEnd==1||this.OutEnd==2)) {
message("Output at end option should be either 0 or 1");
- ok = false;
+ var ok = false;
}
- r = false;
- ierr = execstr("r=validvar(varnam)","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(varnam)","errcatch");
if (!r) {
message([["Invalid variable name."],["Please choose another variable name."]]);
- ok = false;
+ var ok = false;
}
if (ok) {
this.model.ipar = new ScilabDouble([length(this.varnam)],[this._str2code[this.varnam-1]],[this.Method],[this.ZC],[this.OutEnd]);
- [this.model,graphics,ok] = set_io(this.model,graphics,list(),list([-1,-2],-1),1,1);
+ var tmpvar0 = set_io(this.model,graphics,list(),list([-1,-2],-1),1,1)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.x.graphics = graphics;
@@ -19627,7 +20176,7 @@ function FROMWS_c() {
/* autogenerated from "macros/Sources/GENSIN_f.sci" */
function GENSIN_f() {
GENSIN_f.prototype.define = function GENSIN_f() {
- rpar = [[1],[1],[0]];
+ var rpar = [[1],[1],[0]];
this.model = scicos_model();
this.model.sim = new ScilabString(["gensin"]);
this.model.in1 = [];
@@ -19637,8 +20186,8 @@ function GENSIN_f() {
this.model.rpar = new ScilabDouble([1],[1],[0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[string(rpar[1-1])],[string(rpar[2-1])],[string(rpar[3-1])]];
- gr_i = [];
+ var exprs = [[string(rpar[1-1])],[string(rpar[2-1])],[string(rpar[3-1])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -19658,8 +20207,8 @@ function GENSIN_f() {
this.F = arguments[0]["F"]
this.P = arguments[0]["P"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.M,this.F,this.P,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","GENSIN_f")],[" "],["Sine wave generator"],[" "]],["Magnitude","Frequency (rad/s)","Phase (rad)"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -19668,10 +20217,13 @@ function GENSIN_f() {
}
if (this.F<0) {
block_parameter_error(msprintf("Wrong value for \'Frequency\' parameter: %e.",this.F),"Strictly positive integer expected.");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,[],1,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,[],1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.rpar = new ScilabDouble([this.M],[this.F],[this.P]);
this.model.out2 = new ScilabDouble([1]);
this.model.outtyp = new ScilabDouble([1]);
@@ -19697,8 +20249,8 @@ function GENSQR_f() {
this.model.dstate = new ScilabDouble([this.Amplitude]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = string(this.Amplitude);
- gr_i = [];
+ var exprs = string(this.Amplitude);
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -19714,11 +20266,11 @@ function GENSQR_f() {
GENSQR_f.prototype.set = function GENSQR_f() {
this.Amplitude = parseFloat(arguments[0]["Amplitude"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[2-1];
+ var exprs = exprs[2-1];
}
while (true) {
[ok,this.Amplitude,exprs] = scicos_getvalue(["Set Square generator block parameters"],["Amplitude"],list("vec",1),exprs);
@@ -19739,7 +20291,7 @@ function GENSQR_f() {
/* autogenerated from "macros/Sources/GEN_SQR.sci" */
function GEN_SQR() {
GEN_SQR.prototype.define = function GEN_SQR() {
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-176.97473,421.18646,173.61587,524.41503,827,480,0,15,827,480,755,614,1.4],Title="SuperBlock",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=[["if typeof(Amin)<>typeof(Amax) then error(\'Minimum value and Maximum value must have the same type\');end"],["if and(rule<>[1;2]) then error(\'Initial Value must be 1 (for Min) or 2 (for Max)\');end"],["if Amin>Amax then error(\'Maximum value must be greater than the Minimum Value\');end"],["P=%pi/F"],[""]],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-176.97473,421.18646,173.61587,524.41503,827,480,0,15,827,480,755,614,1.4],Title="SuperBlock",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=[["if typeof(Amin)<>typeof(Amax) then error(\'Minimum value and Maximum value must have the same type\');end"],["if and(rule<>[1;2]) then error(\'Initial Value must be 1 (for Min) or 2 (for Max)\');end"],["if Amin>Amax then error(\'Maximum value must be greater than the Minimum Value\');end"],["P=%pi/F"],[""]],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="Counter",graphics=scicos_graphics(orig=[18.229901,339.5057],sz=[60,40],flip=true,theta=0,exprs=[["1"],["2"],["rule"]],pin=[],pout=8,pein=16,peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("counter",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=1,evtin=1,evtout=[],state=[],dstate=0,odstate=list(),rpar=[],ipar=[[1],[2],[1]],opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_block(gui="CONST_m",graphics=scicos_graphics(orig=[38.096074,293.82198],sz=[40,40],flip=true,theta=0,exprs="Amin",pin=[],pout=5,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(-1),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[3-1] = scicos_block(gui="CONST_m",graphics=scicos_graphics(orig=[37.378886,245.02389],sz=[40,40],flip=true,theta=0,exprs="Amax",pin=[],pout=6,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(1),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -19779,12 +20331,12 @@ function GEN_SQR() {
this.model.nzcross = new ScilabDouble([0]);
this.model.nmode = new ScilabDouble([0]);
this.model.equations = list();
- Amin = -1;
- Amax = 1;
- rule = 1;
- F = 1;
- exprs = [sci2exp(Amin),sci2exp(Amax),sci2exp(rule),sci2exp(F)];
- gr_i = [];
+ var Amin = -1;
+ var Amax = 1;
+ var rule = 1;
+ var F = 1;
+ var exprs = [sci2exp(Amin),sci2exp(Amax),sci2exp(rule),sci2exp(F)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -19801,37 +20353,43 @@ function GEN_SQR() {
scicos_context.Amax = arguments[0]["scicos_context.Amax"]
scicos_context.rule = arguments[0]["scicos_context.rule"]
scicos_context.F = arguments[0]["scicos_context.F"]
- y = this.needcompile;
+ var y = this.needcompile;
arg1.model.ipar = 1;
- typ = list();
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- Btitre = "Set GEN_SQR parameters";
- Exprs0 = [["Amin"],["Amax"],["rule"],["F"]];
- Bitems = [["Minimum Value"],["Maximum Value"],["Initial Value( 1= Minimum Value 2= Maximum Value)"],["Period (sec)"]];
- Ss = list("mat",[-1,-1],"mat",[-1,-1],"pol",-1,"pol",-1);
- scicos_context = struct();
- this.x = arg1;
- ok = false;
+ var typ = list();
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var Btitre = "Set GEN_SQR parameters";
+ var Exprs0 = [["Amin"],["Amax"],["rule"],["F"]];
+ var Bitems = [["Minimum Value"],["Maximum Value"],["Initial Value( 1= Minimum Value 2= Maximum Value)"],["Period (sec)"]];
+ var Ss = list("mat",[-1,-1],"mat",[-1,-1],"pol",-1,"pol",-1);
+ var scicos_context = struct();
+ this.x = arg1;
+ var ok = false;
while (!ok) {
[ok,scicos_context.Amin,scicos_context.Amax,scicos_context.rule,scicos_context.F,exprs] = scicos_getvalue(Btitre,Bitems,Ss,exprs);
if (!ok) {
return;
}
- PREVAR_scicos_context = scicos_context;
- sblock = this.x.model.rpar;
- [PREVAR_scicos_context,ierr] = script2var(sblock.props.context,PREVAR_scicos_context);
+ var PREVAR_scicos_context = scicos_context;
+ var sblock = this.x.model.rpar;
+ var tmpvar0 = script2var(sblock.props.context,PREVAR_scicos_context)
+ var PREVAR_scicos_context = tmpvar0[0]
+ var ierr = tmpvar0[1];
if (ierr==0) {
- [sblock,%w,needcompile2,ok] = do_eval(sblock,list());
+ var tmpvar1 = do_eval(sblock,list())
+ var sblock = tmpvar1[0]
+ %w = tmpvar1[1]
+ var needcompile2 = tmpvar1[2]
+ var ok = tmpvar1[3];
if (ok) {
- y = max(2,this.needcompile,needcompile2);
+ var y = max(2,this.needcompile,needcompile2);
this.x.graphics.exprs = exprs;
this.x.model.rpar = sblock;
break;
}
} else {
message(lasterror());
- ok = false;
+ var ok = false;
}
}
return new BasicBlock(this.x);
@@ -19840,7 +20398,7 @@ function GEN_SQR() {
/* autogenerated from "macros/Sources/Ground_g.sci" */
function Ground_g() {
Ground_g.prototype.define = function Ground_g() {
- C = [0];
+ var C = [0];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["cstblk4_m"]), new ScilabDouble([4]));
this.model.in1 = [];
@@ -19852,8 +20410,8 @@ function Ground_g() {
this.model.opar = list(C);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -19880,13 +20438,13 @@ function INIMPL_f() {
this.model.ipar = [1];
this.model.dep_ut = [false,false];
this.model.blocktype = new ScilabString(["c"]);
- mo = modelica();
+ var mo = modelica();
mo.model = "PORT";
mo.outputs = "n";
this.model.equations = new ScilabDouble([mo]);
this.prt = 1;
- exprs = "1";
- gr_i = [];
+ var exprs = "1";
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
this.x.graphics.out_implicit = ["I"];
return new ImplicitInBlock(this.x);
@@ -19902,11 +20460,11 @@ function INIMPL_f() {
INIMPL_f.prototype.set = function INIMPL_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[1-1];
+ var exprs = exprs[1-1];
}
while (true) {
[ok,this.prt,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","INIMPL_f")],[" "],["Implicit input port"],[" "]],"Port Number",list("vec",1),exprs);
@@ -19918,8 +20476,8 @@ function INIMPL_f() {
block_parameter_error(msprintf("Wrong value for \'Port Number\' parameter: %d.",this.prt),"Strictly positive integer expected.");
} else {
if (this.model.ipar!=this.prt) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.ipar = new ScilabDouble([this.prt]);
graphics.exprs = exprs;
@@ -19934,7 +20492,7 @@ function INIMPL_f() {
/* autogenerated from "macros/Sources/IN_f.sci" */
function IN_f() {
IN_f.prototype.define = function IN_f() {
- prt = 1;
+ var prt = 1;
this.model = scicos_model();
this.model.sim = new ScilabString(["input"]);
this.model.out = new ScilabDouble([-1]);
@@ -19943,8 +20501,8 @@ function IN_f() {
this.model.ipar = new ScilabDouble([prt]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = sci2exp(prt);
- gr_i = [];
+ var exprs = sci2exp(prt);
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
return new ExplicitInBlock(this.x);
}
@@ -19958,21 +20516,26 @@ function IN_f() {
}
IN_f.prototype.set = function IN_f() {
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==2) {
- exprs = exprs[1-1];
+ var exprs = exprs[1-1];
}
if (size(exprs,"*")==1) {
- exprs = [[exprs[1-1]],["[-1 -2]"],["-1"]];
+ var exprs = [[exprs[1-1]],["[-1 -2]"],["-1"]];
}
while (true) {
- [ok,prt,otsz,ot,exprs] = getvalue(_("Set Input block parameters"),[[_("Port number")],[_("Outport size ([-1 -2] for inherit)")],[_("Outport Type (-1 for inherit)")]],list("vec",1,"vec",-1,"vec",1),exprs);
+ var tmpvar0 = getvalue(_("Set Input block parameters"),[[_("Port number")],[_("Outport size ([-1 -2] for inherit)")],[_("Outport Type (-1 for inherit)")]],list("vec",1,"vec",-1,"vec",1),exprs)
+ var ok = tmpvar0[0]
+ var prt = tmpvar0[1]
+ var otsz = tmpvar0[2]
+ var ot = tmpvar0[3]
+ var exprs = tmpvar0[4];
if (!ok) {
break;
}
- prt = int(prt);
+ var prt = int(prt);
if (prt<=0) {
message(_("Port number must be a positive integer"));
} else if (!isequal(size(otsz,"*"),2)) {
@@ -19981,8 +20544,8 @@ function IN_f() {
message(_("Outport type must be a number between 1 and 9, or -1 for inheritance."));
} else {
if (this.model.ipar!=prt) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.ipar = new ScilabDouble([prt]);
this.model.firing = [];
@@ -20011,8 +20574,8 @@ function Modulo_Count() {
this.model.ipar = new ScilabDouble([this.base]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.ini_c)],[string(this.base)]];
- gr_i = [];
+ var exprs = [[string(this.ini_c)],[string(this.base)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -20030,8 +20593,8 @@ function Modulo_Count() {
this.ini_c = parseFloat(arguments[0]["ini_c"])
this.base = parseFloat(arguments[0]["base"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.ini_c,this.base,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","Modulo_Count")],[" "],["Modulo counter (0 to N counter)"],[" "]],["Initial State (zero or positive number)","Upper Limit (positive number)"],list("vec",1,"vec",1),exprs);
@@ -20059,7 +20622,7 @@ function Modulo_Count() {
/* autogenerated from "macros/Sources/PULSE_SC.sci" */
function PULSE_SC() {
PULSE_SC.prototype.define = function PULSE_SC() {
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-162.7581,435.54369,67.607292,416.67644,827,479,0,15,827,480,715,167,1.4],Title=["SuperBlock","/home/fady/Scicos_examples/"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=10,context=[["E2=E+W/100*F"],["if (W<0 | W>100) then error(\'Width must be between 0 and 100\');end"],["if (E2 >= F) then error (\'Offset must be lower than (frequency*(1-Width/100))\'); end"]],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-162.7581,435.54369,67.607292,416.67644,827,479,0,15,827,480,715,167,1.4],Title=["SuperBlock","/home/fady/Scicos_examples/"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=10,context=[["E2=E+W/100*F"],["if (W<0 | W>100) then error(\'Width must be between 0 and 100\');end"],["if (E2 >= F) then error (\'Offset must be lower than (frequency*(1-Width/100))\'); end"]],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="CONST_m",graphics=scicos_graphics(orig=[30.801202,158.91733],sz=[40,40],flip=true,theta=0,exprs="A",pin=[],pout=5,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(1),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_block(gui="Ground_g",graphics=scicos_graphics(orig=[31.534535,215.384],sz=[40,40],flip=true,theta=0,exprs=[],pin=[],pout=4,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=-1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(0),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[3-1] = scicos_block(gui="SELECT_m",graphics=scicos_graphics(orig=[106.00652,186.09381],sz=[40,40],flip=true,theta=0,exprs=[["-1"],["2"],["1"]],pin=[[4],[5]],pout=11,pein=[[9],[8]],peout=[],gr_i=[],id="",in_implicit=[["E"],["E"]],out_implicit="E"),model=scicos_model(sim=list("selector_m",4),in1=[[-1],[-1]],in2=[[-2],[-2]],intyp=[[-1],[-1]],out=-1,out2=-2,outtyp=-1,evtin=[[1],[1]],evtout=[],state=[],dstate=1,odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -20094,12 +20657,12 @@ function PULSE_SC() {
this.model.nzcross = new ScilabDouble([0]);
this.model.nmode = new ScilabDouble([0]);
this.model.equations = list();
- E = 0.1;
- W = 30;
- F = 1;
- A = 1;
- exprs = [sci2exp(E),sci2exp(W),sci2exp(F),sci2exp(A)];
- gr_i = [];
+ var E = 0.1;
+ var W = 30;
+ var F = 1;
+ var A = 1;
+ var exprs = [sci2exp(E),sci2exp(W),sci2exp(F),sci2exp(A)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -20116,30 +20679,36 @@ function PULSE_SC() {
scicos_context.W = arguments[0]["scicos_context.W"]
scicos_context.F = arguments[0]["scicos_context.F"]
scicos_context.A = arguments[0]["scicos_context.A"]
- y = this.needcompile;
+ var y = this.needcompile;
arg1.model.ipar = 1;
- typ = list();
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- Btitre = "Set Pulse Generator parameters";
- Exprs0 = [["E"],["W"],["F"],["A"]];
- Bitems = [["Phase delay (secs):"],["Pulse Width (% of period):"],["Period (secs):"],["Amplitude:"]];
- Ss = list("pol",-1,"pol",-1,"pol",-1,"mat",[-1,-1]);
- scicos_context = struct();
- this.x = arg1;
- ok = false;
+ var typ = list();
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var Btitre = "Set Pulse Generator parameters";
+ var Exprs0 = [["E"],["W"],["F"],["A"]];
+ var Bitems = [["Phase delay (secs):"],["Pulse Width (% of period):"],["Period (secs):"],["Amplitude:"]];
+ var Ss = list("pol",-1,"pol",-1,"pol",-1,"mat",[-1,-1]);
+ var scicos_context = struct();
+ this.x = arg1;
+ var ok = false;
while (!ok) {
[ok,scicos_context.E,scicos_context.W,scicos_context.F,scicos_context.A,exprs] = scicos_getvalue(Btitre,Bitems,Ss,exprs);
if (!ok) {
return;
}
- PREVAR_scicos_context = scicos_context;
- sblock = this.x.model.rpar;
- [PREVAR_scicos_context,ierr] = script2var(sblock.props.context,PREVAR_scicos_context);
+ var PREVAR_scicos_context = scicos_context;
+ var sblock = this.x.model.rpar;
+ var tmpvar0 = script2var(sblock.props.context,PREVAR_scicos_context)
+ var PREVAR_scicos_context = tmpvar0[0]
+ var ierr = tmpvar0[1];
if (ierr==0) {
- [sblock,%w,needcompile2,ok] = do_eval(sblock,list());
+ var tmpvar1 = do_eval(sblock,list())
+ var sblock = tmpvar1[0]
+ %w = tmpvar1[1]
+ var needcompile2 = tmpvar1[2]
+ var ok = tmpvar1[3];
if (ok) {
- y = max(2,this.needcompile,needcompile2);
+ var y = max(2,this.needcompile,needcompile2);
this.x.graphics.exprs = exprs;
this.x.model.rpar = sblock;
break;
@@ -20148,7 +20717,7 @@ function PULSE_SC() {
if ((lasterror()!=[])) {
messagebox(lasterror());
}
- ok = false;
+ var ok = false;
}
}
return new BasicBlock(this.x);
@@ -20160,7 +20729,7 @@ function RAMP() {
this.slope = 0;
this.iout = 0;
this.stt = 0;
- rpar = [[this.slope],[this.stt],[this.iout]];
+ var rpar = [[this.slope],[this.stt],[this.iout]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["ramp"]), new ScilabDouble([4]));
this.model.in1 = [];
@@ -20170,8 +20739,8 @@ function RAMP() {
this.model.nmode = new ScilabDouble([1]);
this.model.nzcross = new ScilabDouble([1]);
this.model.dep_ut = [false,true];
- exprs = [string(rpar)];
- gr_i = [];
+ var exprs = [string(rpar)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -20191,8 +20760,8 @@ function RAMP() {
this.stt = parseFloat(arguments[0]["stt"])
this.iout = parseFloat(arguments[0]["iout"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.slope,this.stt,this.iout,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","RAMP")],[" "],["Ramp function"],[" "]],["Slope","Start Time","Initial Value"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -20217,8 +20786,8 @@ function RAND_f() {
RAND_f.prototype.define = function RAND_f() {
this.a = 0;
this.b = 1;
- dt = 0;
- out = 1;
+ var dt = 0;
+ var out = 1;
this.flag = 0;
this.model = scicos_model();
this.model.sim = new ScilabString(["rndblk"]);
@@ -20229,8 +20798,8 @@ function RAND_f() {
this.model.ipar = new ScilabDouble([this.flag]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.flag)],[sci2exp(this.a.slice())],[sci2exp(this.b.slice())],[string(this.model.dstate[1-1])]];
- gr_i = [];
+ var exprs = [[string(this.flag)],[sci2exp(this.a.slice())],[sci2exp(this.b.slice())],[string(this.model.dstate[1-1])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -20252,14 +20821,14 @@ function RAND_f() {
this.b = parseFloat(arguments[0]["b"])
this.seed_c = arguments[0]["seed_c"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==5) {
- exprs = exprs.slice(1-1,3);
+ var exprs = exprs.slice(1-1,3);
}
if (size(exprs,"*")==3) {
- exprs = [[exprs],[string(this.model.dstate[1-1])]];
+ var exprs = [[exprs],[string(this.model.dstate[1-1])]];
}
while (true) {
[ok,this.flag,this.a,this.b,this.seed_c,exprs] = scicos_getvalue([["Set Random generator block parameters"],["flag = 0 : Uniform distribution A is min and A+B max"],["flag = 1 : Normal distribution A is mean and B deviation"],[" "],["A and B must be vector with equal sizes"],["seed is the seed of random number generator (integer<2**31)"]],["flag","A","B","seed"],list("vec",1,"vec",-1,"vec","size(%2,\'*\')","vec",1),exprs);
@@ -20269,7 +20838,7 @@ function RAND_f() {
if (this.flag!=0&&this.flag!=1) {
message("flag must be equal to 1 or 0");
} else {
- nout = size(this.a,"*");
+ var nout = size(this.a,"*");
graphics.exprs = exprs;
this.model.out = new ScilabDouble([nout]);
this.model.ipar = new ScilabDouble([this.flag]);
@@ -20288,10 +20857,10 @@ function RAND_m() {
RAND_m.prototype.define = function RAND_m() {
this.a = 0;
this.b = 1;
- dt = 0;
+ var dt = 0;
this.flag = 0;
- function_name = "rndblk_m";
- funtyp = 4;
+ var function_name = "rndblk_m";
+ var funtyp = 4;
this.model = scicos_model();
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = [];
@@ -20309,8 +20878,8 @@ function RAND_m() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- exprs = [[sci2exp(1)],[string(this.flag)],[sci2exp([this.a])],[sci2exp([this.b])],[sci2exp([this.model.dstate[1-1],int(rand()*(10^7-1))])]];
- gr_i = [];
+ var exprs = [[sci2exp(1)],[string(this.flag)],[sci2exp([this.a])],[sci2exp([this.b])],[sci2exp([this.model.dstate[1-1],int(rand()*(10^7-1))])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -20334,8 +20903,8 @@ function RAND_m() {
this.b = parseFloat(arguments[0]["b"])
this.seed_c = arguments[0]["seed_c"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==14) {
exprs[9-1] = [];
@@ -20348,23 +20917,26 @@ function RAND_m() {
if (this.flag!=0&&this.flag!=1) {
message("flag must be equal to 1 or 0");
} else {
- out = size(this.a);
+ var out = size(this.a);
if (this.typ==1) {
- function_name = "rndblk_m";
+ var function_name = "rndblk_m";
this.model.rpar = new ScilabDouble([real(this.a.slice())],[real(this.b.slice())]);
this.model.dstate = new ScilabDouble([this.seed_c[1-1]],[0*real(this.a.slice())]);
- ot = 1;
+ var ot = 1;
} else if (this.typ==2) {
- function_name = "rndblkz_m";
- ot = 2;
+ var function_name = "rndblkz_m";
+ var ot = 2;
this.model.rpar = new ScilabDouble([real(this.a.slice())],[imag(this.a.slice())],[real(this.b.slice())],[imag(this.b.slice())]);
this.model.dstate = new ScilabDouble([this.seed_c.slice()],[0*[[real(this.a.slice())],[imag(this.a.slice())]]]);
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([],[]),list(out,ot),1,[]);
+ var tmpvar0 = set_io(this.model,graphics,list([],[]),list(out,ot),1,[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([4]));
graphics.exprs = exprs;
@@ -20382,17 +20954,17 @@ function RAND_m() {
/* autogenerated from "macros/Sources/READAU_f.sci" */
function READAU_f() {
READAU_f.prototype.define = function READAU_f() {
- frmt = "uc ";
- fname = "test.au";
- lunit = 0;
+ var frmt = "uc ";
+ var fname = "test.au";
+ var lunit = 0;
this.N = 20;
- M = 1;
- tmask = [];
+ var M = 1;
+ var tmask = [];
this.swap = 0;
- offset = 1;
- outmask = 1;
- ievt = 0;
- nout = size(outmask,"*");
+ var offset = 1;
+ var outmask = 1;
+ var ievt = 0;
+ var nout = size(outmask,"*");
this.model = scicos_model();
this.model.sim = list(new ScilabString(["readau"]), new ScilabDouble([2]));
this.model.out = new ScilabDouble([nout]);
@@ -20401,8 +20973,8 @@ function READAU_f() {
this.model.ipar = new ScilabDouble([length(fname)],[this._str2code[frmt-1]],[ievt],[this.N],[M],[this.swap],[offset],[this._str2code[fname-1]],[tmask],[outmask]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[fname],[string(this.N)],[string(this.swap)]];
- gr_i = [];
+ var exprs = [[fname],[string(this.N)],[string(this.swap)]];
+ var gr_i = [];
this.x = standard_define([5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -20422,28 +20994,28 @@ function READAU_f() {
this.N = parseFloat(arguments[0]["N"])
this.swap = parseFloat(arguments[0]["swap"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- out = this.model.out;
- dstate = this.model.dstate;
- ipar = this.model.ipar;
- imask = 9+ipar[1-1];
- tmask = ipar[imask-1];
- lunit = dstate[3-1];
- fname = exprs[1-1];
+ var out = this.model.out;
+ var dstate = this.model.dstate;
+ var ipar = this.model.ipar;
+ var imask = 9+ipar[1-1];
+ var tmask = ipar[imask-1];
+ var lunit = dstate[3-1];
+ var fname = exprs[1-1];
while (true) {
[ok,this.fname1,this.N,this.swap,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","READAU_f")],[" "],["(Read Audio File)"],[" "],["Read is done on a binary \'.au\' file"]],["Input File Name","Buffer size","Swap Mode (0:No, 1:Yes)"],list("str",1,"vec",1,"vec",1),exprs);
- tmask1 = [];
- outmask = 1;
- frmt1 = "uc";
- M = 1;
- offset = 1;
+ var tmask1 = [];
+ var outmask = 1;
+ var frmt1 = "uc";
+ var M = 1;
+ var offset = 1;
if (!ok) {
break;
}
this.fname1 = stripblanks(this.fname1);
- frmt1 = stripblanks(frmt1);
+ var frmt1 = stripblanks(frmt1);
if (this.alreadyran&&this.fname1!=fname) {
block_parameter_error("Simulation running !!! You cannot modify Input file name","End current simulation first.");
} else if (this.fname1=="") {
@@ -20455,12 +21027,15 @@ function READAU_f() {
} else if (this.swap!=0&&this.swap!=1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Swap Mode",this.swap),msprintf("Must be in the interval %s.","[0, 1]"));
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,[],1,1,[]);
- frmt1 = part(frmt1,1,3);
+ var tmpvar0 = check_io(this.model,graphics,[],1,1,[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
+ var frmt1 = part(frmt1,1,3);
if (ok) {
- ipar = [[length(this.fname1)],[this._str2code[frmt1-1]],[0],[this.N],[M],[this.swap],[offset,this._str2code[this.fname1-1]],[tmask1,outmask.slice()]];
+ var ipar = [[length(this.fname1)],[this._str2code[frmt1-1]],[0],[this.N],[M],[this.swap],[offset,this._str2code[this.fname1-1]],[tmask1,outmask.slice()]];
if (prod(size(dstate))!=(this.N*M)+3) {
- dstate = [[-1],[-1],[lunit],[zeros(this.N*M,1)]];
+ var dstate = [[-1],[-1],[lunit],[zeros(this.N*M,1)]];
}
this.model.dstate = new ScilabDouble(dstate);
this.model.ipar = new ScilabDouble(ipar);
@@ -20477,19 +21052,19 @@ function READAU_f() {
/* autogenerated from "macros/Sources/READC_f.sci" */
function READC_f() {
READC_f.prototype.define = function READC_f() {
- frmt = "d ";
- fname = "foo";
- lunit = 0;
+ var frmt = "d ";
+ var fname = "foo";
+ var lunit = 0;
this.N = 20;
this.M = 1;
- rpar = [];
- tmask = 0;
+ var rpar = [];
+ var tmask = 0;
this.swap = 0;
this.offset = 1;
this.outmask = 1;
- ievt = 0;
- nout = size(this.outmask,"*");
- ipar = [[length(fname)],[this._str2code[frmt-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[fname-1]],[tmask],[this.outmask]];
+ var ievt = 0;
+ var nout = size(this.outmask,"*");
+ var ipar = [[length(fname)],[this._str2code[frmt-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[fname-1]],[tmask],[this.outmask]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["readc"]), new ScilabDouble([2]));
this.model.out = new ScilabDouble([nout]);
@@ -20500,8 +21075,8 @@ function READC_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = [["[]"],[sci2exp(this.outmask)],[fname],[frmt],[string(this.M)],[string(this.N)],[string(this.offset)],[string(this.swap)]];
- gr_i = [];
+ var exprs = [["[]"],[sci2exp(this.outmask)],[fname],[frmt],[string(this.M)],[string(this.N)],[string(this.offset)],[string(this.swap)]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -20532,16 +21107,16 @@ function READC_f() {
this.swap = parseFloat(arguments[0]["swap"])
this.x = arg1;
this.model = this.x.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- out = this.model.out;
- dstate = this.model.dstate;
- ipar = this.model.ipar;
- imask = 9+ipar[1-1];
- tmask = ipar[imask-1];
- lunit = dstate[3-1];
- fname = exprs[3-1];
- frmt = exprs[4-1];
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var out = this.model.out;
+ var dstate = this.model.dstate;
+ var ipar = this.model.ipar;
+ var imask = 9+ipar[1-1];
+ var tmask = ipar[imask-1];
+ var lunit = dstate[3-1];
+ var fname = exprs[3-1];
+ var frmt = exprs[4-1];
while (true) {
[ok,this.tmask1,this.outmask,this.fname1,this.frmt1,this.M,this.N,this.offset,this.swap,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","READC_f")],[" "],["Read from C binary file"]],["Time Record Selection","Outputs Record Selection","Input File Name","Input Format","Record Size","Buffer Size","Initial Record Index","Swap Mode (0:No, 1:Yes)"],list("vec",-1,"vec",-1,"str",1,"str",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -20549,8 +21124,8 @@ function READC_f() {
}
this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
this.frmt1 = stripblanks(this.frmt1);
- fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
- nout = size(this.outmask,"*");
+ var fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
+ var nout = size(this.outmask,"*");
if (prod(size(this.tmask1))>1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter.","Time Record Selection"),"Must be a scalar or an empty matrix.");
} else if (and(this.frmt1!=fmts)) {
@@ -20581,15 +21156,18 @@ function READC_f() {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Initial Record Index",this.offset),"Strictly positive integer expected.");
} else {
if (this.tmask1==[]) {
- ievt = 0;
+ var ievt = 0;
this.tmask1 = 0;
- outpt = [];
+ var outpt = [];
} else {
- ievt = 1;
- outpt = 1;
- }
- out = size(this.outmask,"*");
- [this.model,graphics,ok] = check_io(this.model,graphics,[],out,1,outpt);
+ var ievt = 1;
+ var outpt = 1;
+ }
+ var out = size(this.outmask,"*");
+ var tmpvar0 = check_io(this.model,graphics,[],out,1,outpt)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.frmt1 = part(this.frmt1,1,3);
if (ok) {
if (ievt==0) {
@@ -20597,9 +21175,9 @@ function READC_f() {
} else {
this.model.firing = new ScilabDouble([0]);
}
- ipar = [[length(this.fname1)],[this._str2code[this.frmt1-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[this.fname1-1]],[this.tmask1],[this.outmask.slice()]];
+ var ipar = [[length(this.fname1)],[this._str2code[this.frmt1-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[this.fname1-1]],[this.tmask1],[this.outmask.slice()]];
if (prod(size(dstate))!=(this.N*this.M)+3) {
- dstate = [[-1],[-1],[lunit],[zeros(this.N*this.M,1)]];
+ var dstate = [[-1],[-1],[lunit],[zeros(this.N*this.M,1)]];
}
this.model.dstate = new ScilabDouble(dstate);
this.model.ipar = new ScilabDouble(ipar);
@@ -20616,17 +21194,17 @@ function READC_f() {
/* autogenerated from "macros/Sources/RFILE_f.sci" */
function RFILE_f() {
RFILE_f.prototype.define = function RFILE_f() {
- out = 1;
- nout = sum(out);
- frmt = "(7(e10.3,1x))";
- fname = "foo";
- lunit = 0;
+ var out = 1;
+ var nout = sum(out);
+ var frmt = "(7(e10.3,1x))";
+ var fname = "foo";
+ var lunit = 0;
this.N = 2;
- rpar = [];
- tmask = 0;
+ var rpar = [];
+ var tmask = 0;
this.outmask = 1;
- ipar = [[length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[this.outmask]];
- dstate = [[1],[1],[lunit],[zeros((nout)*this.N,1)]];
+ var ipar = [[length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[this.outmask]];
+ var dstate = [[1],[1],[lunit],[zeros((nout)*this.N,1)]];
this.model = scicos_model();
this.model.sim = new ScilabString(["readf"]);
this.model.out = new ScilabDouble([nout]);
@@ -20635,8 +21213,8 @@ function RFILE_f() {
this.model.ipar = new ScilabDouble([length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[this.outmask]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[sci2exp([])],[sci2exp(this.outmask)],[fname],[frmt],[string(this.N)],[sci2exp(out)]];
- gr_i = [];
+ var exprs = [[sci2exp([])],[sci2exp(this.outmask)],[fname],[frmt],[string(this.N)],[sci2exp(out)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -20660,18 +21238,18 @@ function RFILE_f() {
this.frmt1 = parseFloat(arguments[0]["frmt1"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- dstate = this.model.dstate;
- ipar = this.model.ipar;
- ievt = ipar[3-1];
+ var dstate = this.model.dstate;
+ var ipar = this.model.ipar;
+ var ievt = ipar[3-1];
this.N = ipar[4-1];
- imask = 5+ipar[1-1]+ipar[2-1];
- tmask = ipar[imask-1];
- lunit = dstate[3-1];
- fname = exprs[3-1];
- frmt = exprs[4-1];
+ var imask = 5+ipar[1-1]+ipar[2-1];
+ var tmask = ipar[imask-1];
+ var lunit = dstate[3-1];
+ var fname = exprs[3-1];
+ var frmt = exprs[4-1];
if (size(exprs,"*")>5) {
exprs[6-1] = [];
}
@@ -20682,7 +21260,7 @@ function RFILE_f() {
}
this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
this.frmt1 = stripblanks(this.frmt1);
- nout = size(this.outmask,"*");
+ var nout = size(this.outmask,"*");
if (prod(size(this.tmask1))>1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Time Record Selection",strcat(string(this.tmask1.slice())," ")),"Empty matrix or scalar expected.");
} else if (this.tmask1!=[]&&this.tmask1<1) {
@@ -20705,23 +21283,26 @@ function RFILE_f() {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s","Outputs Record Selection",strcat(string(this.outmask.slice())," ")),"Strictly positive indexes expected.");
} else {
if (this.tmask1==[]) {
- ievt = 0;
- cout = [];
+ var ievt = 0;
+ var cout = [];
this.tmask1 = 0;
} else {
- ievt = 1;
- cout = 1;
+ var ievt = 1;
+ var cout = 1;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,[],nout,1,cout);
+ var tmpvar0 = check_io(this.model,graphics,[],nout,1,cout)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
if (ievt==0) {
this.model.firing = [];
} else {
this.model.firing = new ScilabDouble([0]);
}
- ipar = [[length(this.fname1)],[length(this.frmt1)],[ievt],[this.N],[this._str2code[this.fname1-1]],[this._str2code[this.frmt1-1]],[this.tmask1],[this.outmask.slice()]];
+ var ipar = [[length(this.fname1)],[length(this.frmt1)],[ievt],[this.N],[this._str2code[this.fname1-1]],[this._str2code[this.frmt1-1]],[this.tmask1],[this.outmask.slice()]];
if (prod(size(dstate))!=(nout+ievt)*this.N+3) {
- dstate = [[-1],[-1],[lunit],[zeros((nout+ievt)*this.N,1)]];
+ var dstate = [[-1],[-1],[lunit],[zeros((nout+ievt)*this.N,1)]];
}
this.model.dstate = new ScilabDouble(dstate);
this.model.ipar = new ScilabDouble(ipar);
@@ -20745,8 +21326,8 @@ function SAWTOOTH_f() {
this.model.dstate = new ScilabDouble([0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -20766,7 +21347,7 @@ function SAWTOOTH_f() {
/* autogenerated from "macros/Sources/STEP.sci" */
function STEP() {
STEP.prototype.define = function STEP() {
- rpar = [[0],[1]];
+ var rpar = [[0],[1]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["step_func"]), new ScilabDouble([4]));
this.model.evtin = new ScilabDouble([1]);
@@ -20778,8 +21359,8 @@ function STEP() {
this.model.rpar = new ScilabDouble(rpar);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = [[string(1)],[string(rpar)]];
- gr_i = [];
+ var exprs = [[string(1)],[string(rpar)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -20799,8 +21380,8 @@ function STEP() {
this.in1 = arguments[0]["in1"]
this.fi = arguments[0]["fi"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.temps,this.in1,this.fi,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","STEP_FUNCTION")],[" "],["Step Function"],[" "]],["Step Time","Initial Value","Final Value"],list("vec",1,"vec",-1,"vec",-1),exprs);
@@ -20816,20 +21397,23 @@ function STEP() {
this.fi = this.fi*ones(this.in1);
} else {
block_parameter_error(msprintf("\'Initial Value\' and \'Final Value\': incompatible sizes: %d and %d.",size(this.in1,"*"),size(this.fi,"*")),"Same sizes expected.");
- ok = false;
+ var ok = false;
}
}
if (ok) {
this.model.out2 = new ScilabDouble([1]);
this.model.outtyp = new ScilabDouble([1]);
- [this.model,graphics,ok] = check_io(this.model,graphics,[],size(this.fi,"*"),1,1);
+ var tmpvar0 = check_io(this.model,graphics,[],size(this.fi,"*"),1,1)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.firing = new ScilabDouble([this.temps]);
if (this.temps==0) {
- rpar = [[this.fi],[this.fi]];
+ var rpar = [[this.fi],[this.fi]];
} else {
- rpar = [[this.in1],[this.fi]];
+ var rpar = [[this.in1],[this.fi]];
}
this.model.rpar = new ScilabDouble(rpar);
graphics.exprs = exprs;
@@ -20844,13 +21428,13 @@ function STEP() {
/* autogenerated from "macros/Sources/STEP_FUNCTION.sci" */
function STEP_FUNCTION() {
STEP_FUNCTION.prototype.define = function STEP_FUNCTION() {
- scs_m_1 = scicos_diagram();
+ var scs_m_1 = scicos_diagram();
scs_m_1.objs[1-1] = STEP("define");
scs_m_1.objs[2-1] = OUT_f("define");
scs_m_1.objs[3-1] = scicos_link();
scs_m_1.objs[4-1] = scicos_link();
- blk = scs_m_1.objs[1-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[1-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [0,0];
graphics.sz = [40,40];
@@ -20860,8 +21444,8 @@ function STEP_FUNCTION() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[1-1] = blk;
- blk = scs_m_1.objs[2-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[2-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [80,10];
graphics.sz = [20,20];
@@ -20871,11 +21455,11 @@ function STEP_FUNCTION() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[2-1] = blk;
- lnk = scs_m_1.objs[3-1];
+ var lnk = scs_m_1.objs[3-1];
lnk.from = [1,1,0];
lnk.to = [2,1,1];
scs_m_1.objs[3-1] = lnk;
- lnk = scs_m_1.objs[4-1];
+ var lnk = scs_m_1.objs[4-1];
lnk.xx = [0,20,-20,-20,20,1];
lnk.yy = [0,-20,-20,60,60,1];
lnk.ct = [5,-1];
@@ -20890,7 +21474,7 @@ function STEP_FUNCTION() {
this.model.out2 = new ScilabDouble([1]);
this.model.outtyp = new ScilabDouble([1]);
this.model.rpar = scs_m_1;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -20904,59 +21488,59 @@ function STEP_FUNCTION() {
}
STEP_FUNCTION.prototype.set = function STEP_FUNCTION() {
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="STEP") {
- ppath = list(i);
+ var ppath = list(i);
break;
}
}
- newpar = list();
+ var newpar = list();
for (path in ppath) {
- np = size(path,"*");
- spath = list();
+ var np = size(path,"*");
+ var spath = list();
for (k=1;k<=np;k+=1) {
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path[k-1];
}
- xx = arg1[spath-1];
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (diffobjs(this.xxn,xx)) {
this.model = xx.model;
- model_n = this.xxn.model;
+ var model_n = this.xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = this.xxn;
@@ -20964,8 +21548,8 @@ function STEP_FUNCTION() {
}
}
this.x = arg1;
- y = needcompile;
- typ = newpar;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
@@ -20979,7 +21563,7 @@ function SampleCLK() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = [[sci2exp(1)],[sci2exp(0)]];
+ var exprs = [[sci2exp(1)],[sci2exp(0)]];
this.x = standard_define([2,2],this.model,exprs," ");
return new BasicBlock(this.x);
}
@@ -20997,9 +21581,9 @@ function SampleCLK() {
this.frequ = arguments[0]["frequ"]
this.offset = arguments[0]["offset"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.frequ,this.offset,exprs] = scicos_getvalue("Set block parameters",["Sample time","Offset"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -21007,16 +21591,16 @@ function SampleCLK() {
}
if (this.frequ<0) {
message("Frequency must be a positif number");
- ok = false;
+ var ok = false;
}
if (abs(this.offset)>this.frequ) {
message("The |Offset| must be less than the Frequency");
- ok = false;
+ var ok = false;
}
if (ok) {
if (or(this.model.rpar.slice()!=[[this.frequ],[this.offset]])) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.rpar = new ScilabDouble([this.frequ],[this.offset]);
this.model.evtout = new ScilabDouble([1]);
@@ -21034,7 +21618,7 @@ function SampleCLK() {
/* autogenerated from "macros/Sources/Sigbuilder.sci" */
function Sigbuilder() {
Sigbuilder.prototype.define = function Sigbuilder() {
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["Sigbuilder","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=100,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["Sigbuilder","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=100,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="CURVE_c",graphics=scicos_graphics(orig=[329.63473,606.18517],sz=[40,40],flip=true,theta=0,exprs=[["3"],["[0,1,2]"],["[10,20,-30]"],["y"],["n"]],pin=[],pout=6,pein=4,peout=2,gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("curve_c",4),in1=[],in2=[],intyp=1,out=1,out2=[],outtyp=1,evtin=1,evtout=1,state=[],dstate=[],odstate=list(),rpar=[[0],[1],[2],[10],[20],[-30]],ipar=[[3],[3],[1]],opar=list(),blocktype="c",firing=0,dep_ut=[false,true],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_link(xx=[[349.63473],[349.49528]],yy=[[600.47089],[565.10704]],id="drawlink",thick=[0,0],ct=[5,-1],from=[1,1,0],to=[3,1,1]);
scs_m_1.objs[3-1] = scicos_block(gui="CLKSPLIT_f",graphics=scicos_graphics(orig=[[349.49528],[565.10704]],sz=[0.3333333,0.3333333],flip=true,theta=0,exprs=[],pin=[],pout=[],pein=2,peout=[[8],[4]],gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="split",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=1,evtout=[[1],[1]],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="d",firing=[false,false,false],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -21044,7 +21628,7 @@ function Sigbuilder() {
scs_m_1.objs[7-1] = scicos_block(gui="CLKOUTV_f",graphics=scicos_graphics(orig=[339.49528,505.10704],sz=[20,30],flip=true,theta=0,exprs="1",pin=[],pout=[],pein=8,peout=[],gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="output",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=1,evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[8-1] = scicos_link(xx=[[349.49528],[349.49528]],yy=[[565.10704],[535.10704]],id="drawlink",thick=[0,0],ct=[5,-1],from=[3,1,0],to=[7,1,1]);
this.model = scicos_model(sim="csuper",in1=[],in2=[],intyp=1,out=-1,out2=[],outtyp=1,evtin=[],evtout=1,state=[],dstate=[],odstate=list(),rpar=scs_m_1,ipar=[],opar=list(),blocktype="h",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list());
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -21057,65 +21641,65 @@ function Sigbuilder() {
return options;
}
Sigbuilder.prototype.set = function Sigbuilder() {
- ppath = list(0);
+ var ppath = list(0);
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="CURVE_c") {
ppath[1-1] = i;
break;
}
}
- newpar = list();
+ var newpar = list();
this.y = 0;
for (path in ppath) {
- np = size(path,"*");
- spath = list();
+ var np = size(path,"*");
+ var spath = list();
for (k=1;k<=np;k+=1) {
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path[k-1];
}
- xx = arg1[spath-1];
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (diffobjs(this.xxn,xx)) {
this.model = xx.model;
- model_n = this.xxn.model;
+ var model_n = this.xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)||or(this.model.in2!=model_n.in2)||or(this.model.out2!=model_n.out2)||or(this.model.outtyp!=model_n.outtyp)||or(this.model.intyp!=model_n.intyp)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if ((size(this.model.in1,"*")!=size(model_n.in1,"*"))||(size(this.model.out,"*")!=size(model_n.out,"*"))) {
- needcompile = 4;
+ var needcompile = 4;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = this.xxn;
@@ -21124,7 +21708,7 @@ function Sigbuilder() {
}
}
this.x = arg1;
- typ = newpar;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
@@ -21136,7 +21720,7 @@ function TIME_f() {
this.model.out = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -21166,8 +21750,8 @@ function TKSCALE() {
this.model.rpar = new ScilabDouble([this.a],[this.b],[this.f]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[sci2exp(this.a)],[sci2exp(this.b)],[sci2exp(this.f)]];
- gr_i = [];
+ var exprs = [[sci2exp(this.a)],[sci2exp(this.b)],[sci2exp(this.f)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -21187,8 +21771,8 @@ function TKSCALE() {
this.b = parseFloat(arguments[0]["b"])
this.f = parseFloat(arguments[0]["f"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
[ok,this.a,this.b,this.f,exprs] = scicos_getvalue("Set scale block parameters",["Min value","Max value","Normalization"],list("vec",1,"vec",1,"vec",1),exprs);
if (ok) {
@@ -21203,7 +21787,7 @@ function TKSCALE() {
/* autogenerated from "macros/Threshold/GENERAL_f.sci" */
function GENERAL_f() {
GENERAL_f.prototype.define = function GENERAL_f() {
- rpar = [[0],[0],[0],[0]];
+ var rpar = [[0],[0],[0],[0]];
this.in1 = 1;
this.out = 1;
this.model = scicos_model();
@@ -21215,8 +21799,8 @@ function GENERAL_f() {
this.model.blocktype = new ScilabString(["z"]);
this.model.firing = new ScilabDouble([-ones(this.out,1)]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(sci2exp(this.in1))],[strcat(sci2exp(this.out))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.in1))],[strcat(sci2exp(this.out))]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -21234,27 +21818,30 @@ function GENERAL_f() {
this.in1 = parseFloat(arguments[0]["in1"])
this.out = parseFloat(arguments[0]["out"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- rpar = this.model.rpar;
+ var rpar = this.model.rpar;
this.in1 = this.model.in1;
this.out = this.model.evtout;
- nin = sum(this.in1);
- nout = sum(this.out);
+ var nin = sum(this.in1);
+ var nout = sum(this.out);
[ok,this.in1,this.out,exprs] = scicos_getvalue("Set General Zero-Crossing parameters",["Input size","Number of event output"],list("vec",1,"vec",1),exprs);
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,this.in1,[],[],ones(this.out,1));
+ var tmpvar0 = check_io(this.model,graphics,this.in1,[],[],ones(this.out,1))
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
- nout1 = this.out;
- nin1 = this.in1;
+ var nout1 = this.out;
+ var nin1 = this.in1;
if (nout==nout1&&nin==nin1) {
- rp = matrix(rpar,nout,2^(2*nin));
+ var rp = matrix(rpar,nout,2^(2*nin));
} else {
- rp = -1*ones(nout1,2^(2*nin1));
+ var rp = -1*ones(nout1,2^(2*nin1));
}
- n = size(rp,2)/2;
- result = x_mdialog("routing matrix",string(1,nout1),string(1,2^(2*nin1)),string(rp.slice().slice()));
+ var n = size(rp,2)/2;
+ var result = x_mdialog("routing matrix",string(1,nout1),string(1,2^(2*nin1)),string(rp.slice().slice()));
if (result!=[]) {
rp.slice(1-1,nout1).slice(1-1,2*n) = evstr(result);
this.model.nzcross = new ScilabDouble([this.in1]);
@@ -21281,7 +21868,7 @@ function NEGTOPOS_f() {
this.model.blocktype = new ScilabString(["z"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [true,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -21302,7 +21889,7 @@ function NEGTOPOS_f() {
/* autogenerated from "macros/Threshold/POSTONEG_f.sci" */
function POSTONEG_f() {
POSTONEG_f.prototype.define = function POSTONEG_f() {
- rpar = [[-1],[-1],[-1],[0]];
+ var rpar = [[-1],[-1],[-1],[0]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["zcross"]), new ScilabDouble([1]));
this.model.nzcross = new ScilabDouble([1]);
@@ -21312,7 +21899,7 @@ function POSTONEG_f() {
this.model.blocktype = new ScilabString(["z"]);
this.model.dep_ut = [true,false];
this.model.firing = [-1];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -21333,7 +21920,7 @@ function POSTONEG_f() {
/* autogenerated from "macros/Threshold/ZCROSS_f.sci" */
function ZCROSS_f() {
ZCROSS_f.prototype.define = function ZCROSS_f() {
- rpar = [[-1],[-1],[0],[0]];
+ var rpar = [[-1],[-1],[0],[0]];
this.in1 = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["zcross"]), new ScilabDouble([1]));
@@ -21344,8 +21931,8 @@ function ZCROSS_f() {
this.model.blocktype = new ScilabString(["z"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [true,false];
- exprs = strcat(sci2exp(this.in1));
- gr_i = [];
+ var exprs = strcat(sci2exp(this.in1));
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -21360,8 +21947,8 @@ function ZCROSS_f() {
ZCROSS_f.prototype.set = function ZCROSS_f() {
this.in1 = parseFloat(arguments[0]["in1"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.in1,exprs] = scicos_getvalue([["Set Zero-Crossing parameters"],["All surfaces must cross together"]],"Input size",list("vec",1),exprs);
@@ -21372,9 +21959,9 @@ function ZCROSS_f() {
if (this.in1<=0) {
message("Block must have at least one input");
} else {
- kk = 0;
+ var kk = 0;
for (jj=1;jj<=this.in1;jj+=1) {
- kk = kk+2^(this.in1+jj-1);
+ var kk = kk+2^(this.in1+jj-1);
}
this.model.rpar = new ScilabDouble([-ones(kk,1)],[zeros(2^(2*this.in1)-kk,1)]);
graphics.exprs = exprs;
diff --git a/js/Branching/CLKFROM.js b/js/Branching/CLKFROM.js
index b3a992b0..b705f634 100644
--- a/js/Branching/CLKFROM.js
+++ b/js/Branching/CLKFROM.js
@@ -8,7 +8,7 @@ function CLKFROM() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = "A";
+ var exprs = "A";
this.x = standard_define([2,1],this.model,exprs," ");
this.x.graphics.id = "From";
return new BasicBlock(this.x);
@@ -24,17 +24,17 @@ function CLKFROM() {
CLKFROM.prototype.set = function CLKFROM() {
this.tag = arguments[0]["tag"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.tag,exprs] = scicos_getvalue("Set block parameters","Tag",list("str",-1),exprs);
if (!ok) {
break;
}
if (this.model.opar!=list(this.tag)) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.opar = list(new ScilabDouble([this.tag]));
this.model.evtout = new ScilabDouble([1]);
diff --git a/js/Branching/CLKGOTO.js b/js/Branching/CLKGOTO.js
index 55d9edba..75320022 100644
--- a/js/Branching/CLKGOTO.js
+++ b/js/Branching/CLKGOTO.js
@@ -9,7 +9,7 @@ function CLKGOTO() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = [["A"],[sci2exp(1)]];
+ var exprs = [["A"],[sci2exp(1)]];
this.x = standard_define([2,1],this.model,exprs," ");
this.x.graphics.id = "Goto";
return new BasicBlock(this.x);
@@ -28,9 +28,9 @@ function CLKGOTO() {
this.tag = arguments[0]["tag"]
this.tagvis = parseFloat(arguments[0]["tagvis"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.tag,this.tagvis,exprs] = scicos_getvalue("Set block parameters",["Tag","Tag Visibility (1=Local 2=Scoped 3=Global)"],list("str",-1,"vec",1),exprs);
if (!ok) {
@@ -38,13 +38,13 @@ function CLKGOTO() {
}
if (((this.tagvis<1)||(this.tagvis>3))) {
message("Tag Visibility must be between 1 and 3");
- ok = false;
+ var ok = false;
}
this.tagvis = int(this.tagvis);
if (ok) {
if (((this.model.opar!=list(this.tag))||(this.model.ipar!=this.tagvis))) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.opar = list(new ScilabDouble([this.tag]));
this.model.ipar = new ScilabDouble([this.tagvis]);
diff --git a/js/Branching/CLKGotoTagVisibility.js b/js/Branching/CLKGotoTagVisibility.js
index 1104d22b..6b7e5fb8 100644
--- a/js/Branching/CLKGotoTagVisibility.js
+++ b/js/Branching/CLKGotoTagVisibility.js
@@ -14,8 +14,8 @@ function CLKGotoTagVisibility() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [false,false];
- exprs = "A";
- gr_i = [];
+ var exprs = "A";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -31,8 +31,8 @@ function CLKGotoTagVisibility() {
CLKGotoTagVisibility.prototype.set = function CLKGotoTagVisibility() {
this.tag = arguments[0]["tag"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
@@ -41,8 +41,8 @@ function CLKGotoTagVisibility() {
}
if (ok) {
if (this.model.opar!=list(this.tag)) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
graphics.exprs = exprs;
this.model.opar = list(new ScilabDouble([this.tag]));
diff --git a/js/Branching/DEMUX.js b/js/Branching/DEMUX.js
index 7879bc31..4d1da68d 100644
--- a/js/Branching/DEMUX.js
+++ b/js/Branching/DEMUX.js
@@ -10,8 +10,8 @@ function DEMUX() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- exprs = string(this.out);
- gr_i = [];
+ var exprs = string(this.out);
+ var gr_i = [];
this.x = standard_define([.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -27,8 +27,8 @@ function DEMUX() {
DEMUX.prototype.set = function DEMUX() {
this.out = parseFloat(arguments[0]["out"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.out,exprs] = scicos_getvalue("Set DEMUX block parameters",["number of output ports or vector of sizes"],list("intvec",-1),exprs);
@@ -38,21 +38,27 @@ function DEMUX() {
if (size(this.out,"*")==1) {
if (this.out<2||this.out>31) {
message("Block must have at least 2 and at most 31 output ports");
- ok = false;
+ var ok = false;
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,0,-transpose([1:this.out]),[],[]);
+ var tmpvar0 = check_io(this.model,graphics,0,-transpose([1:this.out]),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
} else {
if (size(this.out,"*")<2||or(this.out==0)||size(this.out,"*")>31) {
message([["Block must have at least 2 and at most 31 output ports"],["size 0 is not allowed"]]);
- ok = false;
+ var ok = false;
} else {
if (min(this.out)<0) {
- nin = 0;
+ var nin = 0;
} else {
- nin = sum(this.out);
+ var nin = sum(this.out);
}
- [this.model,graphics,ok] = check_io(this.model,graphics,nin,this.out.slice(),[],[]);
+ var tmpvar1 = check_io(this.model,graphics,nin,this.out.slice(),[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
this.out = size(this.out,"*");
}
diff --git a/js/Branching/DEMUX.pickle b/js/Branching/DEMUX.pickle
index d1d8f41f..b740b0b4 100644
--- a/js/Branching/DEMUX.pickle
+++ b/js/Branching/DEMUX.pickle
@@ -11,74 +11,71 @@ p4
atp5
Rp6
.(dp0
-S'arg1'
+S'model.sim'
p1
-S'object'
+S'list'
p2
-sS'graphics'
+sS'model.in1'
p3
-g2
-sS'x.model'
+S'double'
p4
-NsS'model.out'
+sS'ok'
p5
-S'vector'
+S'boolean'
p6
-sS'out'
+sS'model.blocktype'
p7
-S'double'
+S'string'
p8
-sS'model.in1'
-p9
-g8
sS'x.graphics'
+p9
+S'object'
p10
-g2
-sS'model.firing'
+sS'arg1'
p11
-g6
-sS'model.sim'
+g10
+sS'graphics.exprs'
p12
-S'list'
+NsS'nin'
p13
-sS'nin'
+g4
+sS'model.out'
p14
-g8
-sS'[this.model,graphics,ok]'
+S'vector'
p15
-g13
-sS'graphics.exprs'
+sS'exprs'
p16
-NsS'model.ipar'
-p17
g8
-sS'typ'
+sS'x.model'
+p17
+NsS'gr_i'
p18
-g6
-sS'ok'
+g15
+sS'model.dep_ut'
p19
-S'boolean'
+g15
+sS'graphics'
p20
-sS'model.blocktype'
+g10
+sS'y'
p21
-S'string'
+g15
+sS'x'
p22
-sS'model.dep_ut'
+g4
+sS'model'
p23
-g6
-sS'exprs'
+g10
+sS'model.ipar'
p24
-g22
-sS'gr_i'
+g4
+sS'typ'
p25
-g6
-sS'y'
+g15
+sS'model.firing'
p26
-g6
-sS'x'
+g15
+sS'out'
p27
-g8
-sS'model'
-p28
-g2
+g4
s. \ No newline at end of file
diff --git a/js/Branching/DEMUX_f.js b/js/Branching/DEMUX_f.js
index a1176764..f9ada1b0 100644
--- a/js/Branching/DEMUX_f.js
+++ b/js/Branching/DEMUX_f.js
@@ -10,8 +10,8 @@ function DEMUX_f() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- exprs = string(this.out);
- gr_i = [];
+ var exprs = string(this.out);
+ var gr_i = [];
this.x = standard_define([.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -27,8 +27,8 @@ function DEMUX_f() {
DEMUX_f.prototype.set = function DEMUX_f() {
this.out = parseFloat(arguments[0]["out"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.out,exprs] = scicos_getvalue("Set DEMUX block parameters",["number of output ports or vector of sizes"],list("vec",-1),exprs);
@@ -38,21 +38,27 @@ function DEMUX_f() {
if (size(this.out,"*")==1) {
if (this.out<2||this.out>8) {
message("Block must have at least 2 and at most 8 output ports");
- ok = false;
+ var ok = false;
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,0,-transpose([1:this.out]),[],[]);
+ var tmpvar0 = check_io(this.model,graphics,0,-transpose([1:this.out]),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
} else {
if (size(this.out,"*")<2||size(this.out,"*")>8||or(this.out==0)) {
message([["Block must have at least 2 and at most 8 output ports"],["and size 0 is not allowed"]]);
- ok = false;
+ var ok = false;
} else {
if (min(this.out)<0) {
- nin = 0;
+ var nin = 0;
} else {
- nin = sum(this.out);
+ var nin = sum(this.out);
}
- [this.model,graphics,ok] = check_io(this.model,graphics,nin,this.out.slice(),[],[]);
+ var tmpvar1 = check_io(this.model,graphics,nin,this.out.slice(),[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
this.out = size(this.out,"*");
}
diff --git a/js/Branching/DEMUX_f.pickle b/js/Branching/DEMUX_f.pickle
index d1d8f41f..b740b0b4 100644
--- a/js/Branching/DEMUX_f.pickle
+++ b/js/Branching/DEMUX_f.pickle
@@ -11,74 +11,71 @@ p4
atp5
Rp6
.(dp0
-S'arg1'
+S'model.sim'
p1
-S'object'
+S'list'
p2
-sS'graphics'
+sS'model.in1'
p3
-g2
-sS'x.model'
+S'double'
p4
-NsS'model.out'
+sS'ok'
p5
-S'vector'
+S'boolean'
p6
-sS'out'
+sS'model.blocktype'
p7
-S'double'
+S'string'
p8
-sS'model.in1'
-p9
-g8
sS'x.graphics'
+p9
+S'object'
p10
-g2
-sS'model.firing'
+sS'arg1'
p11
-g6
-sS'model.sim'
+g10
+sS'graphics.exprs'
p12
-S'list'
+NsS'nin'
p13
-sS'nin'
+g4
+sS'model.out'
p14
-g8
-sS'[this.model,graphics,ok]'
+S'vector'
p15
-g13
-sS'graphics.exprs'
+sS'exprs'
p16
-NsS'model.ipar'
-p17
g8
-sS'typ'
+sS'x.model'
+p17
+NsS'gr_i'
p18
-g6
-sS'ok'
+g15
+sS'model.dep_ut'
p19
-S'boolean'
+g15
+sS'graphics'
p20
-sS'model.blocktype'
+g10
+sS'y'
p21
-S'string'
+g15
+sS'x'
p22
-sS'model.dep_ut'
+g4
+sS'model'
p23
-g6
-sS'exprs'
+g10
+sS'model.ipar'
p24
-g22
-sS'gr_i'
+g4
+sS'typ'
p25
-g6
-sS'y'
+g15
+sS'model.firing'
p26
-g6
-sS'x'
+g15
+sS'out'
p27
-g8
-sS'model'
-p28
-g2
+g4
s. \ No newline at end of file
diff --git a/js/Branching/ESELECT_f.js b/js/Branching/ESELECT_f.js
index a8945df6..310344e5 100644
--- a/js/Branching/ESELECT_f.js
+++ b/js/Branching/ESELECT_f.js
@@ -14,8 +14,8 @@ function ESELECT_f() {
this.model.dep_ut = [true,false];
this.model.nmode = new ScilabDouble([0]);
this.model.nzcross = new ScilabDouble([0]);
- gr_i = [];
- exprs = [[string(this.out)],[string(1)],[string(this.model.nmode)]];
+ var gr_i = [];
+ var exprs = [[string(this.out)],[string(1)],[string(this.model.nmode)]];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -35,8 +35,8 @@ function ESELECT_f() {
this.inh = parseFloat(arguments[0]["inh"])
this.nmod = parseFloat(arguments[0]["nmod"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==1) {
exprs[2-1] = string(1);
}
@@ -61,7 +61,10 @@ function ESELECT_f() {
if (this.out<2) {
message("Block must have at least two output ports");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,1,[],this.inh,[ones(this.out,1)]);
+ var tmpvar0 = check_io(this.model,graphics,1,[],this.inh,[ones(this.out,1)])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.evtout = new ScilabDouble([ones(this.out,1)]);
diff --git a/js/Branching/ESELECT_f.pickle b/js/Branching/ESELECT_f.pickle
index 1e92bdca..b97e8d58 100644
--- a/js/Branching/ESELECT_f.pickle
+++ b/js/Branching/ESELECT_f.pickle
@@ -67,40 +67,37 @@ p20
sS'model.evtout'
p21
g6
-sS'[this.model,graphics,ok]'
-p22
-g20
sS'model.nmode'
-p23
+p22
g6
sS'exprs[3-1]'
-p24
+p23
g17
sS'graphics.exprs'
-p25
+p24
NsS'model.nzcross'
-p26
+p25
g6
sS'model.blocktype'
-p27
+p26
g17
sS'nmod'
-p28
+p27
g6
sS'exprs'
-p29
+p28
S'matrix'
-p30
+p29
sS'gr_i'
-p31
+p30
g9
sS'y'
-p32
+p31
g9
sS'x'
-p33
+p32
g6
sS'model'
-p34
+p33
g2
s. \ No newline at end of file
diff --git a/js/Branching/EXTRACTOR.js b/js/Branching/EXTRACTOR.js
index c4e5d731..8eeeb581 100644
--- a/js/Branching/EXTRACTOR.js
+++ b/js/Branching/EXTRACTOR.js
@@ -9,8 +9,8 @@ function EXTRACTOR() {
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
this.model.ipar = new ScilabDouble([this.ind]);
- exprs = [sci2exp(this.ind)];
- gr_i = [];
+ var exprs = [sci2exp(this.ind)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -26,8 +26,8 @@ function EXTRACTOR() {
EXTRACTOR.prototype.set = function EXTRACTOR() {
this.ind = parseFloat(arguments[0]["ind"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.ind,exprs] = scicos_getvalue("Set block parameters",["indices to extract"],list("vec",-1),exprs);
@@ -36,7 +36,10 @@ function EXTRACTOR() {
}
this.ind = int(this.ind);
this.ind = this.ind.slice();
- [this.model,graphics,ok] = check_io(this.model,graphics,[-1],size(this.ind,1),[],[]);
+ var tmpvar0 = check_io(this.model,graphics,[-1],size(this.ind,1),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
this.model.ipar = this.ind;
graphics.exprs = exprs;
diff --git a/js/Branching/EXTRACTOR.pickle b/js/Branching/EXTRACTOR.pickle
index 26a63660..c3f89749 100644
--- a/js/Branching/EXTRACTOR.pickle
+++ b/js/Branching/EXTRACTOR.pickle
@@ -30,45 +30,42 @@ p8
sS'arg1'
p9
g8
-sS'[this.model,graphics,ok]'
-p10
-g2
sS'graphics.exprs'
-p11
+p10
NsS'x.model'
-p12
+p11
NsS'model.out'
-p13
+p12
g4
sS'exprs'
-p14
+p13
S'vector'
-p15
+p14
sS'ind'
-p16
+p15
g4
sS'gr_i'
-p17
-g15
+p16
+g14
sS'model.dep_ut'
-p18
-g15
+p17
+g14
sS'graphics'
-p19
+p18
g8
sS'y'
-p20
-g15
+p19
+g14
sS'x'
-p21
+p20
g4
sS'model'
-p22
+p21
g8
sS'model.ipar'
-p23
+p22
g4
sS'typ'
-p24
-g15
+p23
+g14
s. \ No newline at end of file
diff --git a/js/Branching/FROM.js b/js/Branching/FROM.js
index 49334ffd..edb2d8b7 100644
--- a/js/Branching/FROM.js
+++ b/js/Branching/FROM.js
@@ -13,8 +13,8 @@ function FROM() {
this.model.opar = list(new ScilabString(["A"]));
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = ["A"];
- gr_i = [];
+ var exprs = ["A"];
+ var gr_i = [];
this.x = standard_define([2,1],this.model,exprs,gr_i);
this.x.graphics.id = "From";
return new BasicBlock(this.x);
@@ -31,8 +31,8 @@ function FROM() {
FROM.prototype.set = function FROM() {
this.tag = arguments[0]["tag"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tag,exprs] = scicos_getvalue("Set parameters",["Tag"],list("str",-1),exprs);
@@ -41,8 +41,8 @@ function FROM() {
}
if (ok) {
if (this.model.opar!=list(this.tag)) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
graphics.exprs = exprs;
this.model.opar = list(new ScilabDouble([this.tag]));
diff --git a/js/Branching/FROMMO.js b/js/Branching/FROMMO.js
index 9f2f6582..7563b8d0 100644
--- a/js/Branching/FROMMO.js
+++ b/js/Branching/FROMMO.js
@@ -13,11 +13,11 @@ function FROMMO() {
this.model.opar = list(new ScilabString(["A"]));
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "frommo";
mo.outputs = "n";
- exprs = ["A"];
- gr_i = [];
+ var exprs = ["A"];
+ var gr_i = [];
this.x = standard_define([2,1],this.model,exprs,gr_i);
this.x.graphics.out_implicit = ["I"];
return new BasicBlock(this.x);
@@ -34,8 +34,8 @@ function FROMMO() {
FROMMO.prototype.set = function FROMMO() {
this.tag = arguments[0]["tag"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tag,exprs] = scicos_getvalue("Set parameters",["Tag"],list("str",-1),exprs);
@@ -44,8 +44,8 @@ function FROMMO() {
}
if (ok) {
if (this.model.opar!=list(this.tag)) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
graphics.exprs = exprs;
this.model.opar = list(new ScilabDouble([this.tag]));
diff --git a/js/Branching/GOTO.js b/js/Branching/GOTO.js
index 383adc99..24549a07 100644
--- a/js/Branching/GOTO.js
+++ b/js/Branching/GOTO.js
@@ -13,8 +13,8 @@ function GOTO() {
this.model.opar = list(new ScilabString(["A"]));
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = [["A"],[sci2exp(1)]];
- gr_i = [];
+ var exprs = [["A"],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([2,1],this.model,exprs,gr_i);
this.x.graphics.id = "Goto";
return new BasicBlock(this.x);
@@ -33,8 +33,8 @@ function GOTO() {
this.tag = arguments[0]["tag"]
this.tagvis = parseFloat(arguments[0]["tagvis"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tag,this.tagvis,exprs] = scicos_getvalue("Set parameters",["Tag","Tag Visibility(1=Local 2=scoped 3= global)"],list("str",-1,"vec",1),exprs);
@@ -44,19 +44,19 @@ function GOTO() {
this.tagvis = int(this.tagvis);
if (((this.tagvis<1)||(this.tagvis>3))) {
message("Tag Visibility must be between 1 and 3");
- ok = false;
+ var ok = false;
}
if (ok) {
if (((this.model.ipar!=this.tagvis)||(this.model.opar!=list(this.tag)))) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
graphics.exprs = exprs;
this.model.opar = list(new ScilabDouble([this.tag]));
this.model.ipar = new ScilabDouble([this.tagvis]);
this.x.model = this.model;
this.x.graphics = graphics;
- arg1 = this.x;
+ var arg1 = this.x;
break;
}
}
diff --git a/js/Branching/GOTOMO.js b/js/Branching/GOTOMO.js
index 81683fcd..473bfd8c 100644
--- a/js/Branching/GOTOMO.js
+++ b/js/Branching/GOTOMO.js
@@ -13,11 +13,11 @@ function GOTOMO() {
this.model.opar = list(new ScilabString(["A"]));
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "gotomo";
mo.inputs = "p";
- exprs = [["A"],[sci2exp(1)]];
- gr_i = [];
+ var exprs = [["A"],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([2,1],this.model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
return new BasicBlock(this.x);
@@ -36,8 +36,8 @@ function GOTOMO() {
this.tag = arguments[0]["tag"]
this.tagvis = parseFloat(arguments[0]["tagvis"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tag,this.tagvis,exprs] = scicos_getvalue("Set parameters",["Tag","Tag Visibility(1=Local 2=scoped 3= global)"],list("str",-1,"vec",1),exprs);
@@ -47,19 +47,19 @@ function GOTOMO() {
this.tagvis = int(this.tagvis);
if (((this.tagvis<1)||(this.tagvis>3))) {
message("Tag Visibility must be between 1 and 3");
- ok = false;
+ var ok = false;
}
if (ok) {
if (((this.model.ipar!=this.tagvis)||(this.model.opar!=list(this.tag)))) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
graphics.exprs = exprs;
this.model.opar = list(new ScilabDouble([this.tag]));
this.model.ipar = new ScilabDouble([this.tagvis]);
this.x.model = this.model;
this.x.graphics = graphics;
- arg1 = this.x;
+ var arg1 = this.x;
break;
}
}
diff --git a/js/Branching/GotoTagVisibility.js b/js/Branching/GotoTagVisibility.js
index 7010e090..87317add 100644
--- a/js/Branching/GotoTagVisibility.js
+++ b/js/Branching/GotoTagVisibility.js
@@ -14,8 +14,8 @@ function GotoTagVisibility() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [false,false];
- exprs = "A";
- gr_i = [];
+ var exprs = "A";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -31,8 +31,8 @@ function GotoTagVisibility() {
GotoTagVisibility.prototype.set = function GotoTagVisibility() {
this.tag = arguments[0]["tag"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
@@ -41,8 +41,8 @@ function GotoTagVisibility() {
}
if (ok) {
if (this.model.opar!=list(this.tag)) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
graphics.exprs = exprs;
this.model.opar = list(new ScilabDouble([this.tag]));
diff --git a/js/Branching/GotoTagVisibilityMO.js b/js/Branching/GotoTagVisibilityMO.js
index fdacf43e..95c5ae7b 100644
--- a/js/Branching/GotoTagVisibilityMO.js
+++ b/js/Branching/GotoTagVisibilityMO.js
@@ -14,8 +14,8 @@ function GotoTagVisibilityMO() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [false,false];
- exprs = "A";
- gr_i = [];
+ var exprs = "A";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -31,8 +31,8 @@ function GotoTagVisibilityMO() {
GotoTagVisibilityMO.prototype.set = function GotoTagVisibilityMO() {
this.tag = arguments[0]["tag"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
@@ -41,8 +41,8 @@ function GotoTagVisibilityMO() {
}
if (ok) {
if (this.model.opar!=list(this.tag)) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
graphics.exprs = exprs;
this.model.opar = list(new ScilabDouble([this.tag]));
diff --git a/js/Branching/ISELECT_f.js b/js/Branching/ISELECT_f.js
index 456dd661..f06d1bb5 100644
--- a/js/Branching/ISELECT_f.js
+++ b/js/Branching/ISELECT_f.js
@@ -2,7 +2,7 @@
function ISELECT_f() {
ISELECT_f.prototype.define = function ISELECT_f() {
this.z0 = 0;
- out = [[-1],[-1]];
+ var out = [[-1],[-1]];
this.nout = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["selector"]), new ScilabDouble([2]));
@@ -12,8 +12,8 @@ function ISELECT_f() {
this.model.dstate = new ScilabDouble([this.z0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.nout)],[string(this.z0+1)]];
- gr_i = [];
+ var exprs = [[string(this.nout)],[string(this.z0+1)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -31,8 +31,8 @@ function ISELECT_f() {
this.nout = parseFloat(arguments[0]["nout"])
this.z0 = parseFloat(arguments[0]["z0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nout,this.z0,exprs] = scicos_getvalue("Set parameters",["number of outputs","initial connected output"],list("vec",1,"vec",1),exprs);
@@ -42,7 +42,10 @@ function ISELECT_f() {
if (this.z0>this.nout||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,-1,-ones(this.nout,1),ones(this.nout,1),[]);
+ var tmpvar0 = check_io(this.model,graphics,-1,-ones(this.nout,1),ones(this.nout,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.dstate = new ScilabDouble([this.z0-1]);
diff --git a/js/Branching/ISELECT_f.pickle b/js/Branching/ISELECT_f.pickle
index 948a2c26..9790452a 100644
--- a/js/Branching/ISELECT_f.pickle
+++ b/js/Branching/ISELECT_f.pickle
@@ -13,74 +13,71 @@ p5
atp6
Rp7
.(dp0
-S'model.dstate'
+S'model.sim'
p1
-S'double'
+S'list'
p2
-sS'arg1'
+sS'model.in1'
p3
-S'object'
+S'double'
p4
-sS'graphics'
+sS'model.dstate'
p5
g4
-sS'x.model'
+sS'model.evtin'
p6
-NsS'model.out'
+g4
+sS'x.graphics'
p7
-S'matrix'
+S'object'
p8
-sS'out'
+sS'arg1'
p9
g8
-sS'model.in1'
+sS'graphics.exprs'
p10
-g2
-sS'x.graphics'
+NsS'model.out'
p11
-g4
-sS'typ'
+S'matrix'
p12
-S'vector'
+sS'model.blocktype'
p13
-sS'model.evtin'
+S'string'
p14
-g2
-sS'model.sim'
+sS'exprs'
p15
-S'list'
+g12
+sS'x.model'
p16
-sS'[this.model,graphics,ok]'
+NsS'gr_i'
p17
-g16
-sS'graphics.exprs'
+S'vector'
p18
-NsS'z0'
+sS'z0'
p19
-g2
-sS'model.blocktype'
+g4
+sS'model.dep_ut'
p20
-S'string'
+g18
+sS'graphics'
p21
-sS'model.dep_ut'
+g8
+sS'y'
p22
-g13
-sS'exprs'
+g18
+sS'x'
p23
-g8
-sS'gr_i'
+g4
+sS'model'
p24
-g13
-sS'y'
+g8
+sS'typ'
p25
-g13
-sS'x'
+g18
+sS'nout'
p26
-g2
-sS'model'
-p27
g4
-sS'nout'
-p28
-g2
+sS'out'
+p27
+g12
s. \ No newline at end of file
diff --git a/js/Branching/ISELECT_m.js b/js/Branching/ISELECT_m.js
index 5ec93016..6334bf7d 100644
--- a/js/Branching/ISELECT_m.js
+++ b/js/Branching/ISELECT_m.js
@@ -20,8 +20,8 @@ function ISELECT_m() {
this.model.dstate = new ScilabDouble([this.z0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[sci2exp(this.nout)],[sci2exp(this.z0)]];
- gr_i = [];
+ var exprs = [[sci2exp(1)],[sci2exp(this.nout)],[sci2exp(this.z0)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -41,8 +41,8 @@ function ISELECT_m() {
this.nout = parseFloat(arguments[0]["nout"])
this.z0 = parseFloat(arguments[0]["z0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.typ,this.nout,this.z0,exprs] = scicos_getvalue("Set parameters",["Datatype(1= real double 2=Complex 3=int32 ...)","number of outputs","initial connected output"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -53,14 +53,17 @@ function ISELECT_m() {
message("initial connected input is not a valid input port number");
} else if (((this.typ<1)||(this.typ>8))) {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
} else {
- it = this.typ;
- ot = this.typ*ones(1,this.nout);
+ var it = this.typ;
+ var ot = this.typ*ones(1,this.nout);
if (ok) {
- out = [-ones(this.nout,1),-2*ones(this.nout,1)];
- in1 = [-1,-2];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(this.nout,1),[]);
+ var out = [-ones(this.nout,1),-2*ones(this.nout,1)];
+ var in1 = [-1,-2];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(this.nout,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.dstate = new ScilabDouble([this.z0]);
diff --git a/js/Branching/ISELECT_m.pickle b/js/Branching/ISELECT_m.pickle
index 59aa7a37..f1b30901 100644
--- a/js/Branching/ISELECT_m.pickle
+++ b/js/Branching/ISELECT_m.pickle
@@ -67,62 +67,59 @@ p20
sS'model.evtout'
p21
g7
-sS'[this.model,graphics,ok]'
-p22
-g2
sS'model.out2'
-p23
+p22
g11
sS'in1'
-p24
+p23
g7
sS'model.rpar'
-p25
+p24
g7
sS'model.outtyp'
-p26
+p25
g2
sS'model.state'
-p27
+p26
g7
sS'graphics.exprs'
-p28
+p27
NsS'model.ipar'
-p29
+p28
g7
sS'z0'
-p30
+p29
g2
sS'ok'
-p31
+p30
S'boolean'
-p32
+p31
sS'model.blocktype'
-p33
+p32
S'string'
-p34
+p33
sS'model.dep_ut'
-p35
+p34
g7
sS'exprs'
-p36
+p35
g11
sS'gr_i'
-p37
+p36
g7
sS'y'
-p38
+p37
g7
sS'x'
-p39
+p38
g2
sS'model'
-p40
+p39
g4
sS'ot'
-p41
-g34
+p40
+g33
sS'nout'
-p42
+p41
g2
s. \ No newline at end of file
diff --git a/js/Branching/MUX.js b/js/Branching/MUX.js
index 0b29058d..b16966b4 100644
--- a/js/Branching/MUX.js
+++ b/js/Branching/MUX.js
@@ -9,8 +9,8 @@ function MUX() {
this.model.ipar = new ScilabDouble([this.in1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = string(this.in1);
- gr_i = [];
+ var exprs = string(this.in1);
+ var gr_i = [];
this.x = standard_define([.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -25,8 +25,8 @@ function MUX() {
MUX.prototype.set = function MUX() {
this.in1 = parseFloat(arguments[0]["in1"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.in1,exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("intvec",-1),exprs);
@@ -36,21 +36,27 @@ function MUX() {
if (size(this.in1,"*")==1) {
if (this.in1<2||this.in1>31) {
message("Block must have at least two input ports and at most 31");
- ok = false;
+ var ok = false;
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,-transpose([1:this.in1]),0,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,-transpose([1:this.in1]),0,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
} else {
if (size(this.in1,"*")<2||or(this.in1==0)||size(this.in1,"*")>31) {
message([["Block must have at least two input ports"],["and at most 31. Size 0 is not allowed. "]]);
- ok = false;
+ var ok = false;
} else {
if (min(this.in1)<0) {
- nout = 0;
+ var nout = 0;
} else {
- nout = sum(this.in1);
+ var nout = sum(this.in1);
}
- [this.model,graphics,ok] = check_io(this.model,graphics,this.in1.slice(),nout,[],[]);
+ var tmpvar1 = check_io(this.model,graphics,this.in1.slice(),nout,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
this.in1 = size(this.in1,"*");
}
diff --git a/js/Branching/MUX.pickle b/js/Branching/MUX.pickle
index e4cd0711..2dbb6528 100644
--- a/js/Branching/MUX.pickle
+++ b/js/Branching/MUX.pickle
@@ -34,48 +34,45 @@ p10
sS'arg1'
p11
g10
-sS'[this.model,graphics,ok]'
-p12
-g2
sS'graphics.exprs'
-p13
+p12
NsS'in1'
-p14
+p13
S'double'
-p15
+p14
sS'model.out'
-p16
-g15
+p15
+g14
sS'exprs'
-p17
+p16
g8
sS'x.model'
-p18
+p17
NsS'gr_i'
-p19
+p18
g4
sS'model.dep_ut'
-p20
+p19
g4
sS'graphics'
-p21
+p20
g10
sS'y'
-p22
+p21
g4
sS'x'
-p23
-g15
+p22
+g14
sS'model'
-p24
+p23
g10
sS'model.ipar'
-p25
-g15
+p24
+g14
sS'typ'
-p26
+p25
g4
sS'nout'
-p27
-g15
+p26
+g14
s. \ No newline at end of file
diff --git a/js/Branching/MUX_f.js b/js/Branching/MUX_f.js
index 5dcbbd19..65fc7db3 100644
--- a/js/Branching/MUX_f.js
+++ b/js/Branching/MUX_f.js
@@ -9,8 +9,8 @@ function MUX_f() {
this.model.ipar = new ScilabDouble([this.in1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = string(this.in1);
- gr_i = [];
+ var exprs = string(this.in1);
+ var gr_i = [];
this.x = standard_define([0.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -25,8 +25,8 @@ function MUX_f() {
MUX_f.prototype.set = function MUX_f() {
this.in1 = parseFloat(arguments[0]["in1"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.in1,exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("vec",-1),exprs);
@@ -36,21 +36,27 @@ function MUX_f() {
if (size(this.in1,"*")==1) {
if (this.in1<2||this.in1>8) {
message("Block must have at least two input ports and at most eight");
- ok = false;
+ var ok = false;
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,-transpose([1:this.in1]),0,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,-transpose([1:this.in1]),0,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
} else {
if (size(this.in1,"*")<2||size(this.in1,"*")>8||or(this.in1==0)) {
message([["Block must have at least two input ports"],["and at most eight, and size 0 is not allowed. "]]);
- ok = false;
+ var ok = false;
} else {
if (min(this.in1)<0) {
- nout = 0;
+ var nout = 0;
} else {
- nout = sum(this.in1);
+ var nout = sum(this.in1);
}
- [this.model,graphics,ok] = check_io(this.model,graphics,this.in1.slice(),nout,[],[]);
+ var tmpvar1 = check_io(this.model,graphics,this.in1.slice(),nout,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
this.in1 = size(this.in1,"*");
}
diff --git a/js/Branching/MUX_f.pickle b/js/Branching/MUX_f.pickle
index e4cd0711..2dbb6528 100644
--- a/js/Branching/MUX_f.pickle
+++ b/js/Branching/MUX_f.pickle
@@ -34,48 +34,45 @@ p10
sS'arg1'
p11
g10
-sS'[this.model,graphics,ok]'
-p12
-g2
sS'graphics.exprs'
-p13
+p12
NsS'in1'
-p14
+p13
S'double'
-p15
+p14
sS'model.out'
-p16
-g15
+p15
+g14
sS'exprs'
-p17
+p16
g8
sS'x.model'
-p18
+p17
NsS'gr_i'
-p19
+p18
g4
sS'model.dep_ut'
-p20
+p19
g4
sS'graphics'
-p21
+p20
g10
sS'y'
-p22
+p21
g4
sS'x'
-p23
-g15
+p22
+g14
sS'model'
-p24
+p23
g10
sS'model.ipar'
-p25
-g15
+p24
+g14
sS'typ'
-p26
+p25
g4
sS'nout'
-p27
-g15
+p26
+g14
s. \ No newline at end of file
diff --git a/js/Branching/M_SWITCH.js b/js/Branching/M_SWITCH.js
index 093f2f54..30bbaee4 100644
--- a/js/Branching/M_SWITCH.js
+++ b/js/Branching/M_SWITCH.js
@@ -1,8 +1,8 @@
/* autogenerated from "macros/Branching/M_SWITCH.sci" */
function M_SWITCH() {
M_SWITCH.prototype.define = function M_SWITCH() {
- in1 = [[1],[-1],[-1]];
- ipar = [[1],[3]];
+ var in1 = [[1],[-1],[-1]];
+ var ipar = [[1],[3]];
this.nin = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["mswitch"]), new ScilabDouble([4]));
@@ -11,8 +11,8 @@ function M_SWITCH() {
this.model.ipar = new ScilabDouble(ipar);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.nin)],[string(ipar)]];
- gr_i = [];
+ var exprs = [[string(this.nin)],[string(ipar)]];
+ var gr_i = [];
this.x = standard_define([2.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -32,8 +32,8 @@ function M_SWITCH() {
this.base = parseFloat(arguments[0]["base"])
this.rule = arguments[0]["rule"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nin,this.base,this.rule,exprs] = scicos_getvalue("Set parameters",["number of inputs","zero base indexing (0), otherwise 1","rounding rule: int (0), round (1), ceil (2), floor (3)"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -50,17 +50,20 @@ function M_SWITCH() {
message("incorrect rounding rule");
} else {
if (this.nin==1) {
- in1 = [[1,1],[-1,1]];
- out = [1,1];
+ var in1 = [[1,1],[-1,1]];
+ var out = [1,1];
} else {
- in1 = [[1],[-ones(this.nin,1)]];
- in2 = [[1],[-2*ones(this.nin,1)]];
- in1 = [in1,in2];
- out = [-1,-2];
+ var in1 = [[1],[-ones(this.nin,1)]];
+ var in2 = [[1],[-2*ones(this.nin,1)]];
+ var in1 = [in1,in2];
+ var out = [-1,-2];
}
- it = [[-1],[-2*ones(this.nin,1)]];
- ot = -2;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var it = [[-1],[-2*ones(this.nin,1)]];
+ var ot = -2;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.ipar = new ScilabDouble([this.base],[this.rule]);
diff --git a/js/Branching/M_SWITCH.pickle b/js/Branching/M_SWITCH.pickle
index 396fdd0d..2736cffb 100644
--- a/js/Branching/M_SWITCH.pickle
+++ b/js/Branching/M_SWITCH.pickle
@@ -49,52 +49,49 @@ p14
sS'nin'
p15
g8
-sS'[this.model,graphics,ok]'
-p16
-g8
sS'in1'
-p17
+p16
g5
sS'in2'
-p18
+p17
g5
sS'base'
-p19
+p18
g8
sS'graphics.exprs'
-p20
+p19
NsS'model.ipar'
-p21
+p20
g5
sS'typ'
-p22
+p21
g10
sS'model.blocktype'
-p23
+p22
S'string'
-p24
+p23
sS'model.dep_ut'
-p25
+p24
g10
sS'exprs'
-p26
+p25
g5
sS'gr_i'
-p27
+p26
g10
sS'ipar'
-p28
+p27
g5
sS'y'
-p29
+p28
g10
sS'x'
-p30
+p29
g8
sS'model'
-p31
+p30
g2
sS'ot'
-p32
+p31
g8
s. \ No newline at end of file
diff --git a/js/Branching/NRMSOM_f.js b/js/Branching/NRMSOM_f.js
index 8414f30f..c2765c61 100644
--- a/js/Branching/NRMSOM_f.js
+++ b/js/Branching/NRMSOM_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Branching/NRMSOM_f.sci" */
function NRMSOM_f() {
NRMSOM_f.prototype.define = function NRMSOM_f() {
- in1 = [[-1],[-1]];
+ var in1 = [[-1],[-1]];
this.nin = 2;
this.model = scicos_model();
this.model.sim = new ScilabString(["junk"]);
@@ -9,8 +9,8 @@ function NRMSOM_f() {
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [string(this.nin)];
- gr_i = [];
+ var exprs = [string(this.nin)];
+ var gr_i = [];
this.x = standard_define([.2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -26,15 +26,18 @@ function NRMSOM_f() {
NRMSOM_f.prototype.set = function NRMSOM_f() {
this.nin = parseFloat(arguments[0]["nin"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nin,exprs] = scicos_getvalue("Set parameters",["number of inputs"],list("vec",1),exprs);
if (!ok) {
break;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,-ones(this.nin,1),-1,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,-ones(this.nin,1),-1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.x.graphics = graphics;
diff --git a/js/Branching/NRMSOM_f.pickle b/js/Branching/NRMSOM_f.pickle
index a36e67ea..20fb9bc4 100644
--- a/js/Branching/NRMSOM_f.pickle
+++ b/js/Branching/NRMSOM_f.pickle
@@ -33,43 +33,39 @@ p9
sS'arg1'
p10
g9
-sS'[this.model,graphics,ok]'
-p11
-S'list'
-p12
sS'graphics.exprs'
-p13
+p11
NsS'in1'
-p14
+p12
g4
sS'model.out'
-p15
+p13
g6
sS'exprs'
-p16
+p14
S'vector'
-p17
+p15
sS'x.model'
-p18
+p16
NsS'gr_i'
-p19
-g17
+p17
+g15
sS'model.dep_ut'
-p20
-g17
+p18
+g15
sS'graphics'
-p21
+p19
g9
sS'y'
-p22
-g17
+p20
+g15
sS'x'
-p23
+p21
g6
sS'model'
-p24
+p22
g9
sS'typ'
-p25
-g17
+p23
+g15
s. \ No newline at end of file
diff --git a/js/Branching/RELAY_f.js b/js/Branching/RELAY_f.js
index a6e811d7..69020ac6 100644
--- a/js/Branching/RELAY_f.js
+++ b/js/Branching/RELAY_f.js
@@ -1,8 +1,8 @@
/* autogenerated from "macros/Branching/RELAY_f.sci" */
function RELAY_f() {
RELAY_f.prototype.define = function RELAY_f() {
- i0 = 0;
- in1 = [[-1],[-1]];
+ var i0 = 0;
+ var in1 = [[-1],[-1]];
this.nin = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["relay"]), new ScilabDouble([2]));
@@ -13,8 +13,8 @@ function RELAY_f() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,true];
- exprs = [[string(this.nin)],[string(i0+1)]];
- gr_i = [];
+ var exprs = [[string(this.nin)],[string(i0+1)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -32,10 +32,10 @@ function RELAY_f() {
this.nin = parseFloat(arguments[0]["nin"])
this.z0 = arguments[0]["z0"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- ipar = this.model.ipar;
+ var ipar = this.model.ipar;
while (true) {
[ok,this.nin,this.z0,exprs] = scicos_getvalue("Set parameters",["number of inputs","initial connected input"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -44,7 +44,10 @@ function RELAY_f() {
if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[]);
+ var tmpvar0 = check_io(this.model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.dstate = new ScilabString([this.z0-1]);
diff --git a/js/Branching/RELAY_f.pickle b/js/Branching/RELAY_f.pickle
index fdcdc500..8e77d212 100644
--- a/js/Branching/RELAY_f.pickle
+++ b/js/Branching/RELAY_f.pickle
@@ -54,39 +54,36 @@ g2
sS'i0'
p17
g2
-sS'[this.model,graphics,ok]'
-p18
-g15
sS'in1'
-p19
+p18
g9
sS'graphics.exprs'
-p20
+p19
NsS'typ'
-p21
+p20
g13
sS'model.blocktype'
-p22
+p21
S'string'
-p23
+p22
sS'model.dep_ut'
-p24
+p23
g13
sS'exprs'
-p25
+p24
g9
sS'gr_i'
-p26
+p25
g13
sS'ipar'
-p27
+p26
NsS'y'
-p28
+p27
g13
sS'x'
-p29
+p28
g2
sS'model'
-p30
+p29
g4
s. \ No newline at end of file
diff --git a/js/Branching/SCALAR2VECTOR.js b/js/Branching/SCALAR2VECTOR.js
index ec798670..004add07 100644
--- a/js/Branching/SCALAR2VECTOR.js
+++ b/js/Branching/SCALAR2VECTOR.js
@@ -8,8 +8,8 @@ function SCALAR2VECTOR() {
this.model.in1 = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [string([this.nout])];
- gr_i = [];
+ var exprs = [string([this.nout])];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -25,8 +25,8 @@ function SCALAR2VECTOR() {
SCALAR2VECTOR.prototype.set = function SCALAR2VECTOR() {
this.nout = parseFloat(arguments[0]["nout"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nout,exprs] = scicos_getvalue("Set block parameters",["size of output (-1: if don\'t know)"],list("vec",1),exprs);
@@ -36,10 +36,13 @@ function SCALAR2VECTOR() {
this.nout = int(this.nout);
if ((this.nout!=-1&&(this.nout<=0))) {
message("size of output must be -1 or >0");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,[1],this.nout,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,[1],this.nout,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Branching/SCALAR2VECTOR.pickle b/js/Branching/SCALAR2VECTOR.pickle
index 9cfd21be..d1ff3945 100644
--- a/js/Branching/SCALAR2VECTOR.pickle
+++ b/js/Branching/SCALAR2VECTOR.pickle
@@ -34,42 +34,39 @@ p10
sS'arg1'
p11
g10
-sS'[this.model,graphics,ok]'
-p12
-g2
sS'graphics.exprs'
-p13
+p12
NsS'model.in1'
-p14
+p13
g4
sS'model.dep_ut'
-p15
+p14
S'vector'
-p16
+p15
sS'exprs'
-p17
-g16
+p16
+g15
sS'x.model'
-p18
+p17
NsS'gr_i'
-p19
-g16
+p18
+g15
sS'graphics'
-p20
+p19
g10
sS'y'
-p21
-g16
+p20
+g15
sS'x'
-p22
+p21
g4
sS'model'
-p23
+p22
g10
sS'typ'
-p24
-g16
+p23
+g15
sS'nout'
-p25
+p24
g4
s. \ No newline at end of file
diff --git a/js/Branching/SELECT_f.js b/js/Branching/SELECT_f.js
index a5527aa8..34b3e65d 100644
--- a/js/Branching/SELECT_f.js
+++ b/js/Branching/SELECT_f.js
@@ -2,7 +2,7 @@
function SELECT_f() {
SELECT_f.prototype.define = function SELECT_f() {
this.z0 = 0;
- in1 = [[-1],[-1]];
+ var in1 = [[-1],[-1]];
this.nin = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["selector"]), new ScilabDouble([2]));
@@ -12,8 +12,8 @@ function SELECT_f() {
this.model.dstate = new ScilabDouble([this.z0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.nin)],[string(this.z0+1)]];
- gr_i = [];
+ var exprs = [[string(this.nin)],[string(this.z0+1)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -31,8 +31,8 @@ function SELECT_f() {
this.nin = parseFloat(arguments[0]["nin"])
this.z0 = parseFloat(arguments[0]["z0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nin,this.z0,exprs] = scicos_getvalue("Set parameters",["number of inputs","initial connected input"],list("vec",1,"vec",1),exprs);
@@ -42,7 +42,10 @@ function SELECT_f() {
if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[]);
+ var tmpvar0 = check_io(this.model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.dstate = new ScilabDouble([this.z0-1]);
diff --git a/js/Branching/SELECT_f.pickle b/js/Branching/SELECT_f.pickle
index 3e105200..8a09ab8c 100644
--- a/js/Branching/SELECT_f.pickle
+++ b/js/Branching/SELECT_f.pickle
@@ -13,74 +13,71 @@ p5
atp6
Rp7
.(dp0
-S'model.dstate'
+S'model.sim'
p1
-S'double'
+S'list'
p2
-sS'arg1'
+sS'model.in1'
p3
-S'object'
+S'matrix'
p4
-sS'graphics'
+sS'model.dstate'
p5
-g4
-sS'x.model'
+S'double'
p6
-NsS'model.out'
+sS'model.evtin'
p7
-g2
-sS'model.in1'
+g6
+sS'x.graphics'
p8
-S'matrix'
+S'object'
p9
-sS'x.graphics'
+sS'arg1'
p10
-g4
-sS'typ'
+g9
+sS'graphics.exprs'
p11
-S'vector'
+NsS'nin'
p12
-sS'model.evtin'
+g6
+sS'in1'
p13
-g2
-sS'model.sim'
+g4
+sS'model.out'
p14
-S'list'
+g6
+sS'exprs'
p15
-sS'nin'
+g4
+sS'x.model'
p16
-g2
-sS'[this.model,graphics,ok]'
+NsS'gr_i'
p17
-g15
-sS'in1'
+S'vector'
p18
-g9
-sS'graphics.exprs'
+sS'z0'
p19
-NsS'z0'
+g6
+sS'model.dep_ut'
p20
-g2
-sS'model.blocktype'
+g18
+sS'graphics'
p21
-S'string'
+g9
+sS'y'
p22
-sS'model.dep_ut'
+g18
+sS'x'
p23
-g12
-sS'exprs'
+g6
+sS'model'
p24
g9
-sS'gr_i'
+sS'typ'
p25
-g12
-sS'y'
+g18
+sS'model.blocktype'
p26
-g12
-sS'x'
+S'string'
p27
-g2
-sS'model'
-p28
-g4
s. \ No newline at end of file
diff --git a/js/Branching/SELECT_m.js b/js/Branching/SELECT_m.js
index 6f05f7ca..c59ee23f 100644
--- a/js/Branching/SELECT_m.js
+++ b/js/Branching/SELECT_m.js
@@ -20,8 +20,8 @@ function SELECT_m() {
this.model.dstate = new ScilabDouble([this.z0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[sci2exp(this.nin)],[sci2exp(this.z0)]];
- gr_i = [];
+ var exprs = [[sci2exp(1)],[sci2exp(this.nin)],[sci2exp(this.z0)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -41,8 +41,8 @@ function SELECT_m() {
this.nin = parseFloat(arguments[0]["nin"])
this.z0 = parseFloat(arguments[0]["z0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.typ,this.nin,this.z0,exprs] = scicos_getvalue("Set parameters",["Datatype(1= real double 2=Complex 3=int32 ..)","number of inputs","initial connected input"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -53,14 +53,17 @@ function SELECT_m() {
message("initial connected input is not a valid input port number");
} else if (((this.typ<1)||(this.typ>8))&&(this.typ!=-1)) {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
} else {
- it = this.typ*ones(1,this.nin);
- ot = this.typ;
+ var it = this.typ*ones(1,this.nin);
+ var ot = this.typ;
if (ok) {
- in1 = [-ones(this.nin,1),-2*ones(this.nin,1)];
- out = [-1,-2];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(this.nin,1),[]);
+ var in1 = [-ones(this.nin,1),-2*ones(this.nin,1)];
+ var out = [-1,-2];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(this.nin,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.dstate = new ScilabDouble([this.z0]);
diff --git a/js/Branching/SELECT_m.pickle b/js/Branching/SELECT_m.pickle
index 4eea246b..5c1a1a33 100644
--- a/js/Branching/SELECT_m.pickle
+++ b/js/Branching/SELECT_m.pickle
@@ -71,58 +71,55 @@ g12
sS'nin'
p23
g2
-sS'[this.model,graphics,ok]'
-p24
-g2
sS'model.out2'
-p25
+p24
g2
sS'in1'
-p26
+p25
g12
sS'model.rpar'
-p27
+p26
g12
sS'model.outtyp'
-p28
+p27
g2
sS'model.state'
-p29
+p28
g12
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
+p30
g12
sS'z0'
-p32
+p31
g2
sS'ok'
-p33
+p32
S'boolean'
-p34
+p33
sS'model.blocktype'
-p35
+p34
g7
sS'model.dep_ut'
-p36
+p35
g12
sS'exprs'
-p37
+p36
g14
sS'gr_i'
-p38
+p37
g12
sS'y'
-p39
+p38
g12
sS'x'
-p40
+p39
g2
sS'model'
-p41
+p40
g4
sS'ot'
-p42
+p41
g12
s. \ No newline at end of file
diff --git a/js/Branching/SELF_SWITCH.js b/js/Branching/SELF_SWITCH.js
index 93975975..eca2147d 100644
--- a/js/Branching/SELF_SWITCH.js
+++ b/js/Branching/SELF_SWITCH.js
@@ -13,7 +13,7 @@ function SELF_SWITCH() {
this.x.model.out = 1;
this.x.model.blocktype = "h";
this.x.model.dep_ut = [false,false];
- this.x.model.rpar = this.genSwitchInnerDiagram[this.stateOpen-1];
+ this.x.model.rpar = genSwitchInnerDiagram(this.stateOpen);
this.x.model.opar = list(this.stateOpen);
this.x.graphics.in_implicit = ["E"];
this.x.graphics.in_style = "";
@@ -33,10 +33,10 @@ function SELF_SWITCH() {
SELF_SWITCH.prototype.set = function SELF_SWITCH() {
this.x = arg1;
this.stateOpen = this.x.model.opar[1-1];
- this.x.model.rpar = this.genSwitchInnerDiagram[!this.stateOpen-1];
+ this.x.model.rpar = genSwitchInnerDiagram(!this.stateOpen);
this.x.model.opar = list(!this.stateOpen);
- y = 0;
- typ = list();
+ var y = 0;
+ var typ = list();
if (this.stateOpen==false) {
this.x.graphics.style = "SELF_SWITCH_OFF";
} else {
diff --git a/js/Branching/SELF_SWITCH.pickle b/js/Branching/SELF_SWITCH.pickle
index f13830df..df5cf582 100644
--- a/js/Branching/SELF_SWITCH.pickle
+++ b/js/Branching/SELF_SWITCH.pickle
@@ -6,10 +6,8 @@ S'x'
p2
aS'stateOpen'
p3
-aS'genSwitchInnerDiagram'
-p4
-atp5
-Rp6
+atp4
+Rp5
.(dp0
S'diagram.objs[1-1]'
p1
diff --git a/js/Branching/SWITCH2.js b/js/Branching/SWITCH2.js
index 5b80f243..ad4e6b15 100644
--- a/js/Branching/SWITCH2.js
+++ b/js/Branching/SWITCH2.js
@@ -1,10 +1,10 @@
/* autogenerated from "macros/Branching/SWITCH2.sci" */
function SWITCH2() {
SWITCH2.prototype.define = function SWITCH2() {
- in1 = [[-1],[1],[-1]];
- ipar = [0];
+ var in1 = [[-1],[1],[-1]];
+ var ipar = [0];
this.nzz = 1;
- rpar = 0;
+ var rpar = 0;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["switch2"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble(in1);
@@ -15,8 +15,8 @@ function SWITCH2() {
this.model.nmode = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(ipar)],[string(rpar)],[string(this.nzz)]];
- gr_i = [];
+ var exprs = [[string(ipar)],[string(rpar)],[string(this.nzz)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -36,8 +36,8 @@ function SWITCH2() {
this.thra = arguments[0]["thra"]
this.nzz = parseFloat(arguments[0]["nzz"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.rule,this.thra,this.nzz,exprs] = scicos_getvalue("Set parameters",["pass first input if: u2>=a (0), u2>a (1), u2~=a (2)","threshold a","use zero crossing: yes (1), no (0)"],list("vec",1,"vec",1,"vec",1),exprs);
diff --git a/js/Branching/SWITCH2_m.js b/js/Branching/SWITCH2_m.js
index 8dbaa1e6..e49aa38c 100644
--- a/js/Branching/SWITCH2_m.js
+++ b/js/Branching/SWITCH2_m.js
@@ -1,9 +1,9 @@
/* autogenerated from "macros/Branching/SWITCH2_m.sci" */
function SWITCH2_m() {
SWITCH2_m.prototype.define = function SWITCH2_m() {
- ipar = [0];
+ var ipar = [0];
this.nzz = 1;
- rpar = 0;
+ var rpar = 0;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["switch2_m"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1],[1],[-1]);
@@ -18,8 +18,8 @@ function SWITCH2_m() {
this.model.nmode = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[string(ipar)],[string(rpar)],[string(this.nzz)]];
- gr_i = [];
+ var exprs = [[sci2exp(1)],[string(ipar)],[string(rpar)],[string(this.nzz)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -41,8 +41,8 @@ function SWITCH2_m() {
this.thra = arguments[0]["thra"]
this.nzz = parseFloat(arguments[0]["nzz"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.ot,this.rule,this.thra,this.nzz,exprs] = scicos_getvalue("Set parameters",["Datatype (1=real double 2=complex 3=int32 ...)","pass first input if: u2>=a (0), u2>a (1), u2~=a (2)","threshold a","use zero crossing: yes (1), no (0)"],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
@@ -68,15 +68,18 @@ function SWITCH2_m() {
}
if (((this.ot<1)||(this.ot>8))&&(this.ot!=-1)) {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
it[1-1] = this.ot;
it[2-1] = 1;
it[3-1] = this.ot;
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,this.ot),[],[]);
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,this.ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.x.graphics = graphics;
diff --git a/js/Branching/SWITCH2_m.pickle b/js/Branching/SWITCH2_m.pickle
index ecc77338..5b66bbf0 100644
--- a/js/Branching/SWITCH2_m.pickle
+++ b/js/Branching/SWITCH2_m.pickle
@@ -66,64 +66,61 @@ sS'model.sim'
p19
S'list'
p20
-sS'[this.model,graphics,ok]'
-p21
-g5
sS'model.out2'
-p22
+p21
g5
sS'model.nmode'
-p23
+p22
g5
sS'model.rpar'
-p24
+p23
g5
sS'in1'
-p25
+p24
g9
sS'model.outtyp'
-p26
+p25
g5
sS'graphics.exprs'
-p27
+p26
NsS'model.ipar'
-p28
+p27
g9
sS'model.nzcross'
-p29
+p28
g5
sS'ok'
-p30
+p29
S'boolean'
-p31
+p30
sS'model.blocktype'
-p32
+p31
S'string'
-p33
+p32
sS'nzz'
-p34
+p33
g5
sS'rule'
-p35
+p34
g5
sS'exprs'
-p36
+p35
g14
sS'gr_i'
-p37
+p36
g9
sS'ipar'
-p38
+p37
g9
sS'y'
-p39
+p38
g9
sS'x'
-p40
+p39
g5
sS'model'
-p41
+p40
g2
sS'it[1-1]'
-p42
+p41
Ns. \ No newline at end of file
diff --git a/js/Branching/SWITCH_f.js b/js/Branching/SWITCH_f.js
index 1b4846f9..45393eba 100644
--- a/js/Branching/SWITCH_f.js
+++ b/js/Branching/SWITCH_f.js
@@ -1,8 +1,8 @@
/* autogenerated from "macros/Branching/SWITCH_f.sci" */
function SWITCH_f() {
SWITCH_f.prototype.define = function SWITCH_f() {
- i0 = 0;
- in1 = [[-1],[-1]];
+ var i0 = 0;
+ var in1 = [[-1],[-1]];
this.nin = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["switchn"]), new ScilabDouble([2]));
@@ -12,8 +12,8 @@ function SWITCH_f() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,true];
- exprs = [[string(this.nin)],[string(i0+1)]];
- gr_i = [];
+ var exprs = [[string(this.nin)],[string(i0+1)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -31,10 +31,10 @@ function SWITCH_f() {
this.nin = parseFloat(arguments[0]["nin"])
this.z0 = arguments[0]["z0"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- ipar = this.model.ipar;
+ var ipar = this.model.ipar;
while (true) {
[ok,this.nin,this.z0,exprs] = scicos_getvalue("Set switch parameters",["number of inputs","connected input"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -43,7 +43,10 @@ function SWITCH_f() {
if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,-ones(this.nin,1),-1,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,-ones(this.nin,1),-1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.ipar = new ScilabString([this.z0-1]);
diff --git a/js/Branching/SWITCH_f.pickle b/js/Branching/SWITCH_f.pickle
index 241bf0da..aa8254c3 100644
--- a/js/Branching/SWITCH_f.pickle
+++ b/js/Branching/SWITCH_f.pickle
@@ -48,42 +48,39 @@ g6
sS'i0'
p15
g6
-sS'[this.model,graphics,ok]'
-p16
-g13
sS'in1'
-p17
+p16
g8
sS'graphics.exprs'
-p18
+p17
NsS'model.ipar'
-p19
+p18
g6
sS'typ'
-p20
+p19
g11
sS'model.blocktype'
-p21
+p20
S'string'
-p22
+p21
sS'model.dep_ut'
-p23
+p22
g11
sS'exprs'
-p24
+p23
g8
sS'gr_i'
-p25
+p24
g11
sS'ipar'
-p26
+p25
NsS'y'
-p27
+p26
g11
sS'x'
-p28
+p27
g6
sS'model'
-p29
+p28
g2
s. \ No newline at end of file
diff --git a/js/Electrical/CCS.js b/js/Electrical/CCS.js
index 694226ca..a1c63058 100644
--- a/js/Electrical/CCS.js
+++ b/js/Electrical/CCS.js
@@ -1,43 +1,43 @@
/* autogenerated from "macros/Electrical/CCS.sci" */
function CCS() {
CCS.prototype.define = function CCS() {
- ModelName = "CCS";
- PrametersValue = [];
- ParametersName = [];
+ var ModelName = "CCS";
+ var PrametersValue = [];
+ var ParametersName = [];
this.model = scicos_model();
- Typein = [];
- Typeout = [];
- MI = [];
- MO = [];
- P = [[2,50,1,0],[70,98,2,0],[70,2,-2,0]];
- PortName = [["Iin"],["p"],["n"]];
+ var Typein = [];
+ var Typeout = [];
+ var MI = [];
+ var MO = [];
+ var P = [[2,50,1,0],[70,98,2,0],[70,2,-2,0]];
+ var PortName = [["Iin"],["p"],["n"]];
for (i=1;i<=size(P,"r");i+=1) {
if (P[i-1][3-1]==1) {
- Typein = [[Typein],["E"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["E"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==2) {
- Typein = [[Typein],["I"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["I"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==-1) {
- Typeout = [[Typeout],["E"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["E"]];
+ var MO = [[MO],[PortName[i-1]]];
}
if (P[i-1][3-1]==-2) {
- Typeout = [[Typeout],["I"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["I"]];
+ var MO = [[MO],[PortName[i-1]]];
}
}
this.model = scicos_model();
- mo = modelica();
+ var mo = modelica();
this.model.sim = new ScilabString([ModelName]);
mo.inputs = MI;
mo.outputs = MO;
this.model.rpar = PrametersValue;
mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName));
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
mo.model = ModelName;
@@ -59,8 +59,8 @@ function CCS() {
}
CCS.prototype.set = function CCS() {
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.x = arg1;
return new BasicBlock(this.x);
diff --git a/js/Electrical/CVS.js b/js/Electrical/CVS.js
index aa3b3e1d..82338529 100644
--- a/js/Electrical/CVS.js
+++ b/js/Electrical/CVS.js
@@ -1,43 +1,43 @@
/* autogenerated from "macros/Electrical/CVS.sci" */
function CVS() {
CVS.prototype.define = function CVS() {
- ModelName = "CVS";
- PrametersValue = [];
- ParametersName = [];
+ var ModelName = "CVS";
+ var PrametersValue = [];
+ var ParametersName = [];
this.model = scicos_model();
- Typein = [];
- Typeout = [];
- MI = [];
- MO = [];
- P = [[2,50,1,0],[70,98,2,0],[70,2,-2,0]];
- PortName = [["vin"],["p"],["n"]];
+ var Typein = [];
+ var Typeout = [];
+ var MI = [];
+ var MO = [];
+ var P = [[2,50,1,0],[70,98,2,0],[70,2,-2,0]];
+ var PortName = [["vin"],["p"],["n"]];
for (i=1;i<=size(P,"r");i+=1) {
if (P[i-1][3-1]==1) {
- Typein = [[Typein],["E"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["E"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==2) {
- Typein = [[Typein],["I"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["I"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==-1) {
- Typeout = [[Typeout],["E"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["E"]];
+ var MO = [[MO],[PortName[i-1]]];
}
if (P[i-1][3-1]==-2) {
- Typeout = [[Typeout],["I"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["I"]];
+ var MO = [[MO],[PortName[i-1]]];
}
}
this.model = scicos_model();
- mo = modelica();
+ var mo = modelica();
this.model.sim = new ScilabString([ModelName]);
mo.inputs = MI;
mo.outputs = MO;
this.model.rpar = PrametersValue;
mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName));
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
mo.model = ModelName;
@@ -59,8 +59,8 @@ function CVS() {
}
CVS.prototype.set = function CVS() {
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.x = arg1;
return new BasicBlock(this.x);
diff --git a/js/Electrical/Capacitor.js b/js/Electrical/Capacitor.js
index 49409fff..0bb18356 100644
--- a/js/Electrical/Capacitor.js
+++ b/js/Electrical/Capacitor.js
@@ -8,7 +8,7 @@ function Capacitor() {
this.model.sim = new ScilabString(["Capacitor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Capacitor";
mo.inputs = "p";
mo.outputs = "n";
@@ -16,8 +16,8 @@ function Capacitor() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = string([[this.C],[this.v]]);
- gr_i = [];
+ var exprs = string([[this.C],[this.v]]);
+ var gr_i = [];
this.x = standard_define([2,1.1],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -37,8 +37,8 @@ function Capacitor() {
this.C = parseFloat(arguments[0]["C"])
this.v = parseFloat(arguments[0]["v"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.C,this.v,exprs] = scicos_getvalue("Set Capacitor block parameter",["C (F)","Initial Voltage"],list("vec",1,"vec",1),exprs);
diff --git a/js/Electrical/ConstantVoltage.js b/js/Electrical/ConstantVoltage.js
index b38412a4..86527aec 100644
--- a/js/Electrical/ConstantVoltage.js
+++ b/js/Electrical/ConstantVoltage.js
@@ -9,14 +9,14 @@ function ConstantVoltage() {
this.model.sim = new ScilabString(["ConstantVoltage"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "ConstantVoltage";
mo.inputs = "p";
mo.outputs = "n";
mo.parameters = list("V",list(this.V));
this.model.equations = new ScilabDouble([mo]);
- exprs = string(this.V);
- gr_i = [];
+ var exprs = string(this.V);
+ var gr_i = [];
this.x = standard_define([1.5,1.1],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -33,8 +33,8 @@ function ConstantVoltage() {
ConstantVoltage.prototype.set = function ConstantVoltage() {
this.V = parseFloat(arguments[0]["V"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.V,exprs] = scicos_getvalue("Set ConstantVoltage block parameter","V (volt)",list("vec",1),exprs);
diff --git a/js/Electrical/CurrentSensor.js b/js/Electrical/CurrentSensor.js
index b95e8505..a0be489a 100644
--- a/js/Electrical/CurrentSensor.js
+++ b/js/Electrical/CurrentSensor.js
@@ -7,13 +7,13 @@ function CurrentSensor() {
this.model.sim = new ScilabString(["CurrentSensor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "CurrentSensor";
mo.inputs = "p";
mo.outputs = [["n"],["i"]];
this.model.equations = new ScilabDouble([mo]);
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = [["I"],["E"]];
diff --git a/js/Electrical/Diode.js b/js/Electrical/Diode.js
index db1b958e..df2e5f8b 100644
--- a/js/Electrical/Diode.js
+++ b/js/Electrical/Diode.js
@@ -12,14 +12,14 @@ function Diode() {
this.model.sim = new ScilabString(["Diode"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Diode";
mo.inputs = "p";
mo.outputs = "n";
mo.parameters = list(["Ids","Vt","Maxexp","R"],list(this.Ids,this.Vt,this.Maxexp,this.R));
this.model.equations = new ScilabDouble([mo]);
- exprs = string([[this.Ids],[this.Vt],[this.Maxexp],[this.R]]);
- gr_i = [];
+ var exprs = string([[this.Ids],[this.Vt],[this.Maxexp],[this.R]]);
+ var gr_i = [];
this.x = standard_define([2,1],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -43,8 +43,8 @@ function Diode() {
this.Maxexp = parseFloat(arguments[0]["Maxexp"])
this.R = parseFloat(arguments[0]["R"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.Ids,this.Vt,this.Maxexp,this.R,exprs] = scicos_getvalue("Set Diode block parameter",["Saturation cuurent (A)","Voltage equivalent to temperature (Volt)","Max exponent for linear continuation","R (ohm)"],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
diff --git a/js/Electrical/Ground.js b/js/Electrical/Ground.js
index 867c9a7a..9d796b5c 100644
--- a/js/Electrical/Ground.js
+++ b/js/Electrical/Ground.js
@@ -7,12 +7,12 @@ function Ground() {
this.model.sim = new ScilabString(["Ground"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Ground";
mo.inputs = "p";
this.model.equations = new ScilabDouble([mo]);
- exprs = "";
- gr_i = [];
+ var exprs = "";
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
diff --git a/js/Electrical/Gyrator.js b/js/Electrical/Gyrator.js
index 044faa10..b048b411 100644
--- a/js/Electrical/Gyrator.js
+++ b/js/Electrical/Gyrator.js
@@ -1,43 +1,43 @@
/* autogenerated from "macros/Electrical/Gyrator.sci" */
function Gyrator() {
Gyrator.prototype.define = function Gyrator() {
- ModelName = "Gyrator";
- PrametersValue = [[1],[1]];
- ParametersName = [["G1"],["G2"]];
+ var ModelName = "Gyrator";
+ var PrametersValue = [[1],[1]];
+ var ParametersName = [["G1"],["G2"]];
this.model = scicos_model();
- Typein = [];
- Typeout = [];
- MI = [];
- MO = [];
- P = [[2.5,90,2,0],[2.5,10,2,0],[97.5,90,-2,0],[97.5,10,-2,0]];
- PortName = [["p1"],["n1"],["p2"],["n2"]];
+ var Typein = [];
+ var Typeout = [];
+ var MI = [];
+ var MO = [];
+ var P = [[2.5,90,2,0],[2.5,10,2,0],[97.5,90,-2,0],[97.5,10,-2,0]];
+ var PortName = [["p1"],["n1"],["p2"],["n2"]];
for (i=1;i<=size(P,"r");i+=1) {
if (P[i-1][3-1]==1) {
- Typein = [[Typein],["E"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["E"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==2) {
- Typein = [[Typein],["I"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["I"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==-1) {
- Typeout = [[Typeout],["E"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["E"]];
+ var MO = [[MO],[PortName[i-1]]];
}
if (P[i-1][3-1]==-2) {
- Typeout = [[Typeout],["I"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["I"]];
+ var MO = [[MO],[PortName[i-1]]];
}
}
this.model = scicos_model();
- mo = modelica();
+ var mo = modelica();
this.model.sim = new ScilabString([ModelName]);
mo.inputs = MI;
mo.outputs = MO;
this.model.rpar = new ScilabDouble(PrametersValue);
mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName));
- exprs = [["1"],["1"]];
- gr_i = [];
+ var exprs = [["1"],["1"]];
+ var gr_i = [];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
mo.model = ModelName;
@@ -63,11 +63,11 @@ function Gyrator() {
this.G1 = arguments[0]["G1"]
this.G2 = arguments[0]["G2"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.x = arg1;
- exprs = this.x.graphics.exprs;
+ var exprs = this.x.graphics.exprs;
while (true) {
[ok,this.G1,this.G2,exprs] = scicos_getvalue([["Set Gyrator block parameters:"],[""],["G1: Gyration conductance"],["G2: Gyration conductance"]],["G1","G2"],list("vec",1,"vec",1),exprs);
if (!ok) {
diff --git a/js/Electrical/IdealTransformer.js b/js/Electrical/IdealTransformer.js
index 134085ce..3bdbff02 100644
--- a/js/Electrical/IdealTransformer.js
+++ b/js/Electrical/IdealTransformer.js
@@ -1,43 +1,43 @@
/* autogenerated from "macros/Electrical/IdealTransformer.sci" */
function IdealTransformer() {
IdealTransformer.prototype.define = function IdealTransformer() {
- ModelName = "IdealTransformer";
- PrametersValue = [1];
- ParametersName = ["N"];
+ var ModelName = "IdealTransformer";
+ var PrametersValue = [1];
+ var ParametersName = ["N"];
this.model = scicos_model();
- Typein = [];
- Typeout = [];
- MI = [];
- MO = [];
- P = [[2.5,90,2,0],[2.5,10,2,0],[97.5,90,-2,0],[97.5,10,-2,0]];
- PortName = [["p1"],["n1"],["p2"],["n2"]];
+ var Typein = [];
+ var Typeout = [];
+ var MI = [];
+ var MO = [];
+ var P = [[2.5,90,2,0],[2.5,10,2,0],[97.5,90,-2,0],[97.5,10,-2,0]];
+ var PortName = [["p1"],["n1"],["p2"],["n2"]];
for (i=1;i<=size(P,"r");i+=1) {
if (P[i-1][3-1]==1) {
- Typein = [[Typein],["E"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["E"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==2) {
- Typein = [[Typein],["I"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["I"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==-1) {
- Typeout = [[Typeout],["E"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["E"]];
+ var MO = [[MO],[PortName[i-1]]];
}
if (P[i-1][3-1]==-2) {
- Typeout = [[Typeout],["I"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["I"]];
+ var MO = [[MO],[PortName[i-1]]];
}
}
this.model = scicos_model();
- mo = modelica();
+ var mo = modelica();
this.model.sim = new ScilabString([ModelName]);
mo.inputs = MI;
mo.outputs = MO;
this.model.rpar = PrametersValue;
mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName));
- exprs = ["1"];
- gr_i = [];
+ var exprs = ["1"];
+ var gr_i = [];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
mo.model = ModelName;
@@ -61,11 +61,11 @@ function IdealTransformer() {
IdealTransformer.prototype.set = function IdealTransformer() {
this.N = arguments[0]["N"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.x = arg1;
- exprs = this.x.graphics.exprs;
+ var exprs = this.x.graphics.exprs;
while (true) {
[ok,this.N,exprs] = scicos_getvalue([["Set Transformer block parameters:"],[""],["N:"+" Turn ratio (N1/N2)"]],["N"],list("vec",1),exprs);
if (!ok) {
diff --git a/js/Electrical/Inductor.js b/js/Electrical/Inductor.js
index 034abf89..46c3b201 100644
--- a/js/Electrical/Inductor.js
+++ b/js/Electrical/Inductor.js
@@ -9,14 +9,14 @@ function Inductor() {
this.model.sim = new ScilabString(["Inductor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Inductor";
mo.inputs = "p";
mo.outputs = "n";
mo.parameters = list("L",list(this.L));
this.model.equations = new ScilabDouble([mo]);
- exprs = string(this.L);
- gr_i = [];
+ var exprs = string(this.L);
+ var gr_i = [];
this.x = standard_define([2,0.9],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -33,8 +33,8 @@ function Inductor() {
Inductor.prototype.set = function Inductor() {
this.L = parseFloat(arguments[0]["L"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.L,exprs] = scicos_getvalue("Set Inductor block parameter","L (H)",list("vec",1),exprs);
diff --git a/js/Electrical/MOTOR.js b/js/Electrical/MOTOR.js
index 952bb049..0c8b03ea 100644
--- a/js/Electrical/MOTOR.js
+++ b/js/Electrical/MOTOR.js
@@ -7,8 +7,8 @@ function MOTOR() {
this.model.sim = new ScilabString(["motor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- gr_i = [];
- exprs = "";
+ var gr_i = [];
+ var exprs = "";
this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.out_implicit = [["I"],["I"]];
this.x.graphics.in_implicit = ["I"];
diff --git a/js/Electrical/NMOS.js b/js/Electrical/NMOS.js
index 3bcaa14d..c80a5c08 100644
--- a/js/Electrical/NMOS.js
+++ b/js/Electrical/NMOS.js
@@ -14,7 +14,7 @@ function NMOS() {
this.model.sim = new ScilabString(["NMOS"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "NMOS";
mo.outputs = [["D"],["B"],["S"]];
mo.inputs = "G";
@@ -22,8 +22,8 @@ function NMOS() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]];
- gr_i = [];
+ var exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = [["I"],["I"],["I"]];
@@ -57,8 +57,8 @@ function NMOS() {
this.dL = parseFloat(arguments[0]["dL"])
this.RDS = parseFloat(arguments[0]["RDS"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS,exprs] = scicos_getvalue("Set NMOS Transistor block parameters",["Width [m]","Length [m]","Transconductance parameter [A/(V*V)]","Zero bias threshold voltage [V]","Bulk threshold parameter","Reduction of pinch-off region","Narrowing of channel [m]","Shortening of channel [m]","Drain-Source-Resistance [Ohm]"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
diff --git a/js/Electrical/NPN.js b/js/Electrical/NPN.js
index 6f6d2bb6..392f5285 100644
--- a/js/Electrical/NPN.js
+++ b/js/Electrical/NPN.js
@@ -1,43 +1,43 @@
/* autogenerated from "macros/Electrical/NPN.sci" */
function NPN() {
NPN.prototype.define = function NPN() {
- ModelName = "NPN";
- PrametersValue = [[50],[0.1],[0],[0.02],[1.200e-10],[5.000e-09],[1.000e-12],[4.000e-13],[5.000e-13],[0.8],[0.4],[0.8],[0.333],[1.000e-15],[1.000e-15],[0.02585],[40]];
- ParametersName = [["Bf"],["Br"],["Is"],["Vak"],["Tauf"],["Taur"],["Ccs"],["Cje"],["Cjc"],["Phie"],["Me"],["Phic"],["Mc"],["Gbc"],["Gbe"],["Vt"],["EMinMax"]];
+ var ModelName = "NPN";
+ var PrametersValue = [[50],[0.1],[0],[0.02],[1.200e-10],[5.000e-09],[1.000e-12],[4.000e-13],[5.000e-13],[0.8],[0.4],[0.8],[0.333],[1.000e-15],[1.000e-15],[0.02585],[40]];
+ var ParametersName = [["Bf"],["Br"],["Is"],["Vak"],["Tauf"],["Taur"],["Ccs"],["Cje"],["Cjc"],["Phie"],["Me"],["Phic"],["Mc"],["Gbc"],["Gbe"],["Vt"],["EMinMax"]];
this.model = scicos_model();
- Typein = [];
- Typeout = [];
- MI = [];
- MO = [];
- P = [[100,90,-2,0],[0,50,2,0],[100,10,-2,0]];
- PortName = [["C"],["B"],["E"]];
+ var Typein = [];
+ var Typeout = [];
+ var MI = [];
+ var MO = [];
+ var P = [[100,90,-2,0],[0,50,2,0],[100,10,-2,0]];
+ var PortName = [["C"],["B"],["E"]];
for (i=1;i<=size(P,"r");i+=1) {
if (P[i-1][3-1]==1) {
- Typein = [[Typein],["E"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["E"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==2) {
- Typein = [[Typein],["I"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["I"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==-1) {
- Typeout = [[Typeout],["E"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["E"]];
+ var MO = [[MO],[PortName[i-1]]];
}
if (P[i-1][3-1]==-2) {
- Typeout = [[Typeout],["I"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["I"]];
+ var MO = [[MO],[PortName[i-1]]];
}
}
this.model = scicos_model();
- mo = modelica();
+ var mo = modelica();
this.model.sim = new ScilabString([ModelName]);
mo.inputs = MI;
mo.outputs = MO;
this.model.rpar = new ScilabDouble(PrametersValue);
mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName));
- exprs = [["50"],["0.1"],["1.e-16"],["0.02"],["0.12e-9"],["5e-9"],["1e-12"],["0.4e-12"],["0.5e-12"],["0.8"],["0.4"],["0.8"],["0.333"],["1e-15"],["1e-15"],["0.02585"],["40"]];
- gr_i = [];
+ var exprs = [["50"],["0.1"],["1.e-16"],["0.02"],["0.12e-9"],["5e-9"],["1e-12"],["0.4e-12"],["0.5e-12"],["0.8"],["0.4"],["0.8"],["0.333"],["1e-15"],["1e-15"],["0.02585"],["40"]];
+ var gr_i = [];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
mo.model = ModelName;
@@ -93,11 +93,11 @@ function NPN() {
this.Vt = arguments[0]["Vt"]
this.EMinMax = arguments[0]["EMinMax"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.x = arg1;
- exprs = this.x.graphics.exprs;
+ var exprs = this.x.graphics.exprs;
while (true) {
[ok,this.Bf,this.Br,this.Is,this.Vak,this.Tauf,this.Taur,this.Ccs,this.Cje,this.Cjc,this.Phie,this.Me,this.Phic,this.Mc,this.Gbc,this.Gbe,this.Vt,this.EMinMax,exprs] = scicos_getvalue([["Set NPN block parameters:"],[""]],["Bf : Forward beta","Br : Reverse beta","Is : Transport saturation current","Vak : Early voltage (inverse), 1/Volt","Tauf: Ideal forward transit time","Taur: Ideal reverse transit time","Ccs : Collector-substrat(ground) cap.","Cje : Base-emitter zero bias depletion cap.","Cjc : Base-coll. zero bias depletion cap.","Phie: Base-emitter diffusion voltage","Me : Base-emitter gradation exponent","Phic: Base-collector diffusion voltage","Mc : Base-collector gradation exponent","Gbc : Base-collector conductance","Gbe : Base-emitter conductance","Vt : Voltage equivalent of temperature","EMinmax: if x > EMinMax, the exp(x) is linearized"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
diff --git a/js/Electrical/OpAmp.js b/js/Electrical/OpAmp.js
index b1b1222a..387cd7b4 100644
--- a/js/Electrical/OpAmp.js
+++ b/js/Electrical/OpAmp.js
@@ -1,13 +1,13 @@
/* autogenerated from "macros/Electrical/OpAmp.sci" */
function OpAmp() {
OpAmp.prototype.define = function OpAmp() {
- S = [];
- Z = [];
+ var S = [];
+ var Z = [];
this.model = scicos_model();
this.model.sim = new ScilabString(["OpAmp"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = this.model.sim;
mo.inputs = [["in_p"],["in_n"]];
mo.outputs = ["out"];
@@ -16,8 +16,8 @@ function OpAmp() {
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
this.model.rpar = Z;
- exprs = string(Z);
- gr_i = [];
+ var exprs = string(Z);
+ var gr_i = [];
this.x = standard_define([3,5],this.model,exprs,gr_i);
this.x.graphics.in_implicit = [["I"],["I"]];
this.x.graphics.out_implicit = ["I"];
@@ -39,8 +39,8 @@ function OpAmp() {
this.SatH = arguments[0]["SatH"]
this.SatL = arguments[0]["SatL"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (false) {
[ok,this.OLGain,this.SatH,this.SatL,exprs] = scicos_getvalue("Set the Operational Amplifier parameters",["Open Loop Gain","Positive saturation voltage","Negative saturation voltage"],list("vec",1,"vec",1,"vec",1),exprs);
diff --git a/js/Electrical/PMOS.js b/js/Electrical/PMOS.js
index e9c629a6..ade7e825 100644
--- a/js/Electrical/PMOS.js
+++ b/js/Electrical/PMOS.js
@@ -14,7 +14,7 @@ function PMOS() {
this.model.sim = new ScilabString(["PMOS"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "PMOS";
mo.outputs = [["D"],["B"],["S"]];
mo.inputs = "G";
@@ -22,8 +22,8 @@ function PMOS() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]];
- gr_i = [];
+ var exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = [["I"],["I"],["I"]];
@@ -57,8 +57,8 @@ function PMOS() {
this.dL = parseFloat(arguments[0]["dL"])
this.RDS = parseFloat(arguments[0]["RDS"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS,exprs] = scicos_getvalue("Set PMOS Transistor parameters",["Width [m]","Length [m]","Transconductance parameter [A/(V*V)]","Zero bias threshold voltage [V]","Bulk threshold parameter","Reduction of pinch-off region","Narrowing of channel [m]","Shortening of channel [m]","Drain-Source-Resistance [Ohm]"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
diff --git a/js/Electrical/PNP.js b/js/Electrical/PNP.js
index 1fe8176c..a64de188 100644
--- a/js/Electrical/PNP.js
+++ b/js/Electrical/PNP.js
@@ -1,43 +1,43 @@
/* autogenerated from "macros/Electrical/PNP.sci" */
function PNP() {
PNP.prototype.define = function PNP() {
- ModelName = "PNP";
- PrametersValue = [[50],[0.1],[0],[0.02],[1.200e-10],[5.000e-09],[1.000e-12],[4.000e-13],[5.000e-13],[0.8],[0.4],[0.8],[0.333],[1.000e-15],[1.000e-15],[0.02585],[40]];
- ParametersName = [["Bf"],["Br"],["Is"],["Vak"],["Tauf"],["Taur"],["Ccs"],["Cje"],["Cjc"],["Phie"],["Me"],["Phic"],["Mc"],["Gbc"],["Gbe"],["Vt"],["EMinMax"]];
+ var ModelName = "PNP";
+ var PrametersValue = [[50],[0.1],[0],[0.02],[1.200e-10],[5.000e-09],[1.000e-12],[4.000e-13],[5.000e-13],[0.8],[0.4],[0.8],[0.333],[1.000e-15],[1.000e-15],[0.02585],[40]];
+ var ParametersName = [["Bf"],["Br"],["Is"],["Vak"],["Tauf"],["Taur"],["Ccs"],["Cje"],["Cjc"],["Phie"],["Me"],["Phic"],["Mc"],["Gbc"],["Gbe"],["Vt"],["EMinMax"]];
this.model = scicos_model();
- Typein = [];
- Typeout = [];
- MI = [];
- MO = [];
- P = [[100,90,-2,0],[0,50,2,0],[100,10,-2,0]];
- PortName = [["C"],["B"],["E"]];
+ var Typein = [];
+ var Typeout = [];
+ var MI = [];
+ var MO = [];
+ var P = [[100,90,-2,0],[0,50,2,0],[100,10,-2,0]];
+ var PortName = [["C"],["B"],["E"]];
for (i=1;i<=size(P,"r");i+=1) {
if (P[i-1][3-1]==1) {
- Typein = [[Typein],["E"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["E"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==2) {
- Typein = [[Typein],["I"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["I"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==-1) {
- Typeout = [[Typeout],["E"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["E"]];
+ var MO = [[MO],[PortName[i-1]]];
}
if (P[i-1][3-1]==-2) {
- Typeout = [[Typeout],["I"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["I"]];
+ var MO = [[MO],[PortName[i-1]]];
}
}
this.model = scicos_model();
- mo = modelica();
+ var mo = modelica();
this.model.sim = new ScilabString([ModelName]);
mo.inputs = MI;
mo.outputs = MO;
this.model.rpar = new ScilabDouble(PrametersValue);
mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName));
- exprs = [["50"],["0.1"],["1.e-16"],["0.02"],["0.12e-9"],["5e-9"],["1e-12"],["0.4e-12"],["0.5e-12"],["0.8"],["0.4"],["0.8"],["0.333"],["1e-15"],["1e-15"],["0.02585"],["40"]];
- gr_i = [];
+ var exprs = [["50"],["0.1"],["1.e-16"],["0.02"],["0.12e-9"],["5e-9"],["1e-12"],["0.4e-12"],["0.5e-12"],["0.8"],["0.4"],["0.8"],["0.333"],["1e-15"],["1e-15"],["0.02585"],["40"]];
+ var gr_i = [];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
mo.model = ModelName;
@@ -93,11 +93,11 @@ function PNP() {
this.Vt = arguments[0]["Vt"]
this.EMinMax = arguments[0]["EMinMax"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.x = arg1;
- exprs = this.x.graphics.exprs;
+ var exprs = this.x.graphics.exprs;
while (true) {
[ok,this.Bf,this.Br,this.Is,this.Vak,this.Tauf,this.Taur,this.Ccs,this.Cje,this.Cjc,this.Phie,this.Me,this.Phic,this.Mc,this.Gbc,this.Gbe,this.Vt,this.EMinMax,exprs] = scicos_getvalue([["Set PNP block parameters:"],[""]],["Bf : Forward beta","Br : Reverse beta","Is : Transport saturation current","Vak : Early voltage (inverse), 1/Volt","Tauf: Ideal forward transit time","Taur: Ideal reverse transit time","Ccs : Collector-substrat(ground) cap.","Cje : Base-emitter zero bias depletion cap.","Cjc : Base-coll. zero bias depletion cap.","Phie: Base-emitter diffusion voltage","Me : Base-emitter gradation exponent","Phic: Base-collector diffusion voltage","Mc : Base-collector gradation exponent","Gbc : Base-collector conductance","Gbe : Base-emitter conductance","Vt : Voltage equivalent of temperature","EMinMax: if x > EMinMax, the exp(x) function is linearized"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
diff --git a/js/Electrical/PotentialSensor.js b/js/Electrical/PotentialSensor.js
index 42757248..46db78fb 100644
--- a/js/Electrical/PotentialSensor.js
+++ b/js/Electrical/PotentialSensor.js
@@ -8,12 +8,12 @@ function PotentialSensor() {
this.model.sim = new ScilabString(["PotentialSensor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "PotentialSensor";
mo.inputs = "p";
mo.outputs = ["v"];
this.model.equations = new ScilabDouble([mo]);
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,"",list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["E"];
diff --git a/js/Electrical/Resistor.js b/js/Electrical/Resistor.js
index efec6abd..d0c91ba5 100644
--- a/js/Electrical/Resistor.js
+++ b/js/Electrical/Resistor.js
@@ -7,7 +7,7 @@ function Resistor() {
this.model.sim = new ScilabString(["resistor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Resistor";
mo.inputs = "p";
mo.outputs = "n";
@@ -15,8 +15,8 @@ function Resistor() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = string(this.R);
- gr_i = [];
+ var exprs = string(this.R);
+ var gr_i = [];
this.x = standard_define([2,1],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -33,8 +33,8 @@ function Resistor() {
Resistor.prototype.set = function Resistor() {
this.R = parseFloat(arguments[0]["R"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.R,exprs] = scicos_getvalue("Set Resistor block parameter","R (ohm)",list("vec",1),exprs);
diff --git a/js/Electrical/SineVoltage.js b/js/Electrical/SineVoltage.js
index 6906c803..7db61627 100644
--- a/js/Electrical/SineVoltage.js
+++ b/js/Electrical/SineVoltage.js
@@ -13,14 +13,14 @@ function SineVoltage() {
this.model.sim = new ScilabString(["SineVoltage"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "SineVoltage";
mo.inputs = "p";
mo.outputs = "n";
mo.parameters = list([["V"],["phase"],["freqHz"],["offset"],["startTime"]],list(this.V,this.ph,this.frq,this.offset,this.start));
this.model.equations = new ScilabDouble([mo]);
- exprs = [[string(this.V)],[string(this.ph)],[string(this.frq)],[string(this.offset)],[string(this.start)]];
- gr_i = [];
+ var exprs = [[string(this.V)],[string(this.ph)],[string(this.frq)],[string(this.offset)],[string(this.start)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -46,8 +46,8 @@ function SineVoltage() {
this.offset = parseFloat(arguments[0]["offset"])
this.start = parseFloat(arguments[0]["start"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.V,this.ph,this.frq,this.offset,this.start,exprs] = scicos_getvalue("Set voltage source parameter",["Amplitude (Volt)","phase (rad)","Frequency (Hz)","Voltageoffset (V)","Timeoffset (s)"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
diff --git a/js/Electrical/Switch.js b/js/Electrical/Switch.js
index be1ff9fd..57211e6b 100644
--- a/js/Electrical/Switch.js
+++ b/js/Electrical/Switch.js
@@ -4,12 +4,12 @@ function Switch() {
this.model = scicos_model();
this.Ron = 0.01;
this.Roff = 1e5;
- S = [["Ron"],["Roff"]];
- Z = eval(S);
+ var S = [["Ron"],["Roff"]];
+ var Z = eval(S);
this.model.sim = new ScilabString(["Switch"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = this.model.sim;
mo.inputs = [["p"],["inp"]];
mo.outputs = "n";
@@ -18,8 +18,8 @@ function Switch() {
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
this.model.rpar = new ScilabDouble([Z]);
- exprs = string(Z);
- gr_i = [];
+ var exprs = string(Z);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = [["I"],["E"]];
this.x.graphics.out_implicit = ["I"];
@@ -39,8 +39,8 @@ function Switch() {
this.Ron = parseFloat(arguments[0]["Ron"])
this.Roff = parseFloat(arguments[0]["Roff"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.Ron,this.Roff,exprs] = scicos_getvalue("Set non-ideal electrical switch parameters",["Resistance in On state (Ohm)","Resistance in Off state (Ohm)"],list("vec",1,"vec",1),exprs);
diff --git a/js/Electrical/VVsourceAC.js b/js/Electrical/VVsourceAC.js
index 3faab62a..22a7553b 100644
--- a/js/Electrical/VVsourceAC.js
+++ b/js/Electrical/VVsourceAC.js
@@ -4,20 +4,20 @@ function VVsourceAC() {
this.model = scicos_model();
this.model.in1 = new ScilabDouble([1],[1]);
this.model.out = [1];
- VA = 220;
+ var VA = 220;
this.FR = 50;
this.model.rpar = [this.FR];
this.model.sim = new ScilabString(["VVsourceAC"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "VVsourceAC";
mo.inputs = ["p","VA"];
mo.outputs = "n";
mo.parameters = list(["f"],list(this.FR));
this.model.equations = new ScilabDouble([mo]);
- exprs = [string(this.FR)];
- gr_i = [];
+ var exprs = [string(this.FR)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I","E"];
this.x.graphics.out_implicit = ["I"];
@@ -35,8 +35,8 @@ function VVsourceAC() {
VVsourceAC.prototype.set = function VVsourceAC() {
this.FR = parseFloat(arguments[0]["FR"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.FR,exprs] = scicos_getvalue("Set voltage source parameter",["Frequency (Hz)"],list("vec",-1),exprs);
diff --git a/js/Electrical/VariableResistor.js b/js/Electrical/VariableResistor.js
index 6bf1e3b8..608b7d95 100644
--- a/js/Electrical/VariableResistor.js
+++ b/js/Electrical/VariableResistor.js
@@ -5,15 +5,15 @@ function VariableResistor() {
this.model.sim = new ScilabString(["VariableResistor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "VariableResistor";
mo.inputs = ["p","R"];
mo.outputs = "n";
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I","E"];
this.x.graphics.out_implicit = ["I"];
diff --git a/js/Electrical/VoltageSensor.js b/js/Electrical/VoltageSensor.js
index b234f79a..0c9fc13d 100644
--- a/js/Electrical/VoltageSensor.js
+++ b/js/Electrical/VoltageSensor.js
@@ -7,13 +7,13 @@ function VoltageSensor() {
this.model.sim = new ScilabString(["VoltageSensor"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "VoltageSensor";
mo.inputs = "p";
mo.outputs = [["n"],["v"]];
this.model.equations = new ScilabDouble([mo]);
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = [["I"],["E"]];
diff --git a/js/Electrical/VsourceAC.js b/js/Electrical/VsourceAC.js
index 6c975081..cde9cd20 100644
--- a/js/Electrical/VsourceAC.js
+++ b/js/Electrical/VsourceAC.js
@@ -10,14 +10,14 @@ function VsourceAC() {
this.model.sim = new ScilabString(["VsourceAC"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "VsourceAC";
mo.inputs = "p";
mo.outputs = "n";
mo.parameters = list([["VA"],["f"]],list(this.VA,this.FR));
this.model.equations = new ScilabDouble([mo]);
- exprs = [[string(this.VA)],[string(this.FR)]];
- gr_i = [];
+ var exprs = [[string(this.VA)],[string(this.FR)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -37,8 +37,8 @@ function VsourceAC() {
this.VA = parseFloat(arguments[0]["VA"])
this.FR = parseFloat(arguments[0]["FR"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.VA,this.FR,exprs] = scicos_getvalue("Set voltage source parameter",["Amplitude (Volt)","Frequency (Hz)"],list("vec",-1,"vec",-1),exprs);
diff --git a/js/Events/ANDBLK.js b/js/Events/ANDBLK.js
index cfe72604..e98bb7ec 100644
--- a/js/Events/ANDBLK.js
+++ b/js/Events/ANDBLK.js
@@ -1,45 +1,45 @@
/* autogenerated from "macros/Events/ANDBLK.sci" */
function ANDBLK() {
ANDBLK.prototype.define = function ANDBLK() {
- andlog = ANDLOG_f("define");
+ var andlog = ANDLOG_f("define");
andlog.graphics.orig = [194,133];
andlog.graphics.sz = [60,60];
andlog.graphics.flip = true;
andlog.graphics.pout = 9;
andlog.graphics.pein = [[4],[11]];
- input_port1 = CLKIN_f("define");
+ var input_port1 = CLKIN_f("define");
input_port1.graphics.orig = [149,287];
input_port1.graphics.sz = [20,20];
input_port1.graphics.flip = true;
input_port1.graphics.exprs = "1";
input_port1.graphics.peout = 4;
input_port1.model.ipar = 1;
- output_port = CLKOUT_f("define");
+ var output_port = CLKOUT_f("define");
output_port.graphics.orig = [450,83];
output_port.graphics.sz = [20,20];
output_port.graphics.flip = true;
output_port.graphics.exprs = "1";
output_port.graphics.pein = 8;
output_port.model.ipar = 1;
- input_port2 = CLKIN_f("define");
+ var input_port2 = CLKIN_f("define");
input_port2.graphics.orig = [141,330];
input_port2.graphics.sz = [20,20];
input_port2.graphics.flip = true;
input_port2.graphics.exprs = "2";
input_port2.graphics.peout = 6;
input_port2.model.ipar = 2;
- ifthel = IFTHEL_f("define");
+ var ifthel = IFTHEL_f("define");
ifthel.graphics.orig = [331,137];
ifthel.graphics.sz = [60,60];
ifthel.graphics.flip = true;
ifthel.graphics.pin = 9;
ifthel.graphics.pein = 12;
ifthel.graphics.peout = [[8],[0]];
- split = CLKSPLIT_f("define");
+ var split = CLKSPLIT_f("define");
split.graphics.orig = [[234],[275.78348]];
split.graphics.pein = 6;
split.graphics.peout = [[11],[12]];
- diagram = scicos_diagram();
+ var diagram = scicos_diagram();
diagram.objs[1-1] = andlog;
diagram.objs[2-1] = input_port1;
diagram.objs[3-1] = output_port;
diff --git a/js/Events/ANDLOG_f.js b/js/Events/ANDLOG_f.js
index 4a87edf3..ae7ce241 100644
--- a/js/Events/ANDLOG_f.js
+++ b/js/Events/ANDLOG_f.js
@@ -8,7 +8,7 @@ function ANDLOG_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,3],this.model,[],gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Events/CLKSOMV_f.js b/js/Events/CLKSOMV_f.js
index fb09247c..43665ce3 100644
--- a/js/Events/CLKSOMV_f.js
+++ b/js/Events/CLKSOMV_f.js
@@ -8,7 +8,7 @@ function CLKSOMV_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Events/CLKSOM_f.js b/js/Events/CLKSOM_f.js
index 18f8b9e9..10342a16 100644
--- a/js/Events/CLKSOM_f.js
+++ b/js/Events/CLKSOM_f.js
@@ -8,7 +8,7 @@ function CLKSOM_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([1,1]/1.2,this.model,[],gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Events/END_c.js b/js/Events/END_c.js
index 9413584b..77911212 100644
--- a/js/Events/END_c.js
+++ b/js/Events/END_c.js
@@ -9,8 +9,8 @@ function END_c() {
this.model.firing = new ScilabDouble([this.tf]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = string(this.tf);
- gr_i = [];
+ var exprs = string(this.tf);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -26,8 +26,8 @@ function END_c() {
END_c.prototype.set = function END_c() {
this.tf = parseFloat(arguments[0]["tf"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tf,exprs] = scicos_getvalue("Set final simulation time",["Final simulation time"],list("vec",1),exprs);
diff --git a/js/Events/EVTDLY_c.js b/js/Events/EVTDLY_c.js
index f8f5780f..d535d0d6 100644
--- a/js/Events/EVTDLY_c.js
+++ b/js/Events/EVTDLY_c.js
@@ -11,8 +11,8 @@ function EVTDLY_c() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([this.ff]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.dt)],[sci2exp(this.ff)]];
- gr_i = [];
+ var exprs = [[string(this.dt)],[sci2exp(this.ff)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -30,8 +30,8 @@ function EVTDLY_c() {
this.dt = parseFloat(arguments[0]["dt"])
this.ff = parseFloat(arguments[0]["ff"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.dt,this.ff,exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" to disable any output event."]],["Delay","Date of initial output event"],list("vec",1,"vec",1),exprs);
@@ -40,7 +40,7 @@ function EVTDLY_c() {
}
if (this.dt<=0) {
message("Delay must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Events/EVTDLY_f.js b/js/Events/EVTDLY_f.js
index 75a2562a..e7fb881b 100644
--- a/js/Events/EVTDLY_f.js
+++ b/js/Events/EVTDLY_f.js
@@ -11,8 +11,8 @@ function EVTDLY_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([this.ff]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.dt)],[sci2exp(this.ff)]];
- gr_i = [];
+ var exprs = [[string(this.dt)],[sci2exp(this.ff)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -30,8 +30,8 @@ function EVTDLY_f() {
this.dt = parseFloat(arguments[0]["dt"])
this.ff = parseFloat(arguments[0]["ff"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.dt,this.ff,exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" if no initial event required"]],["Delay","Date of initial output event"],list("vec",1,"vec",1),exprs);
@@ -40,7 +40,7 @@ function EVTDLY_f() {
}
if (this.dt<=0) {
message("Delay must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Events/EVTGEN_f.js b/js/Events/EVTGEN_f.js
index 49aabdb2..e6073dbb 100644
--- a/js/Events/EVTGEN_f.js
+++ b/js/Events/EVTGEN_f.js
@@ -8,8 +8,8 @@ function EVTGEN_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([this.tt]);
this.model.dep_ut = [false,false];
- exprs = string(this.tt);
- gr_i = [];
+ var exprs = string(this.tt);
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -25,8 +25,8 @@ function EVTGEN_f() {
EVTGEN_f.prototype.set = function EVTGEN_f() {
this.tt = parseFloat(arguments[0]["tt"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.tt,exprs] = scicos_getvalue("Set Event time",["Event Time"],list("vec",1),exprs);
diff --git a/js/Events/EVTVARDLY.js b/js/Events/EVTVARDLY.js
index 1359531e..36d2d1d6 100644
--- a/js/Events/EVTVARDLY.js
+++ b/js/Events/EVTVARDLY.js
@@ -10,8 +10,8 @@ function EVTVARDLY() {
this.model.firing = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = string(this.model.firing);
- gr_i = [];
+ var exprs = string(this.model.firing);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -26,8 +26,8 @@ function EVTVARDLY() {
EVTVARDLY.prototype.set = function EVTVARDLY() {
this.fir = arguments[0]["fir"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.fir,exprs] = scicos_getvalue("Set parameter of variable event delay","Initial event firing time (<0 if absent)",list("vec",1),exprs);
diff --git a/js/Events/HALT_f.js b/js/Events/HALT_f.js
index ede573fe..ee80ba4e 100644
--- a/js/Events/HALT_f.js
+++ b/js/Events/HALT_f.js
@@ -9,8 +9,8 @@ function HALT_f() {
this.model.ipar = new ScilabDouble([0]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = string(this.n);
- gr_i = [];
+ var exprs = string(this.n);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -26,8 +26,8 @@ function HALT_f() {
HALT_f.prototype.set = function HALT_f() {
this.n = parseFloat(arguments[0]["n"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.n,exprs] = scicos_getvalue("Set Halt block parameters",["State on halt"],list("vec",1),exprs);
diff --git a/js/Events/IFTHEL_f.js b/js/Events/IFTHEL_f.js
index f4a14f8a..27452a38 100644
--- a/js/Events/IFTHEL_f.js
+++ b/js/Events/IFTHEL_f.js
@@ -13,8 +13,8 @@ function IFTHEL_f() {
this.model.dep_ut = [true,false];
this.model.nmode = new ScilabDouble([1]);
this.model.nzcross = new ScilabDouble([1]);
- gr_i = [];
- exprs = [[string(this.model.in1)],[string(this.model.nmode)]];
+ var gr_i = [];
+ var exprs = [[string(this.model.in1)],[string(this.model.nmode)]];
this.x = standard_define([3,3],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -32,11 +32,11 @@ function IFTHEL_f() {
this.inh = inverse(arguments[0]["inh"])
this.nmod = parseFloat(arguments[0]["nmod"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (exprs==[]) {
- exprs = string(1);
+ var exprs = string(1);
}
if (size(exprs,"*")==1) {
exprs[2-1] = string(1);
@@ -53,7 +53,10 @@ function IFTHEL_f() {
if (this.inh!=1) {
this.inh = [];
}
- [this.model,graphics,ok] = check_io(this.model,graphics,1,[],this.inh,[[1],[1]]);
+ var tmpvar0 = check_io(this.model,graphics,1,[],this.inh,[[1],[1]])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.evtin = this.inh;
diff --git a/js/Events/IFTHEL_f.pickle b/js/Events/IFTHEL_f.pickle
index db2380f6..39f28732 100644
--- a/js/Events/IFTHEL_f.pickle
+++ b/js/Events/IFTHEL_f.pickle
@@ -63,40 +63,37 @@ sS'model.evtout'
p20
S'matrix'
p21
-sS'[this.model,graphics,ok]'
-p22
-g19
sS'model.nmode'
-p23
+p22
g6
sS'graphics.exprs'
-p24
+p23
g16
sS'model.nzcross'
-p25
+p24
g6
sS'model.sim[2]'
-p26
+p25
g6
sS'model.blocktype'
-p27
+p26
g16
sS'model.dep_ut'
-p28
+p27
g8
sS'exprs'
-p29
+p28
g21
sS'gr_i'
-p30
+p29
g8
sS'y'
-p31
+p30
g8
sS'x'
-p32
+p31
g6
sS'model'
-p33
+p32
g2
s. \ No newline at end of file
diff --git a/js/Events/MCLOCK_f.js b/js/Events/MCLOCK_f.js
index 95bed535..81d7a1e3 100644
--- a/js/Events/MCLOCK_f.js
+++ b/js/Events/MCLOCK_f.js
@@ -1,10 +1,10 @@
/* autogenerated from "macros/Events/MCLOCK_f.sci" */
function MCLOCK_f() {
MCLOCK_f.prototype.define = function MCLOCK_f() {
- nn = 2;
- dt = 0.1;
- exprs = [[string(dt)],[string(nn)]];
- mfclck = MFCLCK_f("define");
+ var nn = 2;
+ var dt = 0.1;
+ var exprs = [[string(dt)],[string(nn)]];
+ var mfclck = MFCLCK_f("define");
mfclck.graphics.orig = [334,199];
mfclck.graphics.sz = [40,40];
mfclck.graphics.flip = true;
@@ -14,37 +14,37 @@ function MCLOCK_f() {
mfclck.model.rpar = 0.1;
mfclck.model.ipar = nn;
mfclck.model.firing = [-1,0];
- clksom = CLKSOM_f("define");
+ var clksom = CLKSOM_f("define");
clksom.graphics.orig = [457,161];
clksom.graphics.sz = [16.666667,16.666667];
clksom.graphics.flip = true;
clksom.graphics.exprs = [["0.1"],["0.1"]];
clksom.graphics.pein = [[4],[9],[0]];
clksom.graphics.peout = 5;
- output_port1 = CLKOUT_f("define");
+ var output_port1 = CLKOUT_f("define");
output_port1.graphics.orig = [509,261];
output_port1.graphics.sz = [20,20];
output_port1.graphics.flip = true;
output_port1.graphics.exprs = "1";
output_port1.graphics.pein = 10;
output_port1.model.ipar = 1;
- output_port2 = CLKOUT_f("define");
+ var output_port2 = CLKOUT_f("define");
output_port2.graphics.orig = [509,142];
output_port2.graphics.sz = [20,20];
output_port2.graphics.flip = true;
output_port2.graphics.exprs = "2";
output_port2.graphics.pein = 13;
output_port2.model.ipar = 2;
- split1 = CLKSPLIT_f("define");
+ var split1 = CLKSPLIT_f("define");
split1.graphics.orig = [[411.92504],[169.33333]];
split1.graphics.pein = 3;
split1.graphics.peout = [[9],[10]];
- split2 = CLKSPLIT_f("define");
+ var split2 = CLKSPLIT_f("define");
split2.graphics.orig = [[482.45315],[169.33333]];
split2.graphics.pein = 5;
split2.graphics.peout = [[12],[13]];
- gr_i = [];
- diagram = scicos_diagram();
+ var gr_i = [];
+ var diagram = scicos_diagram();
diagram.objs[1-1] = mfclck;
diagram.objs[2-1] = clksom;
diagram.objs[3-1] = scicos_link(xx=[[360.7],[360.7],[411.9]],yy=[[193.3],[169.3],[169.3]],ct=[10,-1],from=[1,2],to=[8,1]);
@@ -79,23 +79,23 @@ function MCLOCK_f() {
}
MCLOCK_f.prototype.set = function MCLOCK_f() {
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="MFCLCK_f") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- spath = list("model","rpar","objs",path);
- xx = arg1[spath-1];
+ var newpar = list();
+ var spath = list("model","rpar","objs",path);
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (or(this.xxn!=xx)) {
arg1[spath-1] = this.xxn;
newpar[size(newpar)+1-1] = path;
}
this.x = arg1;
- y = 0;
- typ = newpar;
+ var y = 0;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Events/MFCLCK_f.js b/js/Events/MFCLCK_f.js
index 8a646014..ef618f72 100644
--- a/js/Events/MFCLCK_f.js
+++ b/js/Events/MFCLCK_f.js
@@ -13,8 +13,8 @@ function MFCLCK_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [-1,0];
this.model.dep_ut = [false,false];
- exprs = [[string(this.dt)],[string(this.nn)]];
- gr_i = [];
+ var exprs = [[string(this.dt)],[string(this.nn)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -32,14 +32,14 @@ function MFCLCK_f() {
this.dt = parseFloat(arguments[0]["dt"])
this.nn = parseFloat(arguments[0]["nn"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
[ok,this.dt,this.nn,exprs] = scicos_getvalue("Set Multifrequency clock parameters",["basic period (1/f)","multiply by (n)"],list("vec",1,"vec",1),exprs);
if (ok) {
this.model.ipar = new ScilabDouble([this.nn]);
this.model.rpar = new ScilabDouble([this.dt]);
- hh = this.model.firing;
+ var hh = this.model.firing;
hh[2-1] = 0;
this.model.firing = hh;
graphics.exprs = exprs;
diff --git a/js/Events/M_freq.js b/js/Events/M_freq.js
index bb1ccae9..ba3dd675 100644
--- a/js/Events/M_freq.js
+++ b/js/Events/M_freq.js
@@ -10,8 +10,8 @@ function M_freq() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [0,-1,-1];
this.model.dep_ut = [false,false];
- exprs = [[sci2exp([[1],[2]])],[sci2exp([[0],[0]])]];
- gr_i = [];
+ var exprs = [[sci2exp([[1],[2]])],[sci2exp([[0],[0]])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -29,9 +29,9 @@ function M_freq() {
this.frequ = inverse(arguments[0]["frequ"])
this.offset = inverse(arguments[0]["offset"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.frequ,this.offset,exprs] = scicos_getvalue("Set block parameters",["Sample time","Offset"],list("vec",-1,"vec",-1),exprs);
if (!ok) {
@@ -41,21 +41,33 @@ function M_freq() {
this.frequ = this.frequ.slice();
if ((size(this.frequ,"*"))!=(size(this.offset,"*"))) {
message("offset and frequency must have the same size");
- ok = false;
+ var ok = false;
} else if (or(this.frequ<0)) {
message("Frequency must be a positif number");
- ok = false;
+ var ok = false;
} else if (or(abs(this.offset)>this.frequ)) {
message("The |Offset| must be less than the Frequency");
- ok = false;
+ var ok = false;
}
if (ok) {
- [m,den,off,count,m1,fir,this.frequ,this.offset,ok] = mfrequ_clk(this.frequ,this.offset);
+ var tmpvar0 = mfrequ_clk(this.frequ,this.offset)
+ var m = tmpvar0[0]
+ var den = tmpvar0[1]
+ var off = tmpvar0[2]
+ var count = tmpvar0[3]
+ var m1 = tmpvar0[4]
+ var fir = tmpvar0[5]
+ this.frequ = tmpvar0[6]
+ this.offset = tmpvar0[7]
+ var ok = tmpvar0[8];
}
if (ok) {
this.model.opar = list(m, new ScilabDouble([double(den)]), new ScilabDouble([off]), new ScilabDouble([count]));
- mn = (2^size(m1,"*"))-1;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(),list(),1,ones(mn,1));
+ var mn = (2^size(m1,"*"))-1;
+ var tmpvar1 = set_io(this.model,graphics,list(),list(),1,ones(mn,1))
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (mn>3) {
graphics.sz = [40+(mn-3)*10,40];
} else {
diff --git a/js/Events/M_freq.pickle b/js/Events/M_freq.pickle
index c059a6fd..1b907d36 100644
--- a/js/Events/M_freq.pickle
+++ b/js/Events/M_freq.pickle
@@ -23,96 +23,90 @@ S'object'
p2
sS'graphics.exprs'
p3
-NsS'[m,den,off,count,m1,fir,this.frequ,this.offset,ok]'
+NsS'istreated'
p4
-S'double'
+S'boolean'
p5
-sS'istreated'
+sS'x.model'
p6
-S'boolean'
+NsS'ind'
p7
-sS'x.model'
+S'double'
p8
-NsS'ind'
-p9
-g5
sS'graphics'
-p10
+p9
g2
sS'x.graphics'
-p11
+p10
g2
sS'model.evtin'
-p12
-g5
+p11
+g8
sS'model.firing'
-p13
+p12
S'vector'
-p14
+p13
sS'model.sim'
-p15
+p14
S'list'
-p16
+p15
sS'model.evtout'
-p17
+p16
S'matrix'
-p18
-sS'[this.model,graphics,ok]'
-p19
-g5
+p17
sS'model.rpar'
-p20
-g14
+p18
+g13
sS'graphics.sz'
-p21
-g14
+p19
+g13
sS'offset'
-p22
-g14
+p20
+g13
sS'typ'
-p23
-g14
+p21
+g13
sS'model.opar'
-p24
-g16
+p22
+g15
sS'ok'
-p25
-g7
+p23
+g5
sS'model.blocktype'
-p26
+p24
S'string'
-p27
+p25
sS'frequ'
-p28
-g14
+p26
+g13
sS'mn'
-p29
-g5
+p27
+g8
sS'm'
-p30
-g18
+p28
+g17
sS'model.dep_ut'
-p31
-g14
+p29
+g13
sS'exprs'
-p32
-g18
+p30
+g17
sS'gr_i'
-p33
-g14
+p31
+g13
sS'y'
-p34
-g14
+p32
+g13
sS'x'
-p35
-g5
+p33
+g8
sS'model'
-p36
+p34
g2
sS'ot'
-p37
-g18
+p35
+g17
sS'k'
-p38
-g18
+p36
+g17
s. \ No newline at end of file
diff --git a/js/Events/VirtualCLK0.js b/js/Events/VirtualCLK0.js
index c8c77beb..a4b3baed 100644
--- a/js/Events/VirtualCLK0.js
+++ b/js/Events/VirtualCLK0.js
@@ -9,7 +9,7 @@ function VirtualCLK0() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = [];
+ var exprs = [];
this.x = standard_define([2,2],this.model,exprs," ");
return new BasicBlock(this.x);
}
diff --git a/js/Events/freq_div.js b/js/Events/freq_div.js
index b7e4817d..7c42fa2a 100644
--- a/js/Events/freq_div.js
+++ b/js/Events/freq_div.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Events/freq_div.sci" */
function freq_div() {
freq_div.prototype.define = function freq_div() {
- scs_m_1 = scicos_diagram();
+ var scs_m_1 = scicos_diagram();
scs_m_1.objs[1-1] = Modulo_Count("define");
scs_m_1.objs[2-1] = CLKINV_f("define");
scs_m_1.objs[3-1] = CLKOUTV_f("define");
@@ -12,8 +12,8 @@ function freq_div() {
scs_m_1.objs[8-1] = scicos_link();
scs_m_1.objs[9-1] = scicos_link();
scs_m_1.objs[10-1] = scicos_link();
- blk = scs_m_1.objs[1-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[1-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [0,-100];
graphics.sz = [60,40];
@@ -25,8 +25,8 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[1-1] = blk;
- blk = scs_m_1.objs[2-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[2-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [120,0];
graphics.sz = [20,20];
@@ -36,8 +36,8 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[2-1] = blk;
- blk = scs_m_1.objs[3-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[3-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [130,-160];
graphics.sz = [20,20];
@@ -47,8 +47,8 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[3-1] = blk;
- blk = scs_m_1.objs[4-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[4-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [100,-100];
graphics.sz = [60,40];
@@ -60,8 +60,8 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[4-1] = blk;
- blk = scs_m_1.objs[5-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[5-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [127,-33];
graphics.sz = [7,7];
@@ -70,26 +70,26 @@ function freq_div() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[5-1] = blk;
- lnk = scs_m_1.objs[6-1];
+ var lnk = scs_m_1.objs[6-1];
lnk.ct = [5,-1];
lnk.from = [2,1,0];
lnk.to = [5,1,1];
scs_m_1.objs[6-1] = lnk;
- lnk = scs_m_1.objs[7-1];
+ var lnk = scs_m_1.objs[7-1];
lnk.from = [1,1,0];
lnk.to = [4,1,1];
scs_m_1.objs[7-1] = lnk;
- lnk = scs_m_1.objs[8-1];
+ var lnk = scs_m_1.objs[8-1];
lnk.ct = [5,-1];
lnk.from = [4,2,0];
lnk.to = [3,1,1];
scs_m_1.objs[8-1] = lnk;
- lnk = scs_m_1.objs[9-1];
+ var lnk = scs_m_1.objs[9-1];
lnk.ct = [5,-1];
lnk.from = [5,1,0];
lnk.to = [4,1,1];
scs_m_1.objs[9-1] = lnk;
- lnk = scs_m_1.objs[10-1];
+ var lnk = scs_m_1.objs[10-1];
lnk.xx = [0,30,1];
lnk.yy = [0,-30,1];
lnk.ct = [5,-1];
@@ -103,7 +103,7 @@ function freq_div() {
this.model.evtin = new ScilabDouble([1]);
this.model.evtout = new ScilabDouble([1]);
this.model.rpar = scs_m_1;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -121,23 +121,23 @@ function freq_div() {
%ph = parseFloat(arguments[0]["%ph"])
%df = parseFloat(arguments[0]["%df"])
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="Modulo_Count") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- y = 0;
- spath = list();
+ var newpar = list();
+ var y = 0;
+ var spath = list();
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path;
- xx = arg1[spath-1];
- xxn = xx;
- graphics = xx.graphics;
- exprs = graphics.exprs;
+ var xx = arg1[spath-1];
+ var xxn = xx;
+ var graphics = xx.graphics;
+ var exprs = graphics.exprs;
this.model = xx.model;
while (true) {
[ok,%ph,%df,exprs] = scicos_getvalue("Set frequency division block parameters",["Phase (0 to division factor -1)","Division factor"],list("vec",1,"vec",1),exprs);
@@ -162,47 +162,47 @@ function freq_div() {
}
if (diffobjs(xxn,xx)) {
this.model = xx.model;
- model_n = xxn.model;
+ var model_n = xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = xxn;
newpar[size(newpar)+1-1] = 1;
- y = max(y,needcompile);
+ var y = max(y,needcompile);
}
this.x = arg1;
- typ = newpar;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Hydraulics/Bache.js b/js/Hydraulics/Bache.js
index 114846c1..82ed4cb1 100644
--- a/js/Hydraulics/Bache.js
+++ b/js/Hydraulics/Bache.js
@@ -1,8 +1,8 @@
/* autogenerated from "macros/Hydraulics/Bache.sci" */
function Bache() {
Bache.prototype.define = function Bache() {
- in1 = 2;
- out = 3;
+ var in1 = 2;
+ var out = 3;
this.model = scicos_model();
this.model.in1 = [-transpose([1:in1])];
this.model.out = [-transpose([1:out])];
@@ -19,7 +19,7 @@ function Bache() {
this.model.sim = new ScilabString(["Bache"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Bache";
mo.inputs = ["Ce1","Ce2"];
mo.outputs = ["Cs1","Cs2","yNiveau"];
@@ -27,8 +27,8 @@ function Bache() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = [[string(this.Patm)],[string(this.A)],[string(this.ze1)],[string(this.ze2)],[string(this.zs1)],[string(this.zs2)],[string(this.z0)],[string(this.T0)],[string(this.p_rho)]];
- gr_i = [];
+ var exprs = [[string(this.Patm)],[string(this.A)],[string(this.ze1)],[string(this.ze2)],[string(this.zs1)],[string(this.zs2)],[string(this.z0)],[string(this.T0)],[string(this.p_rho)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = [["I"],["I"]];
this.x.graphics.out_implicit = [["I"],["I"],["E"]];
@@ -62,8 +62,8 @@ function Bache() {
this.T0 = parseFloat(arguments[0]["T0"])
this.p_rho = parseFloat(arguments[0]["p_rho"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.Patm,this.A,this.ze1,this.ze2,this.zs1,this.zs2,this.z0,this.T0,this.p_rho,exprs] = scicos_getvalue("Parametres de la bache",["Pression dans le ciel de la bache : Patm (Pa)","Section de la bache : A (m2)","Altitude du piquage d entrée 1: ze1 (m)","Altitude du piquage d entrée 2: ze2 (m)","Altitude du piquage de sortie 1: zs1 (m)","Altitude du piquage de sortie 2: zs2 (m)","Altitude initiale du fluide : z0 (m)","Température initiale du fluide : T0 (K)","Si >0, masse volumique imposée du fluide : p_rho (kg/m3)"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
diff --git a/js/Hydraulics/Flowmeter.js b/js/Hydraulics/Flowmeter.js
index dfd7b959..540ed624 100644
--- a/js/Hydraulics/Flowmeter.js
+++ b/js/Hydraulics/Flowmeter.js
@@ -1,43 +1,43 @@
/* autogenerated from "macros/Hydraulics/Flowmeter.sci" */
function Flowmeter() {
Flowmeter.prototype.define = function Flowmeter() {
- ModelName = "Flowmeter";
- PrametersValue = 1;
- ParametersName = "Qini";
+ var ModelName = "Flowmeter";
+ var PrametersValue = 1;
+ var ParametersName = "Qini";
this.model = scicos_model();
- Typein = [];
- Typeout = [];
- MI = [];
- MO = [];
- P = [[50,105,-1,90],[0,10,2,0],[101,10,-2,0]];
- PortName = [["Mesure"],["C1"],["C2"]];
+ var Typein = [];
+ var Typeout = [];
+ var MI = [];
+ var MO = [];
+ var P = [[50,105,-1,90],[0,10,2,0],[101,10,-2,0]];
+ var PortName = [["Mesure"],["C1"],["C2"]];
for (i=1;i<=size(P,"r");i+=1) {
if (P[i-1][3-1]==1) {
- Typein = [[Typein],["E"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["E"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==2) {
- Typein = [[Typein],["I"]];
- MI = [[MI],[PortName[i-1]]];
+ var Typein = [[Typein],["I"]];
+ var MI = [[MI],[PortName[i-1]]];
}
if (P[i-1][3-1]==-1) {
- Typeout = [[Typeout],["E"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["E"]];
+ var MO = [[MO],[PortName[i-1]]];
}
if (P[i-1][3-1]==-2) {
- Typeout = [[Typeout],["I"]];
- MO = [[MO],[PortName[i-1]]];
+ var Typeout = [[Typeout],["I"]];
+ var MO = [[MO],[PortName[i-1]]];
}
}
this.model = scicos_model();
- mo = modelica();
+ var mo = modelica();
this.model.sim = new ScilabString([ModelName]);
mo.inputs = MI;
mo.outputs = MO;
this.model.rpar = new ScilabDouble([PrametersValue]);
mo.parameters = list(ParametersName,PrametersValue,zeros(ParametersName));
- exprs = "1";
- gr_i = [];
+ var exprs = "1";
+ var gr_i = [];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
mo.model = ModelName;
@@ -60,11 +60,11 @@ function Flowmeter() {
Flowmeter.prototype.set = function Flowmeter() {
this.Qini = arguments[0]["Qini"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.x = arg1;
- exprs = this.x.graphics.exprs;
+ var exprs = this.x.graphics.exprs;
while (false) {
[ok,this.Qini,exprs] = scicos_getvalue([["Set Flowmeter block parameters:"],[""],["Qini: "]],"Qini",list("vec",1),exprs);
if (!ok) {
diff --git a/js/Hydraulics/PerteDP.js b/js/Hydraulics/PerteDP.js
index ddbaa5fe..f83950f2 100644
--- a/js/Hydraulics/PerteDP.js
+++ b/js/Hydraulics/PerteDP.js
@@ -14,7 +14,7 @@ function PerteDP() {
this.model.sim = new ScilabString(["PerteDP"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "PerteDP";
mo.inputs = "C1";
mo.outputs = "C2";
@@ -22,8 +22,8 @@ function PerteDP() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = [[string(this.L)],[string(this.D)],[string(this.lambda)],[string(this.z1)],[string(this.z2)],[string(this.p_rho)]];
- gr_i = [];
+ var exprs = [[string(this.L)],[string(this.D)],[string(this.lambda)],[string(this.z1)],[string(this.z2)],[string(this.p_rho)]];
+ var gr_i = [];
this.x = standard_define([2,1],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
@@ -51,8 +51,8 @@ function PerteDP() {
this.z2 = parseFloat(arguments[0]["z2"])
this.p_rho = parseFloat(arguments[0]["p_rho"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.L,this.D,this.lambda,this.z1,this.z2,this.p_rho,exprs] = scicos_getvalue("Parametres du tuyau",["Longueur du tube : L (m)","Diamètre interne du tube : D (m)","Coefficient de perte de charge-frottement(S.U) : lambda","Altitude entrée tuyauterie : z1 (m)","Altitude sortie tuyauterie : z2 (m)","Si >0, masse volumique imposée fu fluide : p_rho (kg/m3)"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
diff --git a/js/Hydraulics/PuitsP.js b/js/Hydraulics/PuitsP.js
index 7b5b3cdb..873fb972 100644
--- a/js/Hydraulics/PuitsP.js
+++ b/js/Hydraulics/PuitsP.js
@@ -10,14 +10,14 @@ function PuitsP() {
this.model.sim = new ScilabString(["Puits"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Puits";
mo.inputs = ["C"];
mo.parameters = list([["P0"],["T0"],["H0"],["option_temperature"]],[[this.P0],[this.T0],[this.H0],[this.option_temperature]]);
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
- exprs = [[string(this.P0)],[string(this.T0)],[string(this.H0)],[string(this.option_temperature)]];
- gr_i = [];
+ var exprs = [[string(this.P0)],[string(this.T0)],[string(this.H0)],[string(this.option_temperature)]];
+ var gr_i = [];
this.x = standard_define([2.5,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
return new BasicBlock(this.x);
@@ -40,8 +40,8 @@ function PuitsP() {
this.H0 = parseFloat(arguments[0]["H0"])
this.option_temperature = parseFloat(arguments[0]["option_temperature"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.P0,this.T0,this.H0,this.option_temperature,exprs] = scicos_getvalue("Paramètres du puits",["Pression de la source : P0 (Pa)","Temperature de la source : T0 (K)","Enthalpie spécifique de la source : H0 (J/kg)","1:température fixée - 2:enthalpie fixée : option_temperature"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
diff --git a/js/Hydraulics/SourceP.js b/js/Hydraulics/SourceP.js
index 71adc5ad..955403fb 100644
--- a/js/Hydraulics/SourceP.js
+++ b/js/Hydraulics/SourceP.js
@@ -10,7 +10,7 @@ function SourceP() {
this.model.sim = new ScilabString(["Source"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "Source";
mo.inputs = [];
mo.outputs = ["C"];
@@ -18,8 +18,8 @@ function SourceP() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = [[string(this.P0)],[string(this.T0)],[string(this.H0)],[string(this.option_temperature)]];
- gr_i = [];
+ var exprs = [[string(this.P0)],[string(this.T0)],[string(this.H0)],[string(this.option_temperature)]];
+ var gr_i = [];
this.x = standard_define([2.5,2],this.model,exprs,list(gr_i,0));
this.x.graphics.out_implicit = ["I"];
return new BasicBlock(this.x);
@@ -42,8 +42,8 @@ function SourceP() {
this.H0 = parseFloat(arguments[0]["H0"])
this.option_temperature = parseFloat(arguments[0]["option_temperature"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.P0,this.T0,this.H0,this.option_temperature,exprs] = scicos_getvalue("Paramètres du puits",["Pression de la source : P0 (Pa)","Temperature de la source : T0 (K)","Enthalpie spécifique de la source : H0 (J/kg)","1:température fixée - 2:enthalpie fixée : option_temperature"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
diff --git a/js/Hydraulics/VanneReglante.js b/js/Hydraulics/VanneReglante.js
index e92145ca..7ae90b14 100644
--- a/js/Hydraulics/VanneReglante.js
+++ b/js/Hydraulics/VanneReglante.js
@@ -10,7 +10,7 @@ function VanneReglante() {
this.model.sim = new ScilabString(["VanneReglante"]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "VanneReglante";
mo.inputs = ["C1","Ouv"];
mo.outputs = "C2";
@@ -18,8 +18,8 @@ function VanneReglante() {
this.model.equations = new ScilabDouble([mo]);
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
- exprs = [[string(this.Cvmax)],[string(this.p_rho)]];
- gr_i = [];
+ var exprs = [[string(this.Cvmax)],[string(this.p_rho)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = [["I"],["E"]];
this.x.graphics.out_implicit = ["I"];
@@ -39,8 +39,8 @@ function VanneReglante() {
this.Cvmax = parseFloat(arguments[0]["Cvmax"])
this.p_rho = parseFloat(arguments[0]["p_rho"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.Cvmax,this.p_rho,exprs] = scicos_getvalue("Paramètres de la vanne reglante",["Cvmax","p_rho"],list("vec",-1,"vec",-1),exprs);
diff --git a/js/IntegerOp/BITCLEAR.js b/js/IntegerOp/BITCLEAR.js
index 4d9758ec..9230f85e 100644
--- a/js/IntegerOp/BITCLEAR.js
+++ b/js/IntegerOp/BITCLEAR.js
@@ -12,8 +12,8 @@ function BITCLEAR() {
this.model.opar = list(new ScilabDouble([int32(0)]));
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(3)],[sci2exp(0)]];
- gr_i = [];
+ var exprs = [[sci2exp(3)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -31,57 +31,60 @@ function BITCLEAR() {
this.Datatype = arguments[0]["Datatype"]
this.bit = parseFloat(arguments[0]["bit"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.Datatype,this.bit,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","BITCLEAR")],[" "],["Clear a bit"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Index of Bit (0 is least significant)"],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- in1 = [this.model.in1,this.model.in2];
+ var in1 = [this.model.in1,this.model.in2];
if (floor(this.bit)!=this.bit) {
block_parameter_error(msprintf("Wrong type for \'%s\' parameter: %5.1f.","Index of Bit",this.bit),"Must be integer.");
- ok = false;
+ var ok = false;
} else if ((this.Datatype==3)||(this.Datatype==6)) {
if (this.bit>31||this.bit<0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 31]"));
- ok = false;
+ var ok = false;
} else {
this.bit = uint32(this.bit);
- n = (2^32-1)-2^this.bit;
- n = uint32(n);
+ var n = (2^32-1)-2^this.bit;
+ var n = uint32(n);
this.model.sim = list(new ScilabString(["bit_clear_32"]), new ScilabDouble([4]));
}
} else if ((this.Datatype==4)||(this.Datatype==7)) {
if (this.bit>15||this.bit<0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 15]"));
- ok = false;
+ var ok = false;
} else {
this.bit = uint16(this.bit);
- n = (2^16-1)-2^this.bit;
- n = uint16(n);
+ var n = (2^16-1)-2^this.bit;
+ var n = uint16(n);
this.model.sim = list(new ScilabString(["bit_clear_16"]), new ScilabDouble([4]));
}
} else if ((this.Datatype==5)||(this.Datatype==8)) {
if (this.bit>7||this.bit<0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 7]"));
- ok = false;
+ var ok = false;
} else {
this.bit = uint8(this.bit);
- n = (2^8-1)-2^this.bit;
- n = uint8(n);
+ var n = (2^8-1)-2^this.bit;
+ var n = uint8(n);
this.model.sim = list(new ScilabString(["bit_clear_8"]), new ScilabDouble([4]));
}
} else {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",this.Datatype),msprintf("Must be in the interval %s.","[3, 8]"));
- ok = false;
+ var ok = false;
}
if (ok) {
- it = this.Datatype;
- ot = this.Datatype;
- out = [1,1];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var it = this.Datatype;
+ var ot = this.Datatype;
+ var out = [1,1];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/IntegerOp/BITCLEAR.pickle b/js/IntegerOp/BITCLEAR.pickle
index f0b09f39..fc60b980 100644
--- a/js/IntegerOp/BITCLEAR.pickle
+++ b/js/IntegerOp/BITCLEAR.pickle
@@ -49,59 +49,56 @@ sS'model.sim'
p14
S'list'
p15
-sS'[this.model,graphics,ok]'
-p16
-g7
sS'model.out2'
-p17
+p16
g7
sS'in1'
-p18
+p17
g10
sS'model.outtyp'
-p19
+p18
g7
sS'graphics.exprs'
-p20
+p19
NsS'bit'
-p21
+p20
g7
sS'typ'
-p22
+p21
g10
sS'model.opar'
-p23
+p22
g15
sS'ok'
-p24
+p23
S'boolean'
-p25
+p24
sS'model.blocktype'
-p26
+p25
S'string'
-p27
+p26
sS'model.dep_ut'
-p28
+p27
g10
sS'n'
-p29
+p28
g7
sS'exprs'
-p30
+p29
S'matrix'
-p31
+p30
sS'gr_i'
-p32
+p31
g10
sS'y'
-p33
+p32
g10
sS'x'
-p34
+p33
g7
sS'model'
-p35
+p34
g2
sS'ot'
-p36
+p35
Ns. \ No newline at end of file
diff --git a/js/IntegerOp/BITSET.js b/js/IntegerOp/BITSET.js
index f20d0619..6a0582fe 100644
--- a/js/IntegerOp/BITSET.js
+++ b/js/IntegerOp/BITSET.js
@@ -12,8 +12,8 @@ function BITSET() {
this.model.opar = list(new ScilabDouble([uint32(0)]));
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(3)],[sci2exp(0)]];
- gr_i = [];
+ var exprs = [[sci2exp(3)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -31,55 +31,58 @@ function BITSET() {
this.Datatype = arguments[0]["Datatype"]
this.bit = parseFloat(arguments[0]["bit"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.Datatype,this.bit,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","BITSET")],[" "],["Set a bit"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Index of Bit (0 is least significant)"],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- in1 = [this.model.in1,this.model.in2];
+ var in1 = [this.model.in1,this.model.in2];
if (floor(this.bit)!=this.bit) {
block_parameter_error(msprintf("Wrong type for \'%s\' parameter: %5.1f.","Index of Bit",this.bit),"Must be integer.");
- ok = false;
+ var ok = false;
}
if ((this.Datatype==3)||(this.Datatype==6)) {
if (this.bit>31||this.bit<0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 31]"));
- ok = false;
+ var ok = false;
}
this.bit = uint32(this.bit);
- n = 2^this.bit;
- n = uint32(n);
+ var n = 2^this.bit;
+ var n = uint32(n);
this.model.sim = list(new ScilabString(["bit_set_32"]), new ScilabDouble([4]));
} else if ((this.Datatype==4)||(this.Datatype==7)) {
if (this.bit>15||this.bit<0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 15]"));
- ok = false;
+ var ok = false;
}
this.bit = uint16(this.bit);
- n = 2^this.bit;
- n = uint16(n);
+ var n = 2^this.bit;
+ var n = uint16(n);
this.model.sim = list(new ScilabString(["bit_set_16"]), new ScilabDouble([4]));
} else if ((this.Datatype==5)||(this.Datatype==8)) {
if (this.bit>7||this.bit<0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 7]"));
- ok = false;
+ var ok = false;
}
this.bit = uint8(this.bit);
- n = 2^this.bit;
- n = uint8(n);
+ var n = 2^this.bit;
+ var n = uint8(n);
this.model.sim = list(new ScilabString(["bit_set_8"]), new ScilabDouble([4]));
} else {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",this.Datatype),msprintf("Must be in the interval %s.","[3, 8]"));
- ok = false;
+ var ok = false;
}
if (ok) {
- it = this.Datatype;
- ot = this.Datatype;
- out = [1,1];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var it = this.Datatype;
+ var ot = this.Datatype;
+ var out = [1,1];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/IntegerOp/BITSET.pickle b/js/IntegerOp/BITSET.pickle
index f0b09f39..fc60b980 100644
--- a/js/IntegerOp/BITSET.pickle
+++ b/js/IntegerOp/BITSET.pickle
@@ -49,59 +49,56 @@ sS'model.sim'
p14
S'list'
p15
-sS'[this.model,graphics,ok]'
-p16
-g7
sS'model.out2'
-p17
+p16
g7
sS'in1'
-p18
+p17
g10
sS'model.outtyp'
-p19
+p18
g7
sS'graphics.exprs'
-p20
+p19
NsS'bit'
-p21
+p20
g7
sS'typ'
-p22
+p21
g10
sS'model.opar'
-p23
+p22
g15
sS'ok'
-p24
+p23
S'boolean'
-p25
+p24
sS'model.blocktype'
-p26
+p25
S'string'
-p27
+p26
sS'model.dep_ut'
-p28
+p27
g10
sS'n'
-p29
+p28
g7
sS'exprs'
-p30
+p29
S'matrix'
-p31
+p30
sS'gr_i'
-p32
+p31
g10
sS'y'
-p33
+p32
g10
sS'x'
-p34
+p33
g7
sS'model'
-p35
+p34
g2
sS'ot'
-p36
+p35
Ns. \ No newline at end of file
diff --git a/js/IntegerOp/CONVERT.js b/js/IntegerOp/CONVERT.js
index 32a89506..ddd77a7c 100644
--- a/js/IntegerOp/CONVERT.js
+++ b/js/IntegerOp/CONVERT.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/IntegerOp/CONVERT.sci" */
function CONVERT() {
CONVERT.prototype.define = function CONVERT() {
- sgn = 2;
+ var sgn = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["convert"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1]);
@@ -14,8 +14,8 @@ function CONVERT() {
this.model.ipar = new ScilabDouble([sgn]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[sci2exp(3)],[sci2exp(0)]];
- gr_i = [];
+ var exprs = [[sci2exp(1)],[sci2exp(3)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -35,9 +35,9 @@ function CONVERT() {
this.ot = parseFloat(arguments[0]["ot"])
this.np = arguments[0]["np"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.it,this.ot,this.np,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CONVERT")],[" "],["Type conversion"],[" "]],["Input Type (1:double, 3:int32, 4:int16, 5:int8, ...)","Output Type (1:double, 3:int32, 4:int16, 5:int8, ...)","Do on Overflow (0:Nothing, 1:Saturate, 2:Error)"],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -51,13 +51,13 @@ function CONVERT() {
}
if ((this.np!=0&&this.np!=1&&this.np!=2)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Do on Overflow",this.np),msprintf("Must be in the interval %s.","[0, 2]"));
- ok = false;
+ var ok = false;
} else if ((this.it>8||this.it<1)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Type",this.it),msprintf("Must be in the interval %s.","[1, 8]"));
- ok = false;
+ var ok = false;
} else if ((this.ot>8||this.ot<1)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Output Type",this.ot),msprintf("Must be in the interval %s.","[1, 8]"));
- ok = false;
+ var ok = false;
}
this.model.sim = list(new ScilabString(["convert"]), new ScilabDouble([4]));
if ((this.it==this.ot)) {
@@ -365,10 +365,13 @@ function CONVERT() {
}
}
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,this.it),list(out,this.ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,this.it),list(out,this.ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/IntegerOp/CONVERT.pickle b/js/IntegerOp/CONVERT.pickle
index b52bf187..b4be3cad 100644
--- a/js/IntegerOp/CONVERT.pickle
+++ b/js/IntegerOp/CONVERT.pickle
@@ -55,57 +55,54 @@ sS'model.sim'
p15
S'list'
p16
-sS'[this.model,graphics,ok]'
-p17
-g5
sS'model.out2'
-p18
+p17
g5
sS'in1'
-p19
+p18
g11
sS'model.rpar'
-p20
+p19
g11
sS'model.outtyp'
-p21
+p20
g5
sS'graphics.exprs'
-p22
+p21
NsS'model.ipar'
-p23
+p22
g5
sS'typ'
-p24
+p23
g11
sS'ok'
-p25
+p24
S'boolean'
-p26
+p25
sS'model.blocktype'
-p27
+p26
S'string'
-p28
+p27
sS'model.dep_ut'
-p29
+p28
g11
sS'exprs'
-p30
+p29
S'matrix'
-p31
+p30
sS'gr_i'
-p32
+p31
g11
sS'y'
-p33
+p32
g11
sS'x'
-p34
+p33
g5
sS'model'
-p35
+p34
g2
sS'ot'
-p36
+p35
g5
s. \ No newline at end of file
diff --git a/js/IntegerOp/DFLIPFLOP.js b/js/IntegerOp/DFLIPFLOP.js
index e07adda8..79215c3e 100644
--- a/js/IntegerOp/DFLIPFLOP.js
+++ b/js/IntegerOp/DFLIPFLOP.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/IntegerOp/DFLIPFLOP.sci" */
function DFLIPFLOP() {
DFLIPFLOP.prototype.define = function DFLIPFLOP() {
- scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["DFLIPFLOP"],tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["DFLIPFLOP"],tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m.objs[1-1] = scicos_block(gui="CONST_m",graphics=scicos_graphics(orig=[109.62561,263.44465],sz=[[20],[20]],flip=true,theta=0,exprs="int8(0)",pin=[],pout=6,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=5,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(int8(0)),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[2-1] = scicos_block(gui="IFTHEL_f",graphics=scicos_graphics(orig=[239.98293,378.2166],sz=[60,60],flip=true,theta=0,exprs=[["1"],["1"]],pin=29,pout=[],pein=22,peout=[[16],[44]],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim=list("ifthel",-1),in1=1,in2=1,intyp=-1,out=[],out2=[],outtyp=1,evtin=1,evtout=[[1],[1]],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="l",firing=[-1,-1],dep_ut=[true,false],label="",nzcross=1,nmode=1,equations=list()),doc=list());
scs_m.objs[3-1] = scicos_block(gui="LOGICAL_OP",graphics=scicos_graphics(orig=[152.88902,260.24498],sz=[60,40],flip=true,theta=0,exprs=[["2"],["1"],["5"],["0"]],pin=[[11],[39]],pout=5,pein=[],peout=[],gr_i=[],id="",in_implicit=[["E"],["E"]],out_implicit="E"),model=scicos_model(sim=list("logicalop_i8",4),in1=[[-1],[-1]],in2=[[-2],[-2]],intyp=[[5],[5]],out=-1,out2=-2,outtyp=5,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[[1],[0]],opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -16,7 +16,7 @@ function DFLIPFLOP() {
scs_m.objs[12-1] = scicos_block(gui="OUT_f",graphics=scicos_graphics(orig=[457.40928,320.20131],sz=[20,20],flip=true,theta=0,exprs="2",pin=13,pout=[],pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim="output",in1=-1,in2=[],intyp=-1,out=[],out2=[],outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=2,opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[13-1] = scicos_link(xx=[[441.81249],[457.40928]],yy=[[329.46812],[330.20131]],id="drawlink",thick=[0,0],ct=[1,1],from=[7,1,0],to=[12,1,1]);
scs_m.objs[14-1] = scicos_block(gui="OUT_f",graphics=scicos_graphics(orig=[376.4669,270.83282],sz=[20,20],flip=true,theta=0,exprs="1",pin=37,pout=[],pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim="output",in1=-1,in2=[],intyp=-1,out=[],out2=[],outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title="Untitled",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=[],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title="Untitled",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=[],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="ANDLOG_f",graphics=scicos_graphics(orig=[194,133],sz=[60,60],flip=true,theta=0,exprs=[],pin=[],pout=9,pein=[[4],[11]],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim="andlog",in1=[],in2=[],intyp=1,out=1,out2=[],outtyp=1,evtin=[[1],[1]],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_block(gui="CLKIN_f",graphics=scicos_graphics(orig=[149,287],sz=[20,20],flip=true,theta=0,exprs="1",pin=[],pout=[],pein=[],peout=4,gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="input",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=[],evtout=1,state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="d",firing=-1,dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[3-1] = scicos_block(gui="CLKOUT_f",graphics=scicos_graphics(orig=[450,83],sz=[20,20],flip=true,theta=0,exprs="1",pin=[],pout=[],pein=8,peout=[],gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="output",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=1,evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -32,7 +32,7 @@ function DFLIPFLOP() {
scs_m.objs[15-1] = scicos_block(gui="ANDBLK",graphics=scicos_graphics(orig=[233.73039,318.74407],sz=[40,40],flip=true,theta=0,exprs=[],pin=[],pout=[],pein=[[19],[16]],peout=17,gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="csuper",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=[[1],[1]],evtout=1,state=[],dstate=[],odstate=list(),rpar=scs_m_1,ipar=[],opar=list(),blocktype="h",firing=false,dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[16-1] = scicos_link(xx=[[259.98293],[260.39705]],yy=[[372.50232],[364.45835]],id="drawlink",thick=[0,0],ct=[5,-1],from=[2,1,0],to=[15,2,1]);
scs_m.objs[17-1] = scicos_link(xx=[[253.73039],[253.72572]],yy=[[313.02978],[309.29537]],id="drawlink",thick=[0,0],ct=[5,-1],from=[15,1,0],to=[41,1,1]);
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["EDGE_TRIGGER","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=30,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["EDGE_TRIGGER","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=30,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="EDGETRIGGER",graphics=scicos_graphics(orig=[288.58631,257.1131],sz=[60,40],flip=true,theta=0,exprs="1",pin=5,pout=3,pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit="E"),model=scicos_model(sim=list("edgetrig",4),in1=1,in2=[],intyp=1,out=1,out2=[],outtyp=1,evtin=[],evtout=[],state=[],dstate=0,odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=1,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_block(gui="IFTHEL_f",graphics=scicos_graphics(orig=[388.28869,247.1131],sz=[60,60],flip=true,theta=0,exprs=[["0"],["0"]],pin=3,pout=[],pein=[],peout=[[7],[0]],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim=list("ifthel",-1),in1=1,in2=[],intyp=1,out=[],out2=1,outtyp=[],evtin=[],evtout=[[1],[1]],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="l",firing=[-1,-1],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[3-1] = scicos_link(xx=[[357.15774],[362.99107],[379.71726]],yy=[[277.1131],[277.1131],[277.1131]],id="drawlink",thick=[0,0],ct=[1,1],from=[1,1,0],to=[2,1,1]);
@@ -43,7 +43,7 @@ function DFLIPFLOP() {
scs_m.objs[18-1] = scicos_block(gui="EDGE_TRIGGER",graphics=scicos_graphics(orig=[133.90637,385.342],sz=[60,40],flip=true,theta=0,exprs=[],pin=26,pout=[],pein=[],peout=19,gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim="csuper",in1=-1,in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=[],evtout=1,state=[],dstate=[],odstate=list(),rpar=scs_m_1,ipar=[],opar=list(),blocktype="h",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[19-1] = scicos_link(xx=[[163.90637],[163.90637],[247.06372]],yy=[[379.62771],[364.45835],[364.45835]],id="drawlink",thick=[0,0],ct=[5,-1],from=[18,1,0],to=[15,1,1]);
scs_m.objs[20-1] = scicos_block(gui="IN_f",graphics=scicos_graphics(orig=[79.594811,395.47647],sz=[20,20],flip=true,theta=0,exprs="2",pin=[],pout=23,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim="input",in1=[],in2=[],intyp=1,out=-1,out2=[],outtyp=-1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=2,opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["Extract_Activation","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=30,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["Extract_Activation","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=30,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="IFTHEL_f",graphics=scicos_graphics(orig=[150.65045,143.82208],sz=[60,60],flip=true,theta=0,exprs=[["0"],["0"]],pin=6,pout=[],pein=[],peout=[[3],[4]],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim=list("ifthel",-1),in1=1,in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=[],evtout=[[1],[1]],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="l",firing=[-1,-1],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_block(gui="CLKSOMV_f",graphics=scicos_graphics(orig=[169.82143,96.146231],sz=[16.666667,16.666667],flip=true,theta=0,exprs=[],pin=[],pout=[],pein=[[3],[4],[0]],peout=8,gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="sum",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=[[1],[1],[1]],evtout=1,state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="d",firing=-1,dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[3-1] = scicos_link(xx=[[170.65045],[170.65045],[150.04302],[150.04302],[169.82143]],yy=[[138.10779],[128.235],[128.235],[104.47956],[104.47956]],id="drawlink",thick=[0,0],ct=[5,-1],from=[1,1,0],to=[2,1,1]);
@@ -88,7 +88,7 @@ function DFLIPFLOP() {
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [true,false];
this.model.rpar = new ScilabDouble([scs_m]);
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,3],this.model,[],gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/IntegerOp/DLATCH.js b/js/IntegerOp/DLATCH.js
index ac4afc92..2b08ce0f 100644
--- a/js/IntegerOp/DLATCH.js
+++ b/js/IntegerOp/DLATCH.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/IntegerOp/DLATCH.sci" */
function DLATCH() {
DLATCH.prototype.define = function DLATCH() {
- scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["DLATCH"],tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["DLATCH"],tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m.objs[1-1] = scicos_block(gui="CONST_m",graphics=scicos_graphics(orig=[109.62561,263.44465],sz=[[20],[20]],flip=true,theta=0,exprs="int8(0)",pin=[],pout=7,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=5,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(int8(0)),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[2-1] = scicos_block(gui="IFTHEL_f",graphics=scicos_graphics(orig=[233.37693,320.30536],sz=[60,60],flip=true,theta=0,exprs=[["0"],["1"]],pin=13,pout=[],pein=[],peout=[[6],[0]],gr_i=list([["txt=[\'If in>0\';\' \';\' then else\'];"],["xstringb(orig(1),orig(2),txt,sz(1),sz(2),\'fill\');"]],8),id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim=list("ifthel",-1),in1=1,in2=1,intyp=-1,out=[],out2=[],outtyp=1,evtin=[],evtout=[[1],[1]],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="l",firing=[-1,-1],dep_ut=[true,false],label="",nzcross=1,nmode=1,equations=list()),doc=list());
scs_m.objs[3-1] = scicos_block(gui="LOGICAL_OP",graphics=scicos_graphics(orig=[152.88902,260.24498],sz=[60,40],flip=true,theta=0,exprs=[["2"],["1"],["5"],["0"]],pin=[[15],[7]],pout=5,pein=[],peout=[],gr_i=list("xstringb(orig(1),orig(2),[\'Logical Op \';OPER],sz(1),sz(2),\'fill\');",8),id="",in_implicit=[["E"],["E"]],out_implicit="E"),model=scicos_model(sim=list("logicalop_i8",4),in1=[[-1],[-1]],in2=[[-2],[-2]],intyp=[[5],[5]],out=-1,out2=-2,outtyp=5,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[[1],[0]],opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -33,7 +33,7 @@ function DLATCH() {
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [true,false];
this.model.rpar = new ScilabDouble([scs_m]);
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,3],this.model,[],gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/IntegerOp/EXTRACTBITS.js b/js/IntegerOp/EXTRACTBITS.js
index 65367a6f..5525a5f5 100644
--- a/js/IntegerOp/EXTRACTBITS.js
+++ b/js/IntegerOp/EXTRACTBITS.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/IntegerOp/EXTRACTBITS.sci" */
function EXTRACTBITS() {
EXTRACTBITS.prototype.define = function EXTRACTBITS() {
- numb = [];
+ var numb = [];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["extract_bit_32_UH0"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -13,8 +13,8 @@ function EXTRACTBITS() {
this.model.ipar = [0,numb];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(3)],[sci2exp(1)],[sci2exp(0)],[sci2exp(0)]];
- gr_i = [];
+ var exprs = [[sci2exp(3)],[sci2exp(1)],[sci2exp(0)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -36,52 +36,52 @@ function EXTRACTBITS() {
this.bit = parseFloat(arguments[0]["bit"])
this.scal = arguments[0]["scal"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.Datatype,this.rule,this.bit,this.scal,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","EXTRACTBITS")],[" "],["Bits Extraction"],[" "],["&nbsp;- Bits to Extract:"],["&nbsp;&nbsp;&nbsp;&nbsp;1 Upper Half"],["&nbsp;&nbsp;&nbsp;&nbsp;2 Lower Half"],["&nbsp;&nbsp;&nbsp;&nbsp;3 Range from MSB"],["&nbsp;&nbsp;&nbsp;&nbsp;4 Range to LSB"],["&nbsp;&nbsp;&nbsp;&nbsp;5 Range of Bits"],["&nbsp;- Number of Bits or Index of bit : Index 0 is LSB"],["&nbsp;&nbsp;&nbsp;&nbsp;If \'Bits to Extract\' is set to \'Range of bits\': [Start, End]"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Bits to extract","Number of Bits or Index of Bit","Treat Bit Field as an Integer (0:No, 1:Yes)"],list("vec",1,"vec",1,"vec",-1,"vec",1),exprs);
if (!ok) {
break;
}
- bitstr = strcat(string(this.bit.slice())," ");
+ var bitstr = strcat(string(this.bit.slice())," ");
if ((this.rule<1)||(this.rule>5)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Bits to Extract",this.rule),msprintf("Must be in the interval %s.","[1, 5]"));
- ok = false;
+ var ok = false;
} else if (this.scal<0||this.scal>1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Treat Bit Field as an Integer",this.scal),msprintf("Must be in the interval %s.","[0, 1]"));
- ok = false;
+ var ok = false;
} else {
- in1 = [this.model.in1,this.model.in2];
+ var in1 = [this.model.in1,this.model.in2];
this.bit = int(this.bit);
this.rule = int(this.rule);
if ((this.rule==3)||(this.rule==4)) {
if ((size(this.bit,"*")!=1)) {
block_parameter_error(msprintf("Wrong size for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),"Must be a single value.");
- ok = false;
+ var ok = false;
} else {
- numb = this.bit;
+ var numb = this.bit;
}
} else if ((this.rule==5)) {
if ((size(this.bit,"*")!=2)) {
block_parameter_error(msprintf("Wrong size for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),"Must have this form: [Start, End].");
- ok = false;
+ var ok = false;
} else if (this.bit[1-1]>this.bit[2-1]) {
block_parameter_error(msprintf("Wrong values for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),msprintf("\'Start\' must be less than \'End\'."));
- ok = false;
+ var ok = false;
} else {
- numb = this.bit[2-1]-this.bit[1-1];
+ var numb = this.bit[2-1]-this.bit[1-1];
}
} else {
this.bit = 0;
- numb = [];
+ var numb = [];
}
}
if (ok) {
if ((this.Datatype==3||this.Datatype==6)) {
if (or(this.bit.slice()>31)||or(this.bit.slice()<0)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),msprintf("Indexes must be in the interval %s.","[0, 31]"));
- ok = false;
+ var ok = false;
}
switch (this.rule) {
case 1:
@@ -128,7 +128,7 @@ function EXTRACTBITS() {
} else if ((this.Datatype==4||this.Datatype==7)) {
if (or(this.bit.slice()>15)||or(this.bit.slice()<0)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),msprintf("Indexes must be in the interval %s.","[0, 15]"));
- ok = false;
+ var ok = false;
}
switch (this.rule) {
case 1:
@@ -175,7 +175,7 @@ function EXTRACTBITS() {
} else if ((this.Datatype==5||this.Datatype==8)) {
if (or(this.bit.slice()>7)||or(this.bit.slice()<0)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),msprintf("Indexes must be in the interval %s.","[0, 7]"));
- ok = false;
+ var ok = false;
}
switch (this.rule) {
case 1:
@@ -221,14 +221,17 @@ function EXTRACTBITS() {
}
} else {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",this.Datatype),msprintf("Must be in the interval %s.","[3, 8]"));
- ok = false;
+ var ok = false;
}
}
if (ok) {
- it = this.Datatype;
- ot = this.Datatype;
- out = [1,1];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var it = this.Datatype;
+ var ot = this.Datatype;
+ var out = [1,1];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/IntegerOp/EXTRACTBITS.pickle b/js/IntegerOp/EXTRACTBITS.pickle
index e5bdf3b7..08b5b345 100644
--- a/js/IntegerOp/EXTRACTBITS.pickle
+++ b/js/IntegerOp/EXTRACTBITS.pickle
@@ -56,62 +56,59 @@ sS'model.sim'
p15
S'list'
p16
-sS'[this.model,graphics,ok]'
-p17
-g7
sS'model.out2'
-p18
+p17
g7
sS'in1'
-p19
+p18
g9
sS'model.outtyp'
-p20
+p19
g7
sS'numb'
-p21
+p20
g9
sS'graphics.exprs'
-p22
+p21
NsS'bit'
-p23
+p22
g7
sS'model.ipar'
-p24
+p23
g9
sS'typ'
-p25
+p24
g9
sS'bitstr'
-p26
+p25
g7
sS'ok'
-p27
+p26
S'boolean'
-p28
+p27
sS'model.blocktype'
-p29
+p28
S'string'
-p30
+p29
sS'rule'
-p31
+p30
g7
sS'exprs'
-p32
+p31
S'matrix'
-p33
+p32
sS'gr_i'
-p34
+p33
g9
sS'y'
-p35
+p34
g9
sS'x'
-p36
+p35
g7
sS'model'
-p37
+p36
g2
sS'ot'
-p38
+p37
Ns. \ No newline at end of file
diff --git a/js/IntegerOp/INTMUL.js b/js/IntegerOp/INTMUL.js
index 375723a6..14df9421 100644
--- a/js/IntegerOp/INTMUL.js
+++ b/js/IntegerOp/INTMUL.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/IntegerOp/INTMUL.sci" */
function INTMUL() {
INTMUL.prototype.define = function INTMUL() {
- sgn = 0;
+ var sgn = 0;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["matmul_i32"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1],[-2]);
@@ -14,8 +14,8 @@ function INTMUL() {
this.model.ipar = new ScilabDouble([sgn]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(3)],[sci2exp(0)]];
- gr_i = [];
+ var exprs = [[sci2exp(3)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -33,19 +33,19 @@ function INTMUL() {
this.Datatype = arguments[0]["Datatype"]
this.np = arguments[0]["np"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.Datatype,this.np,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","INTMUL")],[" "],["Integer matrix multiplication"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Do on Overflow (0:Nothing, 1:Saturate, 2:Error)"],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- it = this.Datatype*ones(1,2);
- ot = this.Datatype;
+ var it = this.Datatype*ones(1,2);
+ var ot = this.Datatype;
if ((this.np!=0&&this.np!=1&&this.np!=2)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Do on Overflow",this.np),msprintf("Must be in the interval %s.","[0, 2]"));
- ok = false;
+ var ok = false;
} else if (this.Datatype==3) {
if (this.np==0) {
this.model.sim = list(new ScilabString(["matmul_i32n"]), new ScilabDouble([4]));
@@ -96,12 +96,15 @@ function INTMUL() {
}
} else {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",ot),msprintf("Must be in the interval %s.","[3, 8]"));
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.ipar = new ScilabDouble([this.np]);
diff --git a/js/IntegerOp/INTMUL.pickle b/js/IntegerOp/INTMUL.pickle
index ab66f1de..2a3298b8 100644
--- a/js/IntegerOp/INTMUL.pickle
+++ b/js/IntegerOp/INTMUL.pickle
@@ -55,54 +55,51 @@ sS'model.sim'
p17
S'list'
p18
-sS'[this.model,graphics,ok]'
-p19
-g10
sS'model.out2'
-p20
+p19
g10
sS'in1'
-p21
+p20
g8
sS'model.rpar'
-p22
+p21
g8
sS'model.outtyp'
-p23
+p22
g10
sS'graphics.exprs'
-p24
+p23
NsS'model.ipar'
-p25
+p24
g10
sS'typ'
-p26
+p25
g8
sS'ok'
-p27
+p26
S'boolean'
-p28
+p27
sS'model.blocktype'
-p29
+p28
g5
sS'model.dep_ut'
-p30
+p29
g8
sS'exprs'
-p31
+p30
g14
sS'gr_i'
-p32
+p31
g8
sS'y'
-p33
+p32
g8
sS'x'
-p34
+p33
g10
sS'model'
-p35
+p34
g2
sS'ot'
-p36
+p35
Ns. \ No newline at end of file
diff --git a/js/IntegerOp/JKFLIPFLOP.js b/js/IntegerOp/JKFLIPFLOP.js
index 6fbf4a6a..79853489 100644
--- a/js/IntegerOp/JKFLIPFLOP.js
+++ b/js/IntegerOp/JKFLIPFLOP.js
@@ -1,9 +1,9 @@
/* autogenerated from "macros/IntegerOp/JKFLIPFLOP.sci" */
function JKFLIPFLOP() {
JKFLIPFLOP.prototype.define = function JKFLIPFLOP() {
- scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["JKFLIPFLOP"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=60,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["JKFLIPFLOP"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=60,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m.objs[1-1] = scicos_block(gui="DOLLAR_m",graphics=scicos_graphics(orig=[299.96961,261.584],sz=[40,40],flip=false,theta=0,exprs=[["int8(0)"],["1"]],pin=7,pout=5,pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit="E"),model=scicos_model(sim=list("dollar4_m",4),in1=1,in2=1,intyp=5,out=1,out2=1,outtyp=5,evtin=[],evtout=[],state=[],dstate=[],odstate=list(int8(0)),rpar=[],ipar=[],opar=list(),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["EDGE_TRIGGER","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=30,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["EDGE_TRIGGER","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=30,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="EDGETRIGGER",graphics=scicos_graphics(orig=[288.58631,257.1131],sz=[60,40],flip=true,theta=0,exprs="-1",pin=5,pout=3,pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit="E"),model=scicos_model(sim=list("edgetrig",4),in1=1,in2=[],intyp=1,out=1,out2=[],outtyp=1,evtin=[],evtout=[],state=[],dstate=0,odstate=list(),rpar=[],ipar=-1,opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=1,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_block(gui="IFTHEL_f",graphics=scicos_graphics(orig=[388.28869,247.1131],sz=[60,60],flip=true,theta=0,exprs=[["0"],["0"]],pin=3,pout=[],pein=[],peout=[[7],[0]],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim=list("ifthel",-1),in1=1,in2=[],intyp=1,out=[],out2=1,outtyp=[],evtin=[],evtout=[[1],[1]],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="l",firing=[-1,-1],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[3-1] = scicos_link(xx=[[357.15774],[362.99107],[379.71726]],yy=[[277.1131],[277.1131],[277.1131]],id="drawlink",thick=[0,0],ct=[1,1],from=[1,1,0],to=[2,1,1]);
@@ -44,7 +44,7 @@ function JKFLIPFLOP() {
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [true,false];
this.model.rpar = new ScilabDouble([scs_m]);
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,3],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -60,17 +60,17 @@ function JKFLIPFLOP() {
this.init = parseFloat(arguments[0]["init"])
this.exprs0 = arguments[0]["exprs0"]
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="DOLLAR_m") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- xx = arg1.model.rpar.objs[path-1];
- exprs = xx.graphics.exprs[1-1];
+ var newpar = list();
+ var xx = arg1.model.rpar.objs[path-1];
+ var exprs = xx.graphics.exprs[1-1];
this.model = xx.model;
- init_old = this.model.odstate[1-1];
+ var init_old = this.model.odstate[1-1];
while (true) {
[ok,this.init,this.exprs0] = scicos_getvalue([[msprintf("Set %s block parameters","JKFLIPFLOP")],[" "],["JK flip-flop"],[" "],["The \'Initial Value\' must be 0 or 1 of type int8"],["&nbsp;- Negative values are considered as int8(0)"],["&nbsp;- Positive values are considered as int8(1)"],[" "]],"Initial Value",list("vec",1),exprs);
if (!ok) {
@@ -89,14 +89,14 @@ function JKFLIPFLOP() {
break;
}
}
- needcompile = 0;
+ var needcompile = 0;
if (init_old!=this.init) {
newpar[size(newpar)+1-1] = 1;
- needcompile = 2;
+ var needcompile = 2;
}
this.x = arg1;
- y = needcompile;
- typ = newpar;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/IntegerOp/LOGIC.js b/js/IntegerOp/LOGIC.js
index 98689ead..5a517eb8 100644
--- a/js/IntegerOp/LOGIC.js
+++ b/js/IntegerOp/LOGIC.js
@@ -15,8 +15,8 @@ function LOGIC() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(this.mat)],[sci2exp(0)]];
- gr_i = [];
+ var exprs = [[sci2exp(this.mat)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,33 +34,36 @@ function LOGIC() {
this.mat = inverse(arguments[0]["mat"])
this.herit = arguments[0]["herit"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.mat,this.herit,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","LOGIC")],[" "],["Combinatorial logic"],[" "],["&nbsp; Rows of the matrix are the output values"],["&nbsp; Number of rows must be a power of two."],["&nbsp; Number of columns gives the number of outputs."],[" "]],["Truth Table (matrix of outputs)","Accepts Inherited Events (0:No, 1:Yes)"],list("mat",[-1,-2],"vec",1),exprs);
if (!ok) {
break;
}
- nout = size(this.mat,2);
- nin = (log(size(this.mat,1))/log(2));
- u1 = floor(nin);
+ var nout = size(this.mat,2);
+ var nin = (log(size(this.mat,1))/log(2));
+ var u1 = floor(nin);
if ((u1!=nin)) {
block_parameter_error(msprintf("Wrong size for \'%s\' parameter: %d.","Truth Table",size(this.mat,1)),"Number of rows must be a power of two.");
- ok = false;
+ var ok = false;
} else if ((find(this.mat.slice()!=0&&this.mat.slice()!=1)!=[])) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter.","Truth Table"),msprintf("Elements must be in the interval %s.","[0, 1]"));
- ok = false;
+ var ok = false;
} else if (this.herit<0||this.herit>1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Accepts Inherited Events",this.herit),msprintf("Must be in the interval %s.","[0, 1]"));
- ok = false;
+ var ok = false;
}
if (ok) {
- in1 = [ones(nin,1),ones(nin,1)];
- out = [ones(nout,1),ones(nout,1)];
- it = 5*ones(1,nin);
- ot = 5*ones(1,nout);
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.herit,1),[]);
+ var in1 = [ones(nin,1),ones(nin,1)];
+ var out = [ones(nout,1),ones(nout,1)];
+ var it = 5*ones(1,nin);
+ var ot = 5*ones(1,nout);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.herit,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/IntegerOp/LOGIC.pickle b/js/IntegerOp/LOGIC.pickle
index a09fede5..383d01ee 100644
--- a/js/IntegerOp/LOGIC.pickle
+++ b/js/IntegerOp/LOGIC.pickle
@@ -66,55 +66,52 @@ g5
sS'mat'
p22
g12
-sS'[this.model,graphics,ok]'
-p23
-g5
sS'model.out2'
-p24
+p23
g5
sS'in1'
-p25
+p24
g8
sS'model.outtyp'
-p26
+p25
g5
sS'graphics.exprs'
-p27
+p26
NsS'typ'
-p28
+p27
g8
sS'model.opar'
-p29
+p28
g20
sS'ok'
-p30
+p29
g18
sS'model.blocktype'
-p31
+p30
S'string'
-p32
+p31
sS'model.dep_ut'
-p33
+p32
g8
sS'exprs'
-p34
+p33
g12
sS'gr_i'
-p35
+p34
g8
sS'y'
-p36
+p35
g8
sS'x'
-p37
+p36
g5
sS'model'
-p38
+p37
g2
sS'ot'
-p39
+p38
g5
sS'nout'
-p40
+p39
g5
s. \ No newline at end of file
diff --git a/js/IntegerOp/SHIFT.js b/js/IntegerOp/SHIFT.js
index 799bee21..ab0de403 100644
--- a/js/IntegerOp/SHIFT.js
+++ b/js/IntegerOp/SHIFT.js
@@ -1,8 +1,8 @@
/* autogenerated from "macros/IntegerOp/SHIFT.sci" */
function SHIFT() {
SHIFT.prototype.define = function SHIFT() {
- sgn = [[0],[0]];
- OPER = 0;
+ var sgn = [[0],[0]];
+ var OPER = 0;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["shift_32_LA"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1]);
@@ -15,8 +15,8 @@ function SHIFT() {
this.model.ipar = new ScilabDouble(sgn);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(3)],[sci2exp(0)],[sci2exp(0)]];
- gr_i = [];
+ var exprs = [[sci2exp(3)],[sci2exp(0)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -36,9 +36,9 @@ function SHIFT() {
this.nb = arguments[0]["nb"]
this.np = arguments[0]["np"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.Datatype,this.nb,this.np,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","SHIFT")],[" "],["Shift/Rotates bits"]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Number of Bits to Shift Left (Negative number to shift right)","Shift Type (0:Arithmetic, 1:Circular)"],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -46,10 +46,10 @@ function SHIFT() {
}
if ((this.np!=0&&this.np!=1)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Shift Type",this.np),msprintf("Must be in the interval %s.","[0, 1]"));
- ok = false;
+ var ok = false;
}
- it = this.Datatype;
- ot = this.Datatype;
+ var it = this.Datatype;
+ var ot = this.Datatype;
if ((this.Datatype==3||this.Datatype==6)) {
if (this.nb>0) {
switch (this.np) {
@@ -115,10 +115,13 @@ function SHIFT() {
}
} else {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",this.Datatype),msprintf("Must be in the interval %s.","[3, 8]"));
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([-1,-2],it),list([-1,-2],ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list([-1,-2],it),list([-1,-2],ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.ipar = new ScilabDouble([this.nb]);
diff --git a/js/IntegerOp/SHIFT.pickle b/js/IntegerOp/SHIFT.pickle
index fe2093d6..0f8af58b 100644
--- a/js/IntegerOp/SHIFT.pickle
+++ b/js/IntegerOp/SHIFT.pickle
@@ -50,56 +50,53 @@ sS'model.sim'
p14
S'list'
p15
-sS'[this.model,graphics,ok]'
-p16
-g2
sS'model.out2'
-p17
+p16
g2
sS'model.intyp'
-p18
+p17
g2
sS'model.rpar'
-p19
+p18
S'vector'
-p20
+p19
sS'model.outtyp'
-p21
+p20
g2
sS'graphics.exprs'
-p22
+p21
NsS'model.ipar'
-p23
+p22
g9
sS'typ'
-p24
-g20
+p23
+g19
sS'ok'
-p25
+p24
S'boolean'
-p26
+p25
sS'model.blocktype'
-p27
+p26
S'string'
-p28
+p27
sS'model.dep_ut'
-p29
-g20
+p28
+g19
sS'exprs'
-p30
+p29
g9
sS'gr_i'
-p31
-g20
+p30
+g19
sS'y'
-p32
-g20
+p31
+g19
sS'x'
-p33
+p32
g2
sS'model'
-p34
+p33
g4
sS'ot'
-p35
+p34
Ns. \ No newline at end of file
diff --git a/js/IntegerOp/SRFLIPFLOP.js b/js/IntegerOp/SRFLIPFLOP.js
index 603bf152..3ed06b83 100644
--- a/js/IntegerOp/SRFLIPFLOP.js
+++ b/js/IntegerOp/SRFLIPFLOP.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/IntegerOp/SRFLIPFLOP.sci" */
function SRFLIPFLOP() {
SRFLIPFLOP.prototype.define = function SRFLIPFLOP() {
- scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["SRFLIPFLOP"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=60,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["SRFLIPFLOP"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=60,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m.objs[1-1] = scicos_block(gui="LOGIC",graphics=scicos_graphics(orig=[298.504,201.45067],sz=[40,40],flip=true,theta=0,exprs=[["[0 1;1 0;1 0;1 0;0 1;0 1;0 0;0 0]"],["1"]],pin=[[4],[10],[12]],pout=[[3],[8]],pein=[],peout=[],gr_i=[],id="",in_implicit=[["E"],["E"],["E"]],out_implicit=[["E"],["E"]]),model=scicos_model(sim=list("logic",4),in1=[[1],[1],[1]],in2=[[1],[1],[1]],intyp=[[5],[5],[5]],out=[[1],[1]],out2=[[1],[1]],outtyp=[[5],[5]],evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(int8([[0,1],[1,0],[1,0],[1,0],[0,1],[0,1],[0,0],[0,0]])),blocktype="c",firing=false,dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[2-1] = scicos_block(gui="DOLLAR_m",graphics=scicos_graphics(orig=[299.23733,254.25067],sz=[40,40],flip=false,theta=0,exprs=[["int8(0)"],["1"]],pin=6,pout=4,pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit="E"),model=scicos_model(sim=list("dollar4_m",4),in1=1,in2=1,intyp=5,out=1,out2=1,outtyp=5,evtin=[],evtout=[],state=[],dstate=[],odstate=list(int8(0)),rpar=[],ipar=[],opar=list(),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[3-1] = scicos_link(xx=[[347.07543],[363.03733],[363.03733]],yy=[[228.11733],[228.11733],[248.584]],id="drawlink",thick=[0,0],ct=[1,1],from=[1,1,0],to=[5,1,1]);
@@ -28,7 +28,7 @@ function SRFLIPFLOP() {
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [true,false];
this.model.rpar = new ScilabDouble([scs_m]);
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,3],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -44,17 +44,17 @@ function SRFLIPFLOP() {
this.init = parseFloat(arguments[0]["init"])
this.exprs0 = arguments[0]["exprs0"]
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="DOLLAR_m") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- xx = arg1.model.rpar.objs[path-1];
- exprs = xx.graphics.exprs[1-1];
+ var newpar = list();
+ var xx = arg1.model.rpar.objs[path-1];
+ var exprs = xx.graphics.exprs[1-1];
this.model = xx.model;
- init_old = this.model.odstate[1-1];
+ var init_old = this.model.odstate[1-1];
while (true) {
[ok,this.init,this.exprs0] = scicos_getvalue([[msprintf("Set %s block parameters","SRFLIPFLOP")],[" "],["SR flip-flop"],[" "],["The \'Initial Value\' must be 0 or 1 of type int8"],["&nbsp;- Negative values are considered as int8(0)"],["&nbsp;- Positive values are considered as int8(1)"],[" "]],"Initial Value",list("vec",1),exprs);
if (!ok) {
@@ -73,14 +73,14 @@ function SRFLIPFLOP() {
break;
}
}
- needcompile = 0;
+ var needcompile = 0;
if (init_old!=this.init) {
newpar[size(newpar)+1-1] = path;
- needcompile = 2;
+ var needcompile = 2;
}
this.x = arg1;
- y = needcompile;
- typ = newpar;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Linear/BIGSOM_f.js b/js/Linear/BIGSOM_f.js
index da6a2b13..95fe10ed 100644
--- a/js/Linear/BIGSOM_f.js
+++ b/js/Linear/BIGSOM_f.js
@@ -9,8 +9,8 @@ function BIGSOM_f() {
this.model.rpar = new ScilabDouble(this.sgn);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = sci2exp(this.sgn);
- gr_i = [];
+ var exprs = sci2exp(this.sgn);
+ var gr_i = [];
this.x = standard_define([2,3],this.model,exprs,gr_i);
return new BigSom(this.x);
}
@@ -25,16 +25,19 @@ function BIGSOM_f() {
BIGSOM_f.prototype.set = function BIGSOM_f() {
this.sgn = inverse(arguments[0]["sgn"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.sgn,exprs] = scicos_getvalue("Set sum block parameters","Inputs ports signs/gain",list("vec",-1),exprs);
if (!ok) {
break;
}
- in1 = -ones(size(this.sgn,"*"),1);
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,-1,[],[]);
+ var in1 = -ones(size(this.sgn,"*"),1);
+ var tmpvar0 = check_io(this.model,graphics,in1,-1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
this.model.rpar = this.sgn.slice();
graphics.exprs = exprs;
diff --git a/js/Linear/BIGSOM_f.pickle b/js/Linear/BIGSOM_f.pickle
index d2fb8c99..a4b3bc4b 100644
--- a/js/Linear/BIGSOM_f.pickle
+++ b/js/Linear/BIGSOM_f.pickle
@@ -33,46 +33,43 @@ p9
sS'arg1'
p10
g9
-sS'[this.model,graphics,ok]'
-p11
-g4
sS'graphics.exprs'
-p12
+p11
NsS'in1'
-p13
+p12
S'double'
-p14
+p13
sS'model.rpar'
-p15
+p14
g2
sS'exprs'
-p16
+p15
g7
sS'x.model'
-p17
+p16
NsS'gr_i'
-p18
+p17
S'vector'
-p19
+p18
sS'model.dep_ut'
-p20
-g19
+p19
+g18
sS'graphics'
-p21
+p20
g9
sS'y'
-p22
-g19
+p21
+g18
sS'x'
-p23
-g14
+p22
+g13
sS'model'
-p24
+p23
g9
sS'typ'
-p25
-g19
+p24
+g18
sS'model.out'
-p26
-g14
+p25
+g13
s. \ No newline at end of file
diff --git a/js/Linear/CLINDUMMY_f.js b/js/Linear/CLINDUMMY_f.js
index db4f00c3..047efa5f 100644
--- a/js/Linear/CLINDUMMY_f.js
+++ b/js/Linear/CLINDUMMY_f.js
@@ -1,14 +1,14 @@
/* autogenerated from "macros/Linear/CLINDUMMY_f.sci" */
function CLINDUMMY_f() {
CLINDUMMY_f.prototype.define = function CLINDUMMY_f() {
- x0 = 0;
+ var x0 = 0;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["cdummy"]), new ScilabDouble([4]));
this.model.state = new ScilabDouble([x0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [false,true];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Linear/CLR.js b/js/Linear/CLR.js
index 64751b07..b4abd599 100644
--- a/js/Linear/CLR.js
+++ b/js/Linear/CLR.js
@@ -1,12 +1,12 @@
/* autogenerated from "macros/Linear/CLR.sci" */
function CLR() {
CLR.prototype.define = function CLR() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
- exprs = [["1"],["1+s"]];
+ var x0 = 0;
+ var A = -1;
+ var B = 1;
+ var C = 1;
+ var D = 0;
+ var exprs = [["1"],["1+s"]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["csslti4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -15,7 +15,7 @@ function CLR() {
this.model.rpar = new ScilabDouble([A.slice()],[B.slice()],[C.slice()],[D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -33,15 +33,15 @@ function CLR() {
this.num = arguments[0]["num"]
this.den = arguments[0]["den"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- x0 = this.model.state;
- rpar = this.model.rpar;
- ns = prod(size(x0));
- nin = 1;
- nout = 1;
- PREVAR_scicos_context = PREVAR_scicos_context;
+ var x0 = this.model.state;
+ var rpar = this.model.rpar;
+ var ns = prod(size(x0));
+ var nin = 1;
+ var nout = 1;
+ var PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.s = %s;
while (true) {
[ok,this.num,this.den,exprs] = scicos_getvalue("Set continuous SISO transfer parameters",["Numerator (s)","Denominator (s)"],list("pol",1,"pol",1),exprs);
@@ -50,24 +50,30 @@ function CLR() {
}
if (degree(this.num)>degree(this.den)) {
message("Transfer function must be proper or strictly proper.");
- ok = false;
+ var ok = false;
}
if (ok) {
- H = cont_frm(this.num,this.den);
- [A,B,C,D] = H.slice(2-1,5);
+ var H = cont_frm(this.num,this.den);
+ var tmpvar0 = H.slice(2-1,5)
+ var A = tmpvar0[0]
+ var B = tmpvar0[1]
+ var C = tmpvar0[2]
+ var D = tmpvar0[3];
graphics.exprs = exprs;
- [ns1,ns1] = size(A);
- rpar = [[matrix(A,ns1*ns1,1)],[matrix(B,ns1,1)],[matrix(C,ns1,1)],[D]];
+ var tmpvar1 = size(A)
+ var ns1 = tmpvar1[0]
+ var ns1 = tmpvar1[1];
+ var rpar = [[matrix(A,ns1*ns1,1)],[matrix(B,ns1,1)],[matrix(C,ns1,1)],[D]];
if (norm(D,1)!=0) {
- mmm = [true,true];
+ var mmm = [true,true];
} else {
- mmm = [false,true];
+ var mmm = [false,true];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
}
if (ns1<=ns) {
- x0 = x0.slice(1-1,ns1);
+ var x0 = x0.slice(1-1,ns1);
} else {
x0[ns1-1][1-1] = 0;
}
diff --git a/js/Linear/CLR.pickle b/js/Linear/CLR.pickle
index 805fede1..a0c8eaad 100644
--- a/js/Linear/CLR.pickle
+++ b/js/Linear/CLR.pickle
@@ -43,84 +43,78 @@ g8
sS'x.graphics'
p12
g2
-sS'[ns1,ns1]'
-p13
-g8
-sS'[A,B,C,D]'
-p14
-S'vector'
-p15
sS'ns'
-p16
+p13
g8
sS'A'
-p17
+p14
g8
sS'model.sim'
-p18
+p15
S'list'
-p19
+p16
sS'C'
-p20
+p17
g8
sS'PREVAR_scicos_context.s'
-p21
+p18
g8
sS'nin'
-p22
+p19
g8
sS'D'
-p23
+p20
g8
sS'H'
-p24
+p21
g8
sS'model.rpar'
-p25
+p22
g5
sS'mmm'
-p26
-g15
+p23
+S'vector'
+p24
sS'model.state'
-p27
+p25
g8
sS'graphics.exprs'
-p28
+p26
NsS'x0'
-p29
+p27
g8
sS'typ'
-p30
-g15
+p28
+g24
sS'ok'
-p31
+p29
S'boolean'
-p32
+p30
sS'model.blocktype'
-p33
+p31
S'string'
-p34
+p32
sS'model.dep_ut'
-p35
-g15
+p33
+g24
sS'exprs'
-p36
+p34
g5
sS'gr_i'
-p37
-g15
+p35
+g24
sS'PREVAR_scicos_context'
-p38
+p36
NsS'y'
-p39
-g15
+p37
+g24
sS'x'
-p40
+p38
g8
sS'model'
-p41
+p39
g2
sS'nout'
-p42
+p40
g8
s. \ No newline at end of file
diff --git a/js/Linear/CLR_f.js b/js/Linear/CLR_f.js
index d91ac6e5..d1b8d23b 100644
--- a/js/Linear/CLR_f.js
+++ b/js/Linear/CLR_f.js
@@ -1,12 +1,12 @@
/* autogenerated from "macros/Linear/CLR_f.sci" */
function CLR_f() {
CLR_f.prototype.define = function CLR_f() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
- exprs = [["1"],["1+s"]];
+ var x0 = 0;
+ var A = -1;
+ var B = 1;
+ var C = 1;
+ var D = 0;
+ var exprs = [["1"],["1+s"]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["csslti"]), new ScilabDouble([1]));
this.model.in1 = new ScilabDouble([1]);
@@ -15,7 +15,7 @@ function CLR_f() {
this.model.rpar = new ScilabDouble([A.slice()],[B.slice()],[C.slice()],[D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2.5,2.5],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -33,15 +33,15 @@ function CLR_f() {
this.num = arguments[0]["num"]
this.den = arguments[0]["den"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- x0 = this.model.state;
- rpar = this.model.rpar;
- ns = prod(size(x0));
- nin = 1;
- nout = 1;
- PREVAR_scicos_context = PREVAR_scicos_context;
+ var x0 = this.model.state;
+ var rpar = this.model.rpar;
+ var ns = prod(size(x0));
+ var nin = 1;
+ var nout = 1;
+ var PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.s = %s;
while (true) {
[ok,this.num,this.den,exprs] = scicos_getvalue("Set continuous SISO transfer parameters",["Numerator (s)","Denominator (s)"],list("pol",1,"pol",1),exprs);
@@ -50,24 +50,30 @@ function CLR_f() {
}
if (degree(this.num)>degree(this.den)) {
message("Transfer must be proper or strictly proper");
- ok = false;
+ var ok = false;
}
if (ok) {
- H = cont_frm(this.num,this.den);
- [A,B,C,D] = H.slice(2-1,5);
+ var H = cont_frm(this.num,this.den);
+ var tmpvar0 = H.slice(2-1,5)
+ var A = tmpvar0[0]
+ var B = tmpvar0[1]
+ var C = tmpvar0[2]
+ var D = tmpvar0[3];
graphics.exprs = exprs;
- [ns1,ns1] = size(A);
- rpar = [[matrix(A,ns1*ns1,1)],[matrix(B,ns1,1)],[matrix(C,ns1,1)],[D]];
+ var tmpvar1 = size(A)
+ var ns1 = tmpvar1[0]
+ var ns1 = tmpvar1[1];
+ var rpar = [[matrix(A,ns1*ns1,1)],[matrix(B,ns1,1)],[matrix(C,ns1,1)],[D]];
if (norm(D,1)!=0) {
- mmm = [true,true];
+ var mmm = [true,true];
} else {
- mmm = [false,true];
+ var mmm = [false,true];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
}
if (ns1<=ns) {
- x0 = x0.slice(1-1,ns1);
+ var x0 = x0.slice(1-1,ns1);
} else {
x0[ns1-1][1-1] = 0;
}
diff --git a/js/Linear/CLR_f.pickle b/js/Linear/CLR_f.pickle
index 805fede1..a0c8eaad 100644
--- a/js/Linear/CLR_f.pickle
+++ b/js/Linear/CLR_f.pickle
@@ -43,84 +43,78 @@ g8
sS'x.graphics'
p12
g2
-sS'[ns1,ns1]'
-p13
-g8
-sS'[A,B,C,D]'
-p14
-S'vector'
-p15
sS'ns'
-p16
+p13
g8
sS'A'
-p17
+p14
g8
sS'model.sim'
-p18
+p15
S'list'
-p19
+p16
sS'C'
-p20
+p17
g8
sS'PREVAR_scicos_context.s'
-p21
+p18
g8
sS'nin'
-p22
+p19
g8
sS'D'
-p23
+p20
g8
sS'H'
-p24
+p21
g8
sS'model.rpar'
-p25
+p22
g5
sS'mmm'
-p26
-g15
+p23
+S'vector'
+p24
sS'model.state'
-p27
+p25
g8
sS'graphics.exprs'
-p28
+p26
NsS'x0'
-p29
+p27
g8
sS'typ'
-p30
-g15
+p28
+g24
sS'ok'
-p31
+p29
S'boolean'
-p32
+p30
sS'model.blocktype'
-p33
+p31
S'string'
-p34
+p32
sS'model.dep_ut'
-p35
-g15
+p33
+g24
sS'exprs'
-p36
+p34
g5
sS'gr_i'
-p37
-g15
+p35
+g24
sS'PREVAR_scicos_context'
-p38
+p36
NsS'y'
-p39
-g15
+p37
+g24
sS'x'
-p40
+p38
g8
sS'model'
-p41
+p39
g2
sS'nout'
-p42
+p40
g8
s. \ No newline at end of file
diff --git a/js/Linear/CLSS.js b/js/Linear/CLSS.js
index 679b0e73..d5fd2d3a 100644
--- a/js/Linear/CLSS.js
+++ b/js/Linear/CLSS.js
@@ -6,8 +6,8 @@ function CLSS() {
this.B = 1;
this.C = 1;
this.D = 0;
- in1 = 1;
- out = 1;
+ var in1 = 1;
+ var out = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["csslti4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1]);
@@ -16,8 +16,8 @@ function CLSS() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -41,10 +41,10 @@ function CLSS() {
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==7) {
- exprs = exprs[[1:4,7]-1];
+ var exprs = exprs[[1:4,7]-1];
}
this.model = arg1.model;
while (true) {
@@ -52,37 +52,42 @@ function CLSS() {
if (!ok) {
break;
}
- out = size(this.C,1);
+ var out = size(this.C,1);
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = size(this.B,2);
+ var in1 = size(this.B,2);
if (in1==0) {
- in1 = [];
+ var in1 = [];
}
- [ms,ns] = size(this.A);
- okD = true;
+ var tmpvar0 = size(this.A)
+ var ms = tmpvar0[0]
+ var ns = tmpvar0[1];
+ var okD = true;
if (size(this.D,"*")!=size(this.C,1)*size(this.B,2)) {
if (size(this.D,"*")==1) {
this.D = this.D*ones(this.C*this.B);
} else if (size(this.D,"*")==0) {
this.D = zeros(this.C*this.B);
} else {
- okD = false;
+ var okD = false;
}
}
if (ms!=ns||!okD) {
message(_("Matrix A is not square or D has wrong dimension"));
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,out,[],[]);
+ var tmpvar1 = check_io(this.model,graphics,in1,out,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
- rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
- mmm = [true,true];
+ var mmm = [true,true];
} else {
- mmm = [false,true];
+ var mmm = [false,true];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
diff --git a/js/Linear/CLSS.pickle b/js/Linear/CLSS.pickle
index 4f321577..321fe50f 100644
--- a/js/Linear/CLSS.pickle
+++ b/js/Linear/CLSS.pickle
@@ -33,87 +33,81 @@ p5
sS'x.model'
p6
g2
-sS'[ms,ns]'
+sS'model.out'
p7
S'double'
p8
-sS'model.out'
-p9
-g8
sS'out'
-p10
+p9
g8
sS'model.in1'
-p11
+p10
g8
sS'x.graphics'
-p12
+p11
g2
sS'A'
-p13
+p12
g8
sS'model.sim'
-p14
+p13
S'list'
-p15
+p14
sS'C'
-p16
+p15
g8
sS'B'
-p17
+p16
g8
sS'D'
-p18
+p17
g8
-sS'[this.model,graphics,ok]'
-p19
-g15
sS'in1'
-p20
+p18
g8
sS'model.rpar'
-p21
+p19
g5
sS'mmm'
-p22
+p20
S'vector'
-p23
+p21
sS'model.state'
-p24
+p22
g8
sS'graphics.exprs'
-p25
+p23
g8
sS'x0'
-p26
+p24
g8
sS'typ'
-p27
-g23
+p25
+g21
sS'model.blocktype'
-p28
+p26
S'string'
-p29
+p27
sS'model.dep_ut'
-p30
-g23
+p28
+g21
sS'exprs'
-p31
+p29
g5
sS'gr_i'
-p32
-g23
+p30
+g21
sS'okD'
-p33
+p31
S'boolean'
-p34
+p32
sS'y'
-p35
-g23
+p33
+g21
sS'x'
-p36
+p34
g8
sS'model'
-p37
+p35
g2
s. \ No newline at end of file
diff --git a/js/Linear/CLSS_f.js b/js/Linear/CLSS_f.js
index 77ee0162..f6afb7fb 100644
--- a/js/Linear/CLSS_f.js
+++ b/js/Linear/CLSS_f.js
@@ -6,8 +6,8 @@ function CLSS_f() {
this.B = 1;
this.C = 1;
this.D = 0;
- in1 = 1;
- out = 1;
+ var in1 = 1;
+ var out = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["csslti"]), new ScilabDouble([1]));
this.model.in1 = new ScilabDouble([in1]);
@@ -16,8 +16,8 @@ function CLSS_f() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -41,10 +41,10 @@ function CLSS_f() {
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==7) {
- exprs = exprs[[1:4,7]-1];
+ var exprs = exprs[[1:4,7]-1];
}
this.model = arg1.model;
while (true) {
@@ -52,27 +52,32 @@ function CLSS_f() {
if (!ok) {
break;
}
- out = size(this.C,1);
+ var out = size(this.C,1);
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = size(this.B,2);
+ var in1 = size(this.B,2);
if (in1==0) {
- in1 = [];
+ var in1 = [];
}
- [ms,ns] = size(this.A);
+ var tmpvar0 = size(this.A)
+ var ms = tmpvar0[0]
+ var ns = tmpvar0[1];
if (ms!=ns) {
message("A matrix must be square");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,out,[],[]);
+ var tmpvar1 = check_io(this.model,graphics,in1,out,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
- rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
- mmm = [true,true];
+ var mmm = [true,true];
} else {
- mmm = [false,true];
+ var mmm = [false,true];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
diff --git a/js/Linear/CLSS_f.pickle b/js/Linear/CLSS_f.pickle
index 09fdffb3..5800baa1 100644
--- a/js/Linear/CLSS_f.pickle
+++ b/js/Linear/CLSS_f.pickle
@@ -33,83 +33,77 @@ p5
sS'x.model'
p6
g2
-sS'model.dep_ut'
-p7
-S'vector'
-p8
sS'model.out'
-p9
+p7
S'double'
-p10
+p8
sS'out'
-p11
-g10
+p9
+g8
sS'model.in1'
-p12
-g10
+p10
+g8
sS'x.graphics'
-p13
+p11
g2
sS'A'
-p14
-g10
+p12
+g8
sS'model.sim'
-p15
+p13
S'list'
-p16
+p14
sS'C'
-p17
-g10
+p15
+g8
sS'B'
-p18
-g10
+p16
+g8
sS'D'
-p19
-g10
-sS'[this.model,graphics,ok]'
-p20
-g16
+p17
+g8
sS'in1'
-p21
-g10
+p18
+g8
sS'model.rpar'
-p22
+p19
g5
sS'mmm'
+p20
+S'vector'
+p21
+sS'model.state'
+p22
+g8
+sS'graphics.exprs'
p23
g8
-sS'model.state'
+sS'x0'
p24
-g10
-sS'graphics.exprs'
+g8
+sS'typ'
p25
-g10
-sS'x0'
+g21
+sS'model.blocktype'
p26
-g10
-sS'typ'
+S'string'
p27
-g8
-sS'model.blocktype'
+sS'model.dep_ut'
p28
-S'string'
-p29
-sS'[ms,ns]'
-p30
-g10
+g21
sS'exprs'
-p31
+p29
g5
sS'gr_i'
-p32
-g8
+p30
+g21
sS'y'
-p33
-g8
+p31
+g21
sS'x'
-p34
-g10
+p32
+g8
sS'model'
-p35
+p33
g2
s. \ No newline at end of file
diff --git a/js/Linear/DELAYV_f.js b/js/Linear/DELAYV_f.js
index e8b2de09..0cfbfc4d 100644
--- a/js/Linear/DELAYV_f.js
+++ b/js/Linear/DELAYV_f.js
@@ -2,7 +2,7 @@
function DELAYV_f() {
DELAYV_f.prototype.define = function DELAYV_f() {
this.nin = 1;
- z0 = zeros(11,1);
+ var z0 = zeros(11,1);
this.zz0 = z0.slice(1-1,$-1);
this.T = 1;
this.model = scicos_model();
@@ -16,8 +16,8 @@ function DELAYV_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [0,-1];
this.model.dep_ut = [true,false];
- exprs = [[string(this.nin)],[strcat(string(z0.slice(1-1,$-1)),";")],[string(this.T)]];
- gr_i = [];
+ var exprs = [[string(this.nin)],[strcat(string(z0.slice(1-1,$-1)),";")],[string(this.T)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -37,13 +37,13 @@ function DELAYV_f() {
this.zz0 = inverse(arguments[0]["zz0"])
this.T = parseFloat(arguments[0]["T"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
this.nin = this.model.in1[1-1];
- z0 = this.model.dstate;
+ var z0 = this.model.dstate;
this.zz0 = z0.slice(1-1,$-1);
- told = z0[$-1];
+ var told = z0[$-1];
while (true) {
[ok,this.nin,this.zz0,this.T,exprs] = scicos_getvalue("Set delay parameters",["Number of inputs","Register initial condition","Max delay"],list("vec",1,"vec",-1,"vec",1),exprs);
if (!ok) {
@@ -51,14 +51,17 @@ function DELAYV_f() {
}
if (size(this.zz0,"*")<2) {
message("Register length must be at least 2");
- ok = false;
+ var ok = false;
}
if (this.T<=0) {
message("Delay must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,[[this.nin],[1]],this.nin,1,[[1],[1]]);
+ var tmpvar0 = check_io(this.model,graphics,[[this.nin],[1]],this.nin,1,[[1],[1]])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/DELAYV_f.pickle b/js/Linear/DELAYV_f.pickle
index e6e095e1..caf0384e 100644
--- a/js/Linear/DELAYV_f.pickle
+++ b/js/Linear/DELAYV_f.pickle
@@ -65,44 +65,41 @@ g11
sS'nin'
p20
g2
-sS'[this.model,graphics,ok]'
-p21
-g18
sS'model.rpar'
-p22
+p21
g2
sS'T'
-p23
+p22
g2
sS'graphics.exprs'
-p24
+p23
NsS'z0'
-p25
+p24
g2
sS'ok'
-p26
+p25
S'boolean'
-p27
+p26
sS'model.blocktype'
-p28
+p27
S'string'
-p29
+p28
sS'model.dep_ut'
-p30
+p29
g7
sS'exprs'
-p31
+p30
g11
sS'gr_i'
-p32
+p31
g7
sS'y'
-p33
+p32
g7
sS'x'
-p34
+p33
g2
sS'model'
-p35
+p34
g4
s. \ No newline at end of file
diff --git a/js/Linear/DELAY_f.js b/js/Linear/DELAY_f.js
index 129377bb..dad5fa7c 100644
--- a/js/Linear/DELAY_f.js
+++ b/js/Linear/DELAY_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Linear/DELAY_f.sci" */
function DELAY_f() {
DELAY_f.prototype.define = function DELAY_f() {
- evtdly = EVTDLY_f("define");
+ var evtdly = EVTDLY_f("define");
evtdly.graphics.orig = [243,296];
evtdly.graphics.sz = [40,40];
evtdly.graphics.flip = true;
@@ -10,7 +10,7 @@ function DELAY_f() {
evtdly.graphics.peout = 7;
evtdly.model.rpar = 0.1;
evtdly.model.firing = 0;
- register = REGISTER_f("define");
+ var register = REGISTER_f("define");
register.graphics.orig = [238,195];
register.graphics.sz = [50,50];
register.graphics.flip = true;
@@ -18,25 +18,25 @@ function DELAY_f() {
register.graphics.pin = 6;
register.graphics.pout = 5;
register.graphics.pein = 9;
- input_port = IN_f("define");
+ var input_port = IN_f("define");
input_port.graphics.orig = [92,210];
input_port.graphics.sz = [20,20];
input_port.graphics.flip = true;
input_port.graphics.exprs = [["1"],["1"]];
input_port.graphics.pout = 6;
input_port.model.ipar = 1;
- output_port = OUT_f("define");
+ var output_port = OUT_f("define");
output_port.graphics.orig = [440,210];
output_port.graphics.sz = [20,20];
output_port.graphics.flip = true;
output_port.graphics.exprs = [["1"],["1"]];
output_port.graphics.pin = 5;
output_port.model.ipar = 1;
- split = CLKSPLIT_f("define");
+ var split = CLKSPLIT_f("define");
split.graphics.orig = [[263],[271.2]];
split.graphics.pein = 7;
split.graphics.peout = [[9],[10]];
- diagram = scicos_diagram();
+ var diagram = scicos_diagram();
diagram.objs[1-1] = input_port;
diagram.objs[2-1] = output_port;
diagram.objs[3-1] = register;
@@ -78,9 +78,9 @@ function DELAY_f() {
DELAY_f.prototype.set = function DELAY_f() {
this.dt = arguments[0]["dt"]
this.z0 = arguments[0]["z0"]
- ppath = list(0,0);
+ var ppath = list(0,0);
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="REGISTER_f") {
ppath[1-1] = i;
}
@@ -92,25 +92,25 @@ function DELAY_f() {
}
}
this.x = arg1;
- newpar = list();
- register = this.x.model.rpar.objs[ppath[1-1]-1];
- evtdly = this.x.model.rpar.objs[ppath[2-1]-1];
- register_exprs = register.graphics.exprs;
- evtdly_exprs = evtdly.graphics.exprs;
- exprs = [[evtdly_exprs[1-1]],[register_exprs]];
+ var newpar = list();
+ var register = this.x.model.rpar.objs[ppath[1-1]-1];
+ var evtdly = this.x.model.rpar.objs[ppath[2-1]-1];
+ var register_exprs = register.graphics.exprs;
+ var evtdly_exprs = evtdly.graphics.exprs;
+ var exprs = [[evtdly_exprs[1-1]],[register_exprs]];
while (true) {
[ok,this.dt,this.z0,exprs] = scicos_getvalue([["This block implements as a discretized delay"],["it is consist of a shift register and a clock"],["value of the delay is given by;","the discretization time step multiplied by the"],["number-1 of state of the register"]],["Discretization time step","Register initial state"],list("vec",1,"vec",-1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (prod(size(this.z0))<1) {
- mess = [[mess],["Register length must be at least 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Register length must be at least 1"],[" "]];
+ var ok = false;
}
if (this.dt<=0) {
- mess = [[mess],["Discretization time step must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Discretization time step must be positive"],[" "]];
+ var ok = false;
}
if (!ok) {
message(mess);
@@ -130,9 +130,9 @@ function DELAY_f() {
break;
}
}
- needcompile = 0;
- y = needcompile;
- typ = newpar;
+ var needcompile = 0;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Linear/DERIV.js b/js/Linear/DERIV.js
index 127b74fa..853643e7 100644
--- a/js/Linear/DERIV.js
+++ b/js/Linear/DERIV.js
@@ -7,8 +7,8 @@ function DERIV() {
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["x"]);
this.model.dep_ut = [true,false];
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Linear/DIFF_c.js b/js/Linear/DIFF_c.js
index f1a45eeb..f8d77168 100644
--- a/js/Linear/DIFF_c.js
+++ b/js/Linear/DIFF_c.js
@@ -9,8 +9,8 @@ function DIFF_c() {
this.model.state = new ScilabDouble(this.x0);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -28,26 +28,26 @@ function DIFF_c() {
this.x0 = inverse(arguments[0]["x0"])
this.xd0 = inverse(arguments[0]["xd0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
- ask_again = false;
+ var ask_again = false;
[ok,this.x0,this.xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",["Initial state","Initial Derivative"],list("vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
this.x0 = this.x0.slice();
- N = size(this.x0,"*");
+ var N = size(this.x0,"*");
this.xd0 = this.xd0.slice();
- Nxd = size(this.xd0,"*");
+ var Nxd = size(this.xd0,"*");
if ((N!=Nxd)) {
message("Incompatible sizes: states and their derivatives should have the same size ");
- ask_again = true;
+ var ask_again = true;
}
if ((N<=0&&!ask_again)) {
x_message("number of states must be > 0 ");
- ask_again = true;
+ var ask_again = true;
}
if (!ask_again) {
graphics.exprs = exprs;
diff --git a/js/Linear/DLR.js b/js/Linear/DLR.js
index 96fe4163..8c4d3f0e 100644
--- a/js/Linear/DLR.js
+++ b/js/Linear/DLR.js
@@ -1,12 +1,12 @@
/* autogenerated from "macros/Linear/DLR.sci" */
function DLR() {
DLR.prototype.define = function DLR() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
- exprs = [["1"],["1+z"]];
+ var x0 = 0;
+ var A = -1;
+ var B = 1;
+ var C = 1;
+ var D = 0;
+ var exprs = [["1"],["1+z"]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["dsslti4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -16,7 +16,7 @@ function DLR() {
this.model.rpar = new ScilabDouble([A.slice()],[B.slice()],[C.slice()],[D.slice()]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,12 +34,12 @@ function DLR() {
this.num = arguments[0]["num"]
this.den = arguments[0]["den"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- x0 = this.model.dstate;
- ns = prod(size(x0));
- PREVAR_scicos_context = PREVAR_scicos_context;
+ var x0 = this.model.dstate;
+ var ns = prod(size(x0));
+ var PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.z = %z;
while (true) {
[ok,this.num,this.den,exprs] = scicos_getvalue("Set discrete SISO transfer parameters",["Numerator (z)","Denominator (z)"],list("pol",1,"pol",1),exprs);
@@ -48,25 +48,31 @@ function DLR() {
}
if (degree(this.num)>degree(this.den)) {
message("Transfer function must be proper");
- ok = false;
+ var ok = false;
}
if (ok) {
- H = cont_frm(this.num,this.den);
- [A,B,C,D] = H.slice(2-1,5);
+ var H = cont_frm(this.num,this.den);
+ var tmpvar0 = H.slice(2-1,5)
+ var A = tmpvar0[0]
+ var B = tmpvar0[1]
+ var C = tmpvar0[2]
+ var D = tmpvar0[3];
graphics.exprs = exprs;
- [ns1,ns1] = size(A);
+ var tmpvar1 = size(A)
+ var ns1 = tmpvar1[0]
+ var ns1 = tmpvar1[1];
if (ns1<=ns) {
- x0 = x0.slice(1-1,ns1);
+ var x0 = x0.slice(1-1,ns1);
} else {
x0[ns1-1][1-1] = 0;
}
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ var rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
this.model.dstate = x0;
this.model.rpar = new ScilabDouble(rpar);
if (norm(D,1)!=0) {
- mmm = [true,false];
+ var mmm = [true,false];
} else {
- mmm = [false,false];
+ var mmm = [false,false];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
diff --git a/js/Linear/DLR.pickle b/js/Linear/DLR.pickle
index 34bf03b2..8a5f2aa6 100644
--- a/js/Linear/DLR.pickle
+++ b/js/Linear/DLR.pickle
@@ -47,80 +47,74 @@ g2
sS'x.graphics'
p14
g4
-sS'[ns1,ns1]'
-p15
-g10
-sS'[A,B,C,D]'
-p16
-g2
sS'model.evtin'
-p17
+p15
g10
sS'ns'
-p18
+p16
g10
sS'A'
-p19
+p17
g10
sS'model.sim'
-p20
+p18
S'list'
-p21
+p19
sS'C'
-p22
+p20
g10
sS'B'
-p23
+p21
g10
sS'D'
-p24
+p22
g10
sS'H'
-p25
+p23
g10
sS'PREVAR_scicos_context.z'
-p26
+p24
g10
sS'model.rpar'
-p27
+p25
g7
sS'mmm'
-p28
+p26
g2
sS'graphics.exprs'
-p29
+p27
NsS'x0'
-p30
+p28
g10
sS'typ'
-p31
+p29
g2
sS'ok'
-p32
+p30
S'boolean'
-p33
+p31
sS'model.blocktype'
-p34
+p32
S'string'
-p35
+p33
sS'model.dep_ut'
-p36
+p34
g2
sS'exprs'
-p37
+p35
g7
sS'gr_i'
-p38
+p36
g2
sS'PREVAR_scicos_context'
-p39
+p37
NsS'y'
-p40
+p38
g2
sS'x'
-p41
+p39
g10
sS'model'
-p42
+p40
g4
s. \ No newline at end of file
diff --git a/js/Linear/DLR_f.js b/js/Linear/DLR_f.js
index 801be7cb..0306a6d9 100644
--- a/js/Linear/DLR_f.js
+++ b/js/Linear/DLR_f.js
@@ -1,12 +1,12 @@
/* autogenerated from "macros/Linear/DLR_f.sci" */
function DLR_f() {
DLR_f.prototype.define = function DLR_f() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
- exprs = [["1"],["1+z"]];
+ var x0 = 0;
+ var A = -1;
+ var B = 1;
+ var C = 1;
+ var D = 0;
+ var exprs = [["1"],["1+z"]];
this.model = scicos_model();
this.model.sim = new ScilabString(["dsslti"]);
this.model.in1 = new ScilabDouble([1]);
@@ -16,7 +16,7 @@ function DLR_f() {
this.model.rpar = new ScilabDouble([A.slice()],[B.slice()],[C.slice()],[D.slice()]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2.5,2.5],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,12 +34,12 @@ function DLR_f() {
this.num = arguments[0]["num"]
this.den = arguments[0]["den"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- x0 = this.model.dstate;
- ns = prod(size(x0));
- PREVAR_scicos_context = PREVAR_scicos_context;
+ var x0 = this.model.dstate;
+ var ns = prod(size(x0));
+ var PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.z = %z;
while (true) {
[ok,this.num,this.den,exprs] = scicos_getvalue("Set discrete SISO transfer parameters",["Numerator (z)","Denominator (z)"],list("pol",1,"pol",1),exprs);
@@ -48,25 +48,31 @@ function DLR_f() {
}
if (degree(this.num)>degree(this.den)) {
message("Transfer must be proper");
- ok = false;
+ var ok = false;
}
if (ok) {
- H = cont_frm(this.num,this.den);
- [A,B,C,D] = H.slice(2-1,5);
+ var H = cont_frm(this.num,this.den);
+ var tmpvar0 = H.slice(2-1,5)
+ var A = tmpvar0[0]
+ var B = tmpvar0[1]
+ var C = tmpvar0[2]
+ var D = tmpvar0[3];
graphics.exprs = exprs;
- [ns1,ns1] = size(A);
+ var tmpvar1 = size(A)
+ var ns1 = tmpvar1[0]
+ var ns1 = tmpvar1[1];
if (ns1<=ns) {
- x0 = x0.slice(1-1,ns1);
+ var x0 = x0.slice(1-1,ns1);
} else {
x0[ns1-1][1-1] = 0;
}
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ var rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
this.model.dstate = x0;
this.model.rpar = new ScilabDouble(rpar);
if (norm(D,1)!=0) {
- mmm = [true,false];
+ var mmm = [true,false];
} else {
- mmm = [false,false];
+ var mmm = [false,false];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
diff --git a/js/Linear/DLR_f.pickle b/js/Linear/DLR_f.pickle
index 5646a5ed..44d413c7 100644
--- a/js/Linear/DLR_f.pickle
+++ b/js/Linear/DLR_f.pickle
@@ -47,79 +47,73 @@ g2
sS'x.graphics'
p14
g4
-sS'[ns1,ns1]'
-p15
-g10
-sS'[A,B,C,D]'
-p16
-g2
sS'model.evtin'
-p17
+p15
g10
sS'ns'
-p18
+p16
g10
sS'A'
-p19
+p17
g10
sS'model.sim'
-p20
+p18
S'string'
-p21
+p19
sS'C'
-p22
+p20
g10
sS'B'
-p23
+p21
g10
sS'D'
-p24
+p22
g10
sS'H'
-p25
+p23
g10
sS'PREVAR_scicos_context.z'
-p26
+p24
g10
sS'model.rpar'
-p27
+p25
g7
sS'mmm'
-p28
+p26
g2
sS'graphics.exprs'
-p29
+p27
NsS'x0'
-p30
+p28
g10
sS'typ'
-p31
+p29
g2
sS'ok'
-p32
+p30
S'boolean'
-p33
+p31
sS'model.blocktype'
-p34
-g21
+p32
+g19
sS'model.dep_ut'
-p35
+p33
g2
sS'exprs'
-p36
+p34
g7
sS'gr_i'
-p37
+p35
g2
sS'PREVAR_scicos_context'
-p38
+p36
NsS'y'
-p39
+p37
g2
sS'x'
-p40
+p38
g10
sS'model'
-p41
+p39
g4
s. \ No newline at end of file
diff --git a/js/Linear/DLSS.js b/js/Linear/DLSS.js
index 49becba3..69f34f7c 100644
--- a/js/Linear/DLSS.js
+++ b/js/Linear/DLSS.js
@@ -15,8 +15,8 @@ function DLSS() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -40,10 +40,10 @@ function DLSS() {
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==7) {
- exprs = exprs[[1:4,7]-1];
+ var exprs = exprs[[1:4,7]-1];
}
this.model = arg1.model;
while (true) {
@@ -51,37 +51,42 @@ function DLSS() {
if (!ok) {
break;
}
- out = size(this.C,1);
+ var out = size(this.C,1);
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = size(this.B,2);
+ var in1 = size(this.B,2);
if (in1==0) {
- in1 = [];
+ var in1 = [];
}
- [ms,ns] = size(this.A);
- okD = true;
+ var tmpvar0 = size(this.A)
+ var ms = tmpvar0[0]
+ var ns = tmpvar0[1];
+ var okD = true;
if (size(this.D,"*")!=size(this.C,1)*size(this.B,2)) {
if (size(this.D,"*")==1) {
this.D = this.D*ones(this.C*this.B);
} else if (size(this.D,"*")==0) {
this.D = zeros(this.C*this.B);
} else {
- okD = false;
+ var okD = false;
}
}
if (ms!=ns||!okD) {
message(_("Matrix A is not square or D has wrong dimension"));
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,out,1,[]);
+ var tmpvar1 = check_io(this.model,graphics,in1,out,1,[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
- rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
- mmm = [true,false];
+ var mmm = [true,false];
} else {
- mmm = [false,false];
+ var mmm = [false,false];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
diff --git a/js/Linear/DLSS.pickle b/js/Linear/DLSS.pickle
index 52fc31ec..2dfb7e72 100644
--- a/js/Linear/DLSS.pickle
+++ b/js/Linear/DLSS.pickle
@@ -37,86 +37,80 @@ p7
sS'x.model'
p8
g4
-sS'[ms,ns]'
+sS'model.out'
p9
S'double'
p10
-sS'model.out'
-p11
-g10
sS'out'
-p12
+p11
g2
sS'model.in1'
-p13
+p12
g10
sS'x.graphics'
-p14
+p13
g4
sS'model.evtin'
-p15
+p14
g10
sS'A'
-p16
+p15
g10
sS'model.sim'
-p17
+p16
S'list'
-p18
+p17
sS'C'
-p19
+p18
g10
sS'B'
-p20
+p19
g10
sS'D'
-p21
+p20
g10
-sS'[this.model,graphics,ok]'
-p22
-g18
sS'in1'
-p23
+p21
g2
sS'model.rpar'
-p24
+p22
g7
sS'mmm'
-p25
+p23
g2
sS'graphics.exprs'
-p26
+p24
g10
sS'x0'
-p27
+p25
g10
sS'typ'
-p28
+p26
g2
sS'model.blocktype'
-p29
+p27
S'string'
-p30
+p28
sS'model.dep_ut'
-p31
+p29
g2
sS'exprs'
-p32
+p30
g7
sS'gr_i'
-p33
+p31
g2
sS'okD'
-p34
+p32
S'boolean'
-p35
+p33
sS'y'
-p36
+p34
g2
sS'x'
-p37
+p35
g10
sS'model'
-p38
+p36
g4
s. \ No newline at end of file
diff --git a/js/Linear/DLSS_f.js b/js/Linear/DLSS_f.js
index 409916ab..81a76895 100644
--- a/js/Linear/DLSS_f.js
+++ b/js/Linear/DLSS_f.js
@@ -15,8 +15,8 @@ function DLSS_f() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -40,10 +40,10 @@ function DLSS_f() {
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==7) {
- exprs = exprs[[1:4,7]-1];
+ var exprs = exprs[[1:4,7]-1];
}
this.model = arg1.model;
while (true) {
@@ -51,27 +51,32 @@ function DLSS_f() {
if (!ok) {
break;
}
- out = size(this.C,1);
+ var out = size(this.C,1);
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = size(this.B,2);
+ var in1 = size(this.B,2);
if (in1==0) {
- in1 = [];
+ var in1 = [];
}
- [ms,ns] = size(this.A);
+ var tmpvar0 = size(this.A)
+ var ms = tmpvar0[0]
+ var ns = tmpvar0[1];
if (ms!=ns) {
message("A matrix must be square");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,out,1,[]);
+ var tmpvar1 = check_io(this.model,graphics,in1,out,1,[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
- rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
- mmm = [true,false];
+ var mmm = [true,false];
} else {
- mmm = [false,false];
+ var mmm = [false,false];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
diff --git a/js/Linear/DLSS_f.pickle b/js/Linear/DLSS_f.pickle
index cd25ebe9..c8c627de 100644
--- a/js/Linear/DLSS_f.pickle
+++ b/js/Linear/DLSS_f.pickle
@@ -37,82 +37,76 @@ p7
sS'x.model'
p8
g4
-sS'model.dep_ut'
-p9
-g2
sS'model.out'
-p10
+p9
S'double'
-p11
+p10
sS'out'
-p12
+p11
g2
sS'model.in1'
-p13
-g11
+p12
+g10
sS'x.graphics'
-p14
+p13
g4
sS'model.evtin'
-p15
-g11
+p14
+g10
sS'A'
-p16
-g11
+p15
+g10
sS'model.sim'
-p17
+p16
S'list'
-p18
+p17
sS'C'
-p19
-g11
+p18
+g10
sS'B'
-p20
-g11
+p19
+g10
sS'D'
-p21
-g11
-sS'[this.model,graphics,ok]'
-p22
-g18
+p20
+g10
sS'in1'
-p23
+p21
g2
sS'model.rpar'
-p24
+p22
g7
sS'mmm'
-p25
+p23
g2
sS'graphics.exprs'
-p26
-g11
+p24
+g10
sS'x0'
-p27
-g11
+p25
+g10
sS'typ'
-p28
+p26
g2
sS'model.blocktype'
-p29
+p27
S'string'
-p30
-sS'[ms,ns]'
-p31
-g11
+p28
+sS'model.dep_ut'
+p29
+g2
sS'exprs'
-p32
+p30
g7
sS'gr_i'
-p33
+p31
g2
sS'y'
-p34
+p32
g2
sS'x'
-p35
-g11
+p33
+g10
sS'model'
-p36
+p34
g4
s. \ No newline at end of file
diff --git a/js/Linear/DOLLAR.js b/js/Linear/DOLLAR.js
index 960f1660..c92f7138 100644
--- a/js/Linear/DOLLAR.js
+++ b/js/Linear/DOLLAR.js
@@ -1,10 +1,10 @@
/* autogenerated from "macros/Linear/DOLLAR.sci" */
function DOLLAR() {
DOLLAR.prototype.define = function DOLLAR() {
- z = 0;
+ var z = 0;
this.inh = 0;
- in1 = 1;
- exprs = string([[z],[this.inh]]);
+ var in1 = 1;
+ var exprs = string([[z],[this.inh]]);
this.model = scicos_model();
this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1]);
@@ -13,7 +13,7 @@ function DOLLAR() {
this.model.dstate = new ScilabDouble([z]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -31,8 +31,8 @@ function DOLLAR() {
this.a = arguments[0]["a"]
this.inh = parseFloat(arguments[0]["inh"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")<2) {
exprs[2-1] = "0";
@@ -42,51 +42,54 @@ function DOLLAR() {
if (!ok) {
break;
}
- out = [size(this.a,1),size(this.a,2)];
+ var out = [size(this.a,1),size(this.a,2)];
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = out;
+ var in1 = out;
this.model.sim = list(new ScilabString(["dollar4_m"]), new ScilabDouble([4]));
this.model.odstate = list(new ScilabDouble([this.a]));
this.model.dstate = [];
if (this.type[(this.a)==1-1]) {
if (isreal(this.a)) {
- it = 1;
- ot = 1;
+ var it = 1;
+ var ot = 1;
if ((size(this.a,1)==1||size(this.a,2)==1)) {
this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4]));
this.model.dstate = this.a.slice();
this.model.odstate = list();
}
} else {
- it = 2;
- ot = 2;
+ var it = 2;
+ var ot = 2;
}
} else if ((typeof(this.a)=="int32")) {
- it = 3;
- ot = 3;
+ var it = 3;
+ var ot = 3;
} else if ((typeof(this.a)=="int16")) {
- it = 4;
- ot = 4;
+ var it = 4;
+ var ot = 4;
} else if ((typeof(this.a)=="int8")) {
- it = 5;
- ot = 5;
+ var it = 5;
+ var ot = 5;
} else if ((typeof(this.a)=="uint32")) {
- it = 6;
- ot = 6;
+ var it = 6;
+ var ot = 6;
} else if ((typeof(this.a)=="uint16")) {
- it = 7;
- ot = 7;
+ var it = 7;
+ var ot = 7;
} else if ((typeof(this.a)=="uint8")) {
- it = 8;
- ot = 8;
+ var it = 8;
+ var ot = 8;
} else {
message("type is not recognized");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/DOLLAR.pickle b/js/Linear/DOLLAR.pickle
index f1752657..032d6ef5 100644
--- a/js/Linear/DOLLAR.pickle
+++ b/js/Linear/DOLLAR.pickle
@@ -61,46 +61,43 @@ p18
sS'model.sim'
p19
g2
-sS'[this.model,graphics,ok]'
-p20
-g4
sS'in1'
-p21
+p20
g4
sS'graphics.exprs'
-p22
+p21
NsS'typ'
-p23
+p22
g13
sS'ot'
-p24
+p23
g4
sS'ok'
-p25
+p24
S'boolean'
-p26
+p25
sS'model.blocktype'
-p27
+p26
g18
sS'model.dep_ut'
-p28
+p27
g13
sS'exprs'
-p29
+p28
g18
sS'gr_i'
-p30
+p29
g13
sS'y'
-p31
+p30
g13
sS'x'
-p32
+p31
g4
sS'model'
-p33
+p32
g6
sS'z'
-p34
+p33
g4
s. \ No newline at end of file
diff --git a/js/Linear/DOLLAR_f.js b/js/Linear/DOLLAR_f.js
index daf7ecc1..843477e9 100644
--- a/js/Linear/DOLLAR_f.js
+++ b/js/Linear/DOLLAR_f.js
@@ -1,10 +1,10 @@
/* autogenerated from "macros/Linear/DOLLAR_f.sci" */
function DOLLAR_f() {
DOLLAR_f.prototype.define = function DOLLAR_f() {
- z = 0;
+ var z = 0;
this.inh = 0;
- in1 = 1;
- exprs = string([[z],[this.inh]]);
+ var in1 = 1;
+ var exprs = string([[z],[this.inh]]);
this.model = scicos_model();
this.model.sim = new ScilabString(["dollar"]);
this.model.in1 = new ScilabDouble([in1]);
@@ -13,7 +13,7 @@ function DOLLAR_f() {
this.model.dstate = new ScilabDouble([z]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -31,8 +31,8 @@ function DOLLAR_f() {
this.a = arguments[0]["a"]
this.inh = parseFloat(arguments[0]["inh"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")<2) {
exprs[2-1] = "0";
@@ -42,13 +42,16 @@ function DOLLAR_f() {
if (!ok) {
break;
}
- out = size(this.a,"*");
+ var out = size(this.a,"*");
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = out;
+ var in1 = out;
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,-1,-1,ones(1-this.inh,1),[]);
+ var tmpvar0 = check_io(this.model,graphics,-1,-1,ones(1-this.inh,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/DOLLAR_f.pickle b/js/Linear/DOLLAR_f.pickle
index 223b5a69..3693edac 100644
--- a/js/Linear/DOLLAR_f.pickle
+++ b/js/Linear/DOLLAR_f.pickle
@@ -52,40 +52,36 @@ p15
sS'model.sim'
p16
g15
-sS'[this.model,graphics,ok]'
-p17
-S'list'
-p18
sS'in1'
-p19
+p17
g2
sS'graphics.exprs'
-p20
+p18
NsS'typ'
-p21
+p19
g10
sS'model.blocktype'
-p22
+p20
g15
sS'model.dep_ut'
-p23
+p21
g10
sS'exprs'
-p24
+p22
g15
sS'gr_i'
-p25
+p23
g10
sS'y'
-p26
+p24
g10
sS'x'
-p27
+p25
g2
sS'model'
-p28
+p26
g4
sS'z'
-p29
+p27
g2
s. \ No newline at end of file
diff --git a/js/Linear/DOLLAR_m.js b/js/Linear/DOLLAR_m.js
index 2e7e5501..daaa8404 100644
--- a/js/Linear/DOLLAR_m.js
+++ b/js/Linear/DOLLAR_m.js
@@ -1,10 +1,10 @@
/* autogenerated from "macros/Linear/DOLLAR_m.sci" */
function DOLLAR_m() {
DOLLAR_m.prototype.define = function DOLLAR_m() {
- z = 0;
+ var z = 0;
this.inh = 0;
- in1 = 1;
- exprs = string([[z],[this.inh]]);
+ var in1 = 1;
+ var exprs = string([[z],[this.inh]]);
this.model = scicos_model();
this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1]);
@@ -13,7 +13,7 @@ function DOLLAR_m() {
this.model.dstate = new ScilabDouble([z]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -31,8 +31,8 @@ function DOLLAR_m() {
this.a = arguments[0]["a"]
this.inh = parseFloat(arguments[0]["inh"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")<2) {
exprs[2-1] = "0";
@@ -42,51 +42,54 @@ function DOLLAR_m() {
if (!ok) {
break;
}
- out = [size(this.a,1),size(this.a,2)];
+ var out = [size(this.a,1),size(this.a,2)];
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = out;
+ var in1 = out;
this.model.sim = list(new ScilabString(["dollar4_m"]), new ScilabDouble([4]));
this.model.odstate = list(new ScilabDouble([this.a]));
this.model.dstate = [];
if ((this.type[this.a-1]==1)) {
if (isreal(this.a)) {
- it = 1;
- ot = 1;
+ var it = 1;
+ var ot = 1;
if ((size(this.a,1)==1||size(this.a,2)==1)) {
this.model.sim = list(new ScilabString(["dollar4"]), new ScilabDouble([4]));
this.model.dstate = this.a.slice();
this.model.odstate = list();
}
} else {
- it = 2;
- ot = 2;
+ var it = 2;
+ var ot = 2;
}
} else if ((typeof(this.a)=="int32")) {
- it = 3;
- ot = 3;
+ var it = 3;
+ var ot = 3;
} else if ((typeof(this.a)=="int16")) {
- it = 4;
- ot = 4;
+ var it = 4;
+ var ot = 4;
} else if ((typeof(this.a)=="int8")) {
- it = 5;
- ot = 5;
+ var it = 5;
+ var ot = 5;
} else if ((typeof(this.a)=="uint32")) {
- it = 6;
- ot = 6;
+ var it = 6;
+ var ot = 6;
} else if ((typeof(this.a)=="uint16")) {
- it = 7;
- ot = 7;
+ var it = 7;
+ var ot = 7;
} else if ((typeof(this.a)=="uint8")) {
- it = 8;
- ot = 8;
+ var it = 8;
+ var ot = 8;
} else {
message("type is not recognized");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/DOLLAR_m.pickle b/js/Linear/DOLLAR_m.pickle
index f1752657..032d6ef5 100644
--- a/js/Linear/DOLLAR_m.pickle
+++ b/js/Linear/DOLLAR_m.pickle
@@ -61,46 +61,43 @@ p18
sS'model.sim'
p19
g2
-sS'[this.model,graphics,ok]'
-p20
-g4
sS'in1'
-p21
+p20
g4
sS'graphics.exprs'
-p22
+p21
NsS'typ'
-p23
+p22
g13
sS'ot'
-p24
+p23
g4
sS'ok'
-p25
+p24
S'boolean'
-p26
+p25
sS'model.blocktype'
-p27
+p26
g18
sS'model.dep_ut'
-p28
+p27
g13
sS'exprs'
-p29
+p28
g18
sS'gr_i'
-p30
+p29
g13
sS'y'
-p31
+p30
g13
sS'x'
-p32
+p31
g4
sS'model'
-p33
+p32
g6
sS'z'
-p34
+p33
g4
s. \ No newline at end of file
diff --git a/js/Linear/GAINBLK.js b/js/Linear/GAINBLK.js
index e399edfb..8cd16680 100644
--- a/js/Linear/GAINBLK.js
+++ b/js/Linear/GAINBLK.js
@@ -2,10 +2,10 @@
function GAINBLK() {
GAINBLK.prototype.define = function GAINBLK() {
this.gain = 1;
- in1 = -1;
- out = -1;
- in2 = -2;
- out2 = -2;
+ var in1 = -1;
+ var out = -1;
+ var in2 = -2;
+ var out2 = -2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["gainblk"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1]);
@@ -15,8 +15,8 @@ function GAINBLK() {
this.model.rpar = new ScilabDouble([this.gain]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [strcat(sci2exp(this.gain))];
- gr_i = [];
+ var exprs = [strcat(sci2exp(this.gain))];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,11 +34,11 @@ function GAINBLK() {
this.gain = parseFloat(arguments[0]["gain"])
this.over = arguments[0]["over"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==1) {
- exprs = [[exprs],[sci2exp(0)]];
+ var exprs = [[exprs],[sci2exp(0)]];
}
while (true) {
[ok,this.gain,this.over,exprs] = scicos_getvalue("Set gain block parameters",["Gain","Do On Overflow(0=Nothing 1=Saturate 2=Error)"],list("mat",[-1,-1],"vec",1),exprs);
@@ -50,98 +50,106 @@ function GAINBLK() {
} else {
if (typeof(this.gain)=="constant") {
if (isreal(this.gain)) {
- it = 1;
- ot = 1;
+ var it = 1;
+ var ot = 1;
this.model.sim = list(new ScilabString(["gainblk"]), new ScilabDouble([4]));
this.model.rpar = this.gain.slice();
this.model.opar = list();
} else {
message("type is not supported");
- ok = false;
+ var ok = false;
}
} else {
if ((this.over==0)) {
if ((typeof(this.gain)=="int32")) {
- ot = 3;
+ var ot = 3;
this.model.sim = list(new ScilabString(["gainblk_i32n"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="int16")) {
- ot = 4;
+ var ot = 4;
this.model.sim = list(new ScilabString(["gainblk_i16n"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="int8")) {
- ot = 5;
+ var ot = 5;
this.model.sim = list(new ScilabString(["gainblk_i8n"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint32")) {
- ot = 6;
+ var ot = 6;
this.model.sim = list(new ScilabString(["gainblk_ui32n"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint16")) {
- ot = 7;
+ var ot = 7;
this.model.sim = list(new ScilabString(["gainblk_ui16n"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint8")) {
- ot = 8;
+ var ot = 8;
this.model.sim = list(new ScilabString(["gainblk_ui8n"]), new ScilabDouble([4]));
} else {
message("type is not supported.");
- ok = false;
+ var ok = false;
}
} else if ((this.over==1)) {
if ((typeof(this.gain)=="int32")) {
- ot = 3;
+ var ot = 3;
this.model.sim = list(new ScilabString(["gainblk_i32s"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="int16")) {
- ot = 4;
+ var ot = 4;
this.model.sim = list(new ScilabString(["gainblk_i16s"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="int8")) {
- ot = 5;
+ var ot = 5;
this.model.sim = list(new ScilabString(["gainblk_i8s"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint32")) {
- ot = 6;
+ var ot = 6;
this.model.sim = list(new ScilabString(["gainblk_ui32s"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint16")) {
- ot = 7;
+ var ot = 7;
this.model.sim = list(new ScilabString(["gainblk_ui16s"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint8")) {
- ot = 8;
+ var ot = 8;
this.model.sim = list(new ScilabString(["gainblk_ui8s"]), new ScilabDouble([4]));
} else {
message("type is not supported.");
- ok = false;
+ var ok = false;
}
} else if ((this.over==2)) {
if ((typeof(this.gain)=="int32")) {
- ot = 3;
+ var ot = 3;
this.model.sim = list(new ScilabString(["gainblk_i32e"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="int16")) {
- ot = 4;
+ var ot = 4;
this.model.sim = list(new ScilabString(["gainblk_i16e"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="int8")) {
- ot = 5;
+ var ot = 5;
this.model.sim = list(new ScilabString(["gainblk_i8e"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint32")) {
- ot = 6;
+ var ot = 6;
this.model.sim = list(new ScilabString(["gainblk_ui32e"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint16")) {
- ot = 7;
+ var ot = 7;
this.model.sim = list(new ScilabString(["gainblk_ui16e"]), new ScilabDouble([4]));
} else if ((typeof(this.gain)=="uint8")) {
- ot = 8;
+ var ot = 8;
this.model.sim = list(new ScilabString(["gainblk_ui8e"]), new ScilabDouble([4]));
} else {
message("type is not an integer.");
- ok = false;
+ var ok = false;
}
} else {
message("Do on Overflow must be 0,1,2");
- ok = false;
+ var ok = false;
}
this.model.rpar = [];
this.model.opar = list(this.gain.slice());
}
if (ok) {
- [out,in1] = size(this.gain);
+ var tmpvar0 = size(this.gain)
+ var out = tmpvar0[0]
+ var in1 = tmpvar0[1];
if (out*in1!=1) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([in1,-1],ot),list([out,-1],ot),[],[]);
+ var tmpvar1 = set_io(this.model,graphics,list([in1,-1],ot),list([out,-1],ot),[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
} else {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([-1,-2],ot),list([-1,-2],ot),[],[]);
+ var tmpvar2 = set_io(this.model,graphics,list([-1,-2],ot),list([-1,-2],ot),[],[])
+ this.model = tmpvar2[0]
+ var graphics = tmpvar2[1]
+ var ok = tmpvar2[2];
}
}
if (ok) {
diff --git a/js/Linear/GAINBLK.pickle b/js/Linear/GAINBLK.pickle
index 31b6e852..4d9f0cbf 100644
--- a/js/Linear/GAINBLK.pickle
+++ b/js/Linear/GAINBLK.pickle
@@ -45,68 +45,62 @@ sS'model.sim'
p12
S'list'
p13
-sS'[out,in1]'
-p14
-g5
-sS'[this.model,graphics,ok]'
-p15
-g5
sS'model.out2'
-p16
+p14
g5
sS'in1'
-p17
+p15
g5
sS'in2'
-p18
+p16
g5
sS'model.rpar'
-p19
+p17
g5
sS'graphics.exprs'
-p20
+p18
S'matrix'
-p21
+p19
sS'typ'
-p22
+p20
S'vector'
-p23
+p21
sS'model.opar'
-p24
+p22
g13
sS'out2'
-p25
+p23
g5
sS'ok'
-p26
+p24
S'boolean'
-p27
+p25
sS'model.blocktype'
-p28
+p26
S'string'
-p29
+p27
sS'model.dep_ut'
-p30
-g23
+p28
+g21
sS'exprs'
-p31
-g23
+p29
+g21
sS'gr_i'
-p32
-g23
+p30
+g21
sS'y'
-p33
-g23
+p31
+g21
sS'x'
-p34
+p32
g5
sS'model'
-p35
+p33
g2
sS'ot'
-p36
+p34
g5
sS'gain'
-p37
+p35
g5
s. \ No newline at end of file
diff --git a/js/Linear/GAINBLK_f.js b/js/Linear/GAINBLK_f.js
index 3c884a91..55cf64ea 100644
--- a/js/Linear/GAINBLK_f.js
+++ b/js/Linear/GAINBLK_f.js
@@ -2,8 +2,8 @@
function GAINBLK_f() {
GAINBLK_f.prototype.define = function GAINBLK_f() {
this.gain = 1;
- in1 = 1;
- out = 1;
+ var in1 = 1;
+ var out = 1;
this.model = scicos_model();
this.model.sim = new ScilabString(["gain"]);
this.model.in1 = new ScilabDouble([in1]);
@@ -11,8 +11,8 @@ function GAINBLK_f() {
this.model.rpar = new ScilabDouble([this.gain]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [strcat(sci2exp(this.gain))];
- gr_i = [];
+ var exprs = [strcat(sci2exp(this.gain))];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -28,8 +28,8 @@ function GAINBLK_f() {
GAINBLK_f.prototype.set = function GAINBLK_f() {
this.gain = parseFloat(arguments[0]["gain"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
@@ -39,8 +39,13 @@ function GAINBLK_f() {
if (this.gain==[]) {
message("Gain must have at least one element");
} else {
- [out,in1] = size(this.gain);
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,out,[],[]);
+ var tmpvar0 = size(this.gain)
+ var out = tmpvar0[0]
+ var in1 = tmpvar0[1];
+ var tmpvar1 = check_io(this.model,graphics,in1,out,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
this.model.rpar = this.gain.slice();
diff --git a/js/Linear/GAINBLK_f.pickle b/js/Linear/GAINBLK_f.pickle
index 8a166c85..c9ead743 100644
--- a/js/Linear/GAINBLK_f.pickle
+++ b/js/Linear/GAINBLK_f.pickle
@@ -11,73 +11,66 @@ p4
atp5
Rp6
.(dp0
-S'arg1'
+S'model.sim'
p1
-S'object'
+S'string'
p2
-sS'graphics'
+sS'model.in1'
p3
-g2
-sS'x.model'
+S'double'
p4
-NsS'model.out'
+sS'model.blocktype'
p5
-S'double'
+g2
+sS'x.graphics'
p6
-sS'out'
+S'object'
p7
-g6
-sS'model.in1'
+sS'model.dep_ut'
p8
-g6
-sS'x.graphics'
+S'vector'
p9
-g2
-sS'model.sim'
+sS'arg1'
p10
-S'string'
+g7
+sS'graphics.exprs'
p11
-sS'[out,in1]'
+NsS'in1'
p12
-g6
-sS'[this.model,graphics,ok]'
+g4
+sS'model.rpar'
p13
-S'list'
+g4
+sS'exprs'
p14
-sS'in1'
+g9
+sS'x.model'
p15
-g6
-sS'model.rpar'
+NsS'gr_i'
p16
-g6
+g9
sS'gain'
p17
-g6
-sS'graphics.exprs'
+g4
+sS'graphics'
p18
-NsS'typ'
+g7
+sS'y'
p19
-S'vector'
+g9
+sS'x'
p20
-sS'model.blocktype'
+g4
+sS'model'
p21
-g11
-sS'model.dep_ut'
+g7
+sS'model.out'
p22
-g20
-sS'exprs'
+g4
+sS'typ'
p23
-g20
-sS'gr_i'
+g9
+sS'out'
p24
-g20
-sS'y'
-p25
-g20
-sS'x'
-p26
-g6
-sS'model'
-p27
-g2
+g4
s. \ No newline at end of file
diff --git a/js/Linear/GAIN_f.js b/js/Linear/GAIN_f.js
index 3ac3a5e9..e987baef 100644
--- a/js/Linear/GAIN_f.js
+++ b/js/Linear/GAIN_f.js
@@ -2,8 +2,8 @@
function GAIN_f() {
GAIN_f.prototype.define = function GAIN_f() {
this.gain = 1;
- in1 = 1;
- out = 1;
+ var in1 = 1;
+ var out = 1;
this.model = scicos_model();
this.model.sim = new ScilabString(["gain"]);
this.model.in1 = new ScilabDouble([1]);
@@ -11,8 +11,8 @@ function GAIN_f() {
this.model.rpar = new ScilabDouble([this.gain]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(sci2exp(this.gain))],[strcat(sci2exp(in1))],[strcat(sci2exp(out))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.gain))],[strcat(sci2exp(in1))],[strcat(sci2exp(out))]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -28,8 +28,8 @@ function GAIN_f() {
GAIN_f.prototype.set = function GAIN_f() {
this.gain = parseFloat(arguments[0]["gain"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
@@ -39,8 +39,13 @@ function GAIN_f() {
if (this.gain==[]) {
message("Gain must have at least one element");
} else {
- [out,in1] = size(this.gain);
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,out,[],[]);
+ var tmpvar0 = size(this.gain)
+ var out = tmpvar0[0]
+ var in1 = tmpvar0[1];
+ var tmpvar1 = check_io(this.model,graphics,in1,out,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
this.model.rpar = this.gain.slice();
diff --git a/js/Linear/GAIN_f.pickle b/js/Linear/GAIN_f.pickle
index d35d1dd8..e204ca44 100644
--- a/js/Linear/GAIN_f.pickle
+++ b/js/Linear/GAIN_f.pickle
@@ -11,74 +11,67 @@ p4
atp5
Rp6
.(dp0
-S'arg1'
+S'model.sim'
p1
-S'object'
+S'string'
p2
-sS'graphics'
+sS'model.in1'
p3
-g2
-sS'x.model'
+S'double'
p4
-NsS'model.out'
+sS'model.blocktype'
p5
-S'double'
+g2
+sS'x.graphics'
p6
-sS'out'
+S'object'
p7
-g6
-sS'model.in1'
+sS'model.dep_ut'
p8
-g6
-sS'x.graphics'
+S'vector'
p9
-g2
-sS'model.sim'
+sS'arg1'
p10
-S'string'
+g7
+sS'graphics.exprs'
p11
-sS'[out,in1]'
+NsS'in1'
p12
-g6
-sS'[this.model,graphics,ok]'
+g4
+sS'model.rpar'
p13
-S'list'
+g4
+sS'exprs'
p14
-sS'in1'
+S'matrix'
p15
-g6
-sS'model.rpar'
+sS'x.model'
p16
-g6
-sS'gain'
+NsS'gr_i'
p17
-g6
-sS'graphics.exprs'
+g9
+sS'gain'
p18
-NsS'typ'
+g4
+sS'graphics'
p19
-S'vector'
+g7
+sS'y'
p20
-sS'model.blocktype'
+g9
+sS'x'
p21
-g11
-sS'model.dep_ut'
+g4
+sS'model'
p22
-g20
-sS'exprs'
+g7
+sS'model.out'
p23
-S'matrix'
+g4
+sS'typ'
p24
-sS'gr_i'
+g9
+sS'out'
p25
-g20
-sS'y'
-p26
-g20
-sS'x'
-p27
-g6
-sS'model'
-p28
-g2
+g4
s. \ No newline at end of file
diff --git a/js/Linear/INTEGRAL.js b/js/Linear/INTEGRAL.js
index 1e07521b..c70354a8 100644
--- a/js/Linear/INTEGRAL.js
+++ b/js/Linear/INTEGRAL.js
@@ -2,8 +2,8 @@
function INTEGRAL() {
INTEGRAL.prototype.define = function INTEGRAL() {
this.maxp = 1;
- minp = -1;
- rpar = [];
+ var minp = -1;
+ var rpar = [];
this.model = scicos_model();
this.model.state = new ScilabDouble([0]);
this.model.sim = list(new ScilabString(["integral_func"]), new ScilabDouble([4]));
@@ -12,8 +12,8 @@ function INTEGRAL() {
this.model.rpar = rpar;
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = string([[0],[0],[0],[this.maxp],[minp]]);
- gr_i = [];
+ var exprs = string([[0],[0],[0],[this.maxp],[minp]]);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.id = "1/s";
return new BasicBlock(this.x);
@@ -38,8 +38,8 @@ function INTEGRAL() {
this.maxp = parseFloat(arguments[0]["maxp"])
this.lowp = arguments[0]["lowp"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.x0,this.reinit,this.satur,this.maxp,this.lowp,exprs] = scicos_getvalue("Set Integral block parameters",["Initial Condition","With re-intialization (1:yes, 0:no)","With saturation (1:yes, 0:no)","Upper limit","Lower limit"],list("vec",-1,"vec",1,"vec",1,"vec",-1,"vec",-1),exprs);
@@ -62,27 +62,30 @@ function INTEGRAL() {
}
if ((size(this.x0,1)!=size(this.maxp,1)||size(this.x0,1)!=size(this.lowp,1))) {
message("x0 and Upper limit and Lower limit must have same size");
- ok = false;
+ var ok = false;
} else if (or(this.maxp<=this.lowp)) {
message("Upper limits must be > Lower limits");
- ok = false;
+ var ok = false;
} else if (or(this.x0>this.maxp)||or(this.x0<this.lowp)) {
message("Initial condition x0 should be inside the limits");
- ok = false;
+ var ok = false;
} else {
- rpar = [[this.maxp],[this.lowp]];
+ var rpar = [[this.maxp],[this.lowp]];
this.model.nzcross = new ScilabDouble([size(this.x0,1)]);
this.model.nmode = new ScilabDouble([size(this.x0,1)]);
}
} else {
- rpar = [];
+ var rpar = [];
this.model.nzcross = new ScilabDouble([0]);
this.model.nmode = new ScilabDouble([0]);
}
if (ok) {
this.model.rpar = rpar;
this.model.state = this.x0;
- [this.model,graphics,ok] = check_io(this.model,graphics,size(this.x0,1)*[[1],[ones(this.reinit,1)]],size(this.x0,1),ones(this.reinit,1),[]);
+ var tmpvar0 = check_io(this.model,graphics,size(this.x0,1)*[[1],[ones(this.reinit,1)]],size(this.x0,1),ones(this.reinit,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/INTEGRAL.pickle b/js/Linear/INTEGRAL.pickle
index c42e86ab..7fadba67 100644
--- a/js/Linear/INTEGRAL.pickle
+++ b/js/Linear/INTEGRAL.pickle
@@ -55,62 +55,59 @@ sS'model.sim'
p14
S'list'
p15
-sS'[this.model,graphics,ok]'
-p16
-g15
sS'model.nmode'
-p17
+p16
g4
sS'model.rpar'
-p18
+p17
g6
sS'model.in1'
-p19
+p18
g4
sS'satur'
-p20
+p19
g4
sS'model.state'
-p21
+p20
g4
sS'lowp'
-p22
+p21
S'string'
-p23
+p22
sS'graphics.exprs'
-p24
+p23
NsS'x0'
-p25
+p24
g6
sS'model.nzcross'
-p26
+p25
g4
sS'x.graphics.id'
-p27
-g23
+p26
+g22
sS'ok'
-p28
+p27
S'boolean'
-p29
+p28
sS'model.blocktype'
-p30
-g23
+p29
+g22
sS'model.dep_ut'
-p31
+p30
g6
sS'exprs'
-p32
-g23
+p31
+g22
sS'gr_i'
-p33
+p32
g6
sS'y'
-p34
+p33
g6
sS'x'
-p35
+p34
g4
sS'model'
-p36
+p35
g2
s. \ No newline at end of file
diff --git a/js/Linear/INTEGRAL_f.js b/js/Linear/INTEGRAL_f.js
index 8be55672..53ed84e2 100644
--- a/js/Linear/INTEGRAL_f.js
+++ b/js/Linear/INTEGRAL_f.js
@@ -9,8 +9,8 @@ function INTEGRAL_f() {
this.model.state = new ScilabDouble([this.x0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = strcat(sci2exp(this.x0));
- gr_i = [];
+ var exprs = strcat(sci2exp(this.x0));
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -25,8 +25,8 @@ function INTEGRAL_f() {
INTEGRAL_f.prototype.set = function INTEGRAL_f() {
this.x0 = parseFloat(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters","Initial state",list("vec",1),exprs);
diff --git a/js/Linear/INTEGRAL_m.js b/js/Linear/INTEGRAL_m.js
index 842615a0..667cd9e1 100644
--- a/js/Linear/INTEGRAL_m.js
+++ b/js/Linear/INTEGRAL_m.js
@@ -2,8 +2,8 @@
function INTEGRAL_m() {
INTEGRAL_m.prototype.define = function INTEGRAL_m() {
this.maxp = 1;
- minp = -1;
- rpar = [];
+ var minp = -1;
+ var rpar = [];
this.model = scicos_model();
this.model.state = new ScilabDouble([0]);
this.model.sim = list(new ScilabString(["integral_func"]), new ScilabDouble([4]));
@@ -14,8 +14,8 @@ function INTEGRAL_m() {
this.model.rpar = rpar;
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = string([[0],[0],[0],[this.maxp],[minp]]);
- gr_i = [];
+ var exprs = string([[0],[0],[0],[this.maxp],[minp]]);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -39,8 +39,8 @@ function INTEGRAL_m() {
this.maxp = parseFloat(arguments[0]["maxp"])
this.lowp = parseFloat(arguments[0]["lowp"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.x0,this.reinit,this.satur,this.maxp,this.lowp,exprs] = scicos_getvalue("Set Integral block parameters",["Initial Condition","With re-intialization (1:yes, 0:no)","With saturation (1:yes, 0:no)","Upper limit","Lower limit"],list("mat",[-1,-1],"vec",1,"vec",1,"mat",[-1,-1],"mat",[-1,-1]),exprs);
@@ -48,9 +48,9 @@ function INTEGRAL_m() {
break;
}
if (isreal(this.x0)) {
- Datatype = 1;
+ var Datatype = 1;
} else {
- Datatype = 2;
+ var Datatype = 2;
}
if (this.reinit!=0) {
this.reinit = 1;
@@ -66,15 +66,15 @@ function INTEGRAL_m() {
}
if ((size(this.x0)!=size(this.maxp)||size(this.x0)!=size(this.lowp))) {
message("x0 and Upper limit and Lower limit must have same size");
- ok = false;
+ var ok = false;
} else if (or(this.maxp<=this.lowp)) {
message("Upper limits must be > Lower limits");
- ok = false;
+ var ok = false;
} else if (or(this.x0>this.maxp)||or(this.x0<this.lowp)) {
message("Initial condition x0 should be inside the limits");
- ok = false;
+ var ok = false;
} else {
- rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())]];
+ var rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())]];
this.model.nzcross = new ScilabDouble([size(this.x0,"*")]);
this.model.nmode = new ScilabDouble([size(this.x0,"*")]);
}
@@ -87,21 +87,21 @@ function INTEGRAL_m() {
}
if ((size(this.x0)!=size(this.maxp)||size(this.x0)!=size(this.lowp))) {
message("x0 and Upper limit and Lower limit must have same size");
- ok = false;
+ var ok = false;
} else if (or(real(this.maxp)<=real(this.lowp))||or(imag(this.maxp)<=imag(this.lowp))) {
message("Upper limits must be > Lower limits");
- ok = false;
+ var ok = false;
} else if (or(real(this.x0)>real(this.maxp))||or(real(this.x0)<real(this.lowp))||or(imag(this.x0)>imag(this.maxp))||or(imag(this.x0)<imag(this.lowp))) {
message("Initial condition x0 should be inside the limits");
- ok = false;
+ var ok = false;
} else {
- rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())],[imag(this.maxp.slice())],[imag(this.lowp.slice())]];
+ var rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())],[imag(this.maxp.slice())],[imag(this.lowp.slice())]];
this.model.nzcross = new ScilabDouble([2*size(this.x0,"*")]);
this.model.nmode = new ScilabDouble([2*size(this.x0,"*")]);
}
}
} else {
- rpar = [];
+ var rpar = [];
this.model.nzcross = new ScilabDouble([0]);
this.model.nmode = new ScilabDouble([0]);
}
@@ -110,21 +110,24 @@ function INTEGRAL_m() {
if ((Datatype==1)) {
this.model.state = new ScilabDouble([real(this.x0.slice())]);
this.model.sim = list(new ScilabString(["integral_func"]), new ScilabDouble([4]));
- it = [[1],[ones(this.reinit,1)]];
- ot = 1;
+ var it = [[1],[ones(this.reinit,1)]];
+ var ot = 1;
} else if ((Datatype==2)) {
this.model.state = new ScilabDouble([real(this.x0.slice())],[imag(this.x0.slice())]);
this.model.sim = list(new ScilabString(["integralz_func"]), new ScilabDouble([4]));
- it = [[2],[2*ones(this.reinit,1)]];
- ot = 2;
+ var it = [[2],[2*ones(this.reinit,1)]];
+ var ot = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
- in1 = [size(this.x0,1)*[[1],[ones(this.reinit,1)]],size(this.x0,2)*[[1],[ones(this.reinit,1)]]];
- out = size(this.x0);
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(this.reinit,1),[]);
+ var in1 = [size(this.x0,1)*[[1],[ones(this.reinit,1)]],size(this.x0,2)*[[1],[ones(this.reinit,1)]]];
+ var out = size(this.x0);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),ones(this.reinit,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
}
if (ok) {
diff --git a/js/Linear/INTEGRAL_m.pickle b/js/Linear/INTEGRAL_m.pickle
index 76a2f5ed..7538823d 100644
--- a/js/Linear/INTEGRAL_m.pickle
+++ b/js/Linear/INTEGRAL_m.pickle
@@ -68,65 +68,62 @@ p19
sS'Datatype'
p20
g4
-sS'[this.model,graphics,ok]'
-p21
-g4
sS'model.out2'
-p22
+p21
g4
sS'in1'
-p23
+p22
g8
sS'model.rpar'
-p24
+p23
g8
sS'model.nmode'
-p25
+p24
g4
sS'satur'
-p26
+p25
g4
sS'model.state'
-p27
+p26
g4
sS'lowp'
-p28
+p27
g4
sS'graphics'
-p29
+p28
g2
sS'model.nzcross'
-p30
+p29
g4
sS'ok'
-p31
+p30
S'boolean'
-p32
+p31
sS'model.blocktype'
-p33
+p32
S'string'
-p34
+p33
sS'model.dep_ut'
-p35
+p34
g8
sS'exprs'
-p36
-g34
+p35
+g33
sS'gr_i'
-p37
+p36
g8
sS'graphics.exprs'
-p38
+p37
NsS'y'
-p39
+p38
g8
sS'x'
-p40
+p39
g4
sS'model'
-p41
+p40
g2
sS'ot'
-p42
+p41
g4
s. \ No newline at end of file
diff --git a/js/Linear/PID.js b/js/Linear/PID.js
index a004f67b..320f1396 100644
--- a/js/Linear/PID.js
+++ b/js/Linear/PID.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Linear/PID.sci" */
function PID() {
PID.prototype.define = function PID() {
- scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["PID"],tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["PID"],tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m.objs[1-1] = scicos_block(gui="INTEGRAL_m",graphics=scicos_graphics(orig=[318.304,183.11733],sz=[40,40],flip=true,theta=0,exprs=[["0"],["0"],["0"],["1"],["-1"]],pin=7,pout=9,pein=[],peout=[],gr_i=[],id="1/s",in_implicit="E",out_implicit="E"),model=scicos_model(sim=list("integral_func",4),in1=1,in2=1,intyp=1,out=1,out2=1,outtyp=1,evtin=[],evtout=[],state=0,dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="c",firing=[],dep_ut=[false,true],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[2-1] = scicos_block(gui="SUMMATION",graphics=scicos_graphics(orig=[387.97067,172.85067],sz=[40,60],flip=true,theta=0,exprs=[["1"],["[1;1;1]"]],pin=[[10],[9],[11]],pout=19,pein=[],peout=[],gr_i=[],id="",in_implicit=[["E"],["E"],["E"]],out_implicit="E"),model=scicos_model(sim=list("summation",4),in1=[[-1],[-1],[-1]],in2=[[-2],[-2],[-2]],intyp=[[1],[1],[1]],out=-1,out2=-2,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[[1],[1],[1]],opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m.objs[3-1] = scicos_block(gui="GAINBLK",graphics=scicos_graphics(orig=[321.23733,235.91733],sz=[40,40],flip=true,theta=0,exprs="1",pin=17,pout=10,pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit="E"),model=scicos_model(sim=list("gainblk",4),in1=-1,in2=-2,intyp=1,out=-1,out2=-2,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=1,ipar=[],opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -35,7 +35,7 @@ function PID() {
this.model.firing = new ScilabBoolean([false]);
this.model.dep_ut = [false,false];
this.model.rpar = new ScilabDouble([scs_m]);
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -55,12 +55,12 @@ function PID() {
this.i = arguments[0]["i"]
this.d = arguments[0]["d"]
this.exprs0 = arguments[0]["exprs0"]
- ppath = list(0,0,0);
+ var ppath = list(0,0,0);
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[this.i-1];
+ var o = arg1.model.rpar.objs[this.i-1];
if (typeof(o)=="Link") {
- from = arg1.model.rpar.objs[o.from[1-1]-1];
- to = arg1.model.rpar.objs[o.to[1-1]-1];
+ var from = arg1.model.rpar.objs[o.from[1-1]-1];
+ var to = arg1.model.rpar.objs[o.to[1-1]-1];
if (from.gui=="GAINBLK") {
switch (to.gui) {
case "SUMMATION":
@@ -85,17 +85,17 @@ function PID() {
}
}
}
- newpar = list();
- xx1 = arg1.model.rpar.objs[ppath[1-1]-1];
+ var newpar = list();
+ var xx1 = arg1.model.rpar.objs[ppath[1-1]-1];
exprs[1-1] = xx1.graphics.exprs[1-1];
- p_old = xx1.model.rpar;
- xx2 = arg1.model.rpar.objs[ppath[2-1]-1];
+ var p_old = xx1.model.rpar;
+ var xx2 = arg1.model.rpar.objs[ppath[2-1]-1];
exprs[2-1] = xx2.graphics.exprs[1-1];
- i_old = xx2.model.rpar;
- xx3 = arg1.model.rpar.objs[ppath[3-1]-1];
+ var i_old = xx2.model.rpar;
+ var xx3 = arg1.model.rpar.objs[ppath[3-1]-1];
exprs[3-1] = xx3.graphics.exprs[1-1];
- d_old = xx3.model.rpar;
- y = 0;
+ var d_old = xx3.model.rpar;
+ var y = 0;
while (true) {
[ok,this.p,this.i,this.d,this.exprs0] = scicos_getvalue("Set PID parameters",["Proportional","Integral","Derivation"],list("vec",-1,"vec",-1,"vec",-1),exprs);
if (!ok) {
@@ -114,16 +114,16 @@ function PID() {
break;
}
}
- needcompile = 0;
+ var needcompile = 0;
if (!(p_old==this.p&&i_old==this.i&&d_old==this.d)) {
newpar[size(newpar)+1-1] = ppath[1-1];
newpar[size(newpar)+1-1] = ppath[2-1];
newpar[size(newpar)+1-1] = ppath[3-1];
- needcompile = 2;
+ var needcompile = 2;
}
this.x = arg1;
- y = max(y,needcompile);
- typ = newpar;
+ var y = max(y,needcompile);
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Linear/REGISTER.js b/js/Linear/REGISTER.js
index 34036efe..5e86e2ce 100644
--- a/js/Linear/REGISTER.js
+++ b/js/Linear/REGISTER.js
@@ -10,8 +10,8 @@ function REGISTER() {
this.model.dstate = new ScilabDouble([this.z0]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = strcat(string(this.z0),";");
- gr_i = [];
+ var exprs = strcat(string(this.z0),";");
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -29,11 +29,11 @@ function REGISTER() {
this.z0 = parseFloat(arguments[0]["z0"])
this.it = arguments[0]["it"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,1)==1) {
- exprs = [[exprs],[sci2exp(1)]];
+ var exprs = [[exprs],[sci2exp(1)]];
}
while (true) {
[ok,this.z0,this.it,exprs] = scicos_getvalue("Set delay parameters",["Register initial condition","Datatype (1=double 3=int32 ...)"],list("vec",-1,"vec",1),exprs);
@@ -42,7 +42,7 @@ function REGISTER() {
}
if (prod(size(this.z0))<1) {
message("Register length must be at least 1");
- ok = false;
+ var ok = false;
}
if (this.it==1) {
this.model.sim = list(new ScilabString(["delay4"]), new ScilabDouble([4]));
@@ -70,14 +70,17 @@ function REGISTER() {
this.z0 = uint8(this.z0);
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
this.model.odstate = list(new ScilabDouble([this.z0]));
this.model.dstate = [];
}
if (ok) {
- in1 = [1,1];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,this.it),list(in1,this.it),1,[]);
+ var in1 = [1,1];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,this.it),list(in1,this.it),1,[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/REGISTER.pickle b/js/Linear/REGISTER.pickle
index 8ca0dc7f..7d82ed1e 100644
--- a/js/Linear/REGISTER.pickle
+++ b/js/Linear/REGISTER.pickle
@@ -49,43 +49,40 @@ g4
sS'model.sim'
p15
g2
-sS'[this.model,graphics,ok]'
-p16
-g4
sS'in1'
-p17
+p16
g13
sS'graphics.exprs'
-p18
+p17
S'matrix'
-p19
+p18
sS'z0'
-p20
+p19
g4
sS'ok'
-p21
+p20
S'boolean'
-p22
+p21
sS'model.blocktype'
-p23
+p22
S'string'
-p24
+p23
sS'model.dep_ut'
-p25
+p24
g13
sS'exprs'
-p26
+p25
g4
sS'gr_i'
-p27
+p26
g13
sS'y'
-p28
+p27
g13
sS'x'
-p29
+p28
g4
sS'model'
-p30
+p29
g6
s. \ No newline at end of file
diff --git a/js/Linear/REGISTER_f.js b/js/Linear/REGISTER_f.js
index 87ea4883..f61de699 100644
--- a/js/Linear/REGISTER_f.js
+++ b/js/Linear/REGISTER_f.js
@@ -10,8 +10,8 @@ function REGISTER_f() {
this.model.dstate = new ScilabDouble([this.z0]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = strcat(string(this.z0),";");
- gr_i = [];
+ var exprs = strcat(string(this.z0),";");
+ var gr_i = [];
this.x = standard_define([2.5,2.5],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -26,8 +26,8 @@ function REGISTER_f() {
REGISTER_f.prototype.set = function REGISTER_f() {
this.z0 = parseFloat(arguments[0]["z0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.z0,exprs] = scicos_getvalue("Set delay parameters","Register initial condition",list("vec",-1),exprs);
@@ -36,7 +36,7 @@ function REGISTER_f() {
}
if (prod(size(this.z0))<1) {
message("Register length must be at least 1");
- ok = false;
+ var ok = false;
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/SAMPHOLD.js b/js/Linear/SAMPHOLD.js
index f2aff8d1..a3849f9a 100644
--- a/js/Linear/SAMPHOLD.js
+++ b/js/Linear/SAMPHOLD.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Linear/SAMPHOLD.sci" */
function SAMPHOLD() {
SAMPHOLD.prototype.define = function SAMPHOLD() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["samphold4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1]);
@@ -9,7 +9,7 @@ function SAMPHOLD() {
this.model.evtin = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [true,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model," ",gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Linear/SAMPHOLD_m.js b/js/Linear/SAMPHOLD_m.js
index b9ee78b1..8d4d93a5 100644
--- a/js/Linear/SAMPHOLD_m.js
+++ b/js/Linear/SAMPHOLD_m.js
@@ -12,8 +12,8 @@ function SAMPHOLD_m() {
this.model.evtin = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -30,8 +30,8 @@ function SAMPHOLD_m() {
this.it = arguments[0]["it"]
this.x = arg1;
this.x.model.firing = [];
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.it,exprs] = scicos_getvalue("Set parameters Block",["Datatype(1=real double 2=Complex 3=int32 ...)"],list("vec",1),label);
@@ -40,11 +40,14 @@ function SAMPHOLD_m() {
}
if (((this.it<1)||(this.it>8))) {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
- in1 = [this.model.in1,this.model.in2];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,this.it),list(in1,this.it),1,[]);
+ var in1 = [this.model.in1,this.model.in2];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,this.it),list(in1,this.it),1,[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
arg1.graphics = graphics;
diff --git a/js/Linear/SAMPHOLD_m.pickle b/js/Linear/SAMPHOLD_m.pickle
index 23b819b3..c7f11ba6 100644
--- a/js/Linear/SAMPHOLD_m.pickle
+++ b/js/Linear/SAMPHOLD_m.pickle
@@ -45,50 +45,47 @@ p13
sS'arg1.graphics'
p14
g2
-sS'[this.model,graphics,ok]'
-p15
-g5
sS'model.out2'
-p16
+p15
g5
sS'in1'
-p17
+p16
g9
sS'model.in1'
-p18
+p17
g5
sS'model.outtyp'
-p19
+p18
g5
sS'graphics.exprs'
-p20
+p19
NsS'typ'
-p21
+p20
g9
sS'arg1.model'
-p22
+p21
g2
sS'ok'
-p23
+p22
S'boolean'
-p24
+p23
sS'model.blocktype'
-p25
+p24
S'string'
-p26
+p25
sS'model.dep_ut'
-p27
+p26
g9
sS'gr_i'
-p28
+p27
g9
sS'y'
-p29
+p28
g9
sS'x'
-p30
+p29
g5
sS'model'
-p31
+p30
g2
s. \ No newline at end of file
diff --git a/js/Linear/SAMPLEHOLD_f.js b/js/Linear/SAMPLEHOLD_f.js
index 35768a23..7421d96e 100644
--- a/js/Linear/SAMPLEHOLD_f.js
+++ b/js/Linear/SAMPLEHOLD_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Linear/SAMPLEHOLD_f.sci" */
function SAMPLEHOLD_f() {
SAMPLEHOLD_f.prototype.define = function SAMPLEHOLD_f() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = new ScilabString(["samphold"]);
this.model.in1 = new ScilabDouble([-1]);
@@ -9,7 +9,7 @@ function SAMPLEHOLD_f() {
this.model.evtin = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [true,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model," ",gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Linear/SOM_f.js b/js/Linear/SOM_f.js
index ec087b3c..40e4c2ff 100644
--- a/js/Linear/SOM_f.js
+++ b/js/Linear/SOM_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Linear/SOM_f.sci" */
function SOM_f() {
SOM_f.prototype.define = function SOM_f() {
- sgn = [[1],[1],[1]];
+ var sgn = [[1],[1],[1]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["sum"]), new ScilabDouble([2]));
this.model.in1 = new ScilabDouble([-1],[-1],[-1]);
@@ -9,8 +9,8 @@ function SOM_f() {
this.model.rpar = new ScilabDouble(sgn);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[sci2exp(sgn)]];
- gr_i = [];
+ var exprs = [[sci2exp(1)],[sci2exp(sgn)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -24,22 +24,22 @@ function SOM_f() {
}
SOM_f.prototype.set = function SOM_f() {
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==2) {
- exprs = exprs[2-1];
+ var exprs = exprs[2-1];
}
if (size(exprs,"*")!=3) {
- exprs = string(this.model.rpar);
+ var exprs = string(this.model.rpar);
}
if (graphics.flip) {
- labs = ["down","left","up"];
+ var labs = ["down","left","up"];
} else {
- labs = ["down","right","up"];
+ var labs = ["down","right","up"];
}
- str = [["This sum block is obsolete","parameters cannot be modified. Please replace it with new sum block"],["and gain blocks in the linear palette"," ","Input ports are located at up, side and down positions.","Current gains are:"]];
- str = [[str],[(part(labs.slice(),1,7)+exprs.slice())]];
+ var str = [["This sum block is obsolete","parameters cannot be modified. Please replace it with new sum block"],["and gain blocks in the linear palette"," ","Input ports are located at up, side and down positions.","Current gains are:"]];
+ var str = [[str],[(part(labs.slice(),1,7)+exprs.slice())]];
message(str);
return new BasicBlock(this.x);
}
diff --git a/js/Linear/SUMMATION.js b/js/Linear/SUMMATION.js
index a56677db..d70f6699 100644
--- a/js/Linear/SUMMATION.js
+++ b/js/Linear/SUMMATION.js
@@ -11,8 +11,8 @@ function SUMMATION() {
this.model.ipar = new ScilabDouble(this.sgn);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = sci2exp(this.sgn);
- gr_i = [];
+ var exprs = sci2exp(this.sgn);
+ var gr_i = [];
this.x = standard_define([2,3],this.model,exprs,gr_i);
return new Summation(this.x);
}
@@ -32,13 +32,13 @@ function SUMMATION() {
this.sgn = inverse(arguments[0]["sgn"])
this.satur = arguments[0]["satur"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
if (size(exprs,1)==1) {
- exprs = [[sci2exp(1)],[exprs],[sci2exp(0)]];
+ var exprs = [[sci2exp(1)],[exprs],[sci2exp(0)]];
} else if (size(exprs,1)==2) {
- exprs = [[exprs],[sci2exp(0)]];
+ var exprs = [[exprs],[sci2exp(0)]];
}
while (true) {
[ok,this.Datatype,this.sgn,this.satur,exprs] = scicos_getvalue("Set sum block parameters",["Datatype (1=real double 2=complex 3=int32 ...)","Number of inputs or sign vector (of +1, -1)","Do on Overflow(0=Nothing 1=Saturate 2=Error)"],list("vec",1,"vec",-1,"vec",1),exprs);
@@ -48,45 +48,45 @@ function SUMMATION() {
this.sgn = this.sgn.slice();
if ((this.satur!=0&&this.satur!=1&&this.satur!=2)) {
message("Do on overflow must be 0,1,2");
- ok = false;
+ var ok = false;
}
if (size(this.sgn,1)==1) {
if (this.sgn<1) {
message("Number of inputs must be > 0");
- ok = false;
+ var ok = false;
} else if (this.sgn==1) {
- in1 = -1;
- in2 = -2;
+ var in1 = -1;
+ var in2 = -2;
this.sgn = [];
- nout = 1;
- nout2 = 1;
+ var nout = 1;
+ var nout2 = 1;
} else {
- in1 = -ones(this.sgn,1);
- in2 = 2*in1;
+ var in1 = -ones(this.sgn,1);
+ var in2 = 2*in1;
this.sgn = ones(this.sgn,1);
- nout = -1;
- nout2 = -2;
+ var nout = -1;
+ var nout2 = -2;
}
} else {
if (!and(abs(this.sgn)==1)) {
message("Signs can only be +1 or -1");
- ok = false;
+ var ok = false;
} else {
- in1 = -ones(size(this.sgn,1),1);
- in2 = 2*in1;
- nout = -1;
- nout2 = -2;
+ var in1 = -ones(size(this.sgn,1),1);
+ var in2 = 2*in1;
+ var nout = -1;
+ var nout2 = -2;
}
}
- it = this.Datatype*ones(1,size(in1,1));
- ot = this.Datatype;
+ var it = this.Datatype*ones(1,size(in1,1));
+ var ot = this.Datatype;
if (this.Datatype==1) {
this.model.sim = list(new ScilabString(["summation"]), new ScilabDouble([4]));
} else if (this.Datatype==2) {
this.model.sim = list(new ScilabString(["summation_z"]), new ScilabDouble([4]));
} else if (((this.Datatype<1)||(this.Datatype>8))) {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
} else {
if (this.satur==0) {
if (this.Datatype==3) {
@@ -133,7 +133,10 @@ function SUMMATION() {
}
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],it),list([nout,nout2],ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list([in1,in2],it),list([nout,nout2],ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.rpar = new ScilabDouble([this.satur]);
diff --git a/js/Linear/SUMMATION.pickle b/js/Linear/SUMMATION.pickle
index 6a1a82b2..9645ce38 100644
--- a/js/Linear/SUMMATION.pickle
+++ b/js/Linear/SUMMATION.pickle
@@ -49,61 +49,58 @@ sS'model.sim'
p14
S'list'
p15
-sS'[this.model,graphics,ok]'
-p16
-g10
sS'model.out2'
-p17
+p16
g10
sS'in1'
-p18
+p17
g10
sS'in2'
-p19
+p18
g10
sS'model.rpar'
-p20
+p19
NsS'graphics.exprs'
-p21
+p20
g8
sS'nout2'
-p22
+p21
g10
sS'model.ipar'
-p23
+p22
g8
sS'typ'
-p24
+p23
S'vector'
-p25
+p24
sS'ok'
-p26
+p25
S'boolean'
-p27
+p26
sS'model.blocktype'
-p28
+p27
g5
sS'model.dep_ut'
-p29
-g25
+p28
+g24
sS'exprs'
-p30
+p29
g5
sS'gr_i'
-p31
-g25
+p30
+g24
sS'y'
-p32
-g25
+p31
+g24
sS'x'
-p33
+p32
g10
sS'model'
-p34
+p33
g2
sS'ot'
-p35
+p34
NsS'nout'
-p36
+p35
g10
s. \ No newline at end of file
diff --git a/js/Linear/SUM_f.js b/js/Linear/SUM_f.js
index 5557a31a..59abbc82 100644
--- a/js/Linear/SUM_f.js
+++ b/js/Linear/SUM_f.js
@@ -7,8 +7,8 @@ function SUM_f() {
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- gr_i = [];
- exprs = [];
+ var gr_i = [];
+ var exprs = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Linear/TCLSS.js b/js/Linear/TCLSS.js
index 50067410..51b90c89 100644
--- a/js/Linear/TCLSS.js
+++ b/js/Linear/TCLSS.js
@@ -6,9 +6,9 @@ function TCLSS() {
this.B = 1;
this.C = 1;
this.D = 0;
- in1 = 1;
- nx = size(this.x0,"*");
- out = 1;
+ var in1 = 1;
+ var nx = size(this.x0,"*");
+ var out = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["tcslti4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1],[nx]);
@@ -18,8 +18,8 @@ function TCLSS() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -43,38 +43,43 @@ function TCLSS() {
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==7) {
- exprs = exprs[[1:4,7]-1];
+ var exprs = exprs[[1:4,7]-1];
}
while (true) {
[ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters",["A matrix","B matrix","C matrix","D matrix","Initial state"],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
if (!ok) {
break;
}
- out = size(this.C,1);
+ var out = size(this.C,1);
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = size(this.B,2);
+ var in1 = size(this.B,2);
if (in1==0) {
- in1 = [];
+ var in1 = [];
}
- [ms,ns] = size(this.A);
+ var tmpvar0 = size(this.A)
+ var ms = tmpvar0[0]
+ var ns = tmpvar0[1];
if (ms!=ns) {
message("A matrix must be square");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,[[in1],[ms]],out,1,[]);
+ var tmpvar1 = check_io(this.model,graphics,[[in1],[ms]],out,1,[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
- rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
- mmm = [true,true];
+ var mmm = [true,true];
} else {
- mmm = [false,true];
+ var mmm = [false,true];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
diff --git a/js/Linear/TCLSS.pickle b/js/Linear/TCLSS.pickle
index 64147209..24d42f9f 100644
--- a/js/Linear/TCLSS.pickle
+++ b/js/Linear/TCLSS.pickle
@@ -33,89 +33,83 @@ p5
sS'x.model'
p6
g2
-sS'model.dep_ut'
-p7
-S'vector'
-p8
sS'model.out'
-p9
+p7
S'double'
-p10
+p8
sS'out'
-p11
-g10
+p9
+g8
sS'model.in1'
-p12
+p10
g5
sS'x.graphics'
-p13
+p11
g2
sS'nx'
-p14
-g10
+p12
+g8
sS'model.evtin'
-p15
-g10
+p13
+g8
sS'A'
-p16
-g10
+p14
+g8
sS'model.sim'
-p17
+p15
S'list'
-p18
+p16
sS'C'
-p19
-g10
+p17
+g8
sS'B'
-p20
-g10
+p18
+g8
sS'D'
-p21
-g10
-sS'[this.model,graphics,ok]'
-p22
-g18
+p19
+g8
sS'in1'
-p23
-g10
+p20
+g8
sS'model.rpar'
-p24
+p21
g5
sS'mmm'
+p22
+S'vector'
+p23
+sS'model.state'
+p24
+g8
+sS'graphics.exprs'
p25
g8
-sS'model.state'
+sS'x0'
p26
-g10
-sS'graphics.exprs'
+g8
+sS'typ'
p27
-g10
-sS'x0'
+g23
+sS'model.blocktype'
p28
-g10
-sS'typ'
+S'string'
p29
-g8
-sS'model.blocktype'
+sS'model.dep_ut'
p30
-S'string'
-p31
-sS'[ms,ns]'
-p32
-g10
+g23
sS'exprs'
-p33
+p31
g5
sS'gr_i'
-p34
-g8
+p32
+g23
sS'y'
-p35
-g8
+p33
+g23
sS'x'
-p36
-g10
+p34
+g8
sS'model'
-p37
+p35
g2
s. \ No newline at end of file
diff --git a/js/Linear/TCLSS_f.js b/js/Linear/TCLSS_f.js
index 5fd45bac..33f82aa0 100644
--- a/js/Linear/TCLSS_f.js
+++ b/js/Linear/TCLSS_f.js
@@ -6,9 +6,9 @@ function TCLSS_f() {
this.B = 1;
this.C = 1;
this.D = 0;
- in1 = 1;
- nx = size(this.x0,"*");
- out = 1;
+ var in1 = 1;
+ var nx = size(this.x0,"*");
+ var out = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["tcslti"]), new ScilabDouble([1]));
this.model.in1 = new ScilabDouble([in1],[nx]);
@@ -18,8 +18,8 @@ function TCLSS_f() {
this.model.rpar = new ScilabDouble([this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -43,38 +43,43 @@ function TCLSS_f() {
this.D = parseFloat(arguments[0]["D"])
this.x0 = parseFloat(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==7) {
- exprs = exprs[[1:4,7]-1];
+ var exprs = exprs[[1:4,7]-1];
}
while (true) {
[ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters",["A matrix","B matrix","C matrix","D matrix","Initial state"],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
if (!ok) {
break;
}
- out = size(this.C,1);
+ var out = size(this.C,1);
if (out==0) {
- out = [];
+ var out = [];
}
- in1 = size(this.B,2);
+ var in1 = size(this.B,2);
if (in1==0) {
- in1 = [];
+ var in1 = [];
}
- [ms,ns] = size(this.A);
+ var tmpvar0 = size(this.A)
+ var ms = tmpvar0[0]
+ var ns = tmpvar0[1];
if (ms!=ns) {
message("A matrix must be square");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,[[in1],[ms]],out,1,[]);
+ var tmpvar1 = check_io(this.model,graphics,[[in1],[ms]],out,1,[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
graphics.exprs = exprs;
- rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ var rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
if (this.D!=[]) {
if (norm(this.D,1)!=0) {
- mmm = [true,true];
+ var mmm = [true,true];
} else {
- mmm = [false,true];
+ var mmm = [false,true];
}
if (or(this.model.dep_ut!=mmm)) {
this.model.dep_ut = mmm;
diff --git a/js/Linear/TCLSS_f.pickle b/js/Linear/TCLSS_f.pickle
index 64147209..24d42f9f 100644
--- a/js/Linear/TCLSS_f.pickle
+++ b/js/Linear/TCLSS_f.pickle
@@ -33,89 +33,83 @@ p5
sS'x.model'
p6
g2
-sS'model.dep_ut'
-p7
-S'vector'
-p8
sS'model.out'
-p9
+p7
S'double'
-p10
+p8
sS'out'
-p11
-g10
+p9
+g8
sS'model.in1'
-p12
+p10
g5
sS'x.graphics'
-p13
+p11
g2
sS'nx'
-p14
-g10
+p12
+g8
sS'model.evtin'
-p15
-g10
+p13
+g8
sS'A'
-p16
-g10
+p14
+g8
sS'model.sim'
-p17
+p15
S'list'
-p18
+p16
sS'C'
-p19
-g10
+p17
+g8
sS'B'
-p20
-g10
+p18
+g8
sS'D'
-p21
-g10
-sS'[this.model,graphics,ok]'
-p22
-g18
+p19
+g8
sS'in1'
-p23
-g10
+p20
+g8
sS'model.rpar'
-p24
+p21
g5
sS'mmm'
+p22
+S'vector'
+p23
+sS'model.state'
+p24
+g8
+sS'graphics.exprs'
p25
g8
-sS'model.state'
+sS'x0'
p26
-g10
-sS'graphics.exprs'
+g8
+sS'typ'
p27
-g10
-sS'x0'
+g23
+sS'model.blocktype'
p28
-g10
-sS'typ'
+S'string'
p29
-g8
-sS'model.blocktype'
+sS'model.dep_ut'
p30
-S'string'
-p31
-sS'[ms,ns]'
-p32
-g10
+g23
sS'exprs'
-p33
+p31
g5
sS'gr_i'
-p34
-g8
+p32
+g23
sS'y'
-p35
-g8
+p33
+g23
sS'x'
-p36
-g10
+p34
+g8
sS'model'
-p37
+p35
g2
s. \ No newline at end of file
diff --git a/js/Linear/TIME_DELAY.js b/js/Linear/TIME_DELAY.js
index 466e3ee5..d02b26f5 100644
--- a/js/Linear/TIME_DELAY.js
+++ b/js/Linear/TIME_DELAY.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Linear/TIME_DELAY.sci" */
function TIME_DELAY() {
TIME_DELAY.prototype.define = function TIME_DELAY() {
- nin = 1;
+ var nin = 1;
this.T = 1;
this.init = 0;
this.N = 1024;
@@ -13,8 +13,8 @@ function TIME_DELAY() {
this.model.ipar = new ScilabDouble([this.N]);
this.model.blocktype = new ScilabString(["x"]);
this.model.dep_ut = [false,true];
- exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
- gr_i = [];
+ var exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
+ var gr_i = [];
this.x = standard_define([3.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,10 +34,10 @@ function TIME_DELAY() {
this.init = parseFloat(arguments[0]["init"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- nin = this.model.in1[1-1];
+ var nin = this.model.in1[1-1];
while (true) {
[ok,this.T,this.init,this.N,exprs] = scicos_getvalue("Set delay parameters",["Delay","initial input","Buffer size"],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -45,14 +45,17 @@ function TIME_DELAY() {
}
if (this.N<2) {
message("Buffer must be larger than 2");
- ok = false;
+ var ok = false;
}
if (this.T<=0) {
message("Delay must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,[-1],-1,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,[-1],-1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/TIME_DELAY.pickle b/js/Linear/TIME_DELAY.pickle
index 79702cf9..b4c2bf5b 100644
--- a/js/Linear/TIME_DELAY.pickle
+++ b/js/Linear/TIME_DELAY.pickle
@@ -46,51 +46,48 @@ p12
sS'nin'
p13
g6
-sS'[this.model,graphics,ok]'
-p14
-g12
sS'model.rpar'
-p15
+p14
g8
sS'N'
-p16
+p15
g6
sS'T'
-p17
+p16
g6
sS'graphics.exprs'
-p18
+p17
NsS'model.ipar'
-p19
+p18
g6
sS'typ'
-p20
+p19
g8
sS'ok'
-p21
+p20
S'boolean'
-p22
+p21
sS'model.blocktype'
-p23
+p22
S'string'
-p24
+p23
sS'model.dep_ut'
-p25
+p24
g8
sS'exprs'
-p26
+p25
S'matrix'
-p27
+p26
sS'gr_i'
-p28
+p27
g8
sS'y'
-p29
+p28
g8
sS'x'
-p30
+p29
g6
sS'model'
-p31
+p30
g2
s. \ No newline at end of file
diff --git a/js/Linear/VARIABLE_DELAY.js b/js/Linear/VARIABLE_DELAY.js
index 575eafc3..3be1a51b 100644
--- a/js/Linear/VARIABLE_DELAY.js
+++ b/js/Linear/VARIABLE_DELAY.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Linear/VARIABLE_DELAY.sci" */
function VARIABLE_DELAY() {
VARIABLE_DELAY.prototype.define = function VARIABLE_DELAY() {
- nin = 1;
+ var nin = 1;
this.T = 1;
this.init = 0;
this.N = 1024;
@@ -13,8 +13,8 @@ function VARIABLE_DELAY() {
this.model.ipar = new ScilabDouble([this.N]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
- gr_i = [];
+ var exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,10 +34,10 @@ function VARIABLE_DELAY() {
this.init = parseFloat(arguments[0]["init"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- nin = this.model.in1[1-1];
+ var nin = this.model.in1[1-1];
while (true) {
[ok,this.T,this.init,this.N,exprs] = scicos_getvalue("Set delay parameters",["Max delay","initial input","Buffer size"],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -45,14 +45,17 @@ function VARIABLE_DELAY() {
}
if (this.N<2) {
message("Buffer must be larger than 2");
- ok = false;
+ var ok = false;
}
if (this.T<=0) {
message("Delay must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,[[-1],[1]],-1,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,[[-1],[1]],-1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/VARIABLE_DELAY.pickle b/js/Linear/VARIABLE_DELAY.pickle
index a46b1460..7f7ec489 100644
--- a/js/Linear/VARIABLE_DELAY.pickle
+++ b/js/Linear/VARIABLE_DELAY.pickle
@@ -46,51 +46,48 @@ p12
sS'nin'
p13
g6
-sS'[this.model,graphics,ok]'
-p14
-g12
sS'model.rpar'
-p15
+p14
S'vector'
-p16
+p15
sS'N'
-p17
+p16
g6
sS'T'
-p18
+p17
g6
sS'graphics.exprs'
-p19
+p18
NsS'model.ipar'
-p20
+p19
g6
sS'typ'
-p21
-g16
+p20
+g15
sS'ok'
-p22
+p21
S'boolean'
-p23
+p22
sS'model.blocktype'
-p24
+p23
S'string'
-p25
+p24
sS'model.dep_ut'
-p26
-g16
+p25
+g15
sS'exprs'
-p27
+p26
g8
sS'gr_i'
-p28
-g16
+p27
+g15
sS'y'
-p29
-g16
+p28
+g15
sS'x'
-p30
+p29
g6
sS'model'
-p31
+p30
g2
s. \ No newline at end of file
diff --git a/js/MatrixOp/CUMSUM.js b/js/MatrixOp/CUMSUM.js
index 3283e992..04df6b00 100644
--- a/js/MatrixOp/CUMSUM.js
+++ b/js/MatrixOp/CUMSUM.js
@@ -2,8 +2,8 @@
function CUMSUM() {
CUMSUM.prototype.define = function CUMSUM() {
this.model = scicos_model();
- function_name = "cumsum_m";
- funtyp = 4;
+ var function_name = "cumsum_m";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -20,8 +20,8 @@ function CUMSUM() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(0)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -41,8 +41,8 @@ function CUMSUM() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -51,45 +51,48 @@ function CUMSUM() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
if ((this.typ==1)) {
if ((this.decomptyp==0)) {
- function_name = "cumsum_m";
- out = [-1,-2];
+ var function_name = "cumsum_m";
+ var out = [-1,-2];
} else if ((this.decomptyp==1)) {
- function_name = "cumsum_r";
- out = [-1,1];
+ var function_name = "cumsum_r";
+ var out = [-1,1];
} else if ((this.decomptyp==2)) {
- function_name = "cumsum_c";
- out = [1,-2];
+ var function_name = "cumsum_c";
+ var out = [1,-2];
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 1;
- ot = 1;
+ var it = 1;
+ var ot = 1;
} else if ((this.typ==2)) {
if ((this.decomptyp==0)) {
- function_name = "cumsumz_m";
+ var function_name = "cumsumz_m";
} else if ((this.decomptyp==1)) {
- function_name = "cumsumz_r";
+ var function_name = "cumsumz_r";
} else if ((this.decomptyp==2)) {
- function_name = "cumsumz_c";
+ var function_name = "cumsumz_c";
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 2;
- ot = 2;
+ var it = 2;
+ var ot = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
diff --git a/js/MatrixOp/CUMSUM.pickle b/js/MatrixOp/CUMSUM.pickle
index a299c038..071f5cfc 100644
--- a/js/MatrixOp/CUMSUM.pickle
+++ b/js/MatrixOp/CUMSUM.pickle
@@ -30,103 +30,100 @@ sS'it'
p6
S'double'
p7
-sS'model.intyp'
-p8
-g7
sS'funtyp'
-p9
+p8
g7
sS'model.out'
-p10
+p9
g7
sS'out'
-p11
+p10
g2
sS'model.in2'
-p12
+p11
g7
-sS'model.in1'
-p13
+sS'model.intyp'
+p12
g7
sS'label'
-p14
+p13
S'matrix'
-p15
+p14
sS'model.evtin'
-p16
+p15
g2
sS'model.firing'
-p17
+p16
g2
sS'function_name'
-p18
+p17
S'string'
-p19
+p18
sS'model.sim'
-p20
+p19
S'list'
-p21
+p20
sS'model.evtout'
-p22
+p21
g2
sS'arg1.graphics'
-p23
+p22
g4
-sS'[this.model,graphics,ok]'
-p24
-g7
sS'model.out2'
-p25
+p23
g7
sS'in1'
-p26
+p24
g2
sS'model.rpar'
-p27
+p25
g2
+sS'model.in1'
+p26
+g7
sS'model.outtyp'
-p28
+p27
g7
sS'model.state'
-p29
+p28
g2
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
+p30
g2
sS'typ'
-p32
+p31
g2
sS'arg1.model'
-p33
+p32
g4
sS'label[9-1]'
-p34
+p33
g2
sS'ok'
-p35
+p34
S'boolean'
-p36
+p35
sS'model.blocktype'
-p37
-g19
+p36
+g18
sS'model.dep_ut'
-p38
+p37
g2
sS'gr_i'
-p39
+p38
g2
sS'y'
-p40
+p39
g2
sS'x'
-p41
+p40
g7
sS'model'
-p42
+p41
g4
sS'ot'
-p43
+p42
g7
s. \ No newline at end of file
diff --git a/js/MatrixOp/EXTRACT.js b/js/MatrixOp/EXTRACT.js
index 5120789f..ad64ec4c 100644
--- a/js/MatrixOp/EXTRACT.js
+++ b/js/MatrixOp/EXTRACT.js
@@ -2,8 +2,8 @@
function EXTRACT() {
EXTRACT.prototype.define = function EXTRACT() {
this.model = scicos_model();
- function_name = "extract";
- funtyp = 4;
+ var function_name = "extract";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -20,8 +20,8 @@ function EXTRACT() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp([1])],[sci2exp([1])]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp([1])],[sci2exp([1])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -41,8 +41,8 @@ function EXTRACT() {
this.a = inverse(arguments[0]["a"])
this.b = inverse(arguments[0]["b"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -55,42 +55,45 @@ function EXTRACT() {
break;
}
if ((this.typ==1)) {
- function_name = "extract";
- ot = 1;
- it = 1;
+ var function_name = "extract";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "extractz";
- ot = 2;
- it = 2;
+ var function_name = "extractz";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- ma = size(this.a,1);
- mb = size(this.b,1);
+ var ma = size(this.a,1);
+ var mb = size(this.b,1);
if ((ma==0||mb==0)) {
message("empty field");
- ok = false;
+ var ok = false;
}
for (i=1;i<=ma;i+=1) {
if ((this.a[i-1]<=0)) {
message("invalid index");
- ok = false;
+ var ok = false;
}
}
for (j=1;j<=mb;j+=1) {
if ((this.b[j-1]<=0)) {
message("invalid index");
- ok = false;
+ var ok = false;
}
}
this.model.ipar = new ScilabDouble([this.a],[this.b],[ma],[mb]);
- in1 = [this.model.in1,this.model.in2];
- out = [ma,mb];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [ma,mb];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/EXTRACT.pickle b/js/MatrixOp/EXTRACT.pickle
index d65c7d90..3ab6adf0 100644
--- a/js/MatrixOp/EXTRACT.pickle
+++ b/js/MatrixOp/EXTRACT.pickle
@@ -23,9 +23,10 @@ sS'arg1'
p3
S'object'
p4
-sS'graphics.exprs'
+sS'graphics'
p5
-NsS'it'
+g4
+sS'it'
p6
S'double'
p7
@@ -71,74 +72,70 @@ g2
sS'arg1.graphics'
p23
g4
-sS'[this.model,graphics,ok]'
-p24
-g7
sS'model.out2'
-p25
+p24
g7
sS'in1'
-p26
+p25
g2
sS'model.rpar'
-p27
+p26
g2
sS'model.outtyp'
-p28
+p27
g7
sS'b'
-p29
+p28
g2
sS'model.state'
-p30
+p29
g2
-sS'graphics'
+sS'graphics.exprs'
+p30
+NsS'ma'
p31
-g4
-sS'ma'
-p32
g7
sS'model.ipar'
-p33
+p32
g2
sS'typ'
-p34
+p33
g2
sS'a'
-p35
+p34
g2
sS'arg1.model'
-p36
+p35
g4
sS'label[9-1]'
-p37
+p36
g2
sS'ok'
-p38
+p37
S'boolean'
-p39
+p38
sS'model.blocktype'
-p40
+p39
g19
sS'mb'
-p41
+p40
g7
sS'model.dep_ut'
-p42
+p41
g2
sS'gr_i'
-p43
+p42
g2
sS'y'
-p44
+p43
g2
sS'x'
-p45
+p44
g7
sS'model'
-p46
+p45
g4
sS'ot'
-p47
+p46
g7
s. \ No newline at end of file
diff --git a/js/MatrixOp/EXTTRI.js b/js/MatrixOp/EXTTRI.js
index 071ee74f..07bd5b9c 100644
--- a/js/MatrixOp/EXTTRI.js
+++ b/js/MatrixOp/EXTTRI.js
@@ -2,8 +2,8 @@
function EXTTRI() {
EXTTRI.prototype.define = function EXTTRI() {
this.model = scicos_model();
- function_name = "extrilz";
- funtyp = 4;
+ var function_name = "extrilz";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -20,8 +20,8 @@ function EXTTRI() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(1)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -41,8 +41,8 @@ function EXTTRI() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -51,42 +51,45 @@ function EXTTRI() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
if ((this.typ==1)) {
if ((this.decomptyp==1)) {
- function_name = "exttril";
+ var function_name = "exttril";
} else if ((this.decomptyp==2)) {
- function_name = "exttriu";
+ var function_name = "exttriu";
} else if ((this.decomptyp==3)) {
- function_name = "extdiag";
+ var function_name = "extdiag";
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 1;
- ot = 1;
+ var it = 1;
+ var ot = 1;
} else if ((this.typ==2)) {
if ((this.decomptyp==1)) {
- function_name = "exttrilz";
+ var function_name = "exttrilz";
} else if ((this.decomptyp==2)) {
- function_name = "exttriuz";
+ var function_name = "exttriuz";
} else if ((this.decomptyp==3)) {
- function_name = "extdiagz";
+ var function_name = "extdiagz";
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 2;
- ot = 2;
+ var it = 2;
+ var ot = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
diff --git a/js/MatrixOp/EXTTRI.pickle b/js/MatrixOp/EXTTRI.pickle
index a299c038..2c5c8a8f 100644
--- a/js/MatrixOp/EXTTRI.pickle
+++ b/js/MatrixOp/EXTTRI.pickle
@@ -72,61 +72,58 @@ g2
sS'arg1.graphics'
p23
g4
-sS'[this.model,graphics,ok]'
-p24
-g7
sS'model.out2'
-p25
+p24
g7
sS'in1'
-p26
+p25
g2
sS'model.rpar'
-p27
+p26
g2
sS'model.outtyp'
-p28
+p27
g7
sS'model.state'
-p29
+p28
g2
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
+p30
g2
sS'typ'
-p32
+p31
g2
sS'arg1.model'
-p33
+p32
g4
sS'label[9-1]'
-p34
+p33
g2
sS'ok'
-p35
+p34
S'boolean'
-p36
+p35
sS'model.blocktype'
-p37
+p36
g19
sS'model.dep_ut'
-p38
+p37
g2
sS'gr_i'
-p39
+p38
g2
sS'y'
-p40
+p39
g2
sS'x'
-p41
+p40
g7
sS'model'
-p42
+p41
g4
sS'ot'
-p43
+p42
g7
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATBKSL.js b/js/MatrixOp/MATBKSL.js
index f66c8398..2039befb 100644
--- a/js/MatrixOp/MATBKSL.js
+++ b/js/MatrixOp/MATBKSL.js
@@ -2,8 +2,8 @@
function MATBKSL() {
MATBKSL.prototype.define = function MATBKSL() {
this.model = scicos_model();
- function_name = "mat_bksl";
- funtyp = 4;
+ var function_name = "mat_bksl";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1],[-1]);
this.model.in2 = new ScilabDouble([-2],[-3]);
@@ -20,8 +20,8 @@ function MATBKSL() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -37,8 +37,8 @@ function MATBKSL() {
MATBKSL.prototype.set = function MATBKSL() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -49,23 +49,26 @@ function MATBKSL() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_bksl";
- ot = 1;
- it = [1,1];
+ var function_name = "mat_bksl";
+ var ot = 1;
+ var it = [1,1];
} else if ((this.typ==2)) {
- function_name = "matz_bksl";
- ot = 2;
- it = [2,2];
+ var function_name = "matz_bksl";
+ var ot = 2;
+ var it = [2,2];
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/MATBKSL.pickle b/js/MatrixOp/MATBKSL.pickle
index 32187fe9..d6584a86 100644
--- a/js/MatrixOp/MATBKSL.pickle
+++ b/js/MatrixOp/MATBKSL.pickle
@@ -68,61 +68,58 @@ g2
sS'arg1.graphics'
p23
g4
-sS'[this.model,graphics,ok]'
-p24
-g9
sS'model.out2'
-p25
+p24
g9
sS'in1'
-p26
+p25
g2
sS'model.rpar'
-p27
+p26
g2
sS'model.outtyp'
-p28
+p27
g9
sS'model.state'
-p29
+p28
g2
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
+p30
g2
sS'typ'
-p32
+p31
g2
sS'arg1.model'
-p33
+p32
g4
sS'label[9-1]'
-p34
+p33
g2
sS'ok'
-p35
+p34
S'boolean'
-p36
+p35
sS'model.blocktype'
-p37
+p36
g19
sS'model.dep_ut'
-p38
+p37
g2
sS'gr_i'
-p39
+p38
g2
sS'y'
-p40
+p39
g2
sS'x'
-p41
+p40
g9
sS'model'
-p42
+p41
g4
sS'ot'
-p43
+p42
g9
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATCATH.js b/js/MatrixOp/MATCATH.js
index dc1558d0..d0ba82c1 100644
--- a/js/MatrixOp/MATCATH.js
+++ b/js/MatrixOp/MATCATH.js
@@ -2,8 +2,8 @@
function MATCATH() {
MATCATH.prototype.define = function MATCATH() {
this.model = scicos_model();
- function_name = "mat_cath";
- funtyp = 4;
+ var function_name = "mat_cath";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1],[-1]);
this.model.in2 = new ScilabDouble([-2],[-3]);
@@ -20,8 +20,8 @@ function MATCATH() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(2)];
- gr_i = [];
+ var label = [sci2exp(2)];
+ var gr_i = [];
this.x = standard_define([2,3],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -39,24 +39,27 @@ function MATCATH() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")>1) {
- label = "size(evstr("+label[2-1]+"),\'*\')";
+ var label = "size(evstr("+label[2-1]+"),\'*\')";
}
while (true) {
[ok,this.nin,this.lab] = scicos_getvalue("Set MATCATH block parameters",["Number of input"],list("vec",1),label);
if (!ok) {
break;
}
- label = this.lab;
- in1 = [-1*(ones(this.nin,1)),-(transpose([2:this.nin+1]))];
- out = [-1,0];
- it = -1*(ones(this.nin,1));
- ot = -1;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = this.lab;
+ var in1 = [-1*(ones(this.nin,1)),-(transpose([2:this.nin+1]))];
+ var out = [-1,0];
+ var it = -1*(ones(this.nin,1));
+ var ot = -1;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
- funtyp = 4;
+ var funtyp = 4;
this.model.sim = list(new ScilabString(["mat_cath"]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/MATCATH.pickle b/js/MatrixOp/MATCATH.pickle
index 6f396cfb..47afdfa1 100644
--- a/js/MatrixOp/MATCATH.pickle
+++ b/js/MatrixOp/MATCATH.pickle
@@ -67,56 +67,53 @@ g2
sS'arg1.graphics'
p22
g4
-sS'[this.model,graphics,ok]'
-p23
-g7
sS'model.out2'
-p24
+p23
g7
sS'in1'
-p25
+p24
g2
sS'model.rpar'
-p26
+p25
g2
sS'model.in1'
-p27
+p26
g12
sS'model.outtyp'
-p28
+p27
g7
sS'model.state'
-p29
+p28
g2
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
+p30
g2
sS'typ'
-p32
+p31
g2
sS'arg1.model'
-p33
+p32
NsS'model.blocktype'
-p34
+p33
g18
sS'model.dep_ut'
-p35
+p34
g2
sS'gr_i'
-p36
+p35
g2
sS'y'
-p37
+p36
g2
sS'x'
-p38
+p37
g7
sS'model'
-p39
+p38
g4
sS'ot'
-p40
+p39
g7
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATCATV.js b/js/MatrixOp/MATCATV.js
index c6a998f3..a54a2a05 100644
--- a/js/MatrixOp/MATCATV.js
+++ b/js/MatrixOp/MATCATV.js
@@ -1,10 +1,10 @@
/* autogenerated from "macros/MatrixOp/MATCATV.sci" */
function MATCATV() {
MATCATV.prototype.define = function MATCATV() {
- l1 = [[2],[2]];
+ var l1 = [[2],[2]];
this.model = scicos_model();
- function_name = "mat_catv";
- funtyp = 4;
+ var function_name = "mat_catv";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in2 = new ScilabDouble([-1],[-1]);
this.model.in1 = new ScilabDouble([-2],[-3]);
@@ -21,8 +21,8 @@ function MATCATV() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(2)];
- gr_i = [];
+ var label = [sci2exp(2)];
+ var gr_i = [];
this.x = standard_define([2,3],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -40,24 +40,27 @@ function MATCATV() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")>1) {
- label = "size(evstr("+label[2-1]+"),\'*\')";
+ var label = "size(evstr("+label[2-1]+"),\'*\')";
}
while (true) {
[ok,this.nin,this.lab] = scicos_getvalue("Set MATCATV block parameters",["Number od inputs"],list("vec",1),label);
if (!ok) {
break;
}
- label = this.lab;
- in1 = [-(transpose([2:this.nin+1])),-ones(this.nin,1)];
- it = -ones(this.nin,1);
- ot = -1;
- out = [0,-1];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = this.lab;
+ var in1 = [-(transpose([2:this.nin+1])),-ones(this.nin,1)];
+ var it = -ones(this.nin,1);
+ var ot = -1;
+ var out = [0,-1];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
- funtyp = 4;
+ var funtyp = 4;
this.model.sim = list(new ScilabString(["mat_catv"]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/MATCATV.pickle b/js/MatrixOp/MATCATV.pickle
index d29515a3..ead836c3 100644
--- a/js/MatrixOp/MATCATV.pickle
+++ b/js/MatrixOp/MATCATV.pickle
@@ -67,59 +67,56 @@ g2
sS'arg1.graphics'
p22
g4
-sS'[this.model,graphics,ok]'
-p23
-g7
sS'model.out2'
-p24
+p23
g7
sS'in1'
-p25
+p24
g2
sS'model.rpar'
-p26
+p25
g2
sS'model.in1'
-p27
+p26
g12
sS'model.outtyp'
-p28
+p27
g7
sS'model.state'
-p29
+p28
g2
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
+p30
g2
sS'typ'
-p32
+p31
g2
sS'arg1.model'
-p33
+p32
NsS'model.blocktype'
-p34
+p33
g18
sS'model.dep_ut'
-p35
+p34
g2
sS'gr_i'
-p36
+p35
g2
sS'l1'
-p37
+p36
g12
sS'y'
-p38
+p37
g2
sS'x'
-p39
+p38
g7
sS'model'
-p40
+p39
g4
sS'ot'
-p41
+p40
g7
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATDET.js b/js/MatrixOp/MATDET.js
index e9760077..ea37a5d3 100644
--- a/js/MatrixOp/MATDET.js
+++ b/js/MatrixOp/MATDET.js
@@ -2,8 +2,8 @@
function MATDET() {
MATDET.prototype.define = function MATDET() {
this.model = scicos_model();
- function_name = "mat_det";
- funtyp = 4;
+ var function_name = "mat_det";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-1]);
@@ -20,8 +20,8 @@ function MATDET() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -37,8 +37,8 @@ function MATDET() {
MATDET.prototype.set = function MATDET() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -49,23 +49,26 @@ function MATDET() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_det";
- ot = 1;
- it = 1;
+ var function_name = "mat_det";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "matz_det";
- ot = 2;
- it = 2;
+ var function_name = "matz_det";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/MATDET.pickle b/js/MatrixOp/MATDET.pickle
index f8728324..42a969d6 100644
--- a/js/MatrixOp/MATDET.pickle
+++ b/js/MatrixOp/MATDET.pickle
@@ -67,61 +67,58 @@ g2
sS'arg1.graphics'
p22
g4
-sS'[this.model,graphics,ok]'
-p23
-g7
sS'model.out2'
-p24
+p23
g7
sS'in1'
-p25
+p24
g2
sS'model.rpar'
-p26
+p25
g2
sS'model.outtyp'
-p27
+p26
g7
sS'model.state'
-p28
+p27
g2
sS'graphics.exprs'
-p29
+p28
NsS'model.ipar'
-p30
+p29
g2
sS'typ'
-p31
+p30
g2
sS'arg1.model'
-p32
+p31
g4
sS'label[9-1]'
-p33
+p32
g2
sS'ok'
-p34
+p33
S'boolean'
-p35
+p34
sS'model.blocktype'
-p36
+p35
g18
sS'model.dep_ut'
-p37
+p36
g2
sS'gr_i'
-p38
+p37
g2
sS'y'
-p39
+p38
g2
sS'x'
-p40
+p39
g7
sS'model'
-p41
+p40
g4
sS'ot'
-p42
+p41
g7
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATDIAG.js b/js/MatrixOp/MATDIAG.js
index f3cd3976..1871efa6 100644
--- a/js/MatrixOp/MATDIAG.js
+++ b/js/MatrixOp/MATDIAG.js
@@ -2,8 +2,8 @@
function MATDIAG() {
MATDIAG.prototype.define = function MATDIAG() {
this.model = scicos_model();
- function_name = "mat_diag";
- funtyp = 4;
+ var function_name = "mat_diag";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([1]);
@@ -20,8 +20,8 @@ function MATDIAG() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -37,8 +37,8 @@ function MATDIAG() {
MATDIAG.prototype.set = function MATDIAG() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -49,23 +49,26 @@ function MATDIAG() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_diag";
- ot = 1;
- it = 1;
+ var function_name = "mat_diag";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "matz_diag";
- ot = 2;
- it = 2;
+ var function_name = "matz_diag";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/MATDIAG.pickle b/js/MatrixOp/MATDIAG.pickle
index f8728324..42a969d6 100644
--- a/js/MatrixOp/MATDIAG.pickle
+++ b/js/MatrixOp/MATDIAG.pickle
@@ -67,61 +67,58 @@ g2
sS'arg1.graphics'
p22
g4
-sS'[this.model,graphics,ok]'
-p23
-g7
sS'model.out2'
-p24
+p23
g7
sS'in1'
-p25
+p24
g2
sS'model.rpar'
-p26
+p25
g2
sS'model.outtyp'
-p27
+p26
g7
sS'model.state'
-p28
+p27
g2
sS'graphics.exprs'
-p29
+p28
NsS'model.ipar'
-p30
+p29
g2
sS'typ'
-p31
+p30
g2
sS'arg1.model'
-p32
+p31
g4
sS'label[9-1]'
-p33
+p32
g2
sS'ok'
-p34
+p33
S'boolean'
-p35
+p34
sS'model.blocktype'
-p36
+p35
g18
sS'model.dep_ut'
-p37
+p36
g2
sS'gr_i'
-p38
+p37
g2
sS'y'
-p39
+p38
g2
sS'x'
-p40
+p39
g7
sS'model'
-p41
+p40
g4
sS'ot'
-p42
+p41
g7
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATDIV.js b/js/MatrixOp/MATDIV.js
index dbe451df..d295365d 100644
--- a/js/MatrixOp/MATDIV.js
+++ b/js/MatrixOp/MATDIV.js
@@ -2,8 +2,8 @@
function MATDIV() {
MATDIV.prototype.define = function MATDIV() {
this.model = scicos_model();
- function_name = "mat_div";
- funtyp = 4;
+ var function_name = "mat_div";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1],[-2]);
this.model.in2 = new ScilabDouble([-3],[-3]);
@@ -20,8 +20,8 @@ function MATDIV() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -37,8 +37,8 @@ function MATDIV() {
MATDIV.prototype.set = function MATDIV() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -49,23 +49,26 @@ function MATDIV() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_div";
- ot = 1;
- it = [1,1];
+ var function_name = "mat_div";
+ var ot = 1;
+ var it = [1,1];
} else if ((this.typ==2)) {
- function_name = "matz_div";
- ot = 2;
- it = [2,2];
+ var function_name = "matz_div";
+ var ot = 2;
+ var it = [2,2];
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/MATDIV.pickle b/js/MatrixOp/MATDIV.pickle
index 32187fe9..d6584a86 100644
--- a/js/MatrixOp/MATDIV.pickle
+++ b/js/MatrixOp/MATDIV.pickle
@@ -68,61 +68,58 @@ g2
sS'arg1.graphics'
p23
g4
-sS'[this.model,graphics,ok]'
-p24
-g9
sS'model.out2'
-p25
+p24
g9
sS'in1'
-p26
+p25
g2
sS'model.rpar'
-p27
+p26
g2
sS'model.outtyp'
-p28
+p27
g9
sS'model.state'
-p29
+p28
g2
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
+p30
g2
sS'typ'
-p32
+p31
g2
sS'arg1.model'
-p33
+p32
g4
sS'label[9-1]'
-p34
+p33
g2
sS'ok'
-p35
+p34
S'boolean'
-p36
+p35
sS'model.blocktype'
-p37
+p36
g19
sS'model.dep_ut'
-p38
+p37
g2
sS'gr_i'
-p39
+p38
g2
sS'y'
-p40
+p39
g2
sS'x'
-p41
+p40
g9
sS'model'
-p42
+p41
g4
sS'ot'
-p43
+p42
g9
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATEIG.js b/js/MatrixOp/MATEIG.js
index bd8d9a1c..53c4e86d 100644
--- a/js/MatrixOp/MATEIG.js
+++ b/js/MatrixOp/MATEIG.js
@@ -2,8 +2,8 @@
function MATEIG() {
MATEIG.prototype.define = function MATEIG() {
this.model = scicos_model();
- function_name = "mat_vps";
- funtyp = 4;
+ var function_name = "mat_vps";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-1]);
@@ -20,8 +20,8 @@ function MATEIG() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(1)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -41,8 +41,8 @@ function MATEIG() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -51,43 +51,46 @@ function MATEIG() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
if ((this.typ==1)) {
if ((this.decomptyp==1)) {
- function_name = "mat_vps";
- out = [-1,1];
- ot = 2;
+ var function_name = "mat_vps";
+ var out = [-1,1];
+ var ot = 2;
} else if ((this.decomptyp==2)) {
- function_name = "mat_vpv";
- out = [[-1,-1],[-1,-1]];
- ot = [2,2];
+ var function_name = "mat_vpv";
+ var out = [[-1,-1],[-1,-1]];
+ var ot = [2,2];
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 1;
+ var it = 1;
} else if ((this.typ==2)) {
if ((this.decomptyp==1)) {
- function_name = "matz_vps";
- out = [-1,1];
- ot = 2;
+ var function_name = "matz_vps";
+ var out = [-1,1];
+ var ot = 2;
} else if ((this.decomptyp==2)) {
- function_name = "matz_vpv";
- out = [[-1,-1],[-1,-1]];
- ot = [2,2];
+ var function_name = "matz_vpv";
+ var out = [[-1,-1],[-1,-1]];
+ var ot = [2,2];
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [-1,-1];
- funtyp = 4;
+ var in1 = [-1,-1];
+ var funtyp = 4;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
diff --git a/js/MatrixOp/MATEIG.pickle b/js/MatrixOp/MATEIG.pickle
index dced0534..fa38deab 100644
--- a/js/MatrixOp/MATEIG.pickle
+++ b/js/MatrixOp/MATEIG.pickle
@@ -30,102 +30,99 @@ sS'it'
p6
S'double'
p7
-sS'model.intyp'
-p8
-g7
sS'funtyp'
-p9
+p8
g7
sS'model.out'
-p10
+p9
g7
sS'out'
-p11
+p10
S'matrix'
-p12
+p11
sS'model.in2'
-p13
+p12
g7
-sS'model.in1'
-p14
+sS'model.intyp'
+p13
g7
sS'label'
-p15
-g12
+p14
+g11
sS'model.evtin'
-p16
+p15
g2
sS'model.firing'
-p17
+p16
g2
sS'function_name'
-p18
+p17
S'string'
-p19
+p18
sS'model.sim'
-p20
+p19
S'list'
-p21
+p20
sS'model.evtout'
-p22
+p21
g2
sS'arg1.graphics'
-p23
+p22
g4
-sS'[this.model,graphics,ok]'
-p24
-g7
sS'model.out2'
-p25
+p23
g7
sS'in1'
-p26
+p24
g2
sS'model.rpar'
-p27
+p25
g2
+sS'model.in1'
+p26
+g7
sS'model.outtyp'
-p28
+p27
g7
sS'model.state'
-p29
+p28
g2
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
+p30
g2
sS'typ'
-p32
+p31
g2
sS'arg1.model'
-p33
+p32
NsS'label[9-1]'
-p34
+p33
g2
sS'ok'
-p35
+p34
S'boolean'
-p36
+p35
sS'model.blocktype'
-p37
-g19
+p36
+g18
sS'model.dep_ut'
-p38
+p37
g2
sS'gr_i'
-p39
+p38
g2
sS'y'
-p40
+p39
g2
sS'x'
-p41
+p40
g7
sS'model'
-p42
+p41
g4
sS'ot'
-p43
+p42
g2
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATEXPM.js b/js/MatrixOp/MATEXPM.js
index d528759f..08d383ad 100644
--- a/js/MatrixOp/MATEXPM.js
+++ b/js/MatrixOp/MATEXPM.js
@@ -2,8 +2,8 @@
function MATEXPM() {
MATEXPM.prototype.define = function MATEXPM() {
this.model = scicos_model();
- function_name = "mat_expm";
- funtyp = 4;
+ var function_name = "mat_expm";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-1]);
@@ -20,8 +20,8 @@ function MATEXPM() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -37,8 +37,8 @@ function MATEXPM() {
MATEXPM.prototype.set = function MATEXPM() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -49,23 +49,26 @@ function MATEXPM() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_expm";
- ot = 1;
- it = 1;
+ var function_name = "mat_expm";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "matz_expm";
- ot = 2;
- it = 2;
+ var function_name = "matz_expm";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/MATEXPM.pickle b/js/MatrixOp/MATEXPM.pickle
index f8728324..42a969d6 100644
--- a/js/MatrixOp/MATEXPM.pickle
+++ b/js/MatrixOp/MATEXPM.pickle
@@ -67,61 +67,58 @@ g2
sS'arg1.graphics'
p22
g4
-sS'[this.model,graphics,ok]'
-p23
-g7
sS'model.out2'
-p24
+p23
g7
sS'in1'
-p25
+p24
g2
sS'model.rpar'
-p26
+p25
g2
sS'model.outtyp'
-p27
+p26
g7
sS'model.state'
-p28
+p27
g2
sS'graphics.exprs'
-p29
+p28
NsS'model.ipar'
-p30
+p29
g2
sS'typ'
-p31
+p30
g2
sS'arg1.model'
-p32
+p31
g4
sS'label[9-1]'
-p33
+p32
g2
sS'ok'
-p34
+p33
S'boolean'
-p35
+p34
sS'model.blocktype'
-p36
+p35
g18
sS'model.dep_ut'
-p37
+p36
g2
sS'gr_i'
-p38
+p37
g2
sS'y'
-p39
+p38
g2
sS'x'
-p40
+p39
g7
sS'model'
-p41
+p40
g4
sS'ot'
-p42
+p41
g7
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATINV.js b/js/MatrixOp/MATINV.js
index d43ab5fd..9ad78085 100644
--- a/js/MatrixOp/MATINV.js
+++ b/js/MatrixOp/MATINV.js
@@ -2,8 +2,8 @@
function MATINV() {
MATINV.prototype.define = function MATINV() {
this.model = scicos_model();
- function_name = "mat_inv";
- funtyp = 4;
+ var function_name = "mat_inv";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-1]);
@@ -20,8 +20,8 @@ function MATINV() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -37,8 +37,8 @@ function MATINV() {
MATINV.prototype.set = function MATINV() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -49,23 +49,26 @@ function MATINV() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_inv";
- ot = 1;
- it = 1;
+ var function_name = "mat_inv";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "matz_inv";
- ot = 2;
- it = 2;
+ var function_name = "matz_inv";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/MATINV.pickle b/js/MatrixOp/MATINV.pickle
index f8728324..42a969d6 100644
--- a/js/MatrixOp/MATINV.pickle
+++ b/js/MatrixOp/MATINV.pickle
@@ -67,61 +67,58 @@ g2
sS'arg1.graphics'
p22
g4
-sS'[this.model,graphics,ok]'
-p23
-g7
sS'model.out2'
-p24
+p23
g7
sS'in1'
-p25
+p24
g2
sS'model.rpar'
-p26
+p25
g2
sS'model.outtyp'
-p27
+p26
g7
sS'model.state'
-p28
+p27
g2
sS'graphics.exprs'
-p29
+p28
NsS'model.ipar'
-p30
+p29
g2
sS'typ'
-p31
+p30
g2
sS'arg1.model'
-p32
+p31
g4
sS'label[9-1]'
-p33
+p32
g2
sS'ok'
-p34
+p33
S'boolean'
-p35
+p34
sS'model.blocktype'
-p36
+p35
g18
sS'model.dep_ut'
-p37
+p36
g2
sS'gr_i'
-p38
+p37
g2
sS'y'
-p39
+p38
g2
sS'x'
-p40
+p39
g7
sS'model'
-p41
+p40
g4
sS'ot'
-p42
+p41
g7
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATLU.js b/js/MatrixOp/MATLU.js
index 90e16908..c1c29c69 100644
--- a/js/MatrixOp/MATLU.js
+++ b/js/MatrixOp/MATLU.js
@@ -2,8 +2,8 @@
function MATLU() {
MATLU.prototype.define = function MATLU() {
this.model = scicos_model();
- function_name = "mat_lu";
- funtyp = 4;
+ var function_name = "mat_lu";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-1]);
@@ -20,8 +20,8 @@ function MATLU() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = sci2exp(1);
- gr_i = [];
+ var label = sci2exp(1);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -39,8 +39,8 @@ function MATLU() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -50,22 +50,25 @@ function MATLU() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_lu";
- ot = [1,1];
- it = 1;
+ var function_name = "mat_lu";
+ var ot = [1,1];
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "matz_lu";
- ot = [2,2];
- it = 2;
+ var function_name = "matz_lu";
+ var ot = [2,2];
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([this.model.in1,this.model.in2],it),list([this.model.out,this.model.out2],ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list([this.model.in1,this.model.in2],it),list([this.model.out,this.model.out2],ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
- funtyp = 4;
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = this.lab;
this.x.graphics = graphics;
diff --git a/js/MatrixOp/MATLU.pickle b/js/MatrixOp/MATLU.pickle
index 83b8081a..afb20bf7 100644
--- a/js/MatrixOp/MATLU.pickle
+++ b/js/MatrixOp/MATLU.pickle
@@ -67,58 +67,55 @@ p21
sS'model.evtout'
p22
g2
-sS'[this.model,graphics,ok]'
-p23
-g7
sS'model.out2'
-p24
+p23
g11
sS'model.intyp'
-p25
+p24
g7
sS'model.rpar'
-p26
+p25
g2
sS'model.outtyp'
-p27
+p26
g2
sS'model.state'
-p28
+p27
g2
sS'graphics.exprs'
-p29
+p28
NsS'model.ipar'
-p30
+p29
g2
sS'typ'
-p31
+p30
g2
sS'label[9-1]'
-p32
+p31
g2
sS'ok'
-p33
+p32
S'boolean'
-p34
+p33
sS'model.blocktype'
-p35
+p34
g16
sS'model.dep_ut'
-p36
+p35
g2
sS'gr_i'
-p37
+p36
g2
sS'y'
-p38
+p37
g2
sS'x'
-p39
+p38
g7
sS'model'
-p40
+p39
g4
sS'ot'
-p41
+p40
g2
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATMAGPHI.js b/js/MatrixOp/MATMAGPHI.js
index b3760a0d..bbe2d7d9 100644
--- a/js/MatrixOp/MATMAGPHI.js
+++ b/js/MatrixOp/MATMAGPHI.js
@@ -2,8 +2,8 @@
function MATMAGPHI() {
MATMAGPHI.prototype.define = function MATMAGPHI() {
this.model = scicos_model();
- function_name = "matz_abs";
- funtyp = 4;
+ var function_name = "matz_abs";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -20,8 +20,8 @@ function MATMAGPHI() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -39,8 +39,8 @@ function MATMAGPHI() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -49,26 +49,29 @@ function MATMAGPHI() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
if ((this.decomptyp==1)) {
- function_name = "matz_abs";
- in1 = [-1,-2];
- it = 2;
- out = [[-1,-2],[-1,-2]];
- ot = [1,1];
+ var function_name = "matz_abs";
+ var in1 = [-1,-2];
+ var it = 2;
+ var out = [[-1,-2],[-1,-2]];
+ var ot = [1,1];
} else if ((this.decomptyp==2)) {
- function_name = "matz_absc";
- in1 = [[-1,-2],[-1,-2]];
- it = [1,1];
- out = [-1,-2];
- ot = 2;
+ var function_name = "matz_absc";
+ var in1 = [[-1,-2],[-1,-2]];
+ var it = [1,1];
+ var out = [-1,-2];
+ var ot = 2;
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- funtyp = 4;
+ var funtyp = 4;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
diff --git a/js/MatrixOp/MATMAGPHI.pickle b/js/MatrixOp/MATMAGPHI.pickle
index 7457f5ff..689495ae 100644
--- a/js/MatrixOp/MATMAGPHI.pickle
+++ b/js/MatrixOp/MATMAGPHI.pickle
@@ -27,103 +27,100 @@ g4
sS'it'
p6
g2
-sS'model.intyp'
+sS'funtyp'
p7
S'double'
p8
-sS'funtyp'
-p9
-g8
sS'model.out'
-p10
+p9
S'matrix'
-p11
+p10
sS'out'
-p12
+p11
g2
sS'model.in2'
-p13
+p12
g8
-sS'model.in1'
-p14
+sS'model.intyp'
+p13
g8
sS'label'
-p15
+p14
g2
sS'model.evtin'
-p16
+p15
g2
sS'model.firing'
-p17
+p16
g2
sS'function_name'
-p18
+p17
S'string'
-p19
+p18
sS'model.sim'
-p20
+p19
S'list'
-p21
+p20
sS'model.evtout'
-p22
+p21
g2
sS'arg1.graphics'
-p23
+p22
g4
-sS'[this.model,graphics,ok]'
-p24
-g8
sS'model.out2'
-p25
-g11
+p23
+g10
sS'in1'
-p26
-g11
+p24
+g10
sS'model.rpar'
-p27
+p25
g2
+sS'model.in1'
+p26
+g8
sS'model.outtyp'
-p28
+p27
g2
sS'model.state'
-p29
+p28
g2
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
+p30
g2
sS'typ'
-p32
+p31
g2
sS'arg1.model'
-p33
+p32
NsS'label[9-1]'
-p34
+p33
g2
sS'ok'
-p35
+p34
S'boolean'
-p36
+p35
sS'model.blocktype'
-p37
-g19
+p36
+g18
sS'model.dep_ut'
-p38
+p37
g2
sS'gr_i'
-p39
+p38
g2
sS'y'
-p40
+p39
g2
sS'x'
-p41
+p40
g8
sS'model'
-p42
+p41
g4
sS'ot'
-p43
+p42
g8
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATMUL.js b/js/MatrixOp/MATMUL.js
index 2ce11fb8..81217de2 100644
--- a/js/MatrixOp/MATMUL.js
+++ b/js/MatrixOp/MATMUL.js
@@ -9,8 +9,8 @@ function MATMUL() {
this.model.out2 = new ScilabDouble([-3]);
this.model.dep_ut = [true,false];
this.model.ipar = new ScilabDouble([1]);
- label = [sci2exp(this.model.ipar)];
- gr_i = [];
+ var label = [sci2exp(this.model.ipar)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -30,8 +30,8 @@ function MATMUL() {
this.rule = parseFloat(arguments[0]["rule"])
this.np = parseFloat(arguments[0]["np"])
this.x = arg1;
- graphics = this.x.graphics;
- label = graphics.exprs;
+ var graphics = this.x.graphics;
+ var label = graphics.exprs;
this.model = this.x.model;
if (this.model.ipar==[]) {
this.model.ipar = new ScilabDouble([1]);
@@ -50,17 +50,17 @@ function MATMUL() {
this.rule = int(this.rule);
if ((this.dtype<1||this.dtype>8)) {
message("type is not supported");
- ok = false;
+ var ok = false;
}
if ((this.rule<1||this.rule>3)) {
message("Multiplication rule must be only 1,2 or 3");
- ok = false;
+ var ok = false;
}
if ((this.dtype==1||this.dtype==2)) {
this.np = 0;
}
- TABMIN = [[0],[0],[-(2^31)],[-(2^15)],[-(2^7)],[0],[0],[0]];
- TABMAX = [[0],[0],[(2^31)-1],[(2^15)-1],[(2^7)-1],[(2^32)-1],[(2^16)-1],[(2^8)-1]];
+ var TABMIN = [[0],[0],[-(2^31)],[-(2^15)],[-(2^7)],[0],[0],[0]];
+ var TABMAX = [[0],[0],[(2^31)-1],[(2^15)-1],[(2^7)-1],[(2^32)-1],[(2^16)-1],[(2^8)-1]];
if (this.rule==2) {
if (this.np==0) {
this.model.sim = list(new ScilabString(["matmul2_m"]), new ScilabDouble([4]));
@@ -132,29 +132,32 @@ function MATMUL() {
}
}
}
- kmin = TABMIN[this.dtype-1];
- kmax = TABMAX[this.dtype-1];
- it = this.dtype*ones(1,2);
- ot = this.dtype;
+ var kmin = TABMIN[this.dtype-1];
+ var kmax = TABMAX[this.dtype-1];
+ var it = this.dtype*ones(1,2);
+ var ot = this.dtype;
if (this.rule==1) {
- in1 = [[-1,-2],[-2,-3]];
- out = [-1,-3];
+ var in1 = [[-1,-2],[-2,-3]];
+ var out = [-1,-3];
} else if (this.rule==2) {
- in1 = [[-1,-2],[-1,-2]];
- out = [-1,-2];
+ var in1 = [[-1,-2],[-1,-2]];
+ var out = [-1,-2];
} else {
- in1 = [[-1,-2],[1,1]];
- out = [-1,-2];
+ var in1 = [[-1,-2],[1,1]];
+ var out = [-1,-2];
}
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
- label = exprs;
+ var label = exprs;
this.model.ipar = new ScilabDouble([this.rule]);
this.model.rpar = new ScilabDouble([kmin],[kmax]);
graphics.exprs = label;
this.x.graphics = graphics;
this.x.model = this.model;
- arg1 = this.x;
+ var arg1 = this.x;
break;
}
}
diff --git a/js/MatrixOp/MATMUL.pickle b/js/MatrixOp/MATMUL.pickle
index dcc42c69..31523949 100644
--- a/js/MatrixOp/MATMUL.pickle
+++ b/js/MatrixOp/MATMUL.pickle
@@ -61,62 +61,59 @@ g8
sS'np'
p19
g10
-sS'[this.model,graphics,ok]'
-p20
-g10
sS'model.sim'
-p21
+p20
S'list'
-p22
+p21
sS'label[2-1]'
-p23
+p22
g5
sS'model.out2'
-p24
+p23
g10
sS'in1'
-p25
+p24
g14
sS'model.rpar'
-p26
+p25
g14
sS'kmax'
-p27
+p26
g10
sS'graphics'
-p28
+p27
g2
sS'model.ipar'
-p29
+p28
g10
sS'typ'
-p30
+p29
g8
sS'ot'
-p31
+p30
NsS'ok'
-p32
+p31
S'boolean'
-p33
+p32
sS'rule'
-p34
+p33
g10
sS'gr_i'
-p35
+p34
g8
sS'TABMIN'
-p36
+p35
g14
sS'y'
-p37
+p36
g8
sS'x'
-p38
+p37
g10
sS'model'
-p39
+p38
g2
sS'TABMAX'
-p40
+p39
g14
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATPINV.js b/js/MatrixOp/MATPINV.js
index c055a359..ca0b3185 100644
--- a/js/MatrixOp/MATPINV.js
+++ b/js/MatrixOp/MATPINV.js
@@ -2,8 +2,8 @@
function MATPINV() {
MATPINV.prototype.define = function MATPINV() {
this.model = scicos_model();
- function_name = "mat_pinv";
- funtyp = 4;
+ var function_name = "mat_pinv";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -20,8 +20,8 @@ function MATPINV() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -37,8 +37,8 @@ function MATPINV() {
MATPINV.prototype.set = function MATPINV() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -49,23 +49,26 @@ function MATPINV() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_pinv";
- ot = 1;
- it = 1;
+ var function_name = "mat_pinv";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "matz_pinv";
- ot = 2;
- it = 2;
+ var function_name = "matz_pinv";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/MATPINV.pickle b/js/MatrixOp/MATPINV.pickle
index f8728324..42a969d6 100644
--- a/js/MatrixOp/MATPINV.pickle
+++ b/js/MatrixOp/MATPINV.pickle
@@ -67,61 +67,58 @@ g2
sS'arg1.graphics'
p22
g4
-sS'[this.model,graphics,ok]'
-p23
-g7
sS'model.out2'
-p24
+p23
g7
sS'in1'
-p25
+p24
g2
sS'model.rpar'
-p26
+p25
g2
sS'model.outtyp'
-p27
+p26
g7
sS'model.state'
-p28
+p27
g2
sS'graphics.exprs'
-p29
+p28
NsS'model.ipar'
-p30
+p29
g2
sS'typ'
-p31
+p30
g2
sS'arg1.model'
-p32
+p31
g4
sS'label[9-1]'
-p33
+p32
g2
sS'ok'
-p34
+p33
S'boolean'
-p35
+p34
sS'model.blocktype'
-p36
+p35
g18
sS'model.dep_ut'
-p37
+p36
g2
sS'gr_i'
-p38
+p37
g2
sS'y'
-p39
+p38
g2
sS'x'
-p40
+p39
g7
sS'model'
-p41
+p40
g4
sS'ot'
-p42
+p41
g7
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATRESH.js b/js/MatrixOp/MATRESH.js
index 647cc3db..6de8b8bc 100644
--- a/js/MatrixOp/MATRESH.js
+++ b/js/MatrixOp/MATRESH.js
@@ -2,8 +2,8 @@
function MATRESH() {
MATRESH.prototype.define = function MATRESH() {
this.model = scicos_model();
- function_name = "mat_reshape";
- funtyp = 4;
+ var function_name = "mat_reshape";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -20,8 +20,8 @@ function MATRESH() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp([1,1])],[sci2exp([1,1])]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp([1,1])],[sci2exp([1,1])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -43,8 +43,8 @@ function MATRESH() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -53,48 +53,51 @@ function MATRESH() {
if (!ok) {
break;
}
- nout = size(this.out);
- nin = size(this.l1);
+ var nout = size(this.out);
+ var nin = size(this.l1);
if (nout==0) {
message("output must have at least one element");
- ok = false;
+ var ok = false;
}
if (nin==0) {
message("input must have at least one element");
- ok = false;
+ var ok = false;
}
if (ok) {
if (((this.out[1-1]>(this.l1[1-1]*this.l1[2-1])))) {
message("the first dimension of the output is too big");
- ok = false;
+ var ok = false;
}
if (((this.out[2-1]>(this.l1[1-1]*this.l1[2-1])))) {
message("the second dimension of the output is too big");
- ok = false;
+ var ok = false;
}
if ((((this.out[2-1]*this.out[1-1])>(this.l1[1-1]*this.l1[2-1])))) {
message("the dimensions of the output are too big");
- ok = false;
+ var ok = false;
}
}
if ((this.typ==1)) {
- function_name = "mat_reshape";
- ot = 1;
- it = 1;
+ var function_name = "mat_reshape";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "matz_reshape";
- ot = 2;
- it = 2;
+ var function_name = "matz_reshape";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
- label = this.lab;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(this.l1,it),list(this.out,ot),[],[]);
+ var label = this.lab;
+ var tmpvar0 = set_io(this.model,graphics,list(this.l1,it),list(this.out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
- funtyp = 4;
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/MATRESH.pickle b/js/MatrixOp/MATRESH.pickle
index ca6a495b..f8f86478 100644
--- a/js/MatrixOp/MATRESH.pickle
+++ b/js/MatrixOp/MATRESH.pickle
@@ -41,7 +41,7 @@ g7
sS'model.in2'
p10
g7
-sS'model.in1'
+sS'model.intyp'
p11
g7
sS'label'
@@ -71,63 +71,60 @@ g7
sS'arg1.graphics'
p22
g4
-sS'[this.model,graphics,ok]'
+sS'model.out2'
p23
g7
-sS'model.out2'
+sS'model.in1'
p24
g7
-sS'model.intyp'
-p25
-g7
sS'model.rpar'
-p26
+p25
g2
sS'model.outtyp'
-p27
+p26
g7
sS'model.state'
-p28
+p27
g2
sS'graphics.exprs'
-p29
+p28
NsS'model.ipar'
-p30
+p29
g2
sS'typ'
-p31
+p30
g2
sS'arg1.model'
-p32
+p31
NsS'label[9-1]'
-p33
+p32
g2
sS'ok'
-p34
+p33
S'boolean'
-p35
+p34
sS'model.blocktype'
-p36
+p35
g17
sS'model.dep_ut'
-p37
+p36
g2
sS'gr_i'
-p38
+p37
g2
sS'y'
-p39
+p38
g2
sS'x'
-p40
+p39
g7
sS'model'
-p41
+p40
g4
sS'ot'
-p42
+p41
g7
sS'nout'
-p43
+p42
g7
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATSING.js b/js/MatrixOp/MATSING.js
index 7f0bd2ec..66956d3f 100644
--- a/js/MatrixOp/MATSING.js
+++ b/js/MatrixOp/MATSING.js
@@ -2,8 +2,8 @@
function MATSING() {
MATSING.prototype.define = function MATSING() {
this.model = scicos_model();
- function_name = "mat_sing";
- funtyp = 4;
+ var function_name = "mat_sing";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -20,8 +20,8 @@ function MATSING() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(1)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -41,8 +41,8 @@ function MATSING() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -51,46 +51,49 @@ function MATSING() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
if ((this.typ==1)) {
if ((this.decomptyp==1)) {
- function_name = "mat_sing";
- in1 = [-1,-2];
- out = [-1,1];
- ot = 1;
+ var function_name = "mat_sing";
+ var in1 = [-1,-2];
+ var out = [-1,1];
+ var ot = 1;
} else if ((this.decomptyp==2)) {
- function_name = "mat_svd";
- in1 = [-1,-2];
- out = [[-1,-1],[-1,-2],[-2,-2]];
- ot = [1,1,1];
+ var function_name = "mat_svd";
+ var in1 = [-1,-2];
+ var out = [[-1,-1],[-1,-2],[-2,-2]];
+ var ot = [1,1,1];
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 1;
+ var it = 1;
} else if ((this.typ==2)) {
if ((this.decomptyp==1)) {
- function_name = "matz_sing";
- in1 = [-1,-2];
- out = [-1,1];
- ot = 1;
+ var function_name = "matz_sing";
+ var in1 = [-1,-2];
+ var out = [-1,1];
+ var ot = 1;
} else if ((this.decomptyp==2)) {
- function_name = "matz_svd";
- in1 = [-1,-2];
- out = [[-1,-1],[-1,-2],[-2,-2]];
- ot = [2,1,2];
+ var function_name = "matz_svd";
+ var in1 = [-1,-2];
+ var out = [[-1,-1],[-1,-2],[-2,-2]];
+ var ot = [2,1,2];
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- funtyp = 4;
+ var funtyp = 4;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
diff --git a/js/MatrixOp/MATSING.pickle b/js/MatrixOp/MATSING.pickle
index dced0534..fa38deab 100644
--- a/js/MatrixOp/MATSING.pickle
+++ b/js/MatrixOp/MATSING.pickle
@@ -30,102 +30,99 @@ sS'it'
p6
S'double'
p7
-sS'model.intyp'
-p8
-g7
sS'funtyp'
-p9
+p8
g7
sS'model.out'
-p10
+p9
g7
sS'out'
-p11
+p10
S'matrix'
-p12
+p11
sS'model.in2'
-p13
+p12
g7
-sS'model.in1'
-p14
+sS'model.intyp'
+p13
g7
sS'label'
-p15
-g12
+p14
+g11
sS'model.evtin'
-p16
+p15
g2
sS'model.firing'
-p17
+p16
g2
sS'function_name'
-p18
+p17
S'string'
-p19
+p18
sS'model.sim'
-p20
+p19
S'list'
-p21
+p20
sS'model.evtout'
-p22
+p21
g2
sS'arg1.graphics'
-p23
+p22
g4
-sS'[this.model,graphics,ok]'
-p24
-g7
sS'model.out2'
-p25
+p23
g7
sS'in1'
-p26
+p24
g2
sS'model.rpar'
-p27
+p25
g2
+sS'model.in1'
+p26
+g7
sS'model.outtyp'
-p28
+p27
g7
sS'model.state'
-p29
+p28
g2
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
+p30
g2
sS'typ'
-p32
+p31
g2
sS'arg1.model'
-p33
+p32
NsS'label[9-1]'
-p34
+p33
g2
sS'ok'
-p35
+p34
S'boolean'
-p36
+p35
sS'model.blocktype'
-p37
-g19
+p36
+g18
sS'model.dep_ut'
-p38
+p37
g2
sS'gr_i'
-p39
+p38
g2
sS'y'
-p40
+p39
g2
sS'x'
-p41
+p40
g7
sS'model'
-p42
+p41
g4
sS'ot'
-p43
+p42
g2
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATSUM.js b/js/MatrixOp/MATSUM.js
index d60e4191..f4348aa7 100644
--- a/js/MatrixOp/MATSUM.js
+++ b/js/MatrixOp/MATSUM.js
@@ -2,8 +2,8 @@
function MATSUM() {
MATSUM.prototype.define = function MATSUM() {
this.model = scicos_model();
- function_name = "mat_sum";
- funtyp = 4;
+ var function_name = "mat_sum";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -20,8 +20,8 @@ function MATSUM() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(0)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(0)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -41,8 +41,8 @@ function MATSUM() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -51,47 +51,50 @@ function MATSUM() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
if ((this.typ==1)) {
if ((this.decomptyp==0)) {
- function_name = "mat_sum";
- out = [1,1];
+ var function_name = "mat_sum";
+ var out = [1,1];
} else if ((this.decomptyp==2)) {
- function_name = "mat_suml";
- out = [-1,1];
+ var function_name = "mat_suml";
+ var out = [-1,1];
} else if ((this.decomptyp==1)) {
- function_name = "mat_sumc";
- out = [1,-2];
+ var function_name = "mat_sumc";
+ var out = [1,-2];
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 1;
- ot = 1;
+ var it = 1;
+ var ot = 1;
} else if ((this.typ==2)) {
if ((this.decomptyp==0)) {
- function_name = "matz_sum";
- out = [1,1];
+ var function_name = "matz_sum";
+ var out = [1,1];
} else if ((this.decomptyp==2)) {
- function_name = "matz_suml";
- out = [-1,1];
+ var function_name = "matz_suml";
+ var out = [-1,1];
} else if ((this.decomptyp==1)) {
- function_name = "matz_sumc";
- out = [1,-2];
+ var function_name = "matz_sumc";
+ var out = [1,-2];
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- it = 2;
- ot = 2;
+ var it = 2;
+ var ot = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var funtyp = 4;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
diff --git a/js/MatrixOp/MATSUM.pickle b/js/MatrixOp/MATSUM.pickle
index a299c038..071f5cfc 100644
--- a/js/MatrixOp/MATSUM.pickle
+++ b/js/MatrixOp/MATSUM.pickle
@@ -30,103 +30,100 @@ sS'it'
p6
S'double'
p7
-sS'model.intyp'
-p8
-g7
sS'funtyp'
-p9
+p8
g7
sS'model.out'
-p10
+p9
g7
sS'out'
-p11
+p10
g2
sS'model.in2'
-p12
+p11
g7
-sS'model.in1'
-p13
+sS'model.intyp'
+p12
g7
sS'label'
-p14
+p13
S'matrix'
-p15
+p14
sS'model.evtin'
-p16
+p15
g2
sS'model.firing'
-p17
+p16
g2
sS'function_name'
-p18
+p17
S'string'
-p19
+p18
sS'model.sim'
-p20
+p19
S'list'
-p21
+p20
sS'model.evtout'
-p22
+p21
g2
sS'arg1.graphics'
-p23
+p22
g4
-sS'[this.model,graphics,ok]'
-p24
-g7
sS'model.out2'
-p25
+p23
g7
sS'in1'
-p26
+p24
g2
sS'model.rpar'
-p27
+p25
g2
+sS'model.in1'
+p26
+g7
sS'model.outtyp'
-p28
+p27
g7
sS'model.state'
-p29
+p28
g2
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
+p30
g2
sS'typ'
-p32
+p31
g2
sS'arg1.model'
-p33
+p32
g4
sS'label[9-1]'
-p34
+p33
g2
sS'ok'
-p35
+p34
S'boolean'
-p36
+p35
sS'model.blocktype'
-p37
-g19
+p36
+g18
sS'model.dep_ut'
-p38
+p37
g2
sS'gr_i'
-p39
+p38
g2
sS'y'
-p40
+p39
g2
sS'x'
-p41
+p40
g7
sS'model'
-p42
+p41
g4
sS'ot'
-p43
+p42
g7
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATTRAN.js b/js/MatrixOp/MATTRAN.js
index 847402cb..5189898a 100644
--- a/js/MatrixOp/MATTRAN.js
+++ b/js/MatrixOp/MATTRAN.js
@@ -8,8 +8,8 @@ function MATTRAN() {
this.model.out = new ScilabDouble([-2]);
this.model.out2 = new ScilabDouble([-1]);
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -27,8 +27,8 @@ function MATTRAN() {
this.typ = inverse(arguments[0]["typ"])
this.rule = arguments[0]["rule"]
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==1) {
label[2-1] = sci2exp(1);
@@ -39,27 +39,30 @@ function MATTRAN() {
break;
}
if ((this.typ==1)) {
- function_name = "mattran_m";
- ot = 1;
- it = 1;
+ var function_name = "mattran_m";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
if (this.rule==1) {
- function_name = "matztran_m";
+ var function_name = "matztran_m";
} else {
- function_name = "mathermit_m";
+ var function_name = "mathermit_m";
}
- ot = 2;
- it = 2;
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/MATTRAN.pickle b/js/MatrixOp/MATTRAN.pickle
index d37f5da1..c78ddced 100644
--- a/js/MatrixOp/MATTRAN.pickle
+++ b/js/MatrixOp/MATTRAN.pickle
@@ -43,57 +43,54 @@ g5
sS'label'
p12
g9
-sS'[this.model,graphics,ok]'
-p13
-g5
sS'function_name'
-p14
+p13
S'string'
-p15
+p14
sS'model.sim'
-p16
+p15
S'list'
-p17
+p16
sS'arg1.graphics'
-p18
+p17
g2
sS'label[2-1]'
-p19
-g15
+p18
+g14
sS'model.out2'
-p20
+p19
g5
sS'in1'
-p21
+p20
g9
sS'graphics.exprs'
-p22
+p21
NsS'typ'
-p23
+p22
g9
sS'arg1.model'
-p24
+p23
g2
sS'ok'
-p25
+p24
S'boolean'
-p26
+p25
sS'model.dep_ut'
-p27
+p26
g9
sS'gr_i'
-p28
+p27
g9
sS'y'
-p29
+p28
g9
sS'x'
-p30
+p29
g5
sS'model'
-p31
+p30
g2
sS'ot'
-p32
+p31
g5
s. \ No newline at end of file
diff --git a/js/MatrixOp/MATZCONJ.js b/js/MatrixOp/MATZCONJ.js
index d12db1a6..43dab206 100644
--- a/js/MatrixOp/MATZCONJ.js
+++ b/js/MatrixOp/MATZCONJ.js
@@ -2,8 +2,8 @@
function MATZCONJ() {
MATZCONJ.prototype.define = function MATZCONJ() {
this.model = scicos_model();
- function_name = "matz_conj";
- funtyp = 4;
+ var function_name = "matz_conj";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -20,8 +20,8 @@ function MATZCONJ() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [];
- gr_i = [];
+ var label = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/MatrixOp/MATZREIM.js b/js/MatrixOp/MATZREIM.js
index 7e9eb000..b36f0466 100644
--- a/js/MatrixOp/MATZREIM.js
+++ b/js/MatrixOp/MATZREIM.js
@@ -2,8 +2,8 @@
function MATZREIM() {
MATZREIM.prototype.define = function MATZREIM() {
this.model = scicos_model();
- function_name = "matz_reim";
- funtyp = 4;
+ var function_name = "matz_reim";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -20,8 +20,8 @@ function MATZREIM() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = sci2exp(1);
- gr_i = [];
+ var label = sci2exp(1);
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -39,8 +39,8 @@ function MATZREIM() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -49,26 +49,29 @@ function MATZREIM() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
if ((this.decomptyp==1)) {
- function_name = "matz_reim";
- in1 = [-1,-2];
- it = 2;
- out = [[-1,-2],[-1,-2]];
- ot = [1,1];
+ var function_name = "matz_reim";
+ var in1 = [-1,-2];
+ var it = 2;
+ var out = [[-1,-2],[-1,-2]];
+ var ot = [1,1];
} else if ((this.decomptyp==2)) {
- function_name = "matz_reimc";
- in1 = [[-1,-2],[-1,-2]];
- it = [1,1];
- out = [-1,-2];
- ot = 2;
+ var function_name = "matz_reimc";
+ var in1 = [[-1,-2],[-1,-2]];
+ var it = [1,1];
+ var out = [-1,-2];
+ var ot = 2;
} else {
message("decomposition type is not supported");
- ok = false;
+ var ok = false;
}
- funtyp = 4;
+ var funtyp = 4;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
diff --git a/js/MatrixOp/MATZREIM.pickle b/js/MatrixOp/MATZREIM.pickle
index 7611abb3..9e408e2d 100644
--- a/js/MatrixOp/MATZREIM.pickle
+++ b/js/MatrixOp/MATZREIM.pickle
@@ -27,103 +27,100 @@ g4
sS'it'
p6
g2
-sS'model.intyp'
+sS'funtyp'
p7
S'double'
p8
-sS'funtyp'
-p9
-g8
sS'model.out'
-p10
+p9
S'matrix'
-p11
+p10
sS'out'
-p12
+p11
g2
sS'model.in2'
-p13
+p12
g8
-sS'model.in1'
-p14
+sS'model.intyp'
+p13
g8
sS'label'
-p15
+p14
S'string'
-p16
+p15
sS'model.evtin'
-p17
+p16
g2
sS'model.firing'
-p18
+p17
g2
sS'function_name'
-p19
-g16
+p18
+g15
sS'model.sim'
-p20
+p19
S'list'
-p21
+p20
sS'model.evtout'
-p22
+p21
g2
sS'arg1.graphics'
-p23
+p22
g4
-sS'[this.model,graphics,ok]'
-p24
-g8
sS'model.out2'
-p25
-g11
+p23
+g10
sS'in1'
-p26
-g11
+p24
+g10
sS'model.rpar'
-p27
+p25
g2
+sS'model.in1'
+p26
+g8
sS'model.outtyp'
-p28
+p27
g2
sS'model.state'
-p29
+p28
g2
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
+p30
g2
sS'typ'
-p32
+p31
g2
sS'arg1.model'
-p33
+p32
NsS'label[9-1]'
-p34
+p33
g2
sS'ok'
-p35
+p34
S'boolean'
-p36
+p35
sS'model.blocktype'
-p37
-g16
+p36
+g15
sS'model.dep_ut'
-p38
+p37
g2
sS'gr_i'
-p39
+p38
g2
sS'y'
-p40
+p39
g2
sS'x'
-p41
+p40
g8
sS'model'
-p42
+p41
g4
sS'ot'
-p43
+p42
g8
s. \ No newline at end of file
diff --git a/js/MatrixOp/RICC.js b/js/MatrixOp/RICC.js
index 482dc0d3..6cdfff18 100644
--- a/js/MatrixOp/RICC.js
+++ b/js/MatrixOp/RICC.js
@@ -2,8 +2,8 @@
function RICC() {
RICC.prototype.define = function RICC() {
this.model = scicos_model();
- function_name = "ricc_m";
- funtyp = 4;
+ var function_name = "ricc_m";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1],[-1],[-1]);
this.model.in2 = new ScilabDouble([-1],[-1],[-1]);
@@ -20,8 +20,8 @@ function RICC() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(1)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -39,8 +39,8 @@ function RICC() {
this.tpe = arguments[0]["tpe"]
this.mod = arguments[0]["mod"]
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -50,12 +50,15 @@ function RICC() {
if (!ok) {
break;
}
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- it = [1,1,1];
- ot = 1;
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var it = [1,1,1];
+ var ot = 1;
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
this.model.ipar = new ScilabDouble([this.tpe],[this.mod]);
graphics.exprs = label;
diff --git a/js/MatrixOp/RICC.pickle b/js/MatrixOp/RICC.pickle
index 5a4ca420..57262a2c 100644
--- a/js/MatrixOp/RICC.pickle
+++ b/js/MatrixOp/RICC.pickle
@@ -27,100 +27,97 @@ g4
sS'it'
p6
g2
-sS'model.intyp'
-p7
-g2
sS'funtyp'
-p8
+p7
S'double'
-p9
+p8
sS'model.out'
-p10
-g9
+p9
+g8
sS'out'
-p11
+p10
g2
sS'model.in2'
-p12
+p11
S'matrix'
+p12
+sS'model.intyp'
p13
-sS'model.in1'
-p14
-g13
+g2
sS'label'
-p15
-g13
+p14
+g12
sS'model.evtin'
-p16
+p15
g2
sS'model.firing'
-p17
+p16
g2
sS'function_name'
-p18
+p17
S'string'
-p19
+p18
sS'model.sim'
-p20
+p19
S'list'
-p21
+p20
sS'model.evtout'
-p22
+p21
g2
sS'arg1.graphics'
-p23
+p22
g4
-sS'[this.model,graphics,ok]'
-p24
-g9
sS'model.out2'
-p25
-g9
+p23
+g8
sS'in1'
-p26
+p24
g2
sS'model.rpar'
-p27
+p25
g2
+sS'model.in1'
+p26
+g12
sS'model.outtyp'
-p28
-g9
+p27
+g8
sS'model.state'
-p29
+p28
g2
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
-g13
+p30
+g12
sS'typ'
-p32
+p31
g2
sS'arg1.model'
-p33
+p32
g4
sS'label[9-1]'
-p34
+p33
g2
sS'model.blocktype'
-p35
-g19
+p34
+g18
sS'model.dep_ut'
-p36
+p35
g2
sS'gr_i'
-p37
+p36
g2
sS'y'
-p38
+p37
g2
sS'x'
-p39
-g9
+p38
+g8
sS'model'
-p40
+p39
g4
sS'ot'
-p41
-g9
+p40
+g8
s. \ No newline at end of file
diff --git a/js/MatrixOp/ROOTCOEF.js b/js/MatrixOp/ROOTCOEF.js
index b92ae12a..a468a2ba 100644
--- a/js/MatrixOp/ROOTCOEF.js
+++ b/js/MatrixOp/ROOTCOEF.js
@@ -2,8 +2,8 @@
function ROOTCOEF() {
ROOTCOEF.prototype.define = function ROOTCOEF() {
this.model = scicos_model();
- function_name = "root_coef";
- funtyp = 4;
+ var function_name = "root_coef";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([1]);
@@ -20,8 +20,8 @@ function ROOTCOEF() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(1)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -39,8 +39,8 @@ function ROOTCOEF() {
this.typ = inverse(arguments[0]["typ"])
this.inp = arguments[0]["inp"]
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==14) {
label[9-1] = [];
@@ -51,23 +51,26 @@ function ROOTCOEF() {
break;
}
if ((this.typ==1)) {
- function_name = "root_coef";
- ot = 1;
- it = 1;
+ var function_name = "root_coef";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "rootz_coef";
- ot = 2;
- it = 2;
+ var function_name = "rootz_coef";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
- in1 = [this.inp,this.model.in2];
- out = [this.inp+1,this.model.out2];
- funtyp = 4;
+ var in1 = [this.inp,this.model.in2];
+ var out = [this.inp+1,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/ROOTCOEF.pickle b/js/MatrixOp/ROOTCOEF.pickle
index 38cb75d8..22aed3f5 100644
--- a/js/MatrixOp/ROOTCOEF.pickle
+++ b/js/MatrixOp/ROOTCOEF.pickle
@@ -70,61 +70,58 @@ g2
sS'arg1.graphics'
p23
g4
-sS'[this.model,graphics,ok]'
-p24
-g7
sS'model.out2'
-p25
+p24
g7
sS'in1'
-p26
+p25
g2
sS'model.rpar'
-p27
+p26
g2
sS'model.outtyp'
-p28
+p27
g7
sS'model.state'
-p29
+p28
g2
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
+p30
g2
sS'typ'
-p32
+p31
g2
sS'arg1.model'
-p33
+p32
g4
sS'label[9-1]'
-p34
+p33
g2
sS'ok'
-p35
+p34
S'boolean'
-p36
+p35
sS'model.blocktype'
-p37
+p36
g19
sS'model.dep_ut'
-p38
+p37
g2
sS'gr_i'
-p39
+p38
g2
sS'y'
-p40
+p39
g2
sS'x'
-p41
+p40
g7
sS'model'
-p42
+p41
g4
sS'ot'
-p43
+p42
g7
s. \ No newline at end of file
diff --git a/js/MatrixOp/SQRT.js b/js/MatrixOp/SQRT.js
index f9eeb3f7..b109ab09 100644
--- a/js/MatrixOp/SQRT.js
+++ b/js/MatrixOp/SQRT.js
@@ -10,8 +10,8 @@ function SQRT() {
this.model.out = new ScilabDouble([-1]);
this.model.out2 = new ScilabDouble([-2]);
this.model.dep_ut = [true,false];
- label = [sci2exp(1)];
- gr_i = [];
+ var label = [sci2exp(1)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -27,8 +27,8 @@ function SQRT() {
SQRT.prototype.set = function SQRT() {
this.typ = inverse(arguments[0]["typ"])
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.typ,exprs] = scicos_getvalue("Set SQRT Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
@@ -36,21 +36,24 @@ function SQRT() {
break;
}
if ((this.typ==1)) {
- function_name = "mat_sqrt";
+ var function_name = "mat_sqrt";
} else if ((this.typ==2)) {
- function_name = "matz_sqrt";
+ var function_name = "matz_sqrt";
} else {
message("type is not supported");
- ok = false;
+ var ok = false;
}
- it = this.typ;
- ot = this.typ;
- in1 = [this.model.in1,this.model.in2];
- out = [this.model.out,this.model.out2];
- funtyp = 4;
+ var it = this.typ;
+ var ot = this.typ;
+ var in1 = [this.model.in1,this.model.in2];
+ var out = [this.model.out,this.model.out2];
+ var funtyp = 4;
if (ok) {
- label = exprs;
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var label = exprs;
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/SQRT.pickle b/js/MatrixOp/SQRT.pickle
index 633e0a08..9d3a8e10 100644
--- a/js/MatrixOp/SQRT.pickle
+++ b/js/MatrixOp/SQRT.pickle
@@ -55,46 +55,43 @@ p17
sS'arg1.graphics'
p18
g2
-sS'[this.model,graphics,ok]'
-p19
-g7
sS'model.out2'
-p20
+p19
g7
sS'in1'
-p21
+p20
g5
sS'model.outtyp'
-p22
+p21
g7
sS'graphics.exprs'
-p23
+p22
NsS'typ'
-p24
+p23
g5
sS'arg1.model'
-p25
+p24
g2
sS'ok'
-p26
+p25
S'boolean'
-p27
+p26
sS'model.dep_ut'
-p28
+p27
g5
sS'gr_i'
-p29
+p28
g5
sS'y'
-p30
+p29
g5
sS'x'
-p31
+p30
g7
sS'model'
-p32
+p31
g2
sS'ot'
-p33
+p32
g5
s. \ No newline at end of file
diff --git a/js/MatrixOp/SUBMAT.js b/js/MatrixOp/SUBMAT.js
index a91c40c4..9e039c9b 100644
--- a/js/MatrixOp/SUBMAT.js
+++ b/js/MatrixOp/SUBMAT.js
@@ -2,8 +2,8 @@
function SUBMAT() {
SUBMAT.prototype.define = function SUBMAT() {
this.model = scicos_model();
- function_name = "submat";
- funtyp = 4;
+ var function_name = "submat";
+ var funtyp = 4;
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -20,8 +20,8 @@ function SUBMAT() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[sci2exp(1)],[sci2exp(1)],[sci2exp(1)],[sci2exp(1)],[sci2exp(1)]];
- gr_i = [];
+ var label = [[sci2exp(1)],[sci2exp(1)],[sci2exp(1)],[sci2exp(1)],[sci2exp(1)]];
+ var gr_i = [];
this.x = standard_define([2.5,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -47,8 +47,8 @@ function SUBMAT() {
this.d = arguments[0]["d"]
this.inp = arguments[0]["inp"]
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
if (size(label,"*")==5) {
label[6-1] = sci2exp([1,1]);
@@ -59,44 +59,47 @@ function SUBMAT() {
break;
}
if ((this.typ==1)) {
- function_name = "submat";
- ot = 1;
- it = 1;
+ var function_name = "submat";
+ var ot = 1;
+ var it = 1;
} else if ((this.typ==2)) {
- function_name = "submatz";
- ot = 2;
- it = 2;
+ var function_name = "submatz";
+ var ot = 2;
+ var it = 2;
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if ((this.a<=0)||(this.b<=0)||(this.c<=0)||(this.d<=0)) {
message("invalid index");
- ok = false;
+ var ok = false;
}
if (this.b<this.a) {
message("ending row must be greater than starting row");
- ok = false;
+ var ok = false;
}
if (this.d<this.c) {
message("ending column must be greater than starting column");
- ok = false;
+ var ok = false;
}
if (this.b>this.inp[1-1]) {
message("index of ending row is out of range");
- ok = false;
+ var ok = false;
}
if (this.d>this.inp[2-1]) {
message("index of ending column is out of range");
- ok = false;
+ var ok = false;
}
this.model.ipar = new ScilabDouble([this.a],[this.b],[this.c],[this.d]);
- in1 = [this.inp[1-1],this.inp[2-1]];
- out = [(this.b-this.a)+1,(this.d-this.c)+1];
- funtyp = 4;
- label = exprs;
+ var in1 = [this.inp[1-1],this.inp[2-1]];
+ var out = [(this.b-this.a)+1,(this.d-this.c)+1];
+ var funtyp = 4;
+ var label = exprs;
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
graphics.exprs = label;
arg1.graphics = graphics;
diff --git a/js/MatrixOp/SUBMAT.pickle b/js/MatrixOp/SUBMAT.pickle
index aba790d7..2889adb4 100644
--- a/js/MatrixOp/SUBMAT.pickle
+++ b/js/MatrixOp/SUBMAT.pickle
@@ -78,60 +78,57 @@ g2
sS'arg1.graphics'
p23
g4
-sS'[this.model,graphics,ok]'
-p24
-g7
sS'model.out2'
-p25
+p24
g7
sS'in1'
-p26
+p25
g2
sS'model.rpar'
-p27
+p26
g2
sS'model.outtyp'
-p28
+p27
g7
sS'model.state'
-p29
+p28
g2
sS'graphics.exprs'
-p30
+p29
NsS'model.ipar'
-p31
+p30
g15
sS'typ'
-p32
+p31
g2
sS'label[6-1]'
-p33
+p32
g19
sS'arg1.model'
-p34
+p33
NsS'ok'
-p35
+p34
S'boolean'
-p36
+p35
sS'model.blocktype'
-p37
+p36
g19
sS'model.dep_ut'
-p38
+p37
g2
sS'gr_i'
-p39
+p38
g2
sS'y'
-p40
+p39
g2
sS'x'
-p41
+p40
g7
sS'model'
-p42
+p41
g4
sS'ot'
-p43
+p42
g7
s. \ No newline at end of file
diff --git a/js/Misc/AUTOMAT.js b/js/Misc/AUTOMAT.js
index e34f5a85..654543e9 100644
--- a/js/Misc/AUTOMAT.js
+++ b/js/Misc/AUTOMAT.js
@@ -1,16 +1,16 @@
/* autogenerated from "macros/Misc/AUTOMAT.sci" */
function AUTOMAT() {
AUTOMAT.prototype.define = function AUTOMAT() {
- NMode = 2;
+ var NMode = 2;
this.Minitial = 1;
- NX = 1;
+ var NX = 1;
this.X0 = [0.0];
this.XP = [[1],[1]];
- C1 = [2];
- C2 = [1];
- exprs = [[string(NMode)],[string(this.Minitial)],[string(NX)],[sci2exp(this.X0)],[sci2exp(this.XP)],[sci2exp(C1)],[sci2exp(C2)]];
- ipar = [[NMode],[this.Minitial],[NX],[this.XP],[C1],[C2]];
- rpar = [this.X0];
+ var C1 = [2];
+ var C2 = [1];
+ var exprs = [[string(NMode)],[string(this.Minitial)],[string(NX)],[sci2exp(this.X0)],[sci2exp(this.XP)],[sci2exp(C1)],[sci2exp(C2)]];
+ var ipar = [[NMode],[this.Minitial],[NX],[this.XP],[C1],[C2]];
+ var rpar = [this.X0];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["automat"]), new ScilabDouble([10004]));
this.model.in1 = new ScilabDouble([2*NX+1],[2*NX+1]);
@@ -23,7 +23,7 @@ function AUTOMAT() {
this.model.dep_ut = [false,true];
this.model.ipar = new ScilabDouble(ipar);
this.model.rpar = rpar;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -37,50 +37,52 @@ function AUTOMAT() {
}
AUTOMAT.prototype.set = function AUTOMAT() {
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- ipar = this.model.ipar;
- NMode = ipar[1-1];
- NX = ipar[3-1];
+ var ipar = this.model.ipar;
+ var NMode = ipar[1-1];
+ var NX = ipar[3-1];
while (true) {
- CX = "C1";
- MSG0 = "\'Jump from Mode ";
- MSG2 = ":[..;M_final(Guard=In(";
- MSG3 = ").i);..]\'";
- MSG = MSG0+"1"+MSG2+"1"+MSG3;
- VEC = "\'mat\',[-1,1]";
+ var CX = "C1";
+ var MSG0 = "\'Jump from Mode ";
+ var MSG2 = ":[..;M_final(Guard=In(";
+ var MSG3 = ").i);..]\'";
+ var MSG = MSG0+"1"+MSG2+"1"+MSG3;
+ var VEC = "\'mat\',[-1,1]";
for (i=2;i<=NMode;i+=1) {
- CX = CX+","+"C"+string(i);
- MSG = MSG+";"+MSG0+string(i)+MSG2+string(i)+MSG3;
- VEC = VEC+","+"\'mat\',[-1,1]";
+ var CX = CX+","+"C"+string(i);
+ var MSG = MSG+";"+MSG0+string(i)+MSG2+string(i)+MSG3;
+ var VEC = VEC+","+"\'mat\',[-1,1]";
}
- GTV = "[ok,NMode,Minitial,NX,X0,XP,"+CX+",exprs]=scicos_getvalue(\'Set Finite state machine model\', [\'Number (finite-state) Modes\';\'Initial Mode\';\'Number of continuous-time states\';\'Continuous-time states intial values\';\'Xproperties of continuous-time states in each Mode\';"+MSG+"], list(\'vec\',1,\'vec\',1,\'vec\',1,\'mat\',[-1,-1],\'mat\',[-1,-1],"+VEC+"),exprs)";
+ var GTV = "[ok,NMode,Minitial,NX,X0,XP,"+CX+",exprs]=scicos_getvalue(\'Set Finite state machine model\', [\'Number (finite-state) Modes\';\'Initial Mode\';\'Number of continuous-time states\';\'Continuous-time states intial values\';\'Xproperties of continuous-time states in each Mode\';"+MSG+"], list(\'vec\',1,\'vec\',1,\'vec\',1,\'mat\',[-1,-1],\'mat\',[-1,-1],"+VEC+"),exprs)";
execstr(GTV);
if (!this.ok) {
break;
}
- NMode_old = size(exprs,"*")-5;
- ModifEncore = false;
+ var NMode_old = size(exprs,"*")-5;
+ var ModifEncore = false;
if ((NMode_old>NMode)) {
exprs.slice(NMode+6-1,NMode_old+5) = [];
- ModifEncore = true;
+ var ModifEncore = true;
}
if ((NMode_old<NMode)) {
exprs.slice(NMode_old+6-1,NMode+5) = exprs[NMode_old+4-1];
- ModifEncore = true;
+ var ModifEncore = true;
}
if ((NX!=size(this.X0,"*"))) {
messagebox("the size of intial continuous-time states should be NX="+string(NX),"modal","error");
- ModifEncore = true;
+ var ModifEncore = true;
}
- [rXP,cXP] = size(this.XP);
+ var tmpvar0 = size(this.XP)
+ var rXP = tmpvar0[0]
+ var cXP = tmpvar0[1];
if (cXP!=NX) {
messagebox("Xproperty matrix is not valid: it should have NX="+string(NX)+" columns","modal","error");
- ModifEncore = true;
+ var ModifEncore = true;
} else if (((rXP!=NMode)&&(rXP>1))) {
messagebox("Xproperty matrix is not valid: it should have NMode="+string(NMode)+" or 1 row(s)","modal","error");
- ModifEncore = true;
+ var ModifEncore = true;
} else if ((rXP==1)) {
for (i=1;i<=NMode-1;i+=1) {
this.XP = [[this.XP],[this.XP[1-1].slice()]];
@@ -88,39 +90,42 @@ function AUTOMAT() {
}
if ((NMode_old==NMode)&&(!ModifEncore)) {
this.XP = matrix(transpose(this.XP),NMode*NX,1);
- ipar = [[NMode],[this.Minitial],[NX],[this.XP]];
- rpar = matrix(this.X0,NX,1);
- INP = ones(NMode,1);
+ var ipar = [[NMode],[this.Minitial],[NX],[this.XP]];
+ var rpar = matrix(this.X0,NX,1);
+ var INP = ones(NMode,1);
if (NX>0) {
- OUT = [[2],[2*NX]];
+ var OUT = [[2],[2*NX]];
} else {
- OUT = [2];
+ var OUT = [2];
}
- MaxModes = 1;
- nzcross = 0;
+ var MaxModes = 1;
+ var nzcross = 0;
for (i=1;i<=NMode;i+=1) {
- Ci = evstr(exprs[5+i-1]);
- ipar = [[ipar],[Ci]];
+ var Ci = evstr(exprs[5+i-1]);
+ var ipar = [[ipar],[Ci]];
INP[i-1][1-1] = 2*NX+length(Ci);
if ((nzcross<length(Ci))) {
- nzcross = length(Ci);
+ var nzcross = length(Ci);
}
if ((MaxModes<max(Ci))) {
- MaxModes = max(Ci);
- imax = i;
+ var MaxModes = max(Ci);
+ var imax = i;
}
}
if (MaxModes>NMode) {
messagebox([["Number of Modes should be "+string(MaxModes)],["A destination Mode in Mode#"+string(imax)+"\'s targets is invalid!"]],"modal","error");
- ModifEncore = true;
+ var ModifEncore = true;
}
if (MaxModes<NMode) {
messagebox(["There is an unused Mode or the Number of Modes should be "+string(MaxModes)],"modal","error");
- ModifEncore = true;
+ var ModifEncore = true;
}
}
if (!ModifEncore) {
- [this.model,graphics,this.ok] = check_io(this.model,graphics,INP,OUT,[],[1]);
+ var tmpvar1 = check_io(this.model,graphics,INP,OUT,[],[1])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ this.ok = tmpvar1[2];
if (!this.ok) {
break;
}
diff --git a/js/Misc/AUTOMAT.pickle b/js/Misc/AUTOMAT.pickle
index c7fee995..2ff4f2eb 100644
--- a/js/Misc/AUTOMAT.pickle
+++ b/js/Misc/AUTOMAT.pickle
@@ -31,51 +31,51 @@ NsS'rpar'
p6
S'vector'
p7
-sS'model.out'
+sS'ModifEncore'
p8
-S'matrix'
+S'boolean'
p9
-sS'exprs.slice(NMode_old+6-1,NMode+5)'
+sS'model.out'
p10
-g2
-sS'MSG'
+S'matrix'
p11
-S'string'
+sS'exprs.slice(NMode_old+6-1,NMode+5)'
p12
-sS'ModifEncore'
+g2
+sS'MSG'
p13
-S'boolean'
+S'string'
p14
-sS'MaxModes'
+sS'XP'
p15
+g11
+sS'MaxModes'
+p16
g2
sS'nzcross'
-p16
+p17
g2
sS'model.in1'
-p17
-g9
-sS'MSG0'
p18
-g12
-sS'MSG3'
+g11
+sS'MSG0'
p19
-g12
-sS'MSG2'
+g14
+sS'MSG3'
p20
-g12
-sS'model.nzcross'
+g14
+sS'MSG2'
p21
-g2
-sS'XP'
+g14
+sS'model.nzcross'
p22
-g9
+g2
sS'NX'
p23
g2
sS'graphics.gr_i[1-1][1-1]'
p24
-g12
+g14
sS'C2'
p25
g7
@@ -98,84 +98,78 @@ g2
sS'model.rpar'
p32
g7
-sS'y'
-p33
-g7
sS'CX'
-p34
-g12
+p33
+g14
sS'INP[i-1][1-1]'
-p35
+p34
g2
sS'VEC'
-p36
-g12
+p35
+g14
sS'GTV'
-p37
-g12
+p36
+g14
sS'graphics'
-p38
+p37
g4
sS'model.state'
-p39
+p38
g2
sS'exprs.slice(NMode+6-1,NMode_old+5)'
-p40
+p39
g7
sS'model.ipar'
-p41
-g9
+p40
+g11
sS'typ'
-p42
+p41
g7
sS'C1'
-p43
+p42
g7
sS'NMode'
-p44
+p43
g2
sS'Ci'
-p45
+p44
g2
sS'model.blocktype'
-p46
-g12
-sS'[this.model,graphics,this.ok]'
-p47
-g30
+p45
+g14
sS'x.graphics'
-p48
+p46
g4
sS'INP'
-p49
+p47
g2
sS'x.model'
-p50
+p48
g4
sS'model.dep_ut'
-p51
+p49
g7
sS'exprs'
-p52
-g9
+p50
+g11
sS'gr_i'
-p53
+p51
g7
sS'ipar'
-p54
-g9
-sS'[rXP,cXP]'
-p55
-g2
+p52
+g11
+sS'y'
+p53
+g7
sS'x'
-p56
+p54
g2
sS'model'
-p57
+p55
g4
sS'Minitial'
-p58
+p56
g2
sS'imax'
-p59
+p57
Ns. \ No newline at end of file
diff --git a/js/Misc/BACKLASH.js b/js/Misc/BACKLASH.js
index bbdfb0f2..ffc9f0d7 100644
--- a/js/Misc/BACKLASH.js
+++ b/js/Misc/BACKLASH.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Misc/BACKLASH.sci" */
function BACKLASH() {
BACKLASH.prototype.define = function BACKLASH() {
- exprs = [["0"],["1"],["1"]];
+ var exprs = [["0"],["1"],["1"]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["backlash"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -10,7 +10,7 @@ function BACKLASH() {
this.model.nzcross = new ScilabDouble([2]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -30,10 +30,10 @@ function BACKLASH() {
this.gap = arguments[0]["gap"]
this.zcr = arguments[0]["zcr"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- rpar = this.model.rpar;
+ var rpar = this.model.rpar;
while (true) {
[ok,this.ini,this.gap,this.zcr,exprs] = scicos_getvalue("Set backlash parameters",["initial output","gap","use zero-crossing (0:no, 1:yes)"],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
diff --git a/js/Misc/BOUNCE.js b/js/Misc/BOUNCE.js
index 3399948c..1cddf4f2 100644
--- a/js/Misc/BOUNCE.js
+++ b/js/Misc/BOUNCE.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Misc/BOUNCE.sci" */
function BOUNCE() {
BOUNCE.prototype.define = function BOUNCE() {
- n = 2;
- k = 1;
- ipar = [];
+ var n = 2;
+ var k = 1;
+ var ipar = [];
for (i=1;i<=n;i+=1) {
for (j=i+1;j<=n;j+=1) {
ipar[k-1] = i;
- k = k+1;
+ var k = k+1;
ipar[k-1] = j;
- k = k+1;
+ var k = k+1;
}
}
this.walls = [[0],[5],[0],[5]];
@@ -21,8 +21,8 @@ function BOUNCE() {
this.C = 0;
this.rpar1 = ones(n,1);
this.rpar2 = this.rpar1;
- state = [this.x,this.xd,this.y,this.yd];
- state = transpose(state);
+ var state = [this.x,this.xd,this.y,this.yd];
+ var state = transpose(state);
this.model = scicos_model();
this.model.sim = list(new ScilabString(["bounce_ball"]), new ScilabDouble([4]));
this.model.in1 = [];
@@ -33,8 +33,8 @@ function BOUNCE() {
this.model.nzcross = new ScilabDouble([n*(n-1)/2+4*n]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(this.rpar1))],[strcat(sci2exp(this.rpar2))],[strcat(sci2exp(this.walls))],[strcat(sci2exp(this.x))],[strcat(sci2exp(this.xd))],[strcat(sci2exp(this.y))],[strcat(sci2exp(this.yd))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.rpar1))],[strcat(sci2exp(this.rpar2))],[strcat(sci2exp(this.walls))],[strcat(sci2exp(this.x))],[strcat(sci2exp(this.xd))],[strcat(sci2exp(this.y))],[strcat(sci2exp(this.yd))]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -66,8 +66,8 @@ function BOUNCE() {
this.g = parseFloat(arguments[0]["g"])
this.C = parseFloat(arguments[0]["C"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")<9) {
exprs[8-1] = "9.81";
@@ -84,7 +84,7 @@ function BOUNCE() {
this.yd = this.yd.slice();
this.rpar1 = this.rpar1.slice();
this.rpar2 = this.rpar2.slice();
- n = size(this.xt,"*");
+ var n = size(this.xt,"*");
this.walls = this.walls.slice();
if (this.walls[1-1]>this.walls[2-1]) {
this.walls = this.walls[[2,1]-1];
@@ -94,30 +94,33 @@ function BOUNCE() {
}
if (n!=size(this.y,"*")||n!=size(this.rpar1,"*")||n!=size(this.rpar2,"*")||n!=size(this.xd,"*")||n!=size(this.yd,"*")) {
message("All vectors must have equal size");
- ok = false;
+ var ok = false;
} else if (!(min([[this.rpar1],[this.rpar2]])>0)) {
message("Mass and radius must be >0");
- ok = false;
+ var ok = false;
}
if (!ok) {
break;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,[],[n,n],[],[]);
+ var tmpvar0 = check_io(this.model,graphics,[],[n,n],[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
- k = 1;
- ipar = [];
+ var k = 1;
+ var ipar = [];
for (i=1;i<=n;i+=1) {
for (j=i+1;j<=n;j+=1) {
ipar[k-1] = i;
- k = k+1;
+ var k = k+1;
ipar[k-1] = j;
- k = k+1;
+ var k = k+1;
}
}
this.model.rpar = new ScilabDouble([this.rpar1],[this.rpar2],[this.walls],[this.g],[this.C]);
this.model.ipar = ipar;
- state = [this.xt,this.xd,this.y,this.yd];
- state = transpose(state);
+ var state = [this.xt,this.xd,this.y,this.yd];
+ var state = transpose(state);
this.model.state = state.slice();
this.model.nzcross = new ScilabDouble([n*(n-1)/2+4*n]);
graphics.exprs = exprs;
diff --git a/js/Misc/BOUNCE.pickle b/js/Misc/BOUNCE.pickle
index f718671d..18a1958e 100644
--- a/js/Misc/BOUNCE.pickle
+++ b/js/Misc/BOUNCE.pickle
@@ -70,76 +70,73 @@ p18
sS'C'
p19
g13
-sS'[this.model,graphics,ok]'
-p20
-g18
sS'yd'
-p21
+p20
g5
sS'model.rpar'
-p22
+p21
g5
sS'walls'
-p23
+p22
g5
sS'rpar1'
-p24
+p23
g13
sS'rpar2'
-p25
+p24
g13
sS'graphics'
-p26
+p25
g2
sS'model.ipar'
-p27
+p26
g9
sS'typ'
-p28
+p27
g9
sS'exprs[8-1]'
-p29
+p28
g16
sS'ok'
-p30
+p29
S'boolean'
-p31
+p30
sS'model.blocktype'
-p32
+p31
g16
sS'g'
+p32
+g13
+sS'k'
p33
g13
-sS'ipar[k-1]'
+sS'model.dep_ut'
p34
-NsS'model.dep_ut'
-p35
g9
sS'n'
-p36
+p35
g13
sS'exprs'
-p37
+p36
g5
sS'gr_i'
-p38
+p37
g9
sS'ipar'
-p39
+p38
g9
sS'y'
-p40
+p39
g5
sS'x'
-p41
+p40
g13
sS'model'
-p42
+p41
g2
-sS'k'
+sS'ipar[k-1]'
+p42
+NsS'model.state'
p43
-g13
-sS'model.state'
-p44
g9
s. \ No newline at end of file
diff --git a/js/Misc/BOUNCEXY.js b/js/Misc/BOUNCEXY.js
index fae911bf..1295acf6 100644
--- a/js/Misc/BOUNCEXY.js
+++ b/js/Misc/BOUNCEXY.js
@@ -15,7 +15,7 @@ function BOUNCEXY() {
this.model.in2 = new ScilabDouble([1],[1]);
this.model.intyp = new ScilabDouble([1],[1]);
this.model.evtin = new ScilabDouble([1]);
- z = [];
+ var z = [];
for (i=1;i<=size(this.clrs,"*");i+=1) {
z[6*(i-1)+1-1] = 0;
z[6*(i-1)+2-1] = 0;
@@ -30,8 +30,8 @@ function BOUNCEXY() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- exprs = [[strcat(sci2exp(this.clrs))],[strcat(sci2exp(this.siz))],[strcat(sci2exp(this.win))],[strcat(sci2exp(1))],[strcat(sci2exp(this.xmin))],[strcat(sci2exp(this.xmax))],[strcat(sci2exp(this.ymin))],[strcat(sci2exp(this.ymax))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.clrs))],[strcat(sci2exp(this.siz))],[strcat(sci2exp(this.win))],[strcat(sci2exp(1))],[strcat(sci2exp(this.xmin))],[strcat(sci2exp(this.xmax))],[strcat(sci2exp(this.ymin))],[strcat(sci2exp(this.ymax))]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -61,38 +61,38 @@ function BOUNCEXY() {
this.ymin = parseFloat(arguments[0]["ymin"])
this.ymax = parseFloat(arguments[0]["ymax"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- dstate = this.model.dstate;
+ var dstate = this.model.dstate;
while (true) {
[ok,this.clrs,this.siz,this.win,this.imode,this.xmin,this.xmax,this.ymin,this.ymax,exprs] = scicos_getvalue("Set Scope parameters",["colors","radii","window number (-1 for automatic)","animation mode (0,1)","Xmin","Xmax","Ymin","Ymax"],list("vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.clrs,"*")!=size(this.siz,"*")) {
- mess = [[mess],["colors and radii must have equal size (number of balls)"],[" "]];
- ok = false;
+ var mess = [[mess],["colors and radii must have equal size (number of balls)"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
+ var ok = false;
}
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (this.xmin>=this.xmax) {
- mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
+ var ok = false;
}
if (!ok) {
message(mess);
} else {
- rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
- ipar = [[this.win],[this.imode],[this.clrs.slice()]];
- z = [];
+ var rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ var ipar = [[this.win],[this.imode],[this.clrs.slice()]];
+ var z = [];
for (i=1;i<=size(this.clrs,"*");i+=1) {
z[6*(i-1)+1-1] = 0;
z[6*(i-1)+2-1] = 0;
diff --git a/js/Misc/BPLATFORM.js b/js/Misc/BPLATFORM.js
index 6ea0a30a..02a231db 100644
--- a/js/Misc/BPLATFORM.js
+++ b/js/Misc/BPLATFORM.js
@@ -16,8 +16,8 @@ function BPLATFORM() {
this.model.rpar = new ScilabDouble([this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = string(this.model.rpar);
- gr_i = [];
+ var exprs = string(this.model.rpar);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -45,32 +45,32 @@ function BPLATFORM() {
this.ymin = parseFloat(arguments[0]["ymin"])
this.ymax = parseFloat(arguments[0]["ymax"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- dstate = this.model.dstate;
+ var dstate = this.model.dstate;
while (true) {
[ok,this.plen,this.csiz,this.phi,this.xmin,this.xmax,this.ymin,this.ymax,exprs] = scicos_getvalue("Set Scope parameters",["pendulum length","cart size (square side)","slope","Xmin","Xmax","Ymin","Ymax"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (this.plen<=0||this.csiz<=0) {
- mess = [[mess],["Pendulum length and cart size must be positive."],[" "]];
- ok = false;
+ var mess = [[mess],["Pendulum length and cart size must be positive."],[" "]];
+ var ok = false;
}
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (this.xmin>=this.xmax) {
- mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
+ var ok = false;
}
if (!ok) {
message(mess);
} else {
- rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ var rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
this.model.rpar = new ScilabDouble(rpar);
graphics.exprs = exprs;
this.x.graphics = graphics;
diff --git a/js/Misc/CBLOCK.js b/js/Misc/CBLOCK.js
index 62d3d677..faf7b1e3 100644
--- a/js/Misc/CBLOCK.js
+++ b/js/Misc/CBLOCK.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Misc/CBLOCK.sci" */
function CBLOCK() {
CBLOCK.prototype.define = function CBLOCK() {
- in1 = 1;
- out = 1;
- clkin = [];
- clkout = [];
- x0 = [];
- z0 = [];
- typ = "c";
- auto = [];
+ var in1 = 1;
+ var out = 1;
+ var clkin = [];
+ var clkout = [];
+ var x0 = [];
+ var z0 = [];
+ var typ = "c";
+ var auto = [];
this.rpar = [];
this.ipar = [];
- funam = "toto";
+ var funam = "toto";
this.ng = 0;
this.model = scicos_model();
this.model.sim = list(new ScilabString([" "]), new ScilabDouble([2004]));
@@ -27,8 +27,8 @@ function CBLOCK() {
this.model.firing = auto;
this.model.dep_ut = [true,false];
this.model.nzcross = new ScilabDouble([this.ng]);
- label = list(transpose([funam,"n",sci2exp(in1),sci2exp(out),sci2exp(clkin),sci2exp(clkout),sci2exp(x0),sci2exp(0),sci2exp(z0),sci2exp(this.rpar),sci2exp(this.ipar),sci2exp(auto),"y","n"]),[]);
- gr_i = [];
+ var label = list(transpose([funam,"n",sci2exp(in1),sci2exp(out),sci2exp(clkin),sci2exp(clkout),sci2exp(x0),sci2exp(0),sci2exp(z0),sci2exp(this.rpar),sci2exp(this.ipar),sci2exp(auto),"y","n"]),[]);
+ var gr_i = [];
this.x = standard_define([4,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -72,37 +72,37 @@ function CBLOCK() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
while (true) {
[ok,this.function_name,this.impli,this.i,this.o,this.ci,this.co,this.xx,this.ng,this.z,this.rpar,this.ipar,this.auto0,this.depu,this.dept,this.lab] = scicos_getvalue("Set C-Block2 block parameters",["simulation function","is block implicit? (y,n)","input ports sizes","output ports sizes","input event ports sizes","output events ports sizes","initial continuous state","number of zero crossing surfaces","initial discrete state","Real parameters vector","Integer parameters vector","initial firing vector (<0 for no firing)","direct feedthrough (y or n)","time dependence (y or n)"],list("str",1,"str",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec","sum(%6)","str",1,"str",1),label[1-1]);
if (!ok) {
break;
}
label[1-1] = this.lab;
- funam = stripblanks(this.function_name);
+ var funam = stripblanks(this.function_name);
this.xx = this.xx.slice();
this.z = this.z.slice();
this.rpar = this.rpar.slice();
this.ipar = int(this.ipar.slice());
- nx = size(this.xx,1);
- nz = size(this.z,1);
+ var nx = size(this.xx,1);
+ var nz = size(this.z,1);
this.i = int(this.i.slice());
this.o = int(this.o.slice());
- nout = size(this.o,1);
+ var nout = size(this.o,1);
this.ci = int(this.ci.slice());
- nevin = size(this.ci,1);
+ var nevin = size(this.ci,1);
this.co = int(this.co.slice());
- nevout = size(this.co,1);
+ var nevout = size(this.co,1);
if (part(this.impli,1)=="y") {
- funtyp = 12004;
+ var funtyp = 12004;
} else {
- funtyp = 2004;
+ var funtyp = 2004;
}
if ([[this.ci],[this.co]]!=[]) {
if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
- ok = false;
+ var ok = false;
}
}
this.depu = stripblanks(this.depu);
@@ -117,22 +117,28 @@ function CBLOCK() {
} else {
this.dept = false;
}
- dep_ut = [this.depu,this.dept];
+ var dep_ut = [this.depu,this.dept];
if (funam==" ") {
break;
}
if (this.model.sim[1-1]!=funam||sign(size(this.model.state,"*"))!=sign(nx)||sign(size(this.model.dstate,"*"))!=sign(nz)||this.model.nzcross!=this.ng||sign(size(this.model.evtout,"*"))!=sign(nevout)) {
- tt = [];
+ var tt = [];
}
- tt = label[2-1];
+ var tt = label[2-1];
while (true) {
- [ok,tt,cancel] = CFORTR2(funam,tt);
+ var tmpvar0 = CFORTR2(funam,tt)
+ var ok = tmpvar0[0]
+ var tt = tmpvar0[1]
+ var cancel = tmpvar0[2];
if (!ok) {
if (cancel) {
break;
}
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,this.ci,this.co);
+ var tmpvar1 = check_io(this.model,graphics,this.i,this.o,this.ci,this.co)
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
this.model.sim = list(new ScilabDouble([funam]), new ScilabDouble([funtyp]));
this.model.in1 = new ScilabDouble([this.i]);
diff --git a/js/Misc/CBLOCK.pickle b/js/Misc/CBLOCK.pickle
index 104370ff..3aefc656 100644
--- a/js/Misc/CBLOCK.pickle
+++ b/js/Misc/CBLOCK.pickle
@@ -115,100 +115,94 @@ g8
sS'model.evtin'
p29
g8
-sS'label[2-1]'
-p30
-g2
sS'model.firing'
-p31
+p30
g8
sS'nevout'
-p32
+p31
g2
sS'model.sim'
-p33
+p32
g25
sS'model.evtout'
-p34
+p33
g8
-sS'[ok,tt,cancel]'
-p35
-g2
sS'clkout'
-p36
+p34
g8
sS'auto'
-p37
+p35
g8
-sS'[this.model,graphics,ok]'
-p38
-g25
+sS'label[2-1]'
+p36
+g2
sS'in1'
-p39
+p37
g2
sS'model.rpar'
-p40
+p38
g8
sS'model.state'
-p41
+p39
g8
sS'graphics'
-p42
+p40
g5
sS'x0'
-p43
+p41
g8
sS'model.ipar'
-p44
+p42
g8
sS'typ'
-p45
+p43
g14
sS'ok'
-p46
+p44
S'boolean'
-p47
+p45
sS'model.blocktype'
-p48
+p46
g14
sS'i'
-p49
+p47
g2
sS'label[1-1]'
-p50
+p48
NsS'x.model'
-p51
+p49
g5
sS'o'
-p52
+p50
g2
sS'depu'
-p53
-g47
+p51
+g45
sS'dept'
-p54
-g47
+p52
+g45
sS'gr_i'
-p55
+p53
g8
sS'ipar'
-p56
+p54
g8
sS'y'
-p57
+p55
g8
sS'x'
-p58
+p56
g2
sS'model'
-p59
+p57
g5
sS'z'
-p60
+p58
g8
sS'nout'
-p61
+p59
g2
sS'dep_ut'
-p62
+p60
g8
s. \ No newline at end of file
diff --git a/js/Misc/CBLOCK4.js b/js/Misc/CBLOCK4.js
index c99b5d9d..15889859 100644
--- a/js/Misc/CBLOCK4.js
+++ b/js/Misc/CBLOCK4.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Misc/CBLOCK4.sci" */
function CBLOCK4() {
CBLOCK4.prototype.define = function CBLOCK4() {
- funam = "toto";
+ var funam = "toto";
this.model = scicos_model();
this.model.sim = list(new ScilabString([" "]), new ScilabDouble([2004]));
this.model.in1 = new ScilabDouble([1]);
@@ -11,8 +11,8 @@ function CBLOCK4() {
this.model.out2 = new ScilabDouble([1]);
this.model.outtyp = new ScilabDouble([1]);
this.model.dep_ut = [true,false];
- label = list([[funam],["n"],[sci2exp([this.model.in1,this.model.in2])],[sci2exp(this.model.intyp)],[sci2exp([this.model.out,this.model.out2])],[sci2exp(this.model.outtyp)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.odstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.opar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]],[]);
- gr_i = [];
+ var label = list([[funam],["n"],[sci2exp([this.model.in1,this.model.in2])],[sci2exp(this.model.intyp)],[sci2exp([this.model.out,this.model.out2])],[sci2exp(this.model.outtyp)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.odstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.opar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]],[]);
+ var gr_i = [];
this.x = standard_define([4,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -66,34 +66,34 @@ function CBLOCK4() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
while (true) {
[ok,this.function_name,this.impli,this.in1,this.it,this.out,this.ot,this.ci,this.co,this.xx,this.z,this.oz,this.rpar,this.ipar,this.opar,this.nmode,this.nzcr,this.auto0,this.depu,this.dept,this.lab] = scicos_getvalue("Set C-Block4 block parameters",["Simulation function","Is block implicit? (y,n)","Input ports sizes","Input ports type","Output port sizes","Output ports type","Input event ports sizes","Output events ports sizes","Initial continuous state","Initial discrete state","Initial object state","Real parameters vector","Integer parameters vector","Object parameters list","Number of modes","Number of zero crossings","Initial firing vector (<0 for no firing)","Direct feedthrough (y or n)","Time dependence (y or n)"],list("str",1,"str",1,"mat",[-1,2],"vec",-1,"mat",[-1,2],"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"lis",-1,"vec",-1,"vec",-1,"lis",-1,"vec",1,"vec",1,"vec","sum(%8)","str",1,"str",1),label[1-1]);
if (!ok) {
break;
}
label[1-1] = this.lab;
- funam = stripblanks(this.function_name);
+ var funam = stripblanks(this.function_name);
this.xx = this.xx.slice();
this.z = this.z.slice();
this.rpar = this.rpar.slice();
this.ipar = int(this.ipar.slice());
- nx = size(this.xx,1);
- nz = size(this.z,1);
+ var nx = size(this.xx,1);
+ var nz = size(this.z,1);
this.ci = int(this.ci.slice());
- nevin = size(this.ci,1);
+ var nevin = size(this.ci,1);
this.co = int(this.co.slice());
- nevout = size(this.co,1);
+ var nevout = size(this.co,1);
if (part(this.impli,1)=="y") {
- funtyp = 12004;
+ var funtyp = 12004;
} else {
- funtyp = 2004;
+ var funtyp = 2004;
}
if ([[this.ci],[this.co]]!=[]) {
if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
- ok = false;
+ var ok = false;
}
}
if (ok) {
@@ -109,19 +109,25 @@ function CBLOCK4() {
} else {
this.dept = false;
}
- dep_ut = [this.depu,this.dept];
+ var dep_ut = [this.depu,this.dept];
if (funam==" ") {
break;
}
if (this.model.sim[1-1]!=funam||sign(size(this.model.state,"*"))!=sign(nx)||sign(size(this.model.dstate,"*"))!=sign(nz)||this.model.nzcross!=this.nzcr||sign(size(this.model.evtout,"*"))!=sign(nevout)) {
- tt = [];
+ var tt = [];
}
- tt = label[2-1];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(this.in1,this.it),list(this.out,this.ot),this.ci,this.co);
+ var tt = label[2-1];
+ var tmpvar0 = set_io(this.model,graphics,list(this.in1,this.it),list(this.out,this.ot),this.ci,this.co)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
while (true) {
- [ok,tt,cancel] = this.CC4[funam-1][tt-1];
+ var tmpvar1 = CC4(funam,tt)
+ var ok = tmpvar1[0]
+ var tt = tmpvar1[1]
+ var cancel = tmpvar1[2];
if (!ok) {
if (cancel) {
break;
diff --git a/js/Misc/CBLOCK4.pickle b/js/Misc/CBLOCK4.pickle
index e9c89e6b..791d370c 100644
--- a/js/Misc/CBLOCK4.pickle
+++ b/js/Misc/CBLOCK4.pickle
@@ -26,30 +26,28 @@ aS'nmode'
p12
aS'z'
p13
-aS'CC4'
-p14
aS'xx'
-p15
+p14
aS'nzcr'
-p16
+p15
aS'depu'
-p17
+p16
aS'dept'
-p18
+p17
aS'opar'
-p19
+p18
aS'oz'
-p20
+p19
aS'ipar'
-p21
+p20
aS'x'
-p22
+p21
aS'model'
-p23
+p22
aS'ot'
-p24
-atp25
-Rp26
+p23
+atp24
+Rp25
.(dp0
S'model.odstate'
p1
@@ -116,85 +114,79 @@ g3
sS'nz'
p26
g3
-sS'label[2-1]'
-p27
-g3
sS'model.firing'
-p28
+p27
NsS'nevout'
-p29
+p28
g3
sS'model.sim'
-p30
+p29
g24
-sS'[ok,tt,cancel]'
-p31
-g3
-sS'[this.model,graphics,ok]'
-p32
+sS'label[2-1]'
+p30
g3
sS'model.out2'
-p33
+p31
g3
sS'model.nmode'
-p34
+p32
NsS'model.rpar'
-p35
+p33
g9
sS'model.outtyp'
-p36
+p34
g3
sS'model.state'
-p37
+p35
g9
sS'graphics'
-p38
+p36
g6
sS'model.ipar'
-p39
+p37
g3
sS'typ'
-p40
+p38
g9
sS'model.opar'
-p41
+p39
NsS'ok'
-p42
+p40
S'boolean'
-p43
+p41
sS'label[1-1]'
-p44
+p42
NsS'x.model'
-p45
+p43
g6
sS'model.dep_ut'
-p46
+p44
g9
sS'depu'
-p47
-g43
+p45
+g41
sS'dept'
-p48
-g43
+p46
+g41
sS'gr_i'
-p49
+p47
g9
sS'ipar'
-p50
+p48
g3
sS'y'
-p51
+p49
g9
sS'x'
-p52
+p50
g3
sS'model'
-p53
+p51
g6
sS'z'
-p54
+p52
g9
sS'dep_ut'
-p55
+p53
g9
s. \ No newline at end of file
diff --git a/js/Misc/CONSTRAINT2_c.js b/js/Misc/CONSTRAINT2_c.js
index b21ab44f..012099d4 100644
--- a/js/Misc/CONSTRAINT2_c.js
+++ b/js/Misc/CONSTRAINT2_c.js
@@ -12,8 +12,8 @@ function CONSTRAINT2_c() {
this.model.ipar = this.id;
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = list(strcat(sci2exp(this.x0)),strcat(sci2exp(this.xd0)),strcat(sci2exp(this.id)));
- gr_i = [];
+ var exprs = list(strcat(sci2exp(this.x0)),strcat(sci2exp(this.xd0)),strcat(sci2exp(this.id)));
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -33,33 +33,33 @@ function CONSTRAINT2_c() {
this.xd0 = inverse(arguments[0]["xd0"])
this.id = inverse(arguments[0]["id"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
- ask_again = false;
+ var ask_again = false;
[ok,this.x0,this.xd0,this.id,exprs] = scicos_getvalue("Set Constraint block parameters",["Initial guess values of states x","Initial guess values of derivative x\'","Id(i)=1: if x\'(i) is present in the feedback, else Id(i)=0"],list("vec",-1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
this.x0 = this.x0.slice();
- N = size(this.x0,"*");
+ var N = size(this.x0,"*");
this.xd0 = this.xd0.slice();
- Nxd = size(this.xd0,"*");
+ var Nxd = size(this.xd0,"*");
this.id = this.id.slice();
- Nid = size(this.id,"*");
+ var Nid = size(this.id,"*");
if ((N!=Nxd)||(N!=Nid)) {
message("incompatible sizes, states, their derivatives, and ID should be the same size ");
- ask_again = true;
+ var ask_again = true;
}
if ((N<=0&&!ask_again)) {
x_message("number of states (constraints) must be > 0 ");
- ask_again = true;
+ var ask_again = true;
}
if ((!ask_again)) {
for (i=1;i<=N;i+=1) {
if (!((this.id[i-1]==0)||(this.id[i-1]==1))) {
- ask_again = true;
+ var ask_again = true;
x_message([["Id(i) must be either"],["0 when x\'(i) is not present in the feedback"],["1: when x\'(i) is present in the feedback"]]);
break;
}
diff --git a/js/Misc/CONSTRAINT_c.js b/js/Misc/CONSTRAINT_c.js
index c3c453eb..b25271e6 100644
--- a/js/Misc/CONSTRAINT_c.js
+++ b/js/Misc/CONSTRAINT_c.js
@@ -10,8 +10,8 @@ function CONSTRAINT_c() {
this.model.state = new ScilabDouble(this.x0);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = "0";
- gr_i = [];
+ var exprs = "0";
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -26,8 +26,8 @@ function CONSTRAINT_c() {
CONSTRAINT_c.prototype.set = function CONSTRAINT_c() {
this.x0 = inverse(arguments[0]["x0"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.x0,exprs] = scicos_getvalue("Set solver block parameters","Initial guess values",list("vec",-1),exprs);
@@ -35,11 +35,14 @@ function CONSTRAINT_c() {
break;
}
this.x0 = this.x0.slice();
- N = size(this.x0,"*");
+ var N = size(this.x0,"*");
if (N<=0) {
message("number of states (constraints) must be > 0 ");
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,N,N,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,N,N,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.model.state = new ScilabDouble([this.x0],[zeros(N,1)]);
diff --git a/js/Misc/CONSTRAINT_c.pickle b/js/Misc/CONSTRAINT_c.pickle
index 50efed9b..25921f7b 100644
--- a/js/Misc/CONSTRAINT_c.pickle
+++ b/js/Misc/CONSTRAINT_c.pickle
@@ -30,52 +30,49 @@ p8
sS'arg1'
p9
g8
-sS'[this.model,graphics,ok]'
-p10
-g2
sS'graphics.exprs'
-p11
+p10
NsS'model.in1'
-p12
+p11
g4
sS'model.dep_ut'
-p13
+p12
S'vector'
-p14
+p13
sS'N'
-p15
+p14
g4
sS'exprs'
-p16
+p15
g6
sS'x.model'
-p17
+p16
NsS'gr_i'
-p18
-g14
+p17
+g13
sS'model.state'
-p19
+p18
S'matrix'
-p20
+p19
sS'graphics'
-p21
+p20
g8
sS'y'
-p22
-g14
+p21
+g13
sS'x'
-p23
+p22
g4
sS'model'
-p24
+p23
g8
sS'model.ipar'
-p25
+p24
g4
sS'typ'
-p26
-g14
+p25
+g13
sS'x0'
-p27
-g20
+p26
+g19
s. \ No newline at end of file
diff --git a/js/Misc/DEADBAND.js b/js/Misc/DEADBAND.js
index a67aa2b0..6bf8c08d 100644
--- a/js/Misc/DEADBAND.js
+++ b/js/Misc/DEADBAND.js
@@ -3,7 +3,7 @@ function DEADBAND() {
DEADBAND.prototype.define = function DEADBAND() {
this.minp = -.5;
this.maxp = .5;
- rpar = [[this.maxp],[this.minp]];
+ var rpar = [[this.maxp],[this.minp]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["deadband"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -13,8 +13,8 @@ function DEADBAND() {
this.model.rpar = new ScilabDouble(rpar);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.maxp)],[string(this.minp)],[string(this.model.nmode)]];
- gr_i = [];
+ var exprs = [[string(this.maxp)],[string(this.minp)],[string(this.model.nmode)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,8 +34,8 @@ function DEADBAND() {
this.minp = parseFloat(arguments[0]["minp"])
this.zeroc = arguments[0]["zeroc"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.maxp,this.minp,this.zeroc,exprs] = scicos_getvalue("Set Deadband parameters",["End of dead band","Start of dead band","zero crossing (0:no, 1:yes)"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -45,7 +45,7 @@ function DEADBAND() {
if (this.maxp<=this.minp) {
message("Upper limit must be > Lower limit");
} else {
- rpar = [[this.maxp],[this.minp]];
+ var rpar = [[this.maxp],[this.minp]];
this.model.rpar = new ScilabDouble(rpar);
if (this.zeroc!=0) {
this.model.nzcross = new ScilabDouble([2]);
diff --git a/js/Misc/DEBUG.js b/js/Misc/DEBUG.js
index 9352edb5..fd7e7507 100644
--- a/js/Misc/DEBUG.js
+++ b/js/Misc/DEBUG.js
@@ -4,8 +4,8 @@ function DEBUG() {
this.model = scicos_model();
this.model.sim = list(new ScilabString(["%debug_scicos"]), new ScilabDouble([99]));
this.model.blocktype = new ScilabString(["d"]);
- exprs = list("","xcos_debug_gui(flag,block);");
- gr_i = [];
+ var exprs = list("","xcos_debug_gui(flag,block);");
+ var gr_i = [];
this.x = standard_define([8,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -19,16 +19,17 @@ function DEBUG() {
}
DEBUG.prototype.set = function DEBUG() {
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- textmp = exprs[2-1];
- ok = true;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var textmp = exprs[2-1];
+ var ok = true;
while (1==1) {
- [txt] = this.dialog[[["Enter scilab instructions for debugging."],[" Inputs are block and flag, output is block"]]-1][textmp-1];
+ var tmpvar0 = dialog([["Enter scilab instructions for debugging."],[" Inputs are block and flag, output is block"]],textmp)
+ var txt = tmpvar0[0];
if (txt!=[]) {
- tt = ["block=debug_scicos(block,flag)"];
+ var tt = ["block=debug_scicos(block,flag)"];
if (execstr("deff(tt,txt)","errcatch")==0) {
- warnMode = warning("query");
+ var warnMode = warning("query");
warning("off");
save(this.TMPDIR+"/debug_scicos",this.debug_scicos);
warning(warnMode);
@@ -41,7 +42,7 @@ function DEBUG() {
message([["Error in the instructions"],[lasterror()]]);
}
} else {
- ok = false;
+ var ok = false;
break;
}
}
diff --git a/js/Misc/DEBUG.pickle b/js/Misc/DEBUG.pickle
index b2e30a30..f87b24a9 100644
--- a/js/Misc/DEBUG.pickle
+++ b/js/Misc/DEBUG.pickle
@@ -10,10 +10,8 @@ aS'model'
p4
aS'TMPDIR'
p5
-aS'dialog'
-p6
-atp7
-Rp8
+atp6
+Rp7
.(dp0
S'exprs[2-1]'
p1
@@ -44,33 +42,30 @@ sS'tt'
p13
S'vector'
p14
-sS'[txt]'
+sS'graphics.exprs'
p15
-g11
-sS'exprs'
+NsS'exprs'
p16
g3
sS'gr_i'
p17
g14
-sS'graphics.exprs'
+sS'graphics'
p18
-NsS'graphics'
-p19
g9
sS'y'
-p20
+p19
g14
sS'x'
-p21
+p20
g11
sS'model'
-p22
+p21
g9
sS'typ'
-p23
+p22
g14
sS'warnMode'
-p24
+p23
g11
s. \ No newline at end of file
diff --git a/js/Misc/DEBUG_SCICOS.js b/js/Misc/DEBUG_SCICOS.js
index 28944332..96f7b940 100644
--- a/js/Misc/DEBUG_SCICOS.js
+++ b/js/Misc/DEBUG_SCICOS.js
@@ -14,7 +14,10 @@ function DEBUG_SCICOS() {
}
DEBUG_SCICOS.prototype.set = function DEBUG_SCICOS() {
arg1.gui = "DEBUG";
- [this.x,y,typ] = DEBUG("set",arg1);
+ var tmpvar0 = DEBUG("set",arg1)
+ this.x = tmpvar0[0]
+ var y = tmpvar0[1]
+ var typ = tmpvar0[2];
return new BasicBlock(this.x);
}
}
diff --git a/js/Misc/DEBUG_SCICOS.pickle b/js/Misc/DEBUG_SCICOS.pickle
index 0271cfca..4fc428a5 100644
--- a/js/Misc/DEBUG_SCICOS.pickle
+++ b/js/Misc/DEBUG_SCICOS.pickle
@@ -22,7 +22,4 @@ p6
sS'typ'
p7
g2
-sS'[this.x,y,typ]'
-p8
-g4
s. \ No newline at end of file
diff --git a/js/Misc/DIFF_f.js b/js/Misc/DIFF_f.js
index 8410083c..b68a32d1 100644
--- a/js/Misc/DIFF_f.js
+++ b/js/Misc/DIFF_f.js
@@ -9,8 +9,8 @@ function DIFF_f() {
this.model.state = new ScilabDouble(this.x0);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -28,8 +28,8 @@ function DIFF_f() {
this.x0 = inverse(arguments[0]["x0"])
this.xd0 = arguments[0]["xd0"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.x0,this.xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",["Initial state","Initial Derivative"],list("vec",1,"vec",1),exprs);
diff --git a/js/Misc/DSUPER.js b/js/Misc/DSUPER.js
index 4d36f641..eaed8a54 100644
--- a/js/Misc/DSUPER.js
+++ b/js/Misc/DSUPER.js
@@ -12,41 +12,47 @@ function DSUPER() {
return options;
}
DSUPER.prototype.set = function DSUPER() {
- y = this.needcompile;
- typ = list();
- graphics = arg1.graphics;
+ var y = this.needcompile;
+ var typ = list();
+ var graphics = arg1.graphics;
if ((length(graphics.exprs)==0)) {
warnBlockByUID(arg1.model.label,"Invalid masked block.");
this.x = arg1;
return;
}
- exprs = graphics.exprs[1-1];
- exprs0 = graphics.exprs[2-1][1-1];
- btitre = graphics.exprs[2-1][2-1][1-1];
- bitems = graphics.exprs[2-1][2-1].slice(2-1,$);
+ var exprs = graphics.exprs[1-1];
+ var exprs0 = graphics.exprs[2-1][1-1];
+ var btitre = graphics.exprs[2-1][2-1][1-1];
+ var bitems = graphics.exprs[2-1][2-1].slice(2-1,$);
if (exprs0==[]) {
this.x = arg1;
return;
}
- context = [arg1.model.rpar.props.context];
- [PREVAR_scicos_context,ierr] = script2var(context,PREVAR_scicos_context);
+ var context = [arg1.model.rpar.props.context];
+ var tmpvar0 = script2var(context,PREVAR_scicos_context)
+ var PREVAR_scicos_context = tmpvar0[0]
+ var ierr = tmpvar0[1];
if (ierr!=0) {
this.x = arg1;
return;
}
- tt = "scicos_context."+exprs0[1-1];
+ var tt = "scicos_context."+exprs0[1-1];
for (i=2;i<=size(exprs0,1);i+=1) {
- tt = tt+",scicos_context."+exprs0[i-1];
+ var tt = tt+",scicos_context."+exprs0[i-1];
}
- ss = graphics.exprs[2-1][3-1];
- scicos_context = PREVAR_scicos_context;
+ var ss = graphics.exprs[2-1][3-1];
+ var scicos_context = PREVAR_scicos_context;
execstr("[ok,"+tt+",exprs]=scicos_getvalue(btitre,bitems,ss,exprs)");
if (this.ok) {
this.x = arg1;
- PREVAR_scicos_context = scicos_context;
- sblock = this.x.model.rpar;
- [sblock,%w,needcompile2,this.ok] = do_eval(sblock,list(),scicos_context);
- y = max(2,this.needcompile,needcompile2);
+ var PREVAR_scicos_context = scicos_context;
+ var sblock = this.x.model.rpar;
+ var tmpvar1 = do_eval(sblock,list(),scicos_context)
+ var sblock = tmpvar1[0]
+ %w = tmpvar1[1]
+ var needcompile2 = tmpvar1[2]
+ this.ok = tmpvar1[3];
+ var y = max(2,this.needcompile,needcompile2);
this.x.graphics.exprs[1-1] = exprs;
this.x.model.rpar = sblock;
} else {
diff --git a/js/Misc/DSUPER.pickle b/js/Misc/DSUPER.pickle
index e20a96c0..24d918fc 100644
--- a/js/Misc/DSUPER.pickle
+++ b/js/Misc/DSUPER.pickle
@@ -15,70 +15,64 @@ S'bitems'
p1
S'string'
p2
-sS'arg1'
+sS'arg1.model'
p3
S'object'
p4
-sS'scicos_context'
+sS'x.graphics.exprs[1-1]'
p5
-NsS'x.model'
+S'double'
p6
-g4
sS'x.model.rpar'
p7
-NsS'arg1.model.rpar.props'
+NsS'ss'
p8
-g4
-sS'tt'
+g6
+sS'arg1'
p9
-g2
-sS'btitre'
+g4
+sS'exprs0'
p10
-S'double'
+g6
+sS'btitre'
p11
-sS'[PREVAR_scicos_context,ierr]'
-p12
-g11
+g6
sS'sblock'
+p12
+NsS'scicos_context'
p13
-NsS'graphics'
+NsS'exprs'
p14
-g4
-sS'typ'
+g6
+sS'x.model'
p15
-S'list'
+g4
+sS'PREVAR_scicos_context'
p16
-sS'arg1.model'
+NsS'context'
p17
-g4
-sS'x.graphics.exprs[1-1]'
+S'vector'
p18
-g11
-sS'ss'
+sS'graphics'
p19
-g11
-sS'exprs0'
+g4
+sS'y'
p20
-g11
-sS'exprs'
+g6
+sS'x'
p21
-g11
-sS'[sblock,%w,needcompile2,this.ok]'
+g4
+sS'arg1.model.rpar.props'
p22
-g11
-sS'PREVAR_scicos_context'
+g4
+sS'typ'
p23
-NsS'context'
+S'list'
p24
-S'vector'
+sS'tt'
p25
-sS'y'
-p26
-g11
-sS'x'
-p27
-g4
+g2
sS'arg1.model.rpar'
-p28
+p26
g4
s. \ No newline at end of file
diff --git a/js/Misc/EDGETRIGGER.js b/js/Misc/EDGETRIGGER.js
index 54bc5ecf..f694714f 100644
--- a/js/Misc/EDGETRIGGER.js
+++ b/js/Misc/EDGETRIGGER.js
@@ -11,8 +11,8 @@ function EDGETRIGGER() {
this.model.ipar = new ScilabDouble([sign(this.edge)]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [string(this.edge)];
- gr_i = [];
+ var exprs = [string(this.edge)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -28,8 +28,8 @@ function EDGETRIGGER() {
EDGETRIGGER.prototype.set = function EDGETRIGGER() {
this.edge = parseFloat(arguments[0]["edge"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.edge,exprs] = scicos_getvalue("Set edge trigger block parameters",["rising (1), falling (-1), both (0)"],list("vec",1),exprs);
diff --git a/js/Misc/EDGE_TRIGGER.js b/js/Misc/EDGE_TRIGGER.js
index 63163874..4349ce08 100644
--- a/js/Misc/EDGE_TRIGGER.js
+++ b/js/Misc/EDGE_TRIGGER.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Misc/EDGE_TRIGGER.sci" */
function EDGE_TRIGGER() {
EDGE_TRIGGER.prototype.define = function EDGE_TRIGGER() {
- scs_m_1 = scicos_diagram();
+ var scs_m_1 = scicos_diagram();
scs_m_1.objs[1-1] = EDGETRIGGER("define");
scs_m_1.objs[2-1] = IFTHEL_f("define");
scs_m_1.objs[3-1] = IN_f("define");
@@ -9,8 +9,8 @@ function EDGE_TRIGGER() {
scs_m_1.objs[5-1] = scicos_link();
scs_m_1.objs[6-1] = scicos_link();
scs_m_1.objs[7-1] = scicos_link();
- blk = scs_m_1.objs[1-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[1-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [60,0];
graphics.sz = [60,40];
@@ -21,8 +21,8 @@ function EDGE_TRIGGER() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[1-1] = blk;
- blk = scs_m_1.objs[2-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[2-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [160,0];
graphics.sz = [60,40];
@@ -35,8 +35,8 @@ function EDGE_TRIGGER() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[2-1] = blk;
- blk = scs_m_1.objs[3-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[3-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [0,10];
graphics.sz = [20,20];
@@ -46,8 +46,8 @@ function EDGE_TRIGGER() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[3-1] = blk;
- blk = scs_m_1.objs[4-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[4-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [170,-60];
graphics.sz = [20,20];
@@ -57,15 +57,15 @@ function EDGE_TRIGGER() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[4-1] = blk;
- lnk = scs_m_1.objs[5-1];
+ var lnk = scs_m_1.objs[5-1];
lnk.from = [3,1,0];
lnk.to = [1,1,1];
scs_m_1.objs[5-1] = lnk;
- lnk = scs_m_1.objs[6-1];
+ var lnk = scs_m_1.objs[6-1];
lnk.from = [1,1,0];
lnk.to = [2,1,1];
scs_m_1.objs[6-1] = lnk;
- lnk = scs_m_1.objs[7-1];
+ var lnk = scs_m_1.objs[7-1];
lnk.ct = [5,-1];
lnk.from = [2,1,0];
lnk.to = [4,1,1];
@@ -77,7 +77,7 @@ function EDGE_TRIGGER() {
this.model.in1 = new ScilabDouble([1]);
this.model.evtout = new ScilabDouble([1]);
this.model.rpar = scs_m_1;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -91,72 +91,72 @@ function EDGE_TRIGGER() {
}
EDGE_TRIGGER.prototype.set = function EDGE_TRIGGER() {
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="EDGETRIGGER") {
- ppath = list(i);
+ var ppath = list(i);
break;
}
}
- newpar = list();
- y = 0;
+ var newpar = list();
+ var y = 0;
for (path in ppath) {
- np = size(path,"*");
- spath = list();
+ var np = size(path,"*");
+ var spath = list();
for (k=1;k<=np;k+=1) {
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path[k-1];
}
- xx = arg1[spath-1];
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (diffobjs(this.xxn,xx)) {
this.model = xx.model;
- model_n = this.xxn.model;
+ var model_n = this.xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if ((size(this.model.in1,"*")!=size(model_n.in1,"*"))||(size(this.model.out,"*")!=size(model_n.out,"*"))) {
- needcompile = 4;
+ var needcompile = 4;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = this.xxn;
newpar[size(newpar)+1-1] = path;
- y = max(y,needcompile);
+ var y = max(y,needcompile);
}
}
this.x = arg1;
- typ = newpar;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Misc/ENDBLK.js b/js/Misc/ENDBLK.js
index 9393fdd7..3a854c31 100644
--- a/js/Misc/ENDBLK.js
+++ b/js/Misc/ENDBLK.js
@@ -1,11 +1,11 @@
/* autogenerated from "macros/Misc/ENDBLK.sci" */
function ENDBLK() {
ENDBLK.prototype.define = function ENDBLK() {
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-159.096,811.104,-121.216,617.984,1323,1008,331,284,630,480,0,7,1.4],Title="ENDBLK",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-159.096,811.104,-121.216,617.984,1323,1008,331,284,630,480,0,7,1.4],Title="ENDBLK",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="END_c",graphics=scicos_graphics(orig=[272.104,249.11733],sz=[40,40],flip=true,theta=0,exprs="1.000E+08",pin=[],pout=[],pein=2,peout=2,gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim=list("scicosexit",4),in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=1,evtout=1,state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="d",firing=1.000e+08,dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_link(xx=[[292.104],[292.104],[261.83733],[261.83733],[292.104],[292.104]],yy=[[243.40305],[234.45067],[234.45067],[305.584],[305.584],[294.83162]],id="drawlink",thick=[0,0],ct=[5,-1],from=[1,1,0],to=[1,1,1]);
this.model = scicos_model(sim="csuper",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=scs_m_1,ipar=[],opar=list(),blocktype="h",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list());
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -19,72 +19,72 @@ function ENDBLK() {
}
ENDBLK.prototype.set = function ENDBLK() {
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="END_c") {
- ppath = list(i);
+ var ppath = list(i);
break;
}
}
- newpar = list();
- y = 0;
+ var newpar = list();
+ var y = 0;
for (path in ppath) {
- np = size(path,"*");
- spath = list();
+ var np = size(path,"*");
+ var spath = list();
for (k=1;k<=np;k+=1) {
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path[k-1];
}
- xx = arg1[spath-1];
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (!isequalbitwise(this.xxn,xx)) {
this.model = xx.model;
- model_n = this.xxn.model;
+ var model_n = this.xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)||or(this.model.in2!=model_n.in2)||or(this.model.out2!=model_n.out2)||or(this.model.outtyp!=model_n.outtyp)||or(this.model.intyp!=model_n.intyp)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if ((size(this.model.in1,"*")!=size(model_n.in1,"*"))||(size(this.model.out,"*")!=size(model_n.out,"*"))||(size(this.model.evtin,"*")!=size(model_n.evtin,"*"))) {
- needcompile = 4;
+ var needcompile = 4;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = this.xxn;
newpar[size(newpar)+1-1] = path;
- y = max(y,needcompile);
+ var y = max(y,needcompile);
}
}
this.x = arg1;
- typ = newpar;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Misc/EXPRESSION.pickle b/js/Misc/EXPRESSION.pickle
index 621cebb9..1ea1772c 100644
--- a/js/Misc/EXPRESSION.pickle
+++ b/js/Misc/EXPRESSION.pickle
@@ -55,9 +55,9 @@ sS'model.in1'
p14
S'matrix'
p15
-sS'[ok,%ok1,ipar,rpar,%nz]'
+sS'x.graphics'
p16
-g10
+g2
sS'%mm'
p17
g10
@@ -71,59 +71,50 @@ sS'%ok1'
p20
S'boolean'
p21
-sS'[%ok1,ipar,rpar,nz]'
-p22
-g10
sS'model.sim'
-p23
+p22
S'list'
-p24
-sS'[this.model,graphics,ok]'
-p25
-g24
+p23
sS'in1'
-p26
+p24
g15
sS'model.rpar'
-p27
+p25
NsS'model.nmode'
-p28
+p26
NsS'graphics.exprs'
-p29
+p27
NsS'model.ipar'
-p30
+p28
NsS'model.nzcross'
-p31
+p29
NsS'%nz'
-p32
+p30
g7
sS'ok'
-p33
+p31
g21
-sS'x.graphics'
-p34
-g2
sS'model.dep_ut'
-p35
+p32
g7
sS'exprs'
-p36
+p33
g15
sS'gr_i'
-p37
+p34
g7
sS'PREVAR_scicos_context'
-p38
+p35
NsS'ipar'
-p39
+p36
g7
sS'y'
-p40
+p37
g7
sS'x'
-p41
+p38
g10
sS'model'
-p42
+p39
g2
s. \ No newline at end of file
diff --git a/js/Misc/Extract_Activation.js b/js/Misc/Extract_Activation.js
index d8fcaa48..1497b6a1 100644
--- a/js/Misc/Extract_Activation.js
+++ b/js/Misc/Extract_Activation.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Misc/Extract_Activation.sci" */
function Extract_Activation() {
Extract_Activation.prototype.define = function Extract_Activation() {
- scs_m_1 = scicos_diagram();
+ var scs_m_1 = scicos_diagram();
scs_m_1.objs[1-1] = IFTHEL_f("define");
scs_m_1.objs[2-1] = CLKSOMV_f("define");
scs_m_1.objs[3-1] = IN_f("define");
@@ -10,8 +10,8 @@ function Extract_Activation() {
scs_m_1.objs[6-1] = scicos_link();
scs_m_1.objs[7-1] = scicos_link();
scs_m_1.objs[8-1] = scicos_link();
- blk = scs_m_1.objs[1-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[1-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [80,0];
graphics.sz = [60,40];
@@ -24,8 +24,8 @@ function Extract_Activation() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[1-1] = blk;
- blk = scs_m_1.objs[2-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[2-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [80,-80];
graphics.sz = [80,40];
@@ -34,8 +34,8 @@ function Extract_Activation() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[2-1] = blk;
- blk = scs_m_1.objs[3-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[3-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [0,10];
graphics.sz = [20,20];
@@ -45,8 +45,8 @@ function Extract_Activation() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[3-1] = blk;
- blk = scs_m_1.objs[4-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[4-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [110,-140];
graphics.sz = [20,20];
@@ -56,21 +56,21 @@ function Extract_Activation() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[4-1] = blk;
- lnk = scs_m_1.objs[5-1];
+ var lnk = scs_m_1.objs[5-1];
lnk.ct = [5,-1];
lnk.from = [1,1,0];
lnk.to = [2,1,1];
scs_m_1.objs[5-1] = lnk;
- lnk = scs_m_1.objs[6-1];
+ var lnk = scs_m_1.objs[6-1];
lnk.ct = [5,-1];
lnk.from = [1,2,0];
lnk.to = [2,2,1];
scs_m_1.objs[6-1] = lnk;
- lnk = scs_m_1.objs[7-1];
+ var lnk = scs_m_1.objs[7-1];
lnk.from = [3,1,0];
lnk.to = [1,1,1];
scs_m_1.objs[7-1] = lnk;
- lnk = scs_m_1.objs[8-1];
+ var lnk = scs_m_1.objs[8-1];
lnk.ct = [5,-1];
lnk.from = [2,1,0];
lnk.to = [4,1,1];
@@ -82,7 +82,7 @@ function Extract_Activation() {
this.model.in1 = new ScilabDouble([1]);
this.model.evtout = new ScilabDouble([1]);
this.model.rpar = scs_m_1;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Misc/HYSTHERESIS.js b/js/Misc/HYSTHERESIS.js
index 9e5509cf..3146e712 100644
--- a/js/Misc/HYSTHERESIS.js
+++ b/js/Misc/HYSTHERESIS.js
@@ -1,10 +1,10 @@
/* autogenerated from "macros/Misc/HYSTHERESIS.sci" */
function HYSTHERESIS() {
HYSTHERESIS.prototype.define = function HYSTHERESIS() {
- in1 = 1;
- ipar = [0];
+ var in1 = 1;
+ var ipar = [0];
this.nzz = 2;
- rpar = [[1],[0],[1],[0]];
+ var rpar = [[1],[0],[1],[0]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["hystheresis"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1]);
@@ -14,8 +14,8 @@ function HYSTHERESIS() {
this.model.nmode = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(rpar)],[string(sign(this.nzz))]];
- gr_i = [];
+ var exprs = [[string(rpar)],[string(sign(this.nzz))]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -39,8 +39,8 @@ function HYSTHERESIS() {
this.out_low = arguments[0]["out_low"]
this.nzz = parseFloat(arguments[0]["nzz"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.high_lim,this.low_lim,this.out_high,this.out_low,this.nzz,exprs] = scicos_getvalue("Set parameters",["switch on at","switch off at","output when on","output when off","use zero crossing: yes (1), no (0)"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
diff --git a/js/Misc/IMPSPLIT_f.js b/js/Misc/IMPSPLIT_f.js
index f9c8121b..6abfab60 100644
--- a/js/Misc/IMPSPLIT_f.js
+++ b/js/Misc/IMPSPLIT_f.js
@@ -3,7 +3,7 @@ function IMPSPLIT_f() {
IMPSPLIT_f.prototype.define = function IMPSPLIT_f() {
this.model = scicos_model();
this.model.sim = new ScilabString(["limpsplit"]);
- mo = modelica();
+ var mo = modelica();
mo.model = "limpsplit";
mo.inputs = "n";
mo.outputs = [["n"],["n"]];
diff --git a/js/Misc/LOGICAL_OP.js b/js/Misc/LOGICAL_OP.js
index 73feb47a..83de46aa 100644
--- a/js/Misc/LOGICAL_OP.js
+++ b/js/Misc/LOGICAL_OP.js
@@ -1,8 +1,8 @@
/* autogenerated from "macros/Misc/LOGICAL_OP.sci" */
function LOGICAL_OP() {
LOGICAL_OP.prototype.define = function LOGICAL_OP() {
- in1 = [[-1],[-1]];
- ipar = [0];
+ var in1 = [[-1],[-1]];
+ var ipar = [0];
this.nin = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["logicalop"]), new ScilabDouble([4]));
@@ -11,8 +11,8 @@ function LOGICAL_OP() {
this.model.ipar = ipar;
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.nin)],[string(ipar)]];
- gr_i = [];
+ var exprs = [[string(this.nin)],[string(ipar)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,11 +34,11 @@ function LOGICAL_OP() {
this.Datatype = arguments[0]["Datatype"]
this.tp = parseFloat(arguments[0]["tp"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,1)==2) {
- exprs = [[exprs],[sci2exp(1)],[sci2exp(0)]];
+ var exprs = [[exprs],[sci2exp(1)],[sci2exp(0)]];
}
while (true) {
[ok,this.nin,this.rule,this.Datatype,this.tp,exprs] = scicos_getvalue("Set parameters",["number of inputs","Operator: AND (0), OR (1), NAND (2), NOR (3), XOR (4), NOT (5)","Datatype (1=double 3=int32 ...)","Bitwise Rule(0=No 1=yes)"],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
@@ -50,16 +50,16 @@ function LOGICAL_OP() {
this.tp = int(this.tp);
if (this.nin<1) {
message("Number of inputs must be >=1 ");
- ok = false;
+ var ok = false;
} else if ((this.rule<0)||(this.rule>5)) {
message("Incorrect operator "+string(this.rule)+" ; must be 0 to 5.");
- ok = false;
+ var ok = false;
} else if ((this.rule==5)&&(this.nin>1)) {
message("Only one input allowed for NOT operation");
this.nin = 1;
} else if (((this.Datatype==1)&&(this.tp!=0))) {
message("Bitwise Rule is only activated when Data type is integer");
- ok = false;
+ var ok = false;
}
if (ok) {
if ((this.tp!=0)) {
@@ -83,35 +83,41 @@ function LOGICAL_OP() {
this.model.sim = list(new ScilabString(["logicalop_ui8"]), new ScilabDouble([4]));
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
this.model.ipar = new ScilabDouble([this.rule],[this.tp]);
}
if (ok) {
- it = this.Datatype*ones(this.nin,1);
- ot = this.Datatype;
- in1 = [-ones(this.nin,1),-2*ones(this.nin,1)];
+ var it = this.Datatype*ones(this.nin,1);
+ var ot = this.Datatype;
+ var in1 = [-ones(this.nin,1),-2*ones(this.nin,1)];
if ((this.rule!=5)&&(this.nin==1)) {
- out = [1,1];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var out = [1,1];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
} else {
- out = [-1,-2];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var out = [-1,-2];
+ var tmpvar1 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
}
}
if (ok) {
if (this.rule==0) {
- label = "AND";
+ var label = "AND";
} else if (this.rule==1) {
- label = "OR";
+ var label = "OR";
} else if (this.rule==2) {
- label = "NAND";
+ var label = "NAND";
} else if (this.rule==3) {
- label = "NOR";
+ var label = "NOR";
} else if (this.rule==4) {
- label = "XOR";
+ var label = "XOR";
} else if (this.rule==5) {
- label = "NOT";
+ var label = "NOT";
}
graphics.exprs = exprs;
graphics.style = ["blockWithLabel;displayedLabel="+label];
diff --git a/js/Misc/LOGICAL_OP.pickle b/js/Misc/LOGICAL_OP.pickle
index 51f0a704..5537fa7c 100644
--- a/js/Misc/LOGICAL_OP.pickle
+++ b/js/Misc/LOGICAL_OP.pickle
@@ -64,49 +64,46 @@ p19
sS'nin'
p20
g10
-sS'[this.model,graphics,ok]'
-p21
-g10
sS'in1'
-p22
+p21
g14
sS'graphics.exprs'
-p23
+p22
g14
sS'model.ipar'
-p24
+p23
g8
sS'typ'
-p25
+p24
g8
sS'ok'
-p26
+p25
S'boolean'
-p27
+p26
sS'model.blocktype'
-p28
+p27
g5
sS'rule'
-p29
+p28
g10
sS'exprs'
-p30
+p29
g14
sS'gr_i'
-p31
+p30
g8
sS'ipar'
-p32
+p31
g8
sS'y'
-p33
+p32
g8
sS'x'
-p34
+p33
g10
sS'model'
-p35
+p34
g2
sS'ot'
-p36
+p35
Ns. \ No newline at end of file
diff --git a/js/Misc/MBLOCK.js b/js/Misc/MBLOCK.js
index c1aaa528..dde93d71 100644
--- a/js/Misc/MBLOCK.js
+++ b/js/Misc/MBLOCK.js
@@ -5,11 +5,11 @@ function MBLOCK() {
this.intype = ["I"];
this.out = [["y1"],["y2"]];
this.outtype = [["I"],["E"]];
- param = [["R"],["L"]];
- paramv = list(0.1,.0001);
+ var param = [["R"],["L"]];
+ var paramv = list(0.1,.0001);
this.pprop = [[0],[0]];
- nameF = "generic";
- exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in1.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(this.pprop.slice()),nameF,[]);
+ var nameF = "generic";
+ var exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in1.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(this.pprop.slice()),nameF,[]);
this.model = scicos_model();
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
@@ -17,7 +17,7 @@ function MBLOCK() {
for (i=1;i<=lstsize(paramv);i+=1) {
this.model.rpar = new ScilabDouble([this.model.rpar],[paramv[i-1].slice()]);
}
- mo = modelica();
+ var mo = modelica();
mo.model = nameF;
mo.parameters = list(param,paramv);
this.model.sim = list(new ScilabString([mo.model]), new ScilabDouble([30004]));
@@ -26,7 +26,7 @@ function MBLOCK() {
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"r"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"r"),1)]);
this.model.equations = mo;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
this.x.graphics.in_implicit = this.intype;
this.x.graphics.out_implicit = this.outtype;
@@ -58,35 +58,35 @@ function MBLOCK() {
this.lab_1 = arguments[0]["lab_1"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (this.type[exprs-1]==15) {
- paramv = list();
+ var paramv = list();
this.pprop = [];
for (i=1;i<=size(this.model.rpar,"*");i+=1) {
paramv[$+1-1] = string(this.model.rpar[i-1]);
this.pprop[$+1-1] = 0;
}
- exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],exprs[1-1][1-1],exprs[1-1][2-1],exprs[1-1][3-1],exprs[1-1][4-1],exprs[1-1][5-1],paramv,sci2exp(this.pprop.slice()),exprs[1-1][7-1],exprs[2-1]);
+ var exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],exprs[1-1][1-1],exprs[1-1][2-1],exprs[1-1][3-1],exprs[1-1][4-1],exprs[1-1][5-1],paramv,sci2exp(this.pprop.slice()),exprs[1-1][7-1],exprs[2-1]);
}
this.lab_1 = list(exprs.in1,exprs.intype,exprs.out,exprs.outtype,exprs.param,exprs.pprop,exprs.nameF);
- lab_2 = exprs.paramv;
+ var lab_2 = exprs.paramv;
while (true) {
[ok,this.Tin,this.Tintype,this.Tout,this.Touttype,this.Tparam,this.pprop,this.Tfunam,this.lab_1] = scicos_getvalue("Set Modelica generic block parameters",["Input variables: ","Input variables types: ","Output variables: ","Output variables types:","Parameters in Modelica:","Parameters properties: ","Function name: "],list("str",-1,"str",-1,"str",-1,"str",-1,"str",-1,"vec",-1,"str",-1),this.lab_1);
if (!ok) {
break;
}
- ierr = execstr("in=stripblanks(evstr(Tin)); intype=stripblanks(evstr(Tintype)); out=stripblanks(evstr(Tout)); outtype=stripblanks(evstr(Touttype)); param=stripblanks(evstr(Tparam)); funam=stripblanks(Tfunam)","errcatch");
+ var ierr = execstr("in=stripblanks(evstr(Tin)); intype=stripblanks(evstr(Tintype)); out=stripblanks(evstr(Tout)); outtype=stripblanks(evstr(Touttype)); param=stripblanks(evstr(Tparam)); funam=stripblanks(Tfunam)","errcatch");
if (ierr!=0) {
messagebox("Error in evaluation of variables.","modal","error");
- ok = false;
+ var ok = false;
}
if (ok) {
for (i=1;i<=size(this.in1,"*");i+=1) {
- r = false;
- ierr = execstr("r=validvar(in(i))","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(in(i))","errcatch");
if (!r) {
- ok = false;
+ var ok = false;
break;
}
}
@@ -96,10 +96,10 @@ function MBLOCK() {
}
if (ok) {
for (i=1;i<=size(this.out,"*");i+=1) {
- r = false;
- ierr = execstr("r=validvar(out(i))","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(out(i))","errcatch");
if (!r) {
- ok = false;
+ var ok = false;
break;
}
}
@@ -108,12 +108,12 @@ function MBLOCK() {
}
}
if (ok) {
- param = param.slice();
+ var param = param.slice();
for (i=1;i<=size(param,"*");i+=1) {
- r = false;
- ierr = execstr("r=validvar(param(i))","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(param(i))","errcatch");
if (!r) {
- ok = false;
+ var ok = false;
break;
}
}
@@ -125,7 +125,7 @@ function MBLOCK() {
for (i=1;i<=size(this.intype,"*");i+=1) {
if (this.intype[i-1]!="E"&&this.intype[i-1]!="I") {
messagebox("Input type should be \'E\' or \'I\'!","modal","error");
- ok = false;
+ var ok = false;
break;
}
}
@@ -134,7 +134,7 @@ function MBLOCK() {
for (i=1;i<=size(this.outtype,"*");i+=1) {
if (this.outtype[i-1]!="E"&&this.outtype[i-1]!="I") {
messagebox("Output type should be \'E\' or \'I\'!","modal","error");
- ok = false;
+ var ok = false;
break;
}
}
@@ -142,110 +142,118 @@ function MBLOCK() {
if (ok) {
if (or(size(this.intype)!=size(this.in1))) {
messagebox("Input variables are not well defined!","modal","error");
- ok = false;
+ var ok = false;
}
}
if (ok) {
if (or(size(this.outtype)!=size(this.out))) {
messagebox("Output variables are not well defined!","modal","error");
- ok = false;
+ var ok = false;
}
}
if (ok) {
this.pprop = this.pprop.slice();
if ((size(param,"*")!=size(this.pprop,"*"))) {
messagebox([["There is differences in"],["size of param and size "],["of param properties."]],"modal","error");
- ok = false;
+ var ok = false;
}
}
if (ok) {
if (max(this.pprop)>2||min(this.pprop)<0) {
messagebox([["Parameters properties must be :"],["0 : for simple paramater,"],["1 : for initial state value,"],["2 : for a fixed initial state value."]],"modal","error");
- ok = false;
+ var ok = false;
}
}
if (ok) {
if (this.funam=="") {
messagebox("The filename is not defined!","modal","error");
- ok = false;
+ var ok = false;
}
}
if (ok) {
- [dirF,nameF,extF] = fileparts(this.funam);
+ var tmpvar0 = fileparts(this.funam)
+ var dirF = tmpvar0[0]
+ var nameF = tmpvar0[1]
+ var extF = tmpvar0[2];
if ((extF!=""&&extF!=".mo")||(dirF!=""&&extF!=".mo")) {
messagebox("Filename extention should be \'.mo \' !","modal","error");
- ok = false;
+ var ok = false;
}
}
if (ok) {
- intypex = find(this.intype=="I");
- outtypex = find(this.outtype=="I");
- [this.model,graphics,ok] = set_io(this.model,graphics,list([ones(this.in1),ones(this.in1)],ones(this.in1)),list([ones(this.out),ones(this.out)],ones(this.out)),[],[],intypex,outtypex);
+ var intypex = find(this.intype=="I");
+ var outtypex = find(this.outtype=="I");
+ var tmpvar1 = set_io(this.model,graphics,list([ones(this.in1),ones(this.in1)],ones(this.in1)),list([ones(this.out),ones(this.out)],ones(this.out)),[],[],intypex,outtypex)
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
}
if (ok) {
- Tparam_lab = evstr(this.Tparam);
- Tparam_sz = size(Tparam_lab,"*");
+ var Tparam_lab = evstr(this.Tparam);
+ var Tparam_sz = size(Tparam_lab,"*");
if (Tparam_sz>lstsize(lab_2)) {
for (i=1;i<=(Tparam_sz-lstsize(lab_2));i+=1) {
lab_2[$+1-1] = "0";
}
} else if (Tparam_sz<lstsize(lab_2)) {
- lab_2_tmp = list();
+ var lab_2_tmp = list();
if (Tparam_sz!=0) {
for (i=1;i<=(lstsize(lab_2)-Tparam_sz);i+=1) {
lab_2_tmp[i-1] = lab_2[i-1];
}
}
- lab_2 = lab_2_tmp;
+ var lab_2 = lab_2_tmp;
}
if (Tparam_sz!=0) {
- lhs_txt = "";
- lab_txt = "";
- rhs_txt = "";
+ var lhs_txt = "";
+ var lab_txt = "";
+ var rhs_txt = "";
for (i=1;i<=Tparam_sz;i+=1) {
- lhs_txt = lhs_txt+"%v"+string(i)+",";
+ var lhs_txt = lhs_txt+"%v"+string(i)+",";
if (this.pprop[i-1]==0) {
- lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+"\';";
+ var lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+"\';";
} else if (this.pprop[i-1]==1) {
- lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (state) \';";
+ var lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (state) \';";
} else if (this.pprop[i-1]==2) {
- lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (fixed state) \';";
+ var lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (fixed state) \';";
}
- rhs_txt = rhs_txt+"\'vec\',-1,";
+ var rhs_txt = rhs_txt+"\'vec\',-1,";
}
- lhs_txt = part(lhs_txt,1,length(lhs_txt)-1);
- lab_txt = part(lab_txt,1,length(lab_txt)-1);
- rhs_txt = part(rhs_txt,1,length(rhs_txt)-1);
- getvalue_txt = "[ok,"+lhs_txt+",lab_2]=scicos_getvalue(\'Set parameters values\',["+lab_txt+"],"+"list("+rhs_txt+"),lab_2)";
+ var lhs_txt = part(lhs_txt,1,length(lhs_txt)-1);
+ var lab_txt = part(lab_txt,1,length(lab_txt)-1);
+ var rhs_txt = part(rhs_txt,1,length(rhs_txt)-1);
+ var getvalue_txt = "[ok,"+lhs_txt+",lab_2]=scicos_getvalue(\'Set parameters values\',["+lab_txt+"],"+"list("+rhs_txt+"),lab_2)";
execstr(getvalue_txt);
if (!ok) {
- lab_2 = exprs.paramv;
+ var lab_2 = exprs.paramv;
}
}
}
if (ok) {
- paramv = list();
+ var paramv = list();
for (i=1;i<=Tparam_sz;i+=1) {
execstr("paramv("+string(i)+")=%v"+string(i));
}
}
if (ok) {
if (extF==".mo"&&fileinfo(this.funam)!=[]) {
- tt = mgetl(this.funam);
+ var tt = mgetl(this.funam);
} else {
- tt = exprs.funtxt;
- mo = this.model.equations;
+ var tt = exprs.funtxt;
+ var mo = this.model.equations;
if (mo.model!=nameF) {
- tt = [];
+ var tt = [];
}
}
- [ok,tt] = MODCOM(this.funam,tt,this.in1,this.out,param,paramv,this.pprop);
+ var tmpvar2 = MODCOM(this.funam,tt,this.in1,this.out,param,paramv,this.pprop)
+ var ok = tmpvar2[0]
+ var tt = tmpvar2[1];
if (!ok) {
break;
}
}
if (ok) {
- mo = modelica();
+ var mo = modelica();
mo.model = nameF;
mo.inputs = this.in1;
mo.outputs = this.out;
diff --git a/js/Misc/MBLOCK.pickle b/js/Misc/MBLOCK.pickle
index 639839ac..b85e0353 100644
--- a/js/Misc/MBLOCK.pickle
+++ b/js/Misc/MBLOCK.pickle
@@ -41,210 +41,201 @@ S'rhs_txt'
p1
S'string'
p2
-sS'graphics.out_implicit'
+sS'model.sim'
p3
-NsS'model.sim'
-p4
S'list'
-p5
+p4
sS'arg1'
-p6
+p5
S'object'
-p7
+p6
sS'graphics.gr_i[1-1][1-1]'
-p8
+p7
g2
sS'graphics.exprs'
-p9
-g7
+p8
+g6
sS'outtypex'
-p10
+p9
S'double'
-p11
+p10
sS'mo.model'
-p12
+p11
g2
sS'ierr'
-p13
-g11
+p12
+g10
sS'exprs.paramv[i-1]'
-p14
-g11
+p13
+g10
sS'lab_2_tmp'
-p15
-g5
+p14
+g4
sS'x.model'
-p16
-g7
+p15
+g6
sS'exprs.outtype'
-p17
-g11
+p16
+g10
sS'exprs.intype'
-p18
-g11
+p17
+g10
sS'exprs.nameF'
-p19
-g11
+p18
+g10
sS'exprs.funtxt'
-p20
+p19
S'vector'
+p20
+sS'graphics.out_implicit'
p21
-sS'[dirF,nameF,extF]'
+NsS'out'
p22
-g11
-sS'out'
-p23
S'matrix'
-p24
+p23
sS'nameF'
-p25
+p24
g2
sS'lab_2_tmp[i-1]'
-p26
-g11
+p25
+g10
sS'exprs.pprop'
-p27
-g11
+p26
+g10
sS'Tparam_lab'
-p28
-g11
+p27
+g10
sS'exprs.out'
-p29
-g11
+p28
+g10
sS'graphics.in_implicit'
-p30
+p29
NsS'typ'
-p31
-g21
+p30
+g20
sS'getvalue_txt'
-p32
+p31
g2
sS'mo.inputs'
-p33
-g21
+p32
+g20
sS'param'
-p34
-g24
+p33
+g23
sS'paramv'
-p35
-g5
+p34
+g4
sS'gr_i'
-p36
-g21
+p35
+g20
sS'x.graphics.in_implicit'
+p36
+g20
+sS'model.sim[1]'
p37
-g21
-sS'[ok,tt]'
+NsS'mo.parameters'
p38
-g11
-sS'model.sim[1]'
+g4
+sS'Tparam_sz'
p39
-NsS'mo.parameters'
+g10
+sS'pprop'
p40
-g5
-sS'Tparam_sz'
+g23
+sS'model.out'
p41
-g11
-sS'mo.outputs'
+g10
+sS'exprs.in1'
p42
-g24
-sS'pprop'
+g10
+sS'model.equations'
p43
-g24
-sS'model.out'
+g6
+sS'mo.outputs'
p44
-g11
-sS'exprs.in1'
-p45
-g11
-sS'model.equations'
-p46
-g7
-sS'[this.model,graphics,ok]'
-p47
-g11
+g23
sS'intype'
-p48
-g21
+p45
+g20
sS'x.graphics.out_implicit'
-p49
-g24
+p46
+g23
sS'in1'
-p50
-g21
+p47
+g20
sS'model.rpar'
-p51
-g24
+p48
+g23
sS'model.in1'
-p52
-g11
+p49
+g10
sS'lhs_txt'
-p53
+p50
g2
sS'outtype'
-p54
-g24
+p51
+g23
sS'graphics'
-p55
-g7
+p52
+g6
sS'intypex'
-p56
-g11
+p53
+g10
sS'lab_1'
-p57
-g5
+p54
+g4
sS'lab_2'
-p58
+p55
NsS'paramv[$+1-1]'
-p59
+p56
g2
sS'ok'
-p60
+p57
S'boolean'
-p61
+p58
sS'model.blocktype'
-p62
+p59
g2
sS'exprs.param'
-p63
-g11
+p60
+g10
sS'mo'
-p64
-g7
+p61
+g6
sS'x.graphics'
-p65
-g7
+p62
+g6
sS'pprop[$+1-1]'
-p66
-g11
+p63
+g10
sS'model.dep_ut'
-p67
-g21
+p64
+g20
sS'exprs.paramv'
-p68
-g5
+p65
+g4
sS'exprs'
-p69
-g11
+p66
+g10
sS'lab_2[$+1-1]'
-p70
+p67
g2
sS'r'
-p71
-g61
+p68
+g58
sS'lab_txt'
-p72
+p69
g2
sS'y'
-p73
-g21
+p70
+g20
sS'x'
-p74
-g11
+p71
+g10
sS'model'
-p75
-g7
+p72
+g6
sS'tt'
-p76
-g21
+p73
+g20
s. \ No newline at end of file
diff --git a/js/Misc/MEMORY_f.js b/js/Misc/MEMORY_f.js
index c410b3c2..d975cc56 100644
--- a/js/Misc/MEMORY_f.js
+++ b/js/Misc/MEMORY_f.js
@@ -1,9 +1,9 @@
/* autogenerated from "macros/Misc/MEMORY_f.sci" */
function MEMORY_f() {
MEMORY_f.prototype.define = function MEMORY_f() {
- z = 0;
- in1 = 1;
- exprs = [[string(z)],[string(1)]];
+ var z = 0;
+ var in1 = 1;
+ var exprs = [[string(z)],[string(1)]];
this.model = scicos_model();
this.model.sim = new ScilabString(["memo"]);
this.model.in1 = new ScilabDouble([in1]);
@@ -13,7 +13,7 @@ function MEMORY_f() {
this.model.rpar = new ScilabDouble([z]);
this.model.blocktype = new ScilabString(["m"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -31,8 +31,8 @@ function MEMORY_f() {
this.a = arguments[0]["a"]
this.inh = parseFloat(arguments[0]["inh"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.a,this.inh,exprs] = scicos_getvalue("Set memory block parameters",["initial condition","Inherit (1: no, 0: yes)"],list("vec",-1,"vec",1),exprs);
@@ -44,13 +44,16 @@ function MEMORY_f() {
} else {
this.inh = 1;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,-1,-1,this.inh,[]);
- out = size(this.a,"*");
+ var tmpvar0 = check_io(this.model,graphics,-1,-1,this.inh,[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
+ var out = size(this.a,"*");
if (out==0) {
- ok = false;
+ var ok = false;
messagebox("Initial condition empty","modal","error");
}
- in1 = out;
+ var in1 = out;
if (ok) {
graphics.exprs = exprs;
this.model.rpar = new ScilabDouble([this.a]);
diff --git a/js/Misc/MEMORY_f.pickle b/js/Misc/MEMORY_f.pickle
index c40ec1e8..e262d11d 100644
--- a/js/Misc/MEMORY_f.pickle
+++ b/js/Misc/MEMORY_f.pickle
@@ -48,49 +48,45 @@ sS'model.sim'
p13
S'string'
p14
-sS'[this.model,graphics,ok]'
-p15
-S'list'
-p16
sS'in1'
-p17
+p15
g2
sS'model.rpar'
-p18
+p16
g2
sS'graphics.exprs'
-p19
+p17
NsS'typ'
-p20
+p18
S'vector'
-p21
+p19
sS'ok'
-p22
+p20
S'boolean'
-p23
+p21
sS'model.blocktype'
-p24
+p22
g14
sS'model.dep_ut'
-p25
-g21
+p23
+g19
sS'exprs'
-p26
+p24
S'matrix'
-p27
+p25
sS'gr_i'
-p28
-g21
+p26
+g19
sS'y'
-p29
-g21
+p27
+g19
sS'x'
-p30
+p28
g2
sS'model'
-p31
+p29
g4
sS'z'
-p32
+p30
g2
s. \ No newline at end of file
diff --git a/js/Misc/MPBLOCK.js b/js/Misc/MPBLOCK.js
index 29fb583e..0c2ce112 100644
--- a/js/Misc/MPBLOCK.js
+++ b/js/Misc/MPBLOCK.js
@@ -5,11 +5,11 @@ function MPBLOCK() {
this.intype = ["I"];
this.out = [["y1"],["y2"]];
this.outtype = [["I"],["I"]];
- param = [];
- paramv = list();
- pprop = [];
- nameF = "myModel";
- exprs = tlist(["MPBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in1.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(pprop.slice()),nameF,[]);
+ var param = [];
+ var paramv = list();
+ var pprop = [];
+ var nameF = "myModel";
+ var exprs = tlist(["MPBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in1.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(pprop.slice()),nameF,[]);
this.model = scicos_model();
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,true];
@@ -17,7 +17,7 @@ function MPBLOCK() {
for (i=1;i<=lstsize(paramv);i+=1) {
this.model.rpar = new ScilabDouble([this.model.rpar],[paramv[i-1].slice()]);
}
- mo = modelica();
+ var mo = modelica();
mo.model = nameF;
mo.parameters = list(param,paramv);
this.model.sim = list(new ScilabString([mo.model]), new ScilabDouble([10004]));
@@ -26,7 +26,7 @@ function MPBLOCK() {
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"r"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"r"),1)]);
this.model.equations = mo;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
this.x.graphics.in_implicit = this.intype;
this.x.graphics.out_implicit = this.outtype;
@@ -43,35 +43,44 @@ function MPBLOCK() {
MPBLOCK.prototype.set = function MPBLOCK() {
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (this.type[exprs-1]==15) {
- paramv = list();
- pprop = [];
+ var paramv = list();
+ var pprop = [];
for (i=1;i<=size(this.model.rpar,"*");i+=1) {
paramv[$+1-1] = string(this.model.rpar[i-1]);
pprop[$+1-1] = 0;
}
- exprs = tlist(["MPBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],exprs[1-1][1-1],exprs[1-1][2-1],exprs[1-1][3-1],exprs[1-1][4-1],exprs[1-1][5-1],paramv,sci2exp(pprop.slice()),exprs[1-1][7-1],exprs[2-1]);
+ var exprs = tlist(["MPBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],exprs[1-1][1-1],exprs[1-1][2-1],exprs[1-1][3-1],exprs[1-1][4-1],exprs[1-1][5-1],paramv,sci2exp(pprop.slice()),exprs[1-1][7-1],exprs[2-1]);
}
- lab_1 = list(exprs.in1,exprs.intype,exprs.out,exprs.outtype,exprs.param,exprs.pprop,exprs.nameF);
- lab_2 = exprs.paramv;
+ var lab_1 = list(exprs.in1,exprs.intype,exprs.out,exprs.outtype,exprs.param,exprs.pprop,exprs.nameF);
+ var lab_2 = exprs.paramv;
while (true) {
- [ok,Tin,Tintype,Tout,Touttype,Tparam,pprop,Tfunam,lab_1] = getvalue("Set Modelica generic block parameters",[["Input variables: "],["Input variables types: "],["Output variables: "],["Output variables types:"],["Parameters in Modelica:"],["Parameters properties: "],["Model name in packages:"]],list("str",-1,"str",-1,"str",-1,"str",-1,"str",-1,"vec",-1,"str",-1),lab_1);
+ var tmpvar0 = getvalue("Set Modelica generic block parameters",[["Input variables: "],["Input variables types: "],["Output variables: "],["Output variables types:"],["Parameters in Modelica:"],["Parameters properties: "],["Model name in packages:"]],list("str",-1,"str",-1,"str",-1,"str",-1,"str",-1,"vec",-1,"str",-1),lab_1)
+ var ok = tmpvar0[0]
+ var Tin = tmpvar0[1]
+ var Tintype = tmpvar0[2]
+ var Tout = tmpvar0[3]
+ var Touttype = tmpvar0[4]
+ var Tparam = tmpvar0[5]
+ var pprop = tmpvar0[6]
+ var Tfunam = tmpvar0[7]
+ var lab_1 = tmpvar0[8];
if (!ok) {
break;
}
- ierr = execstr("in=stripblanks(evstr(Tin)); intype=stripblanks(evstr(Tintype)); out=stripblanks(evstr(Tout)); outtype=stripblanks(evstr(Touttype)); param=stripblanks(evstr(Tparam)); funam=stripblanks(Tfunam)","errcatch");
+ var ierr = execstr("in=stripblanks(evstr(Tin)); intype=stripblanks(evstr(Tintype)); out=stripblanks(evstr(Tout)); outtype=stripblanks(evstr(Touttype)); param=stripblanks(evstr(Tparam)); funam=stripblanks(Tfunam)","errcatch");
if (ierr!=0) {
x_message("Error in evaluation of variables.");
- ok = false;
+ var ok = false;
}
if (ok) {
for (i=1;i<=size(this.in1,"*");i+=1) {
- r = false;
- ierr = execstr("r=validvar(in(i))","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(in(i))","errcatch");
if (!r) {
- ok = false;
+ var ok = false;
break;
}
}
@@ -81,10 +90,10 @@ function MPBLOCK() {
}
if (ok) {
for (i=1;i<=size(this.out,"*");i+=1) {
- r = false;
- ierr = execstr("r=validvar(out(i))","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(out(i))","errcatch");
if (!r) {
- ok = false;
+ var ok = false;
break;
}
}
@@ -93,12 +102,12 @@ function MPBLOCK() {
}
}
if (ok) {
- param = param.slice();
+ var param = param.slice();
for (i=1;i<=size(param,"*");i+=1) {
- r = false;
- ierr = execstr("r=validvar(param(i))","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(param(i))","errcatch");
if (!r) {
- ok = false;
+ var ok = false;
break;
}
}
@@ -110,7 +119,7 @@ function MPBLOCK() {
for (i=1;i<=size(this.intype,"*");i+=1) {
if (this.intype[i-1]!="E"&&this.intype[i-1]!="I") {
x_message("Input type should be \'E\' or \'I\'!");
- ok = false;
+ var ok = false;
break;
}
}
@@ -119,7 +128,7 @@ function MPBLOCK() {
for (i=1;i<=size(this.outtype,"*");i+=1) {
if (this.outtype[i-1]!="E"&&this.outtype[i-1]!="I") {
x_message("Output type should be \'E\' or \'I\'!");
- ok = false;
+ var ok = false;
break;
}
}
@@ -127,100 +136,106 @@ function MPBLOCK() {
if (ok) {
if (or(size(this.intype)!=size(this.in1))) {
x_message("Input variables are not well defined!");
- ok = false;
+ var ok = false;
}
}
if (ok) {
if (or(size(this.outtype)!=size(this.out))) {
x_message("Output variables are not well defined!");
- ok = false;
+ var ok = false;
}
}
if (ok) {
- pprop = pprop.slice();
+ var pprop = pprop.slice();
if ((size(param,"*")!=size(pprop,"*"))) {
x_message([["There is differences in"],["size of param and size "],["of param properties."]]);
- ok = false;
+ var ok = false;
}
}
if (ok) {
if (max(pprop)>2||min(pprop)<0) {
x_message([["Parameters properties must be :"],["0 : if it is a paramaters"],["1 : if it is an initial value of state,"],["2 : it it is a fixed initial state value."]]);
- ok = false;
+ var ok = false;
}
}
if (ok) {
if (this.funam=="") {
x_message("The model name is not defined!");
- ok = false;
+ var ok = false;
}
}
if (ok) {
- [dirF,nameF,extF] = fileparts(this.funam);
+ var tmpvar1 = fileparts(this.funam)
+ var dirF = tmpvar1[0]
+ var nameF = tmpvar1[1]
+ var extF = tmpvar1[2];
if ((extF!="")||(dirF!="")) {
x_message("Invalid model name!");
- ok = false;
+ var ok = false;
}
}
if (ok) {
- intypex = find(this.intype=="I");
- outtypex = find(this.outtype=="I");
- [this.model,graphics,ok] = set_io(this.model,graphics,list([ones(this.in1),ones(this.in1)],ones(this.in1)),list([ones(this.out),ones(this.out)],ones(this.out)),[],[],intypex,outtypex);
+ var intypex = find(this.intype=="I");
+ var outtypex = find(this.outtype=="I");
+ var tmpvar2 = set_io(this.model,graphics,list([ones(this.in1),ones(this.in1)],ones(this.in1)),list([ones(this.out),ones(this.out)],ones(this.out)),[],[],intypex,outtypex)
+ this.model = tmpvar2[0]
+ var graphics = tmpvar2[1]
+ var ok = tmpvar2[2];
}
if (ok) {
- Tparam_lab = evstr(Tparam);
- Tparam_sz = size(Tparam_lab,"*");
+ var Tparam_lab = evstr(Tparam);
+ var Tparam_sz = size(Tparam_lab,"*");
if (Tparam_sz>lstsize(lab_2)) {
for (i=1;i<=(Tparam_sz-lstsize(lab_2));i+=1) {
lab_2[$+1-1] = "0";
}
} else if (Tparam_sz<lstsize(lab_2)) {
- lab_2_tmp = list();
+ var lab_2_tmp = list();
if (Tparam_sz!=0) {
for (i=1;i<=Tparam_sz;i+=1) {
- ee = evstr(exprs.param);
+ var ee = evstr(exprs.param);
for (j=1;j<=size(ee,"r");j+=1) {
if (ee[j-1]==Tparam_lab[i-1]) {
lab_2_tmp[i-1] = lab_2[j-1];
}
}
}
- lab_2 = lab_2_tmp;
+ var lab_2 = lab_2_tmp;
}
}
if (Tparam_sz!=0) {
- lhs_txt = "";
- lab_txt = "";
- rhs_txt = "";
+ var lhs_txt = "";
+ var lab_txt = "";
+ var rhs_txt = "";
for (i=1;i<=Tparam_sz;i+=1) {
- lhs_txt = lhs_txt+"%v"+string(i)+",";
+ var lhs_txt = lhs_txt+"%v"+string(i)+",";
if (pprop[i-1]==0) {
- lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+"\';";
+ var lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+"\';";
} else if (pprop[i-1]==1) {
- lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (state) \';";
+ var lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (state) \';";
} else if (pprop[i-1]==2) {
- lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (fixed state) \';";
+ var lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (fixed state) \';";
}
- rhs_txt = rhs_txt+"\'vec\',-1,";
+ var rhs_txt = rhs_txt+"\'vec\',-1,";
}
- lhs_txt = part(lhs_txt,1,length(lhs_txt)-1);
- lab_txt = part(lab_txt,1,length(lab_txt)-1);
- rhs_txt = part(rhs_txt,1,length(rhs_txt)-1);
- getvalue_txt = "[ok,"+lhs_txt+",lab_2]=scicos_getvalue(\'Set parameters values\',["+lab_txt+"],"+"list("+rhs_txt+"),lab_2)";
+ var lhs_txt = part(lhs_txt,1,length(lhs_txt)-1);
+ var lab_txt = part(lab_txt,1,length(lab_txt)-1);
+ var rhs_txt = part(rhs_txt,1,length(rhs_txt)-1);
+ var getvalue_txt = "[ok,"+lhs_txt+",lab_2]=scicos_getvalue(\'Set parameters values\',["+lab_txt+"],"+"list("+rhs_txt+"),lab_2)";
execstr(getvalue_txt);
if (!ok) {
- lab_2 = exprs.paramv;
+ var lab_2 = exprs.paramv;
}
}
}
if (ok) {
- paramv = list();
+ var paramv = list();
for (i=1;i<=Tparam_sz;i+=1) {
execstr("paramv("+string(i)+")=%v"+string(i));
}
}
if (ok) {
- mo = modelica();
+ var mo = modelica();
mo.model = nameF;
mo.inputs = this.in1;
mo.outputs = this.out;
diff --git a/js/Misc/MPBLOCK.pickle b/js/Misc/MPBLOCK.pickle
index 2bb44bab..f46d2426 100644
--- a/js/Misc/MPBLOCK.pickle
+++ b/js/Misc/MPBLOCK.pickle
@@ -25,210 +25,201 @@ S'rhs_txt'
p1
S'string'
p2
-sS'graphics.out_implicit'
+sS'model.sim'
p3
-NsS'model.sim'
-p4
S'list'
-p5
+p4
sS'ee'
-p6
+p5
S'double'
-p7
+p6
sS'arg1'
-p8
+p7
S'object'
-p9
+p8
sS'graphics.gr_i[1-1][1-1]'
-p10
+p9
g2
sS'graphics.exprs'
-p11
-g9
+p10
+g8
sS'outtypex'
-p12
-g7
+p11
+g6
sS'mo.model'
-p13
+p12
g2
sS'ierr'
-p14
-g7
+p13
+g6
sS'exprs.paramv[i-1]'
-p15
-g7
+p14
+g6
sS'lab_2_tmp'
+p15
+g4
+sS'x.model'
p16
-g5
-sS'[ok,Tin,Tintype,Tout,Touttype,Tparam,pprop,Tfunam,lab_1]'
-p17
-g7
+g8
sS'exprs.outtype'
-p18
-g7
+p17
+g6
sS'exprs.intype'
-p19
-g7
+p18
+g6
sS'exprs.nameF'
+p19
+g6
+sS'graphics.out_implicit'
p20
-g7
-sS'[dirF,nameF,extF]'
+NsS'out'
p21
-g7
-sS'out'
-p22
S'matrix'
-p23
+p22
sS'nameF'
-p24
+p23
g2
sS'lab_2_tmp[i-1]'
-p25
-g7
+p24
+g6
sS'exprs.pprop'
-p26
-g7
+p25
+g6
sS'Tparam_lab'
-p27
-g7
+p26
+g6
sS'exprs.out'
-p28
-g7
+p27
+g6
sS'graphics.in_implicit'
-p29
+p28
NsS'typ'
-p30
+p29
S'vector'
-p31
+p30
sS'getvalue_txt'
-p32
+p31
g2
sS'mo.inputs'
-p33
-g31
+p32
+g30
sS'param'
-p34
-g31
+p33
+g30
sS'paramv'
-p35
-g5
+p34
+g4
sS'gr_i'
-p36
-g31
+p35
+g30
sS'x.graphics.in_implicit'
+p36
+g30
+sS'model.sim[1]'
p37
-g31
-sS'x.model'
+NsS'mo.parameters'
p38
-g9
-sS'model.sim[1]'
+g4
+sS'Tparam_sz'
p39
-NsS'mo.parameters'
+g6
+sS'pprop'
p40
-g5
-sS'Tparam_sz'
+g30
+sS'model.out'
p41
-g7
-sS'mo.outputs'
+g6
+sS'exprs.in1'
p42
-g23
-sS'pprop'
+g6
+sS'model.equations'
p43
-g31
-sS'model.out'
+g8
+sS'mo.outputs'
p44
-g7
-sS'exprs.in1'
-p45
-g7
-sS'model.equations'
-p46
-g9
-sS'[this.model,graphics,ok]'
-p47
-g7
+g22
sS'intype'
-p48
-g31
+p45
+g30
sS'x.graphics.out_implicit'
-p49
-g23
+p46
+g22
sS'in1'
-p50
-g31
+p47
+g30
sS'model.rpar'
-p51
-g23
+p48
+g22
sS'model.in1'
-p52
-g7
+p49
+g6
sS'lhs_txt'
-p53
+p50
g2
sS'outtype'
-p54
-g23
+p51
+g22
sS'graphics'
-p55
-g9
+p52
+g8
sS'intypex'
-p56
-g7
+p53
+g6
sS'lab_1'
-p57
-g5
+p54
+g4
sS'lab_2'
-p58
+p55
NsS'paramv[$+1-1]'
-p59
+p56
g2
sS'ok'
-p60
+p57
S'boolean'
-p61
+p58
sS'model.blocktype'
-p62
+p59
g2
sS'exprs.param'
-p63
-g7
+p60
+g6
sS'mo'
-p64
-g9
+p61
+g8
sS'x.graphics'
-p65
-g9
+p62
+g8
sS'pprop[$+1-1]'
-p66
-g7
+p63
+g6
sS'model.dep_ut'
-p67
-g31
+p64
+g30
sS'exprs.funtxt'
-p68
+p65
g2
sS'exprs'
-p69
-g7
+p66
+g6
sS'lab_2[$+1-1]'
-p70
+p67
g2
sS'r'
-p71
-g61
+p68
+g58
sS'lab_txt'
-p72
+p69
g2
sS'y'
-p73
-g31
+p70
+g30
sS'x'
-p74
-g7
+p71
+g6
sS'model'
-p75
-g9
+p72
+g8
sS'exprs.paramv'
-p76
-g5
+p73
+g4
s. \ No newline at end of file
diff --git a/js/Misc/PAL_f.js b/js/Misc/PAL_f.js
index c06c86e8..7b64b6c3 100644
--- a/js/Misc/PAL_f.js
+++ b/js/Misc/PAL_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Misc/PAL_f.sci" */
function PAL_f() {
PAL_f.prototype.define = function PAL_f() {
- scs = scicos_diagram();
+ var scs = scicos_diagram();
scs.props.title = "Palette";
this.model = scicos_model();
this.model.sim = new ScilabString(["palette"]);
@@ -10,7 +10,7 @@ function PAL_f() {
this.model.rpar = new ScilabDouble([scs]);
this.model.blocktype = new ScilabString(["h"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
this.x.graphics.id = scs.props.title[1-1];
return new BasicBlock(this.x);
@@ -24,12 +24,16 @@ function PAL_f() {
return options;
}
PAL_f.prototype.set = function PAL_f() {
- [this.x,newparameters,needcompile,edited] = scicos(arg1.model.rpar);
+ var tmpvar0 = scicos(arg1.model.rpar)
+ this.x = tmpvar0[0]
+ var newparameters = tmpvar0[1]
+ var needcompile = tmpvar0[2]
+ var edited = tmpvar0[3];
arg1.graphics.id = this.x.props.title[1-1];
arg1.model.rpar = this.x;
this.x = arg1;
- y = [];
- typ = [];
+ var y = [];
+ var typ = [];
%exit = resume(false)
return new BasicBlock(this.x);
}
diff --git a/js/Misc/PAL_f.pickle b/js/Misc/PAL_f.pickle
index 3c09443d..1851d7a7 100644
--- a/js/Misc/PAL_f.pickle
+++ b/js/Misc/PAL_f.pickle
@@ -24,56 +24,53 @@ sS'model.dep_ut'
p6
S'vector'
p7
-sS'[this.x,newparameters,needcompile,edited]'
+sS'arg1'
p8
-S'double'
-p9
+g4
sS'scs.props'
-p10
+p9
g4
sS'model.in1'
-p11
+p10
g7
sS'scs.props.title'
-p12
+p11
g2
sS'x.props'
-p13
+p12
g4
sS'model.out'
-p14
+p13
g7
sS'gr_i'
-p15
+p14
g7
sS'model.rpar'
+p15
+S'double'
p16
-g9
sS'scs'
p17
g4
-sS'arg1'
-p18
-g4
sS'y'
-p19
+p18
g7
sS'x'
-p20
-g9
+p19
+g16
sS'model'
-p21
+p20
g4
sS'x.graphics.id'
-p22
-g9
+p21
+g16
sS'typ'
-p23
+p22
g7
sS'arg1.model.rpar'
-p24
+p23
g4
sS'arg1.graphics.id'
-p25
-g9
+p24
+g16
s. \ No newline at end of file
diff --git a/js/Misc/PENDULUM_ANIM.js b/js/Misc/PENDULUM_ANIM.js
index cc56163e..bf3d386a 100644
--- a/js/Misc/PENDULUM_ANIM.js
+++ b/js/Misc/PENDULUM_ANIM.js
@@ -16,8 +16,8 @@ function PENDULUM_ANIM() {
this.model.rpar = new ScilabDouble([this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = string(this.model.rpar);
- gr_i = [];
+ var exprs = string(this.model.rpar);
+ var gr_i = [];
this.x = standard_define([3,3],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -45,32 +45,32 @@ function PENDULUM_ANIM() {
this.ymin = parseFloat(arguments[0]["ymin"])
this.ymax = parseFloat(arguments[0]["ymax"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- dstate = this.model.dstate;
+ var dstate = this.model.dstate;
while (true) {
[ok,this.plen,this.csiz,this.phi,this.xmin,this.xmax,this.ymin,this.ymax,exprs] = scicos_getvalue("Set Scope parameters",["pendulum length","cart size (square side)","slope","Xmin","Xmax","Ymin","Ymax"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (this.plen<=0||this.csiz<=0) {
- mess = [[mess],["Pendulum length and cart size must be positive."],[" "]];
- ok = false;
+ var mess = [[mess],["Pendulum length and cart size must be positive."],[" "]];
+ var ok = false;
}
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (this.xmin>=this.xmax) {
- mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
+ var ok = false;
}
if (!ok) {
message(mess);
} else {
- rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ var rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
this.model.rpar = new ScilabDouble(rpar);
graphics.exprs = exprs;
this.x.graphics = graphics;
diff --git a/js/Misc/RATELIMITER.js b/js/Misc/RATELIMITER.js
index c3af489f..aa206268 100644
--- a/js/Misc/RATELIMITER.js
+++ b/js/Misc/RATELIMITER.js
@@ -3,7 +3,7 @@ function RATELIMITER() {
RATELIMITER.prototype.define = function RATELIMITER() {
this.minp = -1;
this.maxp = 1;
- rpar = [[this.maxp],[this.minp]];
+ var rpar = [[this.maxp],[this.minp]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["ratelimiter"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -11,8 +11,8 @@ function RATELIMITER() {
this.model.rpar = new ScilabDouble(rpar);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.maxp)],[string(this.minp)]];
- gr_i = [];
+ var exprs = [[string(this.maxp)],[string(this.minp)]];
+ var gr_i = [];
this.x = standard_define([3.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -30,8 +30,8 @@ function RATELIMITER() {
this.maxp = parseFloat(arguments[0]["maxp"])
this.minp = parseFloat(arguments[0]["minp"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.maxp,this.minp,exprs] = scicos_getvalue("Set rate limiter parameters",["max slope","min slope"],list("vec",1,"vec",1),exprs);
@@ -41,7 +41,7 @@ function RATELIMITER() {
if (this.maxp<=this.minp||this.maxp<=0||this.minp>=0) {
message("We must have max_slope> 0 > min_slope.");
} else {
- rpar = [[this.maxp],[this.minp]];
+ var rpar = [[this.maxp],[this.minp]];
this.model.rpar = new ScilabDouble(rpar);
graphics.exprs = exprs;
this.x.graphics = graphics;
diff --git a/js/Misc/RELATIONALOP.js b/js/Misc/RELATIONALOP.js
index c1f3fcb9..34d9bb78 100644
--- a/js/Misc/RELATIONALOP.js
+++ b/js/Misc/RELATIONALOP.js
@@ -1,8 +1,8 @@
/* autogenerated from "macros/Misc/RELATIONALOP.sci" */
function RELATIONALOP() {
RELATIONALOP.prototype.define = function RELATIONALOP() {
- ipar = [2];
- label = "&lt";
+ var ipar = [2];
+ var label = "&lt";
this.model = scicos_model();
this.model.sim = list(new ScilabString(["relationalop"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1],[1]);
@@ -10,8 +10,8 @@ function RELATIONALOP() {
this.model.ipar = ipar;
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(ipar)],[string(0)]];
- gr_i = [];
+ var exprs = [[string(ipar)],[string(0)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.style = ["fontSize=13;fontStyle=1;displayedLabel="+label];
return new BasicBlock(this.x);
@@ -32,11 +32,11 @@ function RELATIONALOP() {
this.zcr = parseFloat(arguments[0]["zcr"])
this.Datatype = arguments[0]["Datatype"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,1)==2) {
- exprs = [[exprs],[sci2exp(1)]];
+ var exprs = [[exprs],[sci2exp(1)]];
}
while (true) {
[ok,this.rule,this.zcr,this.Datatype,exprs] = scicos_getvalue("Set parameters",["Operator: == (0), ~= (1), < (2), <= (3), > (4), >= (5)","Use zero crossing (no: 0), (yes: 1)","Datatype (1=double 3=int32 ...)"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -49,7 +49,7 @@ function RELATIONALOP() {
}
if ((this.rule<0)||(this.rule>5)) {
message("Incorrect operator "+string(this.rule)+" ; must be 0 to 5.");
- ok = false;
+ var ok = false;
}
if ((this.Datatype==1)) {
this.model.sim = list(new ScilabString(["relational_op"]), new ScilabDouble([4]));
@@ -67,28 +67,31 @@ function RELATIONALOP() {
this.model.sim = list(new ScilabString(["relational_op_ui8"]), new ScilabDouble([4]));
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
- it = this.Datatype*ones(1,2);
- ot = this.Datatype;
- in1 = [[-1,-2],[-1,-2]];
- out = [-1,-2];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[]);
+ var it = this.Datatype*ones(1,2);
+ var ot = this.Datatype;
+ var in1 = [[-1,-2],[-1,-2]];
+ var out = [-1,-2];
+ var tmpvar0 = set_io(this.model,graphics,list(in1,it),list(out,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
if (this.rule==0) {
- label = "==";
+ var label = "==";
} else if (this.rule==1) {
- label = "~=";
+ var label = "~=";
} else if (this.rule==2) {
- label = "&#60;";
+ var label = "&#60;";
} else if (this.rule==3) {
- label = "&#8804;";
+ var label = "&#8804;";
} else if (this.rule==4) {
- label = "&#62;";
+ var label = "&#62;";
} else if (this.rule==5) {
- label = "&#8805;";
+ var label = "&#8805;";
}
graphics.exprs = exprs;
graphics.style = ["fontSize=13;fontStyle=1;displayedLabel="+label];
diff --git a/js/Misc/RELATIONALOP.pickle b/js/Misc/RELATIONALOP.pickle
index 708c065e..3d35c336 100644
--- a/js/Misc/RELATIONALOP.pickle
+++ b/js/Misc/RELATIONALOP.pickle
@@ -62,55 +62,52 @@ sS'model.sim'
p19
S'list'
p20
-sS'[this.model,graphics,ok]'
-p21
-g10
sS'model.nmode'
-p22
+p21
g10
sS'in1'
-p23
+p22
g15
sS'graphics.exprs'
-p24
+p23
g15
sS'x.graphics.style'
-p25
+p24
g8
sS'model.ipar'
-p26
+p25
g8
sS'model.nzcross'
-p27
+p26
g10
sS'ok'
-p28
+p27
S'boolean'
-p29
+p28
sS'model.blocktype'
-p30
+p29
g5
sS'rule'
-p31
+p30
g10
sS'exprs'
-p32
+p31
g15
sS'gr_i'
-p33
+p32
g8
sS'ipar'
-p34
+p33
g8
sS'y'
-p35
+p34
g8
sS'x'
-p36
+p35
g10
sS'model'
-p37
+p36
g2
sS'ot'
-p38
+p37
Ns. \ No newline at end of file
diff --git a/js/Misc/SUPER_f.js b/js/Misc/SUPER_f.js
index 2064ceb8..5cf0195b 100644
--- a/js/Misc/SUPER_f.js
+++ b/js/Misc/SUPER_f.js
@@ -1,12 +1,12 @@
/* autogenerated from "macros/Misc/SUPER_f.sci" */
function SUPER_f() {
SUPER_f.prototype.define = function SUPER_f() {
- scs = scicos_diagram();
+ var scs = scicos_diagram();
scs.props.title = "Super Block";
- in1 = IN_f("define");
+ var in1 = IN_f("define");
in1.graphics.orig = [40,40];
in1.graphics.sz = [20,20];
- out = OUT_f("define");
+ var out = OUT_f("define");
out.graphics.orig = [240,40];
out.graphics.sz = [20,20];
scs.objs[1-1] = in1;
@@ -18,7 +18,7 @@ function SUPER_f() {
this.model.rpar = new ScilabDouble([scs]);
this.model.blocktype = new ScilabString(["h"]);
this.model.dep_ut = [false,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new SuperBlock(this.x);
}
diff --git a/js/Misc/TEXT_f.js b/js/Misc/TEXT_f.js
index c6e3131f..f3b95620 100644
--- a/js/Misc/TEXT_f.js
+++ b/js/Misc/TEXT_f.js
@@ -7,8 +7,8 @@ function TEXT_f() {
this.model.sim = new ScilabString(["text"]);
this.model.rpar = new ScilabString(["Text"]);
this.model.ipar = new ScilabDouble([this.font],[this.siz]);
- exprs = [["Text"],[string(this.font)],[string(this.siz)]];
- graphics = scicos_graphics();
+ var exprs = [["Text"],[string(this.font)],[string(this.siz)]];
+ var graphics = scicos_graphics();
graphics.orig = [0,0];
graphics.sz = [2,1];
graphics.exprs = exprs;
@@ -31,12 +31,12 @@ function TEXT_f() {
this.font = parseFloat(arguments[0]["font"])
this.siz = parseFloat(arguments[0]["siz"])
this.x = arg1;
- graphics = arg1.graphics;
- orig = graphics.orig;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var orig = graphics.orig;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==1) {
- exprs = [[exprs],["3"],["1"]];
+ var exprs = [[exprs],["3"],["1"]];
}
while (true) {
[ok,this.txt,this.font,this.siz,exprs] = scicos_getvalue("Set Text block parameters",["Text","Font number","Font size"],list("str",-1,"vec",1,"vec",1),exprs);
@@ -45,28 +45,28 @@ function TEXT_f() {
}
if (this.font<=0||this.font>6) {
message("Font number must be greater than 0 and less than 7");
- ok = false;
+ var ok = false;
}
if (this.siz<0) {
message("Font size must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
graphics.exprs = exprs;
- gh_winpal = gca();
- default_font_style = gh_winpal.font_style;
- default_font_size = gh_winpal.font_size;
- default_font_color = gh_winpal.font_color;
+ var gh_winpal = gca();
+ var default_font_style = gh_winpal.font_style;
+ var default_font_size = gh_winpal.font_size;
+ var default_font_color = gh_winpal.font_color;
gh_winpal.font_style = this.font;
gh_winpal.font_size = this.siz;
- r = xstringl(0,0,exprs[1-1],evstr(exprs[2-1]),evstr(exprs[3-1]));
+ var r = xstringl(0,0,exprs[1-1],evstr(exprs[2-1]),evstr(exprs[3-1]));
gh_winpal.font_style = default_font_style;
gh_winpal.font_size = default_font_size;
gh_winpal.font_color = default_font_color;
- sz = r.slice(3-1,4);
+ var sz = r.slice(3-1,4);
graphics.sz = sz;
this.x.graphics = graphics;
- ipar = [[this.font],[this.siz]];
+ var ipar = [[this.font],[this.siz]];
this.model.rpar = new ScilabDouble([this.txt]);
this.model.ipar = new ScilabDouble(ipar);
this.x.model = this.model;
diff --git a/js/Misc/c_block.js b/js/Misc/c_block.js
index f84d26d0..1499b7e8 100644
--- a/js/Misc/c_block.js
+++ b/js/Misc/c_block.js
@@ -1,14 +1,14 @@
/* autogenerated from "macros/Misc/c_block.sci" */
function c_block() {
c_block.prototype.define = function c_block() {
- in1 = 1;
- out = 1;
- clkin = [];
- clkout = [];
- x0 = [];
- z0 = [];
- typ = "c";
- auto = [];
+ var in1 = 1;
+ var out = 1;
+ var clkin = [];
+ var clkout = [];
+ var x0 = [];
+ var z0 = [];
+ var typ = "c";
+ var auto = [];
this.rpar = [];
this.funam = "toto";
this.model = scicos_model();
@@ -24,8 +24,8 @@ function c_block() {
this.model.blocktype = new ScilabString([typ]);
this.model.firing = auto;
this.model.dep_ut = [true,false];
- label = list([[sci2exp(in1)],[sci2exp(out)],[strcat(sci2exp(this.rpar))],[this.funam]],list([]));
- gr_i = [];
+ var label = list([[sci2exp(in1)],[sci2exp(out)],[strcat(sci2exp(this.rpar))],[this.funam]],list([]));
+ var gr_i = [];
this.x = standard_define([3,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -49,8 +49,8 @@ function c_block() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
while (true) {
[ok,this.i,this.o,this.rpar,this.funam,this.lab] = scicos_getvalue("Set C_block parameters",["input ports sizes","output port sizes","System parameters vector","function name"],list("vec",-1,"vec",-1,"vec",-1,"str",-1),label[1-1]);
if (!ok) {
@@ -62,18 +62,23 @@ function c_block() {
label[1-1] = this.lab;
this.rpar = this.rpar.slice();
this.i = int(this.i.slice());
- ni = size(this.i,1);
+ var ni = size(this.i,1);
this.o = int(this.o.slice());
- no = size(this.o,1);
- tt = label[2-1];
+ var no = size(this.o,1);
+ var tt = label[2-1];
if (this.model.sim[1-1]!=this.funam||size(this.model.in1,"*")!=size(this.i,"*")||size(this.model.out,"*")!=size(this.o,"*")) {
- tt = [];
+ var tt = [];
}
- [ok,tt] = CFORTR(this.funam,tt,this.i,this.o);
+ var tmpvar0 = CFORTR(this.funam,tt,this.i,this.o)
+ var ok = tmpvar0[0]
+ var tt = tmpvar0[1];
if (!ok) {
break;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,[],[]);
+ var tmpvar1 = check_io(this.model,graphics,this.i,this.o,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
this.model.sim[1] = new ScilabString([this.funam]);
this.model.rpar = this.rpar;
diff --git a/js/Misc/c_block.pickle b/js/Misc/c_block.pickle
index 84c7c67e..26a3af97 100644
--- a/js/Misc/c_block.pickle
+++ b/js/Misc/c_block.pickle
@@ -74,77 +74,71 @@ sS'label'
p21
S'list'
p22
-sS'[ok,tt]'
-p23
-g9
sS'model.evtin'
-p24
+p23
g3
sS'model.sim[1]'
+p24
+NsS'model.firing'
p25
-NsS'label[2-1]'
-p26
-g3
-sS'model.firing'
-p27
g3
sS'model.sim'
-p28
+p26
g22
sS'model.evtout'
-p29
+p27
g3
sS'clkout'
-p30
+p28
g3
sS'auto'
-p31
+p29
+g3
+sS'label[2-1]'
+p30
g3
-sS'[this.model,graphics,ok]'
-p32
-g22
sS'in1'
-p33
+p31
g9
sS'model.rpar'
-p34
+p32
g3
sS'model.state'
-p35
+p33
g3
sS'graphics.exprs'
-p36
+p34
NsS'x0'
-p37
+p35
g3
sS'model.ipar'
-p38
+p36
g9
sS'typ'
-p39
+p37
g13
sS'model.blocktype'
-p40
+p38
g13
sS'i'
-p41
+p39
g9
sS'no'
-p42
+p40
g9
sS'o'
-p43
+p41
g9
sS'gr_i'
-p44
+p42
g3
sS'y'
-p45
+p43
g3
sS'x'
-p46
+p44
g9
sS'model'
-p47
+p45
g5
s. \ No newline at end of file
diff --git a/js/Misc/fortran_block.js b/js/Misc/fortran_block.js
index 5e0f951a..bd4d11c7 100644
--- a/js/Misc/fortran_block.js
+++ b/js/Misc/fortran_block.js
@@ -15,8 +15,8 @@ function fortran_block() {
this.model.firing = [];
this.model.dep_ut = [true,false];
this.funam = "forty";
- label = list([[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[strcat(sci2exp(this.model.rpar))],[this.funam]],list([]));
- gr_i = [];
+ var label = list([[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[strcat(sci2exp(this.model.rpar))],[this.funam]],list([]));
+ var gr_i = [];
this.x = standard_define([4,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -40,8 +40,8 @@ function fortran_block() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
while (true) {
[ok,this.i,this.o,this.rpar,this.funam,this.lab] = scicos_getvalue("Set fortran_block parameters",["input ports sizes","output port sizes","System parameters vector","function name"],list("vec",-1,"vec",-1,"vec",-1,"str",-1),label[1-1]);
if (!ok) {
@@ -53,18 +53,23 @@ function fortran_block() {
label[1-1] = this.lab;
this.rpar = this.rpar.slice();
this.i = int(this.i.slice());
- ni = size(this.i,1);
+ var ni = size(this.i,1);
this.o = int(this.o.slice());
- no = size(this.o,1);
- tt = label[2-1];
+ var no = size(this.o,1);
+ var tt = label[2-1];
if (this.model.sim[1-1]!=this.funam||size(this.model.in1,"*")!=size(this.i,"*")||size(this.model.out,"*")!=size(this.o,"*")) {
- tt = [];
+ var tt = [];
}
- [ok,tt] = FORTR(this.funam,tt,this.i,this.o);
+ var tmpvar0 = FORTR(this.funam,tt,this.i,this.o)
+ var ok = tmpvar0[0]
+ var tt = tmpvar0[1];
if (!ok) {
break;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,[],[]);
+ var tmpvar1 = check_io(this.model,graphics,this.i,this.o,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
this.model.sim[1] = new ScilabString([this.funam]);
this.model.rpar = this.rpar;
diff --git a/js/Misc/fortran_block.pickle b/js/Misc/fortran_block.pickle
index 9a7877f6..d1773d92 100644
--- a/js/Misc/fortran_block.pickle
+++ b/js/Misc/fortran_block.pickle
@@ -65,65 +65,59 @@ sS'label'
p18
S'list'
p19
-sS'[ok,tt]'
-p20
-g13
sS'model.evtin'
-p21
+p20
g3
sS'model.sim[1]'
+p21
+NsS'model.firing'
p22
-NsS'label[2-1]'
-p23
-g3
-sS'model.firing'
-p24
g3
sS'model.sim'
-p25
+p23
g19
sS'model.evtout'
-p26
+p24
+g3
+sS'label[2-1]'
+p25
g3
-sS'[this.model,graphics,ok]'
-p27
-g19
sS'model.rpar'
-p28
+p26
g3
sS'model.state'
-p29
+p27
g3
sS'graphics.exprs'
-p30
+p28
NsS'model.ipar'
-p31
+p29
g13
sS'typ'
-p32
+p30
g3
sS'model.blocktype'
-p33
+p31
g9
sS'i'
-p34
+p32
g13
sS'no'
-p35
+p33
g13
sS'o'
-p36
+p34
g13
sS'gr_i'
-p37
+p35
g3
sS'y'
-p38
+p36
g3
sS'x'
-p39
+p37
g13
sS'model'
-p40
+p38
g5
s. \ No newline at end of file
diff --git a/js/Misc/func_block.js b/js/Misc/func_block.js
index 52a8a30a..2579f2c7 100644
--- a/js/Misc/func_block.js
+++ b/js/Misc/func_block.js
@@ -7,8 +7,8 @@ function func_block() {
this.model.out = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = "v=sin(u);y=u*v";
- gr_i = [];
+ var exprs = "v=sin(u);y=u*v";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -22,11 +22,14 @@ function func_block() {
}
func_block.prototype.set = function func_block() {
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.x = arg1;
this.model = this.x.model;
- [ok,mac,exprs] = this.genfunc[exprs-1];
+ var tmpvar0 = genfunc(exprs)
+ var ok = tmpvar0[0]
+ var mac = tmpvar0[1]
+ var exprs = tmpvar0[2];
if (ok) {
this.model.sim = new ScilabDouble([mac]);
graphics.exprs = exprs;
diff --git a/js/Misc/func_block.pickle b/js/Misc/func_block.pickle
index a9ca4a5b..ea703ec1 100644
--- a/js/Misc/func_block.pickle
+++ b/js/Misc/func_block.pickle
@@ -6,10 +6,8 @@ S'x'
p2
aS'model'
p3
-aS'genfunc'
-p4
-atp5
-Rp6
+atp4
+Rp5
.(dp0
S'model.sim'
p1
@@ -19,49 +17,46 @@ sS'model.in1'
p3
S'double'
p4
-sS'[ok,mac,exprs]'
-p5
-g4
sS'model.blocktype'
-p6
+p5
g2
sS'x.graphics'
-p7
+p6
S'object'
-p8
+p7
sS'arg1'
-p9
-g8
+p8
+g7
sS'graphics.exprs'
-p10
+p9
NsS'model.out'
-p11
+p10
g4
sS'exprs'
-p12
+p11
g2
sS'x.model'
-p13
+p12
NsS'gr_i'
-p14
+p13
S'vector'
-p15
+p14
sS'model.dep_ut'
-p16
-g15
+p15
+g14
sS'graphics'
-p17
-g8
+p16
+g7
sS'y'
-p18
-g15
+p17
+g14
sS'x'
-p19
+p18
g4
sS'model'
-p20
-g8
+p19
+g7
sS'typ'
-p21
-g15
+p20
+g14
s. \ No newline at end of file
diff --git a/js/Misc/generic_block.js b/js/Misc/generic_block.js
index 702943ca..93cefd86 100644
--- a/js/Misc/generic_block.js
+++ b/js/Misc/generic_block.js
@@ -16,8 +16,8 @@ function generic_block() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.firing)],["y"],["n"]];
- gr_i = [];
+ var label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.firing)],["y"],["n"]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -59,8 +59,8 @@ function generic_block() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -69,7 +69,7 @@ function generic_block() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
this.function_name = stripblanks(this.function_name);
this.xx = this.xx.slice();
this.z = this.z.slice();
@@ -82,12 +82,12 @@ function generic_block() {
this.funtyp = int(this.funtyp);
if (this.funtyp<0) {
message("function type cannot be negative");
- ok = false;
+ var ok = false;
}
if ([[this.ci],[this.co]]!=[]) {
if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
- ok = false;
+ var ok = false;
}
}
this.depu = stripblanks(this.depu);
@@ -102,13 +102,16 @@ function generic_block() {
} else {
this.dept = false;
}
- dep_ut = [this.depu,this.dept];
+ var dep_ut = [this.depu,this.dept];
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,this.ci,this.co);
+ var tmpvar0 = check_io(this.model,graphics,this.i,this.o,this.ci,this.co)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
if (this.funtyp==3) {
- needcompile = 4;
+ var needcompile = 4;
}
this.model.sim = list(new ScilabDouble([this.function_name]), new ScilabDouble([this.funtyp]));
this.model.state = this.xx;
diff --git a/js/Misc/generic_block.pickle b/js/Misc/generic_block.pickle
index d1f4eab6..f90f00f7 100644
--- a/js/Misc/generic_block.pickle
+++ b/js/Misc/generic_block.pickle
@@ -96,70 +96,67 @@ g8
sS'arg1.graphics'
p24
g5
-sS'[this.model,graphics,ok]'
-p25
-g22
sS'model.rpar'
-p26
+p25
g8
sS'model.state'
-p27
+p26
g8
sS'graphics'
-p28
+p27
g5
sS'model.ipar'
-p29
+p28
g8
sS'typ'
-p30
+p29
g8
sS'needcompile'
-p31
+p30
g2
sS'arg1.model'
-p32
+p31
NsS'label[9-1]'
-p33
+p32
g8
sS'ok'
-p34
+p33
S'boolean'
-p35
+p34
sS'model.blocktype'
-p36
+p35
g20
sS'i'
-p37
+p36
g2
sS'o'
-p38
+p37
g2
sS'depu'
-p39
-g35
+p38
+g34
sS'dept'
-p40
-g35
+p39
+g34
sS'gr_i'
-p41
+p40
g8
sS'ipar'
-p42
+p41
g2
sS'y'
-p43
+p42
g8
sS'x'
-p44
+p43
g2
sS'model'
-p45
+p44
g5
sS'z'
-p46
+p45
g8
sS'dep_ut'
-p47
+p46
g8
s. \ No newline at end of file
diff --git a/js/Misc/generic_block2.js b/js/Misc/generic_block2.js
index aa827d03..d276b49a 100644
--- a/js/Misc/generic_block2.js
+++ b/js/Misc/generic_block2.js
@@ -16,8 +16,8 @@ function generic_block2() {
this.model.blocktype = new ScilabString(["c"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]];
- gr_i = [];
+ var label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp(this.model.in1)],[sci2exp(this.model.out)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -63,8 +63,8 @@ function generic_block2() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -73,7 +73,7 @@ function generic_block2() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
this.function_name = stripblanks(this.function_name);
this.xx = this.xx.slice();
this.z = this.z.slice();
@@ -86,12 +86,12 @@ function generic_block2() {
this.funtyp = int(this.funtyp);
if (this.funtyp<0) {
message("function type cannot be negative");
- ok = false;
+ var ok = false;
}
if ([[this.ci],[this.co]]!=[]) {
if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
- ok = false;
+ var ok = false;
}
}
this.depu = stripblanks(this.depu);
@@ -106,13 +106,16 @@ function generic_block2() {
} else {
this.dept = false;
}
- dep_ut = [this.depu,this.dept];
+ var dep_ut = [this.depu,this.dept];
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,this.ci,this.co);
+ var tmpvar0 = check_io(this.model,graphics,this.i,this.o,this.ci,this.co)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
if (this.funtyp==3) {
- needcompile = 4;
+ var needcompile = 4;
}
this.model.sim = list(new ScilabDouble([this.function_name]), new ScilabDouble([this.funtyp]));
this.model.state = this.xx;
diff --git a/js/Misc/generic_block2.pickle b/js/Misc/generic_block2.pickle
index 3acdefcd..4d36465d 100644
--- a/js/Misc/generic_block2.pickle
+++ b/js/Misc/generic_block2.pickle
@@ -102,72 +102,69 @@ g8
sS'arg1.graphics'
p25
g5
-sS'[this.model,graphics,ok]'
-p26
-g23
sS'model.nmode'
-p27
+p26
NsS'model.rpar'
-p28
+p27
g8
sS'model.state'
-p29
+p28
g8
sS'graphics'
-p30
+p29
g5
sS'model.ipar'
-p31
+p30
g8
sS'typ'
-p32
+p31
g8
sS'needcompile'
-p33
+p32
g2
sS'arg1.model'
-p34
+p33
NsS'label[9-1]'
-p35
+p34
g8
sS'ok'
-p36
+p35
S'boolean'
-p37
+p36
sS'model.blocktype'
-p38
+p37
g21
sS'i'
-p39
+p38
g2
sS'o'
-p40
+p39
g2
sS'depu'
-p41
-g37
+p40
+g36
sS'dept'
-p42
-g37
+p41
+g36
sS'gr_i'
-p43
+p42
g8
sS'ipar'
-p44
+p43
g2
sS'y'
-p45
+p44
g8
sS'x'
-p46
+p45
g2
sS'model'
-p47
+p46
g5
sS'z'
-p48
+p47
g8
sS'dep_ut'
-p49
+p48
g8
s. \ No newline at end of file
diff --git a/js/Misc/generic_block3.js b/js/Misc/generic_block3.js
index a185a2a2..e5bb8697 100644
--- a/js/Misc/generic_block3.js
+++ b/js/Misc/generic_block3.js
@@ -12,8 +12,8 @@ function generic_block3() {
this.model.out2 = new ScilabDouble([1]);
this.model.outtyp = new ScilabDouble([1]);
this.model.dep_ut = [true,false];
- label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp([this.model.in1,this.model.in2])],[sci2exp(this.model.intyp)],[sci2exp([this.model.out,this.model.out2]),sci2exp(this.model.outtyp)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.odstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.opar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]];
- gr_i = [];
+ var label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp([this.model.in1,this.model.in2])],[sci2exp(this.model.intyp)],[sci2exp([this.model.out,this.model.out2]),sci2exp(this.model.outtyp)],[sci2exp(this.model.evtin)],[sci2exp(this.model.evtout)],[sci2exp(this.model.state)],[sci2exp(this.model.dstate)],[sci2exp(this.model.odstate)],[sci2exp(this.model.rpar)],[sci2exp(this.model.ipar)],[sci2exp(this.model.opar)],[sci2exp(this.model.nmode)],[sci2exp(this.model.nzcross)],[sci2exp(this.model.firing)],["y"],["n"]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -67,8 +67,8 @@ function generic_block3() {
this.lab = arguments[0]["lab"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
if (size(label,"*")==14) {
label[9-1] = [];
}
@@ -77,7 +77,7 @@ function generic_block3() {
if (!ok) {
break;
}
- label = this.lab;
+ var label = this.lab;
this.function_name = stripblanks(this.function_name);
this.xx = this.xx.slice();
this.z = this.z.slice();
@@ -88,21 +88,21 @@ function generic_block3() {
this.funtyp = this.funtyp;
if (this.funtyp<0) {
message("function type cannot be negative");
- ok = false;
+ var ok = false;
}
if ([[this.ci],[this.co]]!=[]) {
if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
- ok = false;
+ var ok = false;
}
}
if (this.type[this.opar-1]!=15) {
message("object parameter must be a list");
- ok = false;
+ var ok = false;
}
if (this.type[this.oz-1]!=15) {
message("discrete object state must be a list");
- ok = false;
+ var ok = false;
}
this.depu = stripblanks(this.depu);
if (part(this.depu,1)=="y") {
@@ -116,13 +116,16 @@ function generic_block3() {
} else {
this.dept = false;
}
- dep_ut = [this.depu,this.dept];
+ var dep_ut = [this.depu,this.dept];
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(this.in1,this.it),list(this.out,this.ot),this.ci,this.co);
+ var tmpvar0 = set_io(this.model,graphics,list(this.in1,this.it),list(this.out,this.ot),this.ci,this.co)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
if (this.funtyp==3) {
- needcompile = 4;
+ var needcompile = 4;
}
this.model.sim = list(new ScilabDouble([this.function_name]), new ScilabDouble([this.funtyp]));
this.model.state = this.xx;
diff --git a/js/Misc/generic_block3.pickle b/js/Misc/generic_block3.pickle
index a7a2fa07..c9d9390b 100644
--- a/js/Misc/generic_block3.pickle
+++ b/js/Misc/generic_block3.pickle
@@ -110,74 +110,71 @@ p24
sS'arg1.graphics'
p25
g6
-sS'[this.model,graphics,ok]'
-p26
-g3
sS'model.out2'
-p27
+p26
g3
sS'model.nmode'
-p28
+p27
NsS'model.rpar'
-p29
+p28
g9
sS'model.outtyp'
-p30
+p29
g3
sS'model.state'
-p31
+p30
g9
sS'graphics'
-p32
+p31
g6
sS'model.ipar'
-p33
+p32
g3
sS'typ'
-p34
+p33
g9
sS'model.opar'
-p35
+p34
NsS'needcompile'
-p36
+p35
g3
sS'arg1.model'
-p37
+p36
NsS'label[9-1]'
-p38
+p37
g9
sS'ok'
-p39
+p38
S'boolean'
-p40
+p39
sS'model.dep_ut'
-p41
+p40
g9
sS'depu'
-p42
-g40
+p41
+g39
sS'dept'
-p43
-g40
+p42
+g39
sS'gr_i'
-p44
+p43
g9
sS'ipar'
-p45
+p44
g3
sS'y'
-p46
+p45
g9
sS'x'
-p47
+p46
g3
sS'model'
-p48
+p47
g6
sS'z'
-p49
+p48
g9
sS'dep_ut'
-p50
+p49
g9
s. \ No newline at end of file
diff --git a/js/Misc/scifunc_block.js b/js/Misc/scifunc_block.js
index 83c45670..80f6abb0 100644
--- a/js/Misc/scifunc_block.js
+++ b/js/Misc/scifunc_block.js
@@ -1,14 +1,14 @@
/* autogenerated from "macros/Misc/scifunc_block.sci" */
function scifunc_block() {
scifunc_block.prototype.define = function scifunc_block() {
- in1 = 1;
- out = 1;
- clkin = [];
- clkout = [];
- x0 = [];
- z0 = [];
- typ = "c";
- auto = [];
+ var in1 = 1;
+ var out = 1;
+ var clkin = [];
+ var clkout = [];
+ var x0 = [];
+ var z0 = [];
+ var typ = "c";
+ var auto = [];
this.rpar = [];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["scifunc"]), new ScilabDouble([3]));
@@ -24,8 +24,8 @@ function scifunc_block() {
this.model.blocktype = new ScilabString([typ]);
this.model.firing = auto;
this.model.dep_ut = [true,false];
- exprs = list([[sci2exp(in1)],[sci2exp(out)],[sci2exp(clkin)],[sci2exp(clkout)],[strcat(sci2exp(x0))],[strcat(sci2exp(z0))],[strcat(sci2exp(this.rpar))],[sci2exp(auto)]],list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
- gr_i = [];
+ var exprs = list([[sci2exp(in1)],[sci2exp(out)],[sci2exp(clkin)],[sci2exp(clkout)],[strcat(sci2exp(x0))],[strcat(sci2exp(z0))],[strcat(sci2exp(this.rpar))],[sci2exp(auto)]],list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -57,11 +57,11 @@ function scifunc_block() {
this.auto0 = arguments[0]["auto0"]
this.deptime = arguments[0]["deptime"]
this.lab = arguments[0]["lab"]
- needcompile = 0;
+ var needcompile = 0;
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
if (size(exprs[1-1],"*")==8) {
exprs[1-1][9-1] = "0";
}
@@ -74,23 +74,29 @@ function scifunc_block() {
this.xx = this.xx.slice();
this.z = this.z.slice();
this.rpar = this.rpar.slice();
- nrp = prod(size(this.rpar));
+ var nrp = prod(size(this.rpar));
this.i = int(this.i.slice());
- ni = size(this.i,1);
+ var ni = size(this.i,1);
this.o = int(this.o.slice());
- no = size(this.o,1);
+ var no = size(this.o,1);
this.ci = int(this.ci.slice());
- nci = size(this.ci,1);
+ var nci = size(this.ci,1);
this.co = int(this.co.slice());
- nco = size(this.co,1);
- [ok,tt,dep_ut] = genfunc1(exprs[2-1],this.i,this.o,nci,nco,size(this.xx,1),size(this.z,1),nrp,"c");
+ var nco = size(this.co,1);
+ var tmpvar0 = genfunc1(exprs[2-1],this.i,this.o,nci,nco,size(this.xx,1),size(this.z,1),nrp,"c")
+ var ok = tmpvar0[0]
+ var tt = tmpvar0[1]
+ var dep_ut = tmpvar0[2];
dep_ut[2-1] = (1==this.deptime);
if (!ok) {
break;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,this.i,this.o,this.ci,this.co);
+ var tmpvar1 = check_io(this.model,graphics,this.i,this.o,this.ci,this.co)
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
- auto = this.auto0;
+ var auto = this.auto0;
this.model.state = this.xx;
this.model.dstate = this.z;
this.model.rpar = this.rpar;
@@ -99,7 +105,7 @@ function scifunc_block() {
this.model.ipar = new ScilabDouble([0]);
}
if (or(this.model.opar!=tt)) {
- needcompile = 4;
+ var needcompile = 4;
}
this.model.opar = new ScilabDouble([tt]);
this.model.firing = new ScilabDouble([auto]);
diff --git a/js/Misc/scifunc_block.pickle b/js/Misc/scifunc_block.pickle
index 8aa4565d..d55b8523 100644
--- a/js/Misc/scifunc_block.pickle
+++ b/js/Misc/scifunc_block.pickle
@@ -86,9 +86,9 @@ g3
sS'z0'
p22
g9
-sS'[ok,tt,dep_ut]'
+sS'auto'
p23
-g3
+g9
sS'model.evtin'
p24
g9
@@ -111,75 +111,69 @@ sS'exprs[1-1][9-1]'
p31
S'string'
p32
-sS'[this.model,graphics,ok]'
-p33
-g28
sS'in1'
-p34
+p33
g3
sS'model.rpar'
-p35
+p34
g9
sS'nci'
-p36
+p35
g3
sS'model.state'
-p37
+p36
g9
sS'nco'
-p38
+p37
g3
sS'x0'
-p39
+p38
g9
sS'nrp'
-p40
+p39
g3
sS'typ'
-p41
+p40
g32
sS'model.opar'
-p42
+p41
g28
sS'needcompile'
-p43
+p42
g3
sS'model.blocktype'
-p44
+p43
g32
-sS'auto'
-p45
-g9
sS'i'
-p46
+p44
g3
sS'x.graphics'
-p47
+p45
g6
sS'x.model'
-p48
+p46
g6
sS'o'
-p49
+p47
g3
sS'exprs'
-p50
+p48
g28
sS'gr_i'
-p51
+p49
g9
sS'graphics.exprs'
-p52
+p50
NsS'y'
-p53
+p51
g9
sS'x'
-p54
+p52
g3
sS'model'
-p55
+p53
g6
sS'z'
-p56
+p54
g9
s. \ No newline at end of file
diff --git a/js/Misc/scifunc_block_m.js b/js/Misc/scifunc_block_m.js
index e96e9bdb..494f6450 100644
--- a/js/Misc/scifunc_block_m.js
+++ b/js/Misc/scifunc_block_m.js
@@ -1,16 +1,16 @@
/* autogenerated from "macros/Misc/scifunc_block_m.sci" */
function scifunc_block_m() {
scifunc_block_m.prototype.define = function scifunc_block_m() {
- in1 = 1;
- out = 1;
- clkin = [];
- clkout = [];
- x0 = [];
- z0 = [];
- typ = "c";
- auto = [];
+ var in1 = 1;
+ var out = 1;
+ var clkin = [];
+ var clkout = [];
+ var x0 = [];
+ var z0 = [];
+ var typ = "c";
+ var auto = [];
this.rpar = [];
- it = 1;
+ var it = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["scifunc"]), new ScilabDouble([3]));
this.model.in1 = new ScilabDouble([in1]);
@@ -29,8 +29,8 @@ function scifunc_block_m() {
this.model.blocktype = new ScilabString([typ]);
this.model.firing = auto;
this.model.dep_ut = [true,false];
- exprs = list([[sci2exp([in1,in1])],[sci2exp([out,out])],[sci2exp(clkin)],[sci2exp(clkout)],[strcat(sci2exp(x0))],[strcat(sci2exp(z0))],[strcat(sci2exp(this.rpar))],[sci2exp(auto)],[sci2exp(0)]],list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
- gr_i = [];
+ var exprs = list([[sci2exp([in1,in1])],[sci2exp([out,out])],[sci2exp(clkin)],[sci2exp(clkout)],[strcat(sci2exp(x0))],[strcat(sci2exp(z0))],[strcat(sci2exp(this.rpar))],[sci2exp(auto)],[sci2exp(0)]],list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -62,11 +62,11 @@ function scifunc_block_m() {
this.auto0 = arguments[0]["auto0"]
this.deptime = arguments[0]["deptime"]
this.lab = arguments[0]["lab"]
- needcompile = 0;
+ var needcompile = 0;
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.i,this.o,this.ci,this.co,this.xx,this.z,this.rpar,this.auto0,this.deptime,this.lab] = scicos_getvalue([["Set scifunc_block parameters"],["only regular blocks supported"]],["input ports sizes","output port sizes","input event ports sizes","output events ports sizes","initial continuous state","initial discrete state","System parameters vector","initial firing vector (<0 for no firing)","is block always active (0:no, 1:yes)"],list("mat",[-1,2],"mat",[-2,2],"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1),exprs[1-1]);
if (!ok) {
@@ -76,23 +76,29 @@ function scifunc_block_m() {
this.xx = this.xx.slice();
this.z = this.z.slice();
this.rpar = this.rpar.slice();
- it = ones(1,size(this.i,1));
- ot = ones(1,size(this.o,1));
- nrp = prod(size(this.rpar));
- ni = size(this.i,1);
- no = size(this.o,1);
+ var it = ones(1,size(this.i,1));
+ var ot = ones(1,size(this.o,1));
+ var nrp = prod(size(this.rpar));
+ var ni = size(this.i,1);
+ var no = size(this.o,1);
this.ci = int(this.ci.slice());
- nci = size(this.ci,1);
+ var nci = size(this.ci,1);
this.co = int(this.co.slice());
- nco = size(this.co,1);
- [ok,tt,dep_ut] = genfunc2(exprs[2-1],this.i,this.o,nci,nco,size(this.xx,1),size(this.z,1),nrp,"c");
+ var nco = size(this.co,1);
+ var tmpvar0 = genfunc2(exprs[2-1],this.i,this.o,nci,nco,size(this.xx,1),size(this.z,1),nrp,"c")
+ var ok = tmpvar0[0]
+ var tt = tmpvar0[1]
+ var dep_ut = tmpvar0[2];
dep_ut[2-1] = (1==this.deptime);
if (!ok) {
break;
}
- [this.model,graphics,ok] = set_io(this.model,graphics,list(this.i,it),list(this.o,ot),this.ci,this.co);
+ var tmpvar1 = set_io(this.model,graphics,list(this.i,it),list(this.o,ot),this.ci,this.co)
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
if (ok) {
- auto = this.auto0;
+ var auto = this.auto0;
this.model.state = this.xx;
this.model.dstate = this.z;
this.model.rpar = this.rpar;
@@ -101,7 +107,7 @@ function scifunc_block_m() {
this.model.ipar = new ScilabDouble([0]);
}
if (or(this.model.opar!=tt)) {
- needcompile = 4;
+ var needcompile = 4;
}
this.model.opar = new ScilabDouble([tt]);
this.model.firing = new ScilabDouble([auto]);
diff --git a/js/Misc/scifunc_block_m.pickle b/js/Misc/scifunc_block_m.pickle
index 58448010..e943163b 100644
--- a/js/Misc/scifunc_block_m.pickle
+++ b/js/Misc/scifunc_block_m.pickle
@@ -89,106 +89,100 @@ g3
sS'z0'
p23
g10
-sS'[ok,tt,dep_ut]'
-p24
-g3
sS'model.evtin'
-p25
+p24
g10
sS'exprs[2-1]'
-p26
+p25
NsS'model.firing'
-p27
+p26
g10
sS'model.sim'
-p28
+p27
S'list'
-p29
+p28
sS'model.evtout'
-p30
+p29
g10
sS'clkout'
-p31
+p30
g10
sS'model.in2'
-p32
+p31
g3
sS'auto'
-p33
+p32
g10
-sS'[this.model,graphics,ok]'
-p34
-g3
sS'model.out2'
-p35
+p33
g3
sS'in1'
-p36
+p34
g3
sS'model.rpar'
-p37
+p35
g10
sS'nci'
-p38
+p36
g3
sS'model.state'
-p39
+p37
g10
sS'nco'
-p40
+p38
g3
sS'model.outtyp'
-p41
+p39
g3
sS'x0'
-p42
+p40
g10
sS'nrp'
-p43
+p41
g3
sS'typ'
-p44
+p42
S'string'
-p45
+p43
sS'model.opar'
-p46
-g29
+p44
+g28
sS'needcompile'
-p47
+p45
g3
sS'z'
-p48
+p46
g10
sS'model.blocktype'
-p49
-g45
+p47
+g43
sS'x.graphics'
-p50
+p48
g6
sS'x.model'
-p51
+p49
g6
sS'model.dep_ut'
-p52
+p50
g10
sS'exprs'
-p53
-g29
+p51
+g28
sS'gr_i'
-p54
+p52
g10
sS'graphics.exprs'
-p55
+p53
NsS'y'
-p56
+p54
g10
sS'x'
-p57
+p55
g3
sS'model'
-p58
+p56
g6
sS'ot'
-p59
+p57
g3
s. \ No newline at end of file
diff --git a/js/NonLinear/ABSBLK_f.js b/js/NonLinear/ABSBLK_f.js
index 2204f7fa..dccca3e7 100644
--- a/js/NonLinear/ABSBLK_f.js
+++ b/js/NonLinear/ABSBLK_f.js
@@ -7,7 +7,7 @@ function ABSBLK_f() {
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/NonLinear/ABS_VALUE.js b/js/NonLinear/ABS_VALUE.js
index 116d1ad1..d1440877 100644
--- a/js/NonLinear/ABS_VALUE.js
+++ b/js/NonLinear/ABS_VALUE.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/NonLinear/ABS_VALUE.sci" */
function ABS_VALUE() {
ABS_VALUE.prototype.define = function ABS_VALUE() {
- nu = -1;
+ var nu = -1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["absolute_value"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([nu]);
@@ -10,8 +10,8 @@ function ABS_VALUE() {
this.model.nmode = new ScilabDouble([nu]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [string([1])];
- gr_i = [];
+ var exprs = [string([1])];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -27,8 +27,8 @@ function ABS_VALUE() {
ABS_VALUE.prototype.set = function ABS_VALUE() {
this.zcr = arguments[0]["zcr"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.zcr,exprs] = scicos_getvalue("Set block parameters",["use zero_crossing (1: yes) (0:no)"],list("vec",1),exprs);
diff --git a/js/NonLinear/COSBLK_f.js b/js/NonLinear/COSBLK_f.js
index 9ac5c564..5fc89b30 100644
--- a/js/NonLinear/COSBLK_f.js
+++ b/js/NonLinear/COSBLK_f.js
@@ -1,14 +1,14 @@
/* autogenerated from "macros/NonLinear/COSBLK_f.sci" */
function COSBLK_f() {
COSBLK_f.prototype.define = function COSBLK_f() {
- in1 = 1;
+ var in1 = 1;
this.model = scicos_model();
this.model.sim = new ScilabString(["cosblk"]);
this.model.in1 = new ScilabDouble([-1]);
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/NonLinear/DLRADAPT_f.js b/js/NonLinear/DLRADAPT_f.js
index f1d5e69d..bbbcc0b1 100644
--- a/js/NonLinear/DLRADAPT_f.js
+++ b/js/NonLinear/DLRADAPT_f.js
@@ -18,8 +18,8 @@ function DLRADAPT_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(this.p)],[sci2exp(this.rn)],[sci2exp(this.rd,0)],[sci2exp(this.g)],[sci2exp(this.last_u)],[sci2exp(this.last_y)]];
- gr_i = [];
+ var exprs = [[sci2exp(this.p)],[sci2exp(this.rn)],[sci2exp(this.rd,0)],[sci2exp(this.g)],[sci2exp(this.last_u)],[sci2exp(this.last_y)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -45,23 +45,25 @@ function DLRADAPT_f() {
this.last_u = inverse(arguments[0]["last_u"])
this.last_y = inverse(arguments[0]["last_y"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.p,this.rn,this.rd,this.g,this.last_u,this.last_y,exprs] = scicos_getvalue("Set block parameters",["Vector of p mesh points","Numerator roots (one line for each mesh)","Denominator roots (one line for each mesh)","Vector of gain at mesh points","past inputs (Num degree values)","past outputs (Den degree values)"],list("vec",-1,"mat",[-1,-1],"mat",["size(%1,\'*\')","-1"],"vec","size(%1,\'*\')","vec","size(%2,2)","vec","size(%3,2)"),exprs);
if (!ok) {
break;
}
- m = size(this.rn,2);
- [npt,n] = size(this.rd);
+ var m = size(this.rn,2);
+ var tmpvar0 = size(this.rd)
+ var npt = tmpvar0[0]
+ var n = tmpvar0[1];
if (m>=n) {
message("Transfer must be strictly proper");
} else if (size(this.rn,1)!=0&&size(this.rn,1)!=size(this.p,"*")) {
message("Numerator roots matrix row size\'s is incorrect");
} else {
- rpar = [[this.p.slice()],[real(this.rn.slice())],[imag(this.rn.slice())],[real(this.rd.slice())],[imag(this.rd.slice())],[this.g.slice()]];
- ipar = [[m],[n],[npt]];
+ var rpar = [[this.p.slice()],[real(this.rn.slice())],[imag(this.rn.slice())],[real(this.rd.slice())],[imag(this.rd.slice())],[this.g.slice()]];
+ var ipar = [[m],[n],[npt]];
this.model.dstate = new ScilabDouble([this.last_u.slice()],[this.last_y.slice()]);
this.model.rpar = new ScilabDouble(rpar);
this.model.ipar = new ScilabDouble(ipar);
diff --git a/js/NonLinear/DLRADAPT_f.pickle b/js/NonLinear/DLRADAPT_f.pickle
index 42c4b32e..4e1549e0 100644
--- a/js/NonLinear/DLRADAPT_f.pickle
+++ b/js/NonLinear/DLRADAPT_f.pickle
@@ -90,31 +90,28 @@ g18
sS'g'
p27
g2
-sS'[npt,n]'
-p28
-g9
sS'm'
-p29
+p28
g9
sS'model.dep_ut'
-p30
+p29
g15
sS'p'
-p31
+p30
g2
sS'gr_i'
-p32
+p31
g15
sS'ipar'
-p33
+p32
g2
sS'y'
-p34
+p33
g15
sS'x'
-p35
+p34
g9
sS'model'
-p36
+p35
g4
s. \ No newline at end of file
diff --git a/js/NonLinear/EXPBLK_f.js b/js/NonLinear/EXPBLK_f.js
index 2847bcc3..a1ec6e7f 100644
--- a/js/NonLinear/EXPBLK_f.js
+++ b/js/NonLinear/EXPBLK_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/NonLinear/EXPBLK_f.sci" */
function EXPBLK_f() {
EXPBLK_f.prototype.define = function EXPBLK_f() {
- in1 = 1;
+ var in1 = 1;
this.a = math.E;
this.model = scicos_model();
this.model.sim = new ScilabString(["expblk"]);
@@ -10,8 +10,8 @@ function EXPBLK_f() {
this.model.rpar = new ScilabDouble([this.a]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = ["%e"];
- gr_i = [];
+ var exprs = ["%e"];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -26,11 +26,11 @@ function EXPBLK_f() {
EXPBLK_f.prototype.set = function EXPBLK_f() {
this.a = parseFloat(arguments[0]["a"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[2-1];
+ var exprs = exprs[2-1];
}
while (true) {
[ok,this.a,exprs] = scicos_getvalue("Set a^u block parameters","a (>0)",list("vec",1),exprs);
diff --git a/js/NonLinear/EXPBLK_m.js b/js/NonLinear/EXPBLK_m.js
index e2cfa846..61ae91d7 100644
--- a/js/NonLinear/EXPBLK_m.js
+++ b/js/NonLinear/EXPBLK_m.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/NonLinear/EXPBLK_m.sci" */
function EXPBLK_m() {
EXPBLK_m.prototype.define = function EXPBLK_m() {
- in1 = 1;
+ var in1 = 1;
this.a = math.E;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["expblk_m"]), new ScilabDouble([4]));
@@ -14,8 +14,8 @@ function EXPBLK_m() {
this.model.rpar = new ScilabDouble([this.a]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = ["%e"];
- gr_i = [];
+ var exprs = ["%e"];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -30,11 +30,11 @@ function EXPBLK_m() {
EXPBLK_m.prototype.set = function EXPBLK_m() {
this.a = parseFloat(arguments[0]["a"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[2-1];
+ var exprs = exprs[2-1];
}
while (true) {
[ok,this.a,exprs] = scicos_getvalue("Set a^u block parameters","a (>0)",list("vec",1),exprs);
diff --git a/js/NonLinear/FSV_f.js b/js/NonLinear/FSV_f.js
index faf8b470..37dc3224 100644
--- a/js/NonLinear/FSV_f.js
+++ b/js/NonLinear/FSV_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/NonLinear/FSV_f.sci" */
function FSV_f() {
FSV_f.prototype.define = function FSV_f() {
- in1 = 1;
+ var in1 = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["fsv"]), new ScilabDouble([1]));
this.model.in1 = new ScilabDouble([in1]);
this.model.out = new ScilabDouble([in1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/NonLinear/INTRP2BLK_f.js b/js/NonLinear/INTRP2BLK_f.js
index ca146ae9..db41305d 100644
--- a/js/NonLinear/INTRP2BLK_f.js
+++ b/js/NonLinear/INTRP2BLK_f.js
@@ -12,8 +12,8 @@ function INTRP2BLK_f() {
this.model.ipar = new ScilabDouble([2],[2]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(sci2exp(this.a))],[strcat(sci2exp(this.b))],[strcat(sci2exp(this.c,0))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.a))],[strcat(sci2exp(this.b))],[strcat(sci2exp(this.c,0))]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -33,8 +33,8 @@ function INTRP2BLK_f() {
this.b = inverse(arguments[0]["b"])
this.c = inverse(arguments[0]["c"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.a,this.b,this.c,exprs] = scicos_getvalue("Set Interpolation block parameters",["X coord.","Y coord.","Z values"],list("vec",-1,"vec",-1,"mat",[-1,-1]),exprs);
diff --git a/js/NonLinear/INTRPLBLK_f.js b/js/NonLinear/INTRPLBLK_f.js
index fd4e720d..d2cdf8fa 100644
--- a/js/NonLinear/INTRPLBLK_f.js
+++ b/js/NonLinear/INTRPLBLK_f.js
@@ -10,8 +10,8 @@ function INTRPLBLK_f() {
this.model.rpar = new ScilabDouble([this.a],[this.b]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(sci2exp(this.a))],[strcat(sci2exp(this.b))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.a))],[strcat(sci2exp(this.b))]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -29,8 +29,8 @@ function INTRPLBLK_f() {
this.a = inverse(arguments[0]["a"])
this.b = inverse(arguments[0]["b"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.a,this.b,exprs] = scicos_getvalue("Set Interpolation block parameters",["X coord.","Y coord."],list("vec",-1,"vec",-1),exprs);
diff --git a/js/NonLinear/INVBLK.js b/js/NonLinear/INVBLK.js
index 74b5a1b1..4d9721cd 100644
--- a/js/NonLinear/INVBLK.js
+++ b/js/NonLinear/INVBLK.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/NonLinear/INVBLK.sci" */
function INVBLK() {
INVBLK.prototype.define = function INVBLK() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["invblk4"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([in1]);
this.model.out = new ScilabDouble([in1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/NonLinear/INVBLK_f.js b/js/NonLinear/INVBLK_f.js
index c49a8de8..219dc37b 100644
--- a/js/NonLinear/INVBLK_f.js
+++ b/js/NonLinear/INVBLK_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/NonLinear/INVBLK_f.sci" */
function INVBLK_f() {
INVBLK_f.prototype.define = function INVBLK_f() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = new ScilabString(["invblk"]);
this.model.in1 = new ScilabDouble([in1]);
this.model.out = new ScilabDouble([in1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/NonLinear/LOGBLK_f.js b/js/NonLinear/LOGBLK_f.js
index 95afdc77..5b725fea 100644
--- a/js/NonLinear/LOGBLK_f.js
+++ b/js/NonLinear/LOGBLK_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/NonLinear/LOGBLK_f.sci" */
function LOGBLK_f() {
LOGBLK_f.prototype.define = function LOGBLK_f() {
- in1 = 1;
+ var in1 = 1;
this.a = math.E;
this.model = scicos_model();
this.model.sim = new ScilabString(["logblk"]);
@@ -10,8 +10,8 @@ function LOGBLK_f() {
this.model.rpar = new ScilabDouble([this.a]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = "%e";
- gr_i = [];
+ var exprs = "%e";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -26,11 +26,11 @@ function LOGBLK_f() {
LOGBLK_f.prototype.set = function LOGBLK_f() {
this.a = parseFloat(arguments[0]["a"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[2-1];
+ var exprs = exprs[2-1];
}
while (true) {
[ok,this.a,exprs] = scicos_getvalue("Set log block parameters","Basis (>1)",list("vec",1),exprs);
diff --git a/js/NonLinear/LOOKUP2D.js b/js/NonLinear/LOOKUP2D.js
index 8c50face..1e615526 100644
--- a/js/NonLinear/LOOKUP2D.js
+++ b/js/NonLinear/LOOKUP2D.js
@@ -6,9 +6,9 @@ function LOOKUP2D() {
this.yy = [1:3];
this.zz = [[4,5,6],[16,19,20],[10,18,23],[6,3,-1]];
this.Method = 1;
- Graf = "n";
- Nx = length(this.xx);
- Ny = length(this.yy);
+ var Graf = "n";
+ var Nx = length(this.xx);
+ var Ny = length(this.yy);
this.model.sim = list(new ScilabString(["lookup2d"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1],[1]);
this.model.out = new ScilabDouble([1]);
@@ -16,8 +16,8 @@ function LOOKUP2D() {
this.model.ipar = new ScilabDouble([Nx],[Ny],[this.Method]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = list(strcat(sci2exp(this.xx)),strcat(sci2exp(this.yy)),strcat(sci2exp(this.zz)),sci2exp(this.Method),Graf);
- gr_i = [];
+ var exprs = list(strcat(sci2exp(this.xx)),strcat(sci2exp(this.yy)),strcat(sci2exp(this.zz)),sci2exp(this.Method),Graf);
+ var gr_i = [];
this.x = standard_define([2.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -42,63 +42,71 @@ function LOOKUP2D() {
this.graf = arguments[0]["graf"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- ok = false;
- SaveExit = false;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var ok = false;
+ var SaveExit = false;
while (true) {
- Ask_again = false;
+ var Ask_again = false;
[ok,this.xx,this.yy,this.zz,this.Method,this.graf,exprs] = scicos_getvalue("2D Lookup table parameters",["Row index input values","Column index input values","Table data","Lookup method(1..5)","Launch graphic window(y/n)?"],list("vec",-1,"vec",-1,"mat",[-1,-1],"vec",1,"str",1),exprs);
if (!ok) {
break;
}
- mtd = int(this.Method);
+ var mtd = int(this.Method);
if (mtd<1) {
- mtd = 1;
+ var mtd = 1;
}
if (mtd>6) {
- mtd = 6;
+ var mtd = 6;
}
if (this.graf!="y"&&this.graf!="Y") {
this.graf = "n";
}
exprs[5-1] = "n";
exprs[4-1] = sci2exp(mtd);
- METHOD = getmethod(mtd);
+ var METHOD = getmethod(mtd);
if (!Ask_again) {
this.xx = this.xx.slice();
this.yy = this.yy.slice();
- [nx,mx] = size(this.xx);
- [ny,my] = size(this.yy);
- [nz,mz] = size(this.zz);
+ var tmpvar0 = size(this.xx)
+ var nx = tmpvar0[0]
+ var mx = tmpvar0[1];
+ var tmpvar1 = size(this.yy)
+ var ny = tmpvar1[0]
+ var my = tmpvar1[1];
+ var tmpvar2 = size(this.zz)
+ var nz = tmpvar2[0]
+ var mz = tmpvar2[1];
if (((nx<=1)||(ny<=1))) {
x_message("input row/column data size should be greater than one");
- Ask_again = true;
+ var Ask_again = true;
}
if (!((nx==nz)&&(ny==mz))) {
x_message("incompatible size of x and y");
- Ask_again = true;
+ var Ask_again = true;
}
- [ok] = test_increasing(this.xx);
+ var tmpvar3 = test_increasing(this.xx)
+ var ok = tmpvar3[0];
if ((!ok)) {
x_message("Row input values must be monotonically increasing");
- Ask_again = true;
+ var Ask_again = true;
}
- [ok] = test_increasing(this.yy);
+ var tmpvar4 = test_increasing(this.yy)
+ var ok = tmpvar4[0];
if ((!ok)) {
x_message("Column input values must be monotonically increasing");
- Ask_again = true;
+ var Ask_again = true;
}
}
if (!Ask_again) {
if ((this.graf=="Y"||this.graf=="y")) {
- gh = gcf();
- curwin = gh.figure_id;
- save_curwin = curwin;
- gh2 = scf();
- curwin = max(winsid())+1;
+ var gh = gcf();
+ var curwin = gh.figure_id;
+ var save_curwin = curwin;
+ var gh2 = scf();
+ var curwin = max(winsid())+1;
plot3d(this.xx,this.yy,this.zz,35,45,"X@Y@Z",[5,2,4]);
- curwin = save_curwin;
+ var curwin = save_curwin;
gh.figure_id = curwin;
}
this.model.rpar = new ScilabDouble([this.xx.slice()],[this.yy.slice()],[this.zz.slice()]);
diff --git a/js/NonLinear/LOOKUP2D.pickle b/js/NonLinear/LOOKUP2D.pickle
index 2938eeb7..9caba996 100644
--- a/js/NonLinear/LOOKUP2D.pickle
+++ b/js/NonLinear/LOOKUP2D.pickle
@@ -21,27 +21,25 @@ p9
atp10
Rp11
.(dp0
-S'[ny,my]'
+S'exprs[4-1]'
p1
-S'double'
+S'string'
p2
-sS'[nx,mx]'
-p3
-g2
sS'arg1'
-p4
+p3
S'object'
-p5
+p4
sS'SaveExit'
-p6
+p5
S'boolean'
-p7
+p6
sS'Nx'
+p7
+S'double'
p8
-g2
sS'Ny'
p9
-g2
+g8
sS'xx'
p10
S'vector'
@@ -52,101 +50,91 @@ S'matrix'
p13
sS'Ask_again'
p14
-g7
+g6
sS'model.out'
p15
-g2
+g8
sS'curwin'
p16
NsS'Method'
p17
-g2
+g8
sS'gh'
p18
-g5
-sS'[nz,mz]'
+g4
+sS'model.in1'
p19
-g2
-sS'exprs[4-1]'
+g13
+sS'gh2'
p20
-S'string'
+g8
+sS'gh.figure_id'
p21
-sS'gh2'
+NsS'METHOD'
p22
g2
-sS'gh.figure_id'
-p23
-NsS'METHOD'
-p24
-g21
sS'model.sim'
-p25
+p23
S'list'
-p26
-sS'model.in1'
-p27
-g13
+p24
sS'model.rpar'
-p28
+p25
g13
sS'yy'
-p29
+p26
g11
sS'exprs[5-1]'
-p30
-g21
+p27
+g2
sS'graphics'
-p31
-g5
+p28
+g4
sS'model.ipar'
-p32
+p29
g13
sS'typ'
-p33
+p30
g11
sS'Graf'
-p34
-g21
+p31
+g2
sS'model.blocktype'
-p35
-g21
+p32
+g2
sS'ok'
-p36
-g7
+p33
+g6
sS'save_curwin'
-p37
-NsS'[ok]'
-p38
-g2
-sS'x.graphics'
-p39
-g5
+p34
+NsS'x.graphics'
+p35
+g4
sS'x.model'
-p40
+p36
NsS'model.dep_ut'
-p41
+p37
g11
sS'exprs'
-p42
-g26
+p38
+g24
sS'gr_i'
-p43
+p39
g11
sS'mtd'
-p44
-g2
+p40
+g8
sS'graphics.exprs'
-p45
+p41
NsS'y'
-p46
+p42
g11
sS'x'
-p47
-g2
+p43
+g8
sS'model'
-p48
-g5
+p44
+g4
sS'graf'
-p49
-g21
+p45
+g2
s. \ No newline at end of file
diff --git a/js/NonLinear/LOOKUP_c.js b/js/NonLinear/LOOKUP_c.js
index 51ce5f2c..29655d2e 100644
--- a/js/NonLinear/LOOKUP_c.js
+++ b/js/NonLinear/LOOKUP_c.js
@@ -4,9 +4,9 @@ function LOOKUP_c() {
this.model = scicos_model();
this.xx = [[-1],[0.5],[1],[1.5],[2.5]];
this.yy = [[-6],[-1],[-3],[3],[-4]];
- N = length(this.xx);
+ var N = length(this.xx);
this.Method = 1;
- Graf = "n";
+ var Graf = "n";
this.model.sim = list(new ScilabString(["lookup_c"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1]);
this.model.in2 = new ScilabDouble([-2]);
@@ -21,8 +21,8 @@ function LOOKUP_c() {
this.model.evtin = [];
this.model.evtout = [];
this.model.firing = new ScilabDouble([0]);
- exprs = [[sci2exp(this.Method)],[sci2exp(this.xx)],[sci2exp(this.yy)],[sci2exp(0)],[Graf]];
- gr_i = [];
+ var exprs = [[sci2exp(this.Method)],[sci2exp(this.xx)],[sci2exp(this.yy)],[sci2exp(0)],[Graf]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -47,30 +47,30 @@ function LOOKUP_c() {
this.graf = arguments[0]["graf"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- ok = false;
- SaveExit = false;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var ok = false;
+ var SaveExit = false;
while (true) {
- Ask_again = false;
+ var Ask_again = false;
[ok,this.Method,this.xx,this.yy,this.extrapo,this.graf,exprs] = scicos_getvalue("Lookup table parameters",["Spline Interpolation method (0..9)","x","y","Extrapolate method (0,1)","Launch graphic window(y/n)?"],list("vec",1,"vec",-1,"vec",-1,"vec",1,"str",1),exprs);
if (!ok) {
break;
}
- PeriodicOption = "n";
+ var PeriodicOption = "n";
if (PeriodicOption=="y"||PeriodicOption=="Y") {
- PO = 1;
+ var PO = 1;
} else {
- PO = 0;
+ var PO = 0;
}
- mtd = int(this.Method);
+ var mtd = int(this.Method);
if (mtd<0) {
- mtd = 0;
+ var mtd = 0;
}
if (mtd>9) {
- mtd = 9;
+ var mtd = 9;
}
- METHOD = getmethod(mtd);
+ var METHOD = getmethod(mtd);
this.extrapo = int(this.extrapo);
if (this.extrapo<0) {
this.extrapo = 0;
@@ -81,45 +81,53 @@ function LOOKUP_c() {
if (!Ask_again) {
this.xx = this.xx.slice();
this.yy = this.yy.slice();
- [nx,mx] = size(this.xx);
- [ny,my] = size(this.yy);
+ var tmpvar0 = size(this.xx)
+ var nx = tmpvar0[0]
+ var mx = tmpvar0[1];
+ var tmpvar1 = size(this.yy)
+ var ny = tmpvar1[0]
+ var my = tmpvar1[1];
if (!((nx==ny)&&(mx==my))) {
x_message("incompatible size of x and y");
- Ask_again = true;
+ var Ask_again = true;
}
}
if (!Ask_again) {
this.xy = [this.xx,this.yy];
- [this.xy] = cleandata(this.xy);
- N = size(this.xy,"r");
+ var tmpvar2 = cleandata(this.xy)
+ this.xy = tmpvar2[0];
+ var N = size(this.xy,"r");
exprs[5-1] = "n";
if (this.graf=="y"||this.graf=="Y") {
- ipar = [[N],[mtd],[PO],[this.extrapo]];
- rpar = [];
+ var ipar = [[N],[mtd],[PO],[this.extrapo]];
+ var rpar = [];
if (!exists("curwin")) {
- gh = gcf();
+ var gh = gcf();
this.curwin = gh.figure_id;
}
- save_curwin = this.curwin;
+ var save_curwin = this.curwin;
this.curwin = max(winsid())+1;
- [orpar,oipar,ok] = poke_point(this.xy,ipar,rpar);
+ var tmpvar3 = poke_point(this.xy,ipar,rpar)
+ var orpar = tmpvar3[0]
+ var oipar = tmpvar3[1]
+ var ok = tmpvar3[2];
this.curwin = save_curwin;
if (!ok) {
break;
}
- N2 = oipar[1-1];
- xy2 = [orpar.slice(1-1,N2),orpar.slice(N2+1-1,2*N2)];
- New_methhod = oipar[2-1];
- DChange = false;
- METHOD = getmethod(New_methhod);
+ var N2 = oipar[1-1];
+ var xy2 = [orpar.slice(1-1,N2),orpar.slice(N2+1-1,2*N2)];
+ var New_methhod = oipar[2-1];
+ var DChange = false;
+ var METHOD = getmethod(New_methhod);
if (or(this.xy.slice()[1-1]!=xy2.slice()[1-1])) {
- DChange = true;
+ var DChange = true;
}
if (or(this.xy.slice(1-1,N-1)[2-1]!=xy2.slice(1-1,N2-1)[2-1])) {
- DChange = true;
+ var DChange = true;
}
if ((this.xy[N-1][2-1]!=xy2[N2-1][2-1]&&(METHOD!="periodic"))) {
- DChange = true;
+ var DChange = true;
}
if (DChange) {
exprs[2-1] = strcat(sci2exp(xy2.slice()[1-1]));
@@ -128,30 +136,33 @@ function LOOKUP_c() {
exprs[1-1] = sci2exp(New_methhod);
exprs[4-1] = sci2exp(oipar[4-1]);
if (oipar[3-1]==1) {
- perop = "y";
+ var perop = "y";
} else {
- perop = "n";
+ var perop = "n";
}
- SaveExit = true;
+ var SaveExit = true;
} else {
- [Xdummy,Ydummy,orpar] = Do_Spline(N,mtd,this.xy.slice()[1-1],this.xy.slice()[2-1],this.xy[$-1][1-1],this.xy[1-1][1-1],0);
+ var tmpvar4 = Do_Spline(N,mtd,this.xy.slice()[1-1],this.xy.slice()[2-1],this.xy[$-1][1-1],this.xy[1-1][1-1],0)
+ var Xdummy = tmpvar4[0]
+ var Ydummy = tmpvar4[1]
+ var orpar = tmpvar4[2];
if ((METHOD=="periodic")) {
this.xy[N-1][2-1] = this.xy[1-1][2-1];
}
if ((METHOD=="order 2"||METHOD=="not_a_knot"||METHOD=="periodic"||METHOD=="monotone"||METHOD=="fast"||METHOD=="clamped")) {
- orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]],[orpar]];
+ var orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]],[orpar]];
} else {
if ((METHOD=="zero order-below"||METHOD=="linear"||METHOD=="zero order-above"||METHOD=="zero order-nearest")) {
- orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]]];
+ var orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]]];
}
}
exprs[1-1] = sci2exp(mtd);
- oipar = [[N],[mtd],[PO],[this.extrapo]];
- SaveExit = true;
+ var oipar = [[N],[mtd],[PO],[this.extrapo]];
+ var SaveExit = true;
}
}
if ((SaveExit)) {
- xp = find(orpar.slice(1-1,oipar[1-1])>=0);
+ var xp = find(orpar.slice(1-1,oipar[1-1])>=0);
if ((xp!=[])) {
this.model.firing = new ScilabDouble([orpar[xp[1-1]-1]]);
} else {
diff --git a/js/NonLinear/LOOKUP_c.pickle b/js/NonLinear/LOOKUP_c.pickle
index d4d742be..1d90ff33 100644
--- a/js/NonLinear/LOOKUP_c.pickle
+++ b/js/NonLinear/LOOKUP_c.pickle
@@ -155,788 +155,716 @@ S'string'
p4
sS'Sin_exprs'
p5
-NsS'ya'
+NsS'xenR'
p6
S'double'
p7
-sS'xenR'
+sS'x2'
p8
-g7
-sS'[orpar,oipar]'
-p9
-g7
+g4
sS'Y[j-1]'
-p10
-g7
-sS'NC'
-p11
+p9
g7
sS'Ask_again'
-p12
+p10
S'boolean'
-p13
+p11
sS'y1'
-p14
+p12
g4
sS'Amp3'
-p15
+p13
g2
sS'curwin'
-p16
+p14
NsS'Standm'
-p17
+p15
g4
sS'xenC'
-p18
+p16
g4
sS'yenR'
-p19
+p17
g7
sS'gh'
-p20
+p18
S'object'
-p21
+p19
sS'a.title.text'
-p22
+p20
g2
sS'xmn'
-p23
+p21
g7
sS'x1'
-p24
+p22
g4
-sS'y2p'
-p25
-g7
sS'lx21'
-p26
+p23
g7
sS'xstC'
-p27
+p24
g4
sS'ymx'
-p28
+p25
g7
sS'Zt'
-p29
+p26
S'matrix'
-p30
-sS'[this.xy,rpar,ipar]'
-p31
-g7
-sS'[xtt,k2]'
-p32
-g7
+p27
sS'Bt'
-p33
-g30
+p28
+g27
sS'a.title.font_size'
-p34
+p29
g7
sS'xmx'
-p35
+p30
g7
sS'x1p'
-p36
+p31
g7
sS'random_n_exprs'
-p37
+p32
S'list'
-p38
+p33
sS'a.axes_visible'
-p39
+p34
g4
sS'METHOD'
-p40
+p35
g7
sS'PeriodicOption'
-p41
+p36
g4
sS'ymn'
-p42
+p37
g7
sS'NOrder'
-p43
+p38
g7
sS'var4'
-p44
+p39
g2
sS'xa'
-p45
+p40
g7
sS'yo'
-p46
+p41
g7
sS'y22'
-p47
+p42
g4
-sS'[sok]'
-p48
+sS'ya'
+p43
g7
sS'YMX'
-p49
+p44
g7
sS'yc'
-p50
+p45
g7
sS'a.title.foreground'
-p51
+p46
g7
sS'model.rpar'
-p52
-g30
+p47
+g27
sS'yy'
-p53
-g30
+p48
+g27
sS'sok'
-p54
-g13
+p49
+g11
sS'Pulse_exprs'
-p55
+p50
NsS'dx'
-p56
+p51
g7
sS'dy'
-p57
+p52
g7
sS'random_n_exprs2'
-p58
-g38
+p53
+g33
sS'a.clip_state'
-p59
+p54
g4
sS'yt'
-p60
+p55
g7
sS'model.blocktype'
-p61
-g4
-sS'x21'
-p62
+p56
g4
sS'save_curwin'
-p63
+p57
NsS'oipar'
-p64
+p58
NsS'MENU'
-p65
+p59
g2
sS't4'
-p66
+p60
g4
sS't5'
-p67
+p61
g4
sS't2'
-p68
+p62
g4
sS'x.model'
-p69
+p63
NsS'model.dep_ut'
-p70
+p64
g2
sS'menu_s'
-p71
+p65
g2
sS'Sawt1_exprs'
-p72
+p66
NsS'sample4'
-p73
+p67
g2
sS'sTp2'
-p74
+p68
g2
sS'x'
-p75
+p69
g7
sS'x12'
-p76
+p70
g4
-sS'[ny,my]'
-p77
-g7
sS'exprs[1-1]'
-p78
+p71
g4
sS'points.data'
-p79
+p72
g2
sS'j'
-p80
+p73
g4
-sS'[nx,mx]'
-p81
-g7
sS'x11'
-p82
+p74
g4
sS'arg1'
-p83
-g21
+p75
+g19
sS'Pd3'
-p84
+p76
g2
sS't3'
-p85
+p77
g4
sS'ey'
-p86
+p78
g7
sS'ex'
-p87
+p79
g7
sS'xmn1'
-p88
+p80
g7
sS'sAmp'
-p89
+p81
g2
sS'a.children[2-1]'
-p90
-g21
+p82
+g19
sS'sample5'
-p91
+p83
g2
sS'a.title.font_style'
-p92
+p84
g7
sS'y2'
-p93
+p85
g4
sS'orpar'
-p94
+p86
g2
sS'x.graphics'
-p95
-g21
-sS'A[j+2-1][i+N+1-1]'
-p96
-g7
+p87
+g19
sS'menu_d'
-p97
+p88
g2
sS'menu_e'
-p98
+p89
g2
sS'A[j+1-1][i+N-1]'
-p99
+p90
g7
sS'a.children[1-1]'
-p100
-g21
+p91
+g19
sS'y1p'
-p101
+p92
g7
sS'r'
-p102
+p93
g4
sS'seed4'
-p103
+p94
g2
sS'seed5'
-p104
+p95
g2
sS'B[j+1-1]'
-p105
+p96
g7
sS'model.evtin'
-p106
+p97
g2
sS'y21'
-p107
+p98
g4
sS'menu_t'
-p108
+p99
g2
sS'menu_r'
-p109
+p100
g2
sS'PO'
-p110
+p101
g7
sS'x22'
-p111
+p102
g4
sS'C'
-p112
+p103
g2
sS'DChange'
-p113
-g13
+p104
+g11
sS'Cformat'
-p114
+p105
g4
-sS'[Xdummy,Ydummy,orpar]'
-p115
+sS'Q[i+N-1][i-1]'
+p106
g7
sS'rep'
-p116
+p107
g7
sS'model.out2'
-p117
+p108
g7
sS'xy[N-1][2-1]'
-p118
+p109
g7
sS'sTp'
-p119
+p110
g2
sS'wp'
-p120
+p111
g2
-sS'ystC'
-p121
-g4
sS'New_methhod'
-p122
+p112
g7
sS'PeridicOption'
-p123
+p113
g7
sS'Graf'
-p124
+p114
g4
sS'Q'
-p125
+p115
g7
sS'ok'
-p126
-g13
+p116
+g11
sS'ly11'
-p127
+p117
g7
sS'xy[k-1].slice()'
-p128
+p118
g2
sS'Z'
-p129
+p119
g2
sS'Cmenu'
-p130
+p120
g4
-sS'[xo,k2]'
-p131
-g7
sS'periodicoption'
-p132
+p121
g7
sS'w'
-p133
+p122
g4
sS'random_u_exprs2'
-p134
-g38
+p123
+g33
sS'model.outtyp'
-p135
+p124
g7
sS'A[j+1-1][i+2*N-1]'
-p136
+p125
g7
sS'YMN'
-p137
+p126
g7
sS'Q[i-1][i+N-1]'
-p138
+p127
g7
sS'y11'
-p139
+p128
g4
sS'x2p'
-p140
+p129
g7
sS'y12'
-p141
+p130
g4
-sS'Lx'
-p142
-g7
-sS'py'
-p143
+sS'NC'
+p131
g7
sS'xyt'
-p144
+p132
g2
sS'xo'
-p145
-g30
+p133
+g27
sS'ipar[2-1]'
-p146
-g7
-sS'[mv,nv]'
-p147
+p134
g7
sS'xc'
-p148
+p135
g7
sS'extrapo'
-p149
+p136
g7
sS'offset'
-p150
+p137
g2
sS'splines.data'
-p151
+p138
g2
sS'perop'
-p152
+p139
g4
sS'xe'
-p153
+p140
g7
sS'Y'
-p154
-g30
+p141
+g27
sS'xx'
-p155
-g30
+p142
+g27
sS'xy'
-p156
+p143
g2
sS'btn'
-p157
+p144
g7
sS'xye'
-p158
+p145
g2
sS'SaveExit'
-p159
-g13
+p146
+g11
sS'xp'
-p160
+p147
g7
sS'Method'
-p161
+p148
g7
sS'xt'
-p162
-g30
+p149
+g27
sS'xyo'
-p163
+p150
g2
sS'Q[i-1][i-1]'
-p164
+p151
g7
sS'ystR'
-p165
+p152
g7
sS'A[j-1][i+2*N-1]'
-p166
+p153
g7
sS'ipar[4-1]'
-p167
+p154
g7
sS'px'
-p168
+p155
g7
-sS'[orpar,oipar,ok]'
-p169
+sS'py'
+p156
g7
sS'splines'
-p170
+p157
NsS'tok'
-p171
-g13
+p158
+g11
sS'ixy'
-p172
+p159
g2
sS'rect'
-p173
-g30
+p160
+g27
sS'NP'
-p174
+p161
g7
sS'Amp'
-p175
+p162
g2
-sS'x2'
-p176
-g4
sS'exprs[2-1]'
-p177
+p163
g7
sS'model.firing'
-p178
+p164
g7
sS'xy2'
-p179
+p165
g2
sS'B'
-p180
+p166
g7
sS'A'
-p181
-g7
-sS'[Value,TextInd]'
-p182
+p167
g7
sS'yenC'
-p183
+p168
g4
sS'N'
-p184
-g7
-sS'[this.xye]'
-p185
+p169
g7
sS'random_u_exprs'
-p186
-g38
+p170
+g33
sS'Sawt2_exprs'
-p187
-NsS'[btn,xc,yc,win,Cmenu]'
-p188
+p171
+NsS'XMX'
+p172
g7
sS'a.x_ticks'
-p189
-g21
+p173
+g19
sS'graphics'
-p190
-g21
+p174
+g19
sS'Exitm'
-p191
+p175
g4
sS'N2'
-p192
+p176
g7
sS'model.ipar'
-p193
-g30
-sS'[xyo]'
-p194
-g7
+p177
+g27
sS'Pw3'
-p195
+p178
g2
sS'f'
-p196
+p179
g7
sS'a.grid'
-p197
+p180
g2
sS'y[N-1]'
-p198
-g7
-sS'[dca,k]'
-p199
-g7
-sS'[this.xt,k2]'
-p200
-g7
-sS'[this.xy]'
-p201
+p181
g7
sS'gr_i'
-p202
+p182
g2
sS'ipar'
-p203
+p183
g2
-sS'[rpar,ipar]'
-p204
-g7
+sS'ystC'
+p184
+g4
sS'mtd'
-p205
+p185
g7
sS'PERIODIC'
-p206
+p186
g4
sS'xmx1'
-p207
+p187
g7
sS'scam'
-p208
+p188
g4
sS'exprs[4-1]'
-p209
+p189
g4
sS'ans0'
-p210
+p190
g4
sS'ymn1'
-p211
+p191
g7
sS't1'
-p212
+p192
g4
sS'model.evtout'
-p213
+p193
g2
sS'rpar'
-p214
+p194
g2
sS'lx11'
-p215
+p195
g7
sS'np5'
-p216
+p196
g2
sS'Bias3'
-p217
+p197
g2
sS'Tp3'
-p218
+p198
g2
sS'model.out'
-p219
+p199
g7
sS'np4'
-p220
+p200
g2
sS'rectx'
-p221
+p201
g7
sS'np1'
-p222
-g7
-sS'[X,Y,orpar]'
-p223
+p202
g7
-sS'[xy]'
-p224
+sS'Lx'
+p203
g7
+sS'x21'
+p204
+g4
sS'model.in2'
-p225
+p205
g7
sS'model.in1'
-p226
+p206
g7
sS'x[k-1]'
-p227
+p207
g2
sS'HIT'
-p228
-g13
+p208
+g11
sS'xstR'
-p229
+p209
g7
sS'ymx1'
-p230
+p210
g7
sS'A[j+1-1][i-1]'
-p231
+p211
g7
sS'sAmp2'
-p232
+p212
g2
sS'TN'
-p233
+p213
g2
sS'menus'
-p234
-g38
+p214
+g33
sS'sdelay'
-p235
+p215
g2
sS'points'
-p236
-NsS'[lhs,rhs]'
-p237
-g7
-sS'Q[i+N-1][i+N-1]'
-p238
+p216
+NsS'Q[i+N-1][i+N-1]'
+p217
g7
sS'TA'
-p239
-g30
+p218
+g27
sS'Datam'
-p240
+p219
g4
sS'model.sim'
-p241
-g38
+p220
+g33
sS'XMN'
-p242
+p221
g7
-sS'[tok,xytt]'
-p243
+sS'A[j+2-1][i+N+1-1]'
+p222
g7
sS'a.data_bounds'
-p244
+p223
g7
sS'menu_o'
-p245
+p224
g2
sS'd'
-p246
+p225
g7
sS'ye'
-p247
+p226
g7
sS'X'
-p248
-g30
-sS'[fd,SST,Sheetnames,Sheetpos]'
-p249
+p227
+g27
+sS'y2p'
+p228
g7
sS'fd'
-p250
+p229
g7
sS'exprs[5-1]'
-p251
+p230
g4
sS'graphics.exprs'
-p252
+p231
NsS'phase'
-p253
+p232
g7
sS'typ'
-p254
+p233
g2
sS'min5'
-p255
+p234
g2
-sS'[nD,mD]'
-p256
-g7
sS'a'
-p257
-g21
+p235
+g19
sS'mok'
-p258
-g13
+p236
+g11
sS'Orderm'
-p259
+p237
g4
sS'A[j+2-1][i+N-1]'
-p260
+p238
g7
sS'B[j-1]'
-p261
+p239
g7
sS'ly21'
-p262
+p240
g7
sS'A[j+2-1][i-1]'
-p263
+p241
g7
sS'max5'
-p264
+p242
g2
sS'exprs'
-p265
-g30
+p243
+g27
sS'exprs[3-1]'
-p266
+p244
g7
sS'y[k-1]'
-p267
+p245
g2
sS'At'
-p268
-g30
+p246
+g27
sS'y'
-p269
-g7
-sS'XMX'
-p270
+p247
g7
sS'model'
-p271
-g21
+p248
+g19
sS'order'
-p272
-g7
-sS'Q[i+N-1][i-1]'
-p273
+p249
g7
s. \ No newline at end of file
diff --git a/js/NonLinear/LOOKUP_f.js b/js/NonLinear/LOOKUP_f.js
index cb9d3d7d..9724bd70 100644
--- a/js/NonLinear/LOOKUP_f.js
+++ b/js/NonLinear/LOOKUP_f.js
@@ -8,7 +8,7 @@ function LOOKUP_f() {
this.model.rpar = new ScilabDouble([-2],[-1],[1],[2],[-1],[1],[-1],[1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -22,27 +22,31 @@ function LOOKUP_f() {
}
LOOKUP_f.prototype.set = function LOOKUP_f() {
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- rpar = this.model.rpar;
- n = size(rpar,"*")/2;
- xx = rpar.slice(1-1,n);
- yy = rpar.slice(n+1-1,2*n);
+ var rpar = this.model.rpar;
+ var n = size(rpar,"*")/2;
+ var xx = rpar.slice(1-1,n);
+ var yy = rpar.slice(n+1-1,2*n);
while (true) {
[ln,fun]=where()
if (!or(fun=="do_eval")) {
- [xx,yy,ok,gc] = edit_curv(xx,yy,"axy");
+ var tmpvar0 = edit_curv(xx,yy,"axy")
+ var xx = tmpvar0[0]
+ var yy = tmpvar0[1]
+ var ok = tmpvar0[2]
+ var gc = tmpvar0[3];
} else {
- ok = true;
+ var ok = true;
}
if (!ok) {
break;
}
- n = size(xx,"*");
+ var n = size(xx,"*");
if (or(xx.slice(2-1,n)-xx.slice(1-1,n-1)<=0)) {
message("You have not defined a function");
- ok = false;
+ var ok = false;
}
if (ok) {
this.model.rpar = new ScilabDouble([xx.slice()],[yy.slice()]);
diff --git a/js/NonLinear/LOOKUP_f.pickle b/js/NonLinear/LOOKUP_f.pickle
index 51951b20..0a9d52d0 100644
--- a/js/NonLinear/LOOKUP_f.pickle
+++ b/js/NonLinear/LOOKUP_f.pickle
@@ -9,74 +9,71 @@ p3
atp4
Rp5
.(dp0
-S'arg1'
+S'model.sim'
p1
-S'object'
+S'string'
p2
-sS'rpar'
+sS'model.in1'
p3
-NsS'x.model'
+S'double'
p4
-g2
-sS'model.out'
+sS'ok'
p5
-S'double'
+S'boolean'
p6
-sS'model.in1'
+sS'model.blocktype'
p7
-g6
+g2
sS'x.graphics'
p8
-g2
-sS'model.sim'
+S'object'
p9
-S'string'
+sS'arg1'
p10
-sS'model.rpar'
+g9
+sS'x.model'
p11
-S'matrix'
+g9
+sS'model.rpar'
p12
-sS'yy'
+S'matrix'
p13
-S'vector'
+sS'rpar'
p14
-sS'graphics'
+NsS'yy'
p15
-g2
-sS'typ'
+S'vector'
p16
-g14
-sS'[xx,yy,ok,gc]'
+sS'exprs'
p17
-g6
-sS'ok'
+NsS'xx'
p18
-S'boolean'
+g16
+sS'gr_i'
p19
-sS'model.blocktype'
+g16
+sS'model.dep_ut'
p20
-g10
-sS'xx'
+g16
+sS'graphics'
p21
-g14
-sS'model.dep_ut'
+g9
+sS'y'
p22
-g14
-sS'n'
+g16
+sS'x'
p23
-g6
-sS'exprs'
+g4
+sS'model'
p24
-NsS'gr_i'
+g9
+sS'n'
p25
-g14
-sS'y'
+g4
+sS'typ'
p26
-g14
-sS'x'
+g16
+sS'model.out'
p27
-g6
-sS'model'
-p28
-g2
+g4
s. \ No newline at end of file
diff --git a/js/NonLinear/MAXMIN.js b/js/NonLinear/MAXMIN.js
index 44dd32f3..c973c2c3 100644
--- a/js/NonLinear/MAXMIN.js
+++ b/js/NonLinear/MAXMIN.js
@@ -8,8 +8,8 @@ function MAXMIN() {
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
this.model.ipar = new ScilabDouble([0]);
- exprs = [string(transpose([2,1,1]))];
- gr_i = [];
+ var exprs = [string(transpose([2,1,1]))];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
this.x.graphics.style = "MAXMIN;displayedLabel=MAX";
return new BasicBlock(this.x);
@@ -30,8 +30,8 @@ function MAXMIN() {
this.nin = arguments[0]["nin"]
this.zcr = parseFloat(arguments[0]["zcr"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.mm,this.nin,this.zcr,exprs] = scicos_getvalue("Set Max/Min block parameters",["Min (1) or Max (2) ","Number of input vectors (1 or 2)","zero-crossing (1: yes, 0;no)"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -46,13 +46,19 @@ function MAXMIN() {
}
if (this.nin!=1&&this.nin!=2) {
message("Wrong number of inputs, only 1 and 2 allowed");
- ok = false;
+ var ok = false;
}
if (ok) {
if (this.nin==1) {
- [this.model,graphics,ok] = check_io(this.model,graphics,-1,1,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,-1,1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,[-1,-1],-1,[],[]);
+ var tmpvar1 = check_io(this.model,graphics,[-1,-1],-1,[],[])
+ this.model = tmpvar1[0]
+ var graphics = tmpvar1[1]
+ var ok = tmpvar1[2];
}
}
if (ok) {
@@ -64,9 +70,9 @@ function MAXMIN() {
}
this.model.ipar = new ScilabDouble([this.mm]);
if (this.mm==1) {
- label = "MIN";
+ var label = "MIN";
} else {
- label = "MAX";
+ var label = "MAX";
}
graphics.style = "MAXMIN;displayedLabel="+label;
graphics.exprs = exprs;
diff --git a/js/NonLinear/MAXMIN.pickle b/js/NonLinear/MAXMIN.pickle
index 9d62f4c2..71538e9d 100644
--- a/js/NonLinear/MAXMIN.pickle
+++ b/js/NonLinear/MAXMIN.pickle
@@ -52,49 +52,46 @@ sS'model.sim'
p15
S'list'
p16
-sS'[this.model,graphics,ok]'
-p17
-g16
sS'model.nmode'
-p18
+p17
g6
sS'graphics.exprs'
-p19
+p18
NsS'x.graphics.style'
-p20
+p19
g9
sS'model.ipar'
-p21
+p20
g6
sS'model.nzcross'
-p22
+p21
g6
sS'ok'
-p23
+p22
S'boolean'
-p24
+p23
sS'model.blocktype'
-p25
+p24
g9
sS'mm'
-p26
+p25
g6
sS'model.dep_ut'
-p27
+p26
g13
sS'exprs'
-p28
+p27
g13
sS'gr_i'
-p29
+p28
g13
sS'y'
-p30
+p29
g13
sS'x'
-p31
+p30
g6
sS'model'
-p32
+p31
g2
s. \ No newline at end of file
diff --git a/js/NonLinear/MAX_f.js b/js/NonLinear/MAX_f.js
index 9a8719df..7bbbd11b 100644
--- a/js/NonLinear/MAX_f.js
+++ b/js/NonLinear/MAX_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/NonLinear/MAX_f.sci" */
function MAX_f() {
MAX_f.prototype.define = function MAX_f() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = new ScilabString(["maxblk"]);
this.model.in1 = new ScilabDouble([in1]);
@@ -9,8 +9,8 @@ function MAX_f() {
this.model.dstate = new ScilabDouble([0],[0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/NonLinear/MIN_f.js b/js/NonLinear/MIN_f.js
index 7c4a9e88..ff7b5cc0 100644
--- a/js/NonLinear/MIN_f.js
+++ b/js/NonLinear/MIN_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/NonLinear/MIN_f.sci" */
function MIN_f() {
MIN_f.prototype.define = function MIN_f() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = new ScilabString(["minblk"]);
this.model.in1 = new ScilabDouble([in1]);
@@ -9,8 +9,8 @@ function MIN_f() {
this.model.dstate = new ScilabDouble([0],[0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = sci2exp(in1);
- gr_i = [];
+ var exprs = sci2exp(in1);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/NonLinear/POWBLK_f.js b/js/NonLinear/POWBLK_f.js
index b094c25a..aa5793da 100644
--- a/js/NonLinear/POWBLK_f.js
+++ b/js/NonLinear/POWBLK_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/NonLinear/POWBLK_f.sci" */
function POWBLK_f() {
POWBLK_f.prototype.define = function POWBLK_f() {
- in1 = 1;
+ var in1 = 1;
this.a = 1.5;
this.model = scicos_model();
this.model.sim = new ScilabString(["powblk"]);
@@ -10,8 +10,8 @@ function POWBLK_f() {
this.model.rpar = new ScilabDouble([this.a]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = string(this.a);
- gr_i = [];
+ var exprs = string(this.a);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -26,11 +26,11 @@ function POWBLK_f() {
POWBLK_f.prototype.set = function POWBLK_f() {
this.a = parseFloat(arguments[0]["a"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[2-1];
+ var exprs = exprs[2-1];
}
while (true) {
[ok,this.a,exprs] = scicos_getvalue("Set u^a block parameters","to the power of",list("vec",1),exprs);
diff --git a/js/NonLinear/PRODUCT.js b/js/NonLinear/PRODUCT.js
index e8f0287f..4ff4f86f 100644
--- a/js/NonLinear/PRODUCT.js
+++ b/js/NonLinear/PRODUCT.js
@@ -9,8 +9,8 @@ function PRODUCT() {
this.model.ipar = new ScilabDouble(this.sgn);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = sci2exp(this.sgn);
- gr_i = [];
+ var exprs = sci2exp(this.sgn);
+ var gr_i = [];
this.x = standard_define([2,3],this.model,exprs,gr_i);
return new Product(this.x);
}
@@ -25,9 +25,9 @@ function PRODUCT() {
PRODUCT.prototype.set = function PRODUCT() {
this.sgn = inverse(arguments[0]["sgn"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.sgn,exprs] = scicos_getvalue([[" Set multiplication block parameters"],["(multiplication is set with + 1, division with -1)"],[""]],"Number of inputs or sign vector",list("vec",-1),exprs);
if (!ok) {
@@ -37,27 +37,30 @@ function PRODUCT() {
if (size(this.sgn,1)==1) {
if (this.sgn<1) {
message("Number of inputs must be > 0");
- ok = false;
+ var ok = false;
} else if (this.sgn==1) {
- in1 = -1;
+ var in1 = -1;
this.sgn = [];
- nout = 1;
+ var nout = 1;
} else {
- in1 = -ones(this.sgn,1);
+ var in1 = -ones(this.sgn,1);
this.sgn = ones(this.sgn,1);
- nout = -1;
+ var nout = -1;
}
} else {
if (!and(abs(this.sgn)==1)) {
message("Signs can only be +1 or -1");
- ok = false;
+ var ok = false;
} else {
- in1 = -ones(size(this.sgn,1),1);
- nout = -1;
+ var in1 = -ones(size(this.sgn,1),1);
+ var nout = -1;
}
}
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,in1,nout,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,in1,nout,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.ipar = new ScilabDouble([this.sgn]);
diff --git a/js/NonLinear/PRODUCT.pickle b/js/NonLinear/PRODUCT.pickle
index 9367a9b3..53adad8f 100644
--- a/js/NonLinear/PRODUCT.pickle
+++ b/js/NonLinear/PRODUCT.pickle
@@ -11,75 +11,72 @@ p4
atp5
Rp6
.(dp0
-S'arg1'
+S'model.sim'
p1
-S'object'
+S'list'
p2
-sS'graphics'
+sS'model.in1'
p3
-g2
-sS'x.model'
+S'matrix'
p4
-NsS'sgn'
+sS'ok'
p5
-S'matrix'
+S'boolean'
p6
-sS'model.out'
+sS'model.blocktype'
p7
-S'double'
+S'string'
p8
-sS'model.in1'
-p9
-g6
sS'x.graphics'
+p9
+S'object'
p10
-g2
-sS'model.sim'
+sS'arg1'
p11
-S'list'
+g10
+sS'sgn'
p12
-sS'[this.model,graphics,ok]'
-p13
-g12
+g4
sS'in1'
+p13
+S'double'
p14
-g8
-sS'graphics.exprs'
+sS'model.out'
p15
-NsS'model.ipar'
+g14
+sS'exprs'
p16
-g6
-sS'typ'
+g8
+sS'x.model'
p17
-S'vector'
+NsS'gr_i'
p18
-sS'ok'
+S'vector'
p19
-S'boolean'
+sS'model.dep_ut'
p20
-sS'model.blocktype'
+g19
+sS'graphics.exprs'
p21
-S'string'
+NsS'graphics'
p22
-sS'model.dep_ut'
+g10
+sS'y'
p23
-g18
-sS'exprs'
+g19
+sS'x'
p24
-g22
-sS'gr_i'
+g14
+sS'model'
p25
-g18
-sS'y'
+g10
+sS'model.ipar'
p26
-g18
-sS'x'
+g4
+sS'typ'
p27
-g8
-sS'model'
-p28
-g2
+g19
sS'nout'
-p29
-g8
+p28
+g14
s. \ No newline at end of file
diff --git a/js/NonLinear/QUANT_f.js b/js/NonLinear/QUANT_f.js
index cc2cc43c..083c1e22 100644
--- a/js/NonLinear/QUANT_f.js
+++ b/js/NonLinear/QUANT_f.js
@@ -11,8 +11,8 @@ function QUANT_f() {
this.model.ipar = new ScilabDouble([this.meth]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.pas)],[string(this.meth)]];
- gr_i = [];
+ var exprs = [[string(this.pas)],[string(this.meth)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -30,8 +30,8 @@ function QUANT_f() {
this.pas = parseFloat(arguments[0]["pas"])
this.meth = parseFloat(arguments[0]["meth"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.pas,this.meth,exprs] = scicos_getvalue("Set parameters",["Step","Quantization Type (1-4)"],list("vec",1,"vec",1),exprs);
@@ -41,7 +41,7 @@ function QUANT_f() {
if (this.meth<1||this.meth>4) {
message("Quantization Type must be from 1 to 4");
} else {
- rpar = this.pas;
+ var rpar = this.pas;
this.model.rpar = new ScilabDouble([rpar]);
this.model.ipar = new ScilabDouble([this.meth]);
switch (this.meth) {
diff --git a/js/NonLinear/SATURATION.js b/js/NonLinear/SATURATION.js
index 28ddbc8f..76577e72 100644
--- a/js/NonLinear/SATURATION.js
+++ b/js/NonLinear/SATURATION.js
@@ -3,7 +3,7 @@ function SATURATION() {
SATURATION.prototype.define = function SATURATION() {
this.minp = -1;
this.maxp = 1;
- rpar = [[this.maxp],[this.minp]];
+ var rpar = [[this.maxp],[this.minp]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["satur"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([1]);
@@ -13,8 +13,8 @@ function SATURATION() {
this.model.rpar = new ScilabDouble(rpar);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.maxp)],[string(this.minp)],[string(this.model.nmode)]];
- gr_i = [];
+ var exprs = [[string(this.maxp)],[string(this.minp)],[string(this.model.nmode)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,8 +34,8 @@ function SATURATION() {
this.minp = parseFloat(arguments[0]["minp"])
this.zeroc = arguments[0]["zeroc"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.maxp,this.minp,this.zeroc,exprs] = scicos_getvalue("Set Saturation parameters",["Upper limit","Lower limit","zero crossing (0:no, 1:yes)"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -45,7 +45,7 @@ function SATURATION() {
if (this.maxp<=this.minp) {
message("Upper limit must be > Lower limit");
} else {
- rpar = [[this.maxp],[this.minp]];
+ var rpar = [[this.maxp],[this.minp]];
this.model.rpar = new ScilabDouble(rpar);
if (this.zeroc!=0) {
this.model.nzcross = new ScilabDouble([2]);
diff --git a/js/NonLinear/SAT_f.js b/js/NonLinear/SAT_f.js
index 30dc8d49..b3c1cb21 100644
--- a/js/NonLinear/SAT_f.js
+++ b/js/NonLinear/SAT_f.js
@@ -3,8 +3,8 @@ function SAT_f() {
SAT_f.prototype.define = function SAT_f() {
this.minp = -1;
this.maxp = 1;
- slope = 1;
- rpar = [[this.minp],[this.maxp],[slope]];
+ var slope = 1;
+ var rpar = [[this.minp],[this.maxp],[slope]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["lusat"]), new ScilabDouble([1]));
this.model.in1 = new ScilabDouble([1]);
@@ -13,8 +13,8 @@ function SAT_f() {
this.model.rpar = new ScilabDouble([this.minp],[this.maxp],[slope]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string(this.minp)],[string(this.maxp)],[string(slope)]];
- gr_i = [];
+ var exprs = [[string(this.minp)],[string(this.maxp)],[string(slope)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,8 +34,8 @@ function SAT_f() {
this.maxp = parseFloat(arguments[0]["maxp"])
this.pente = arguments[0]["pente"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.minp,this.maxp,this.pente,exprs] = scicos_getvalue("Set Saturation parameters",["Min","Max","Slope"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -47,7 +47,7 @@ function SAT_f() {
} else if (this.pente<=0) {
message("Slope must be strictly positive");
} else {
- rpar = [[this.minp/this.pente],[this.maxp/this.pente],[this.pente]];
+ var rpar = [[this.minp/this.pente],[this.maxp/this.pente],[this.pente]];
this.model.rpar = new ScilabDouble(rpar);
this.model.firing = [];
graphics.exprs = exprs;
diff --git a/js/NonLinear/SIGNUM.js b/js/NonLinear/SIGNUM.js
index fcef07ab..e62644ab 100644
--- a/js/NonLinear/SIGNUM.js
+++ b/js/NonLinear/SIGNUM.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/NonLinear/SIGNUM.sci" */
function SIGNUM() {
SIGNUM.prototype.define = function SIGNUM() {
- nu = -1;
+ var nu = -1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["signum"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([nu]);
@@ -10,8 +10,8 @@ function SIGNUM() {
this.model.nmode = new ScilabDouble([nu]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [string([1])];
- gr_i = [];
+ var exprs = [string([1])];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -27,8 +27,8 @@ function SIGNUM() {
SIGNUM.prototype.set = function SIGNUM() {
this.zcr = arguments[0]["zcr"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.zcr,exprs] = scicos_getvalue("Set block parameters",["use zero_crossing (1: yes) (0:no)"],list("vec",1),exprs);
diff --git a/js/NonLinear/SINBLK_f.js b/js/NonLinear/SINBLK_f.js
index 4235da70..0484cf15 100644
--- a/js/NonLinear/SINBLK_f.js
+++ b/js/NonLinear/SINBLK_f.js
@@ -7,8 +7,8 @@ function SINBLK_f() {
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/NonLinear/TANBLK_f.js b/js/NonLinear/TANBLK_f.js
index 80e107cb..1650e8f0 100644
--- a/js/NonLinear/TANBLK_f.js
+++ b/js/NonLinear/TANBLK_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/NonLinear/TANBLK_f.sci" */
function TANBLK_f() {
TANBLK_f.prototype.define = function TANBLK_f() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = new ScilabString(["tanblk"]);
this.model.in1 = new ScilabDouble([in1]);
this.model.out = new ScilabDouble([in1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = sci2exp(in1);
- gr_i = [];
+ var exprs = sci2exp(in1);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/NonLinear/TrigFun.js b/js/NonLinear/TrigFun.js
index 2e9e3965..d7168800 100644
--- a/js/NonLinear/TrigFun.js
+++ b/js/NonLinear/TrigFun.js
@@ -7,8 +7,8 @@ function TrigFun() {
this.model.out = new ScilabDouble([-1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = "sin";
- gr_i = [];
+ var exprs = "sin";
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -23,11 +23,11 @@ function TrigFun() {
TrigFun.prototype.set = function TrigFun() {
this.fun = arguments[0]["fun"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- PREVAR_FF = [["sin"],["cos"],["tan"],["asin"],["acos"],["atan"],["sinh"],["cosh"],["tanh"],["asinh"],["acosh"],["atanh"]];
- PREVAR_GG = [["Choose among "+strcat(PREVAR_FF.slice(1-1,4),", ")],[strcat(PREVAR_FF.slice(5-1,$),", ")]];
+ var PREVAR_FF = [["sin"],["cos"],["tan"],["asin"],["acos"],["atan"],["sinh"],["cosh"],["tanh"],["asinh"],["acosh"],["atanh"]];
+ var PREVAR_GG = [["Choose among "+strcat(PREVAR_FF.slice(1-1,4),", ")],[strcat(PREVAR_FF.slice(5-1,$),", ")]];
while (true) {
[ok,this.fun,exprs] = scicos_getvalue(PREVAR_GG,"Function",list("str",1),exprs);
if (!ok) {
diff --git a/js/PDE/PDE.js b/js/PDE/PDE.js
index 9e6318d6..222faab2 100644
--- a/js/PDE/PDE.js
+++ b/js/PDE/PDE.js
@@ -8,9 +8,9 @@ function PDE() {
this.model.out = new ScilabDouble([10],[0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- params_pde = tlist([["paramspde"],["a"],["b"],["txt_exp"],["check_op1"],["a1"],["b1"],["check_op2"],["a2"],["b2"],["check_op3"],["a3"],["b3"],["check_op4"],["a4"],["b4"],["check_op5"],["a5"],["b5"],["check_op6"],["a6"],["b6"],["check_op7"],["a7"],["b7"],["discr_cst"],["discr_non_cst"],["signe"],["rad_automatique"],["rad_manuel"],["methode"],["ord1"],["ord2"],["ord3"],["degre"],["nnode"],["txt_pas"],["CI"],["dCI"],["CLa"],["CLa_exp"],["CLb"],["CLb_exp"],["points"]],"","","","0","","IN_EDP1(t)","0","","IN_EDP2(t)","0","","IN_EDP3(t)","0","","IN_EDP4(t)","0","","IN_EDP5(t)","0","","IN_EDP6(t)","0","","IN_EDP7(t)","0","0","0","0","0","0","","","","","","","","","0","IN_CL1(t)","0","IN_CL2(t)","");
- label = list(params_pde,[],"");
- gr_i = [];
+ var params_pde = tlist([["paramspde"],["a"],["b"],["txt_exp"],["check_op1"],["a1"],["b1"],["check_op2"],["a2"],["b2"],["check_op3"],["a3"],["b3"],["check_op4"],["a4"],["b4"],["check_op5"],["a5"],["b5"],["check_op6"],["a6"],["b6"],["check_op7"],["a7"],["b7"],["discr_cst"],["discr_non_cst"],["signe"],["rad_automatique"],["rad_manuel"],["methode"],["ord1"],["ord2"],["ord3"],["degre"],["nnode"],["txt_pas"],["CI"],["dCI"],["CLa"],["CLa_exp"],["CLb"],["CLb_exp"],["points"]],"","","","0","","IN_EDP1(t)","0","","IN_EDP2(t)","0","","IN_EDP3(t)","0","","IN_EDP4(t)","0","","IN_EDP5(t)","0","","IN_EDP6(t)","0","","IN_EDP7(t)","0","0","0","0","0","0","","","","","","","","","0","IN_CL1(t)","0","IN_CL2(t)","");
+ var label = list(params_pde,[],"");
+ var gr_i = [];
this.x = standard_define([3,3],this.model,label,gr_i);
return new BasicBlock(this.x);
}
@@ -27,35 +27,101 @@ function PDE() {
this.rdnom = arguments[0]["rdnom"]
this.lab = arguments[0]["lab"]
this.x = arg1;
- graphics = arg1.graphics;
- label = graphics.exprs;
+ var graphics = arg1.graphics;
+ var label = graphics.exprs;
this.model = arg1.model;
- params_pde = label[1-1];
+ var params_pde = label[1-1];
while (true) {
[ln,fun]=where()
if (!or(fun=="do_eval")) {
- [ok,a_domaine,b_domaine,discr,signe,choix,type_meth,degre,Nbr_maillage,CI,CI1,CLa_type,CLa_exp,CLb_type,CLb_exp,oper,a1,b1,a2,b2,a3,b3,a4,b4,a5,b5,a6,b6,a7,b7,k,mesures,params_pde] = IHM_EDP(params_pde);
+ var tmpvar0 = IHM_EDP(params_pde)
+ var ok = tmpvar0[0]
+ var a_domaine = tmpvar0[1]
+ var b_domaine = tmpvar0[2]
+ var discr = tmpvar0[3]
+ var signe = tmpvar0[4]
+ var choix = tmpvar0[5]
+ var type_meth = tmpvar0[6]
+ var degre = tmpvar0[7]
+ var Nbr_maillage = tmpvar0[8]
+ var CI = tmpvar0[9]
+ var CI1 = tmpvar0[10]
+ var CLa_type = tmpvar0[11]
+ var CLa_exp = tmpvar0[12]
+ var CLb_type = tmpvar0[13]
+ var CLb_exp = tmpvar0[14]
+ var oper = tmpvar0[15]
+ var a1 = tmpvar0[16]
+ var b1 = tmpvar0[17]
+ var a2 = tmpvar0[18]
+ var b2 = tmpvar0[19]
+ var a3 = tmpvar0[20]
+ var b3 = tmpvar0[21]
+ var a4 = tmpvar0[22]
+ var b4 = tmpvar0[23]
+ var a5 = tmpvar0[24]
+ var b5 = tmpvar0[25]
+ var a6 = tmpvar0[26]
+ var b6 = tmpvar0[27]
+ var a7 = tmpvar0[28]
+ var b7 = tmpvar0[29]
+ var k = tmpvar0[30]
+ var mesures = tmpvar0[31]
+ var params_pde = tmpvar0[32];
if (ok) {
return;
}
} else {
if (exists("%scicos_context")) {
- [ok,a_domaine,b_domaine,discr,signe,choix,type_meth,degre,Nbr_maillage,CI,CI1,CLa_type,CLa_exp,CLb_type,CLb_exp,oper,a1,b1,a2,b2,a3,b3,a4,b4,a5,b5,a6,b6,a7,b7,k,mesures,params_pde] = setvalue_IHM_EDP(params_pde);
+ var tmpvar1 = setvalue_IHM_EDP(params_pde)
+ var ok = tmpvar1[0]
+ var a_domaine = tmpvar1[1]
+ var b_domaine = tmpvar1[2]
+ var discr = tmpvar1[3]
+ var signe = tmpvar1[4]
+ var choix = tmpvar1[5]
+ var type_meth = tmpvar1[6]
+ var degre = tmpvar1[7]
+ var Nbr_maillage = tmpvar1[8]
+ var CI = tmpvar1[9]
+ var CI1 = tmpvar1[10]
+ var CLa_type = tmpvar1[11]
+ var CLa_exp = tmpvar1[12]
+ var CLb_type = tmpvar1[13]
+ var CLb_exp = tmpvar1[14]
+ var oper = tmpvar1[15]
+ var a1 = tmpvar1[16]
+ var b1 = tmpvar1[17]
+ var a2 = tmpvar1[18]
+ var b2 = tmpvar1[19]
+ var a3 = tmpvar1[20]
+ var b3 = tmpvar1[21]
+ var a4 = tmpvar1[22]
+ var b4 = tmpvar1[23]
+ var a5 = tmpvar1[24]
+ var b5 = tmpvar1[25]
+ var a6 = tmpvar1[26]
+ var b6 = tmpvar1[27]
+ var a7 = tmpvar1[28]
+ var b7 = tmpvar1[29]
+ var k = tmpvar1[30]
+ var mesures = tmpvar1[31]
+ var params_pde = tmpvar1[32];
}
}
this.okk = false;
this.rdnom = "PDE";
- ok1 = true;
+ var ok1 = true;
while (true) {
[this.okk,this.rdnom,this.lab] = scicos_getvalue("PLEASE, GIVE US THE BLOCK\'s NAME. ","New block\'s name :",list("str",1),label[3-1]);
if (this.okk==false) {
- ok1 = false;
+ var ok1 = false;
return;
}
label[3-1] = this.lab;
this.rdnom = stripblanks(this.rdnom);
if (this.rdnom==emptystr()) {
- ok1 = false;
+ var ok1 = false;
x_message("sorry C file name not defined");
}
if (ok1) {
@@ -63,37 +129,41 @@ function PDE() {
}
}
if ((choix==0)) {
- ind4 = strindex(a4,"x");
- ind1 = strindex(a1,"x");
- ind2 = strindex(a2,"x");
+ var ind4 = strindex(a4,"x");
+ var ind1 = strindex(a1,"x");
+ var ind2 = strindex(a2,"x");
if ((ind4!=[]||ind1!=[]||ind2!=[])) {
if ((signe==1)) {
- delta = 1;
+ var delta = 1;
} else if ((signe==2)) {
- delta = -1;
+ var delta = -1;
} else if ((signe==0)) {
- delta = 0;
+ var delta = 0;
} else {
x_message([["le discriminant n\'est pas constant,"],["Vous devez choisir son signe dans l\'IHM"]]);
return;
}
} else {
- delta = evstr(a4)^2-4*evstr(a1)*evstr(a2);
+ var delta = evstr(a4)^2-4*evstr(a1)*evstr(a2);
}
if ((delta==[])) {
- delta = 0;
+ var delta = 0;
}
- type_meth = this.arbre_decision[delta-1];
+ var type_meth = arbre_decision(delta);
}
- [flag_type,this.rdnom,DF_type,tt] = translate(CI,CI1,CLa_type,CLa_exp,CLb_type,CLb_exp,oper,type_meth,degre,a_domaine,b_domaine,Nbr_maillage,a1,b1,a2,b2,a3,b3,a4,b4,a5,b5,a6,b6,a7,b7,this.rdnom,mesures);
- Nbr = Nbr_maillage;
+ var tmpvar2 = translate(CI,CI1,CLa_type,CLa_exp,CLb_type,CLb_exp,oper,type_meth,degre,a_domaine,b_domaine,Nbr_maillage,a1,b1,a2,b2,a3,b3,a4,b4,a5,b5,a6,b6,a7,b7,this.rdnom,mesures)
+ var flag_type = tmpvar2[0]
+ this.rdnom = tmpvar2[1]
+ var DF_type = tmpvar2[2]
+ var tt = tmpvar2[3];
+ var Nbr = Nbr_maillage;
if (((CLa_type==1)&&(DF_type==0||DF_type==1))||((CLb_type==1)&&(DF_type==0||DF_type==2))) {
- Nbr = Nbr+1;
+ var Nbr = Nbr+1;
}
if ((mesures==[])) {
- out = Nbr_maillage;
+ var out = Nbr_maillage;
} else {
- out = [[Nbr_maillage],[size(mesures,"*")]];
+ var out = [[Nbr_maillage],[size(mesures,"*")]];
}
if ((flag_type==1)) {
this.model.sim = list(new ScilabDouble([this.rdnom]), new ScilabDouble([2004]));
@@ -122,12 +192,16 @@ function PDE() {
}
}
}
- [ok1] = CFORTREDP(this.rdnom,tt);
+ var tmpvar3 = CFORTREDP(this.rdnom,tt)
+ var ok1 = tmpvar3[0];
if (!ok1) {
break;
}
if (!ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,ones(k,1),out.slice(),[],[]);
+ var tmpvar4 = check_io(this.model,graphics,ones(k,1),out.slice(),[],[])
+ this.model = tmpvar4[0]
+ var graphics = tmpvar4[1]
+ var ok = tmpvar4[2];
}
label[1-1] = params_pde;
label[2-1] = tt;
diff --git a/js/PDE/PDE.pickle b/js/PDE/PDE.pickle
index 827369c7..6b7cf86c 100644
--- a/js/PDE/PDE.pickle
+++ b/js/PDE/PDE.pickle
@@ -2,20 +2,18 @@ c__builtin__
set
p0
((lp1
-S'lab'
+S'x'
p2
-aS'rdnom'
+aS'model'
p3
-aS'arbre_decision'
+aS'okk'
p4
-aS'x'
+aS'lab'
p5
-aS'model'
+aS'rdnom'
p6
-aS'okk'
-p7
-atp8
-Rp9
+atp7
+Rp8
.(dp0
S'params_pde'
p1
@@ -25,104 +23,92 @@ sS'ok1'
p3
S'boolean'
p4
-sS'[ok,a_domaine,b_domaine,discr,signe,choix,type_meth,degre,Nbr_maillage,CI,CI1,CLa_type,CLa_exp,CLb_type,CLb_exp,oper,a1,b1,a2,b2,a3,b3,a4,b4,a5,b5,a6,b6,a7,b7,k,mesures,params_pde]'
-p5
-g2
sS'arg1'
-p6
+p5
S'object'
-p7
+p6
sS'graphics'
-p8
-g7
+p7
+g6
sS'x.model'
+p8
+NsS'model.out'
p9
-NsS'[flag_type,this.rdnom,DF_type,tt]'
-p10
-g2
-sS'model.out'
-p11
S'matrix'
-p12
+p10
sS'label[3-1]'
-p13
+p11
NsS'x.graphics'
-p14
-g7
+p12
+g6
sS'out'
-p15
-g12
+p13
+g10
sS'ind4'
-p16
+p14
g2
sS'model.in1'
-p17
-g12
+p15
+g10
sS'ind1'
-p18
+p16
g2
sS'ind2'
-p19
+p17
g2
sS'type_meth'
-p20
+p18
g2
-sS'label[2-1]'
-p21
-NsS'label'
-p22
+sS'label'
+p19
S'list'
-p23
+p20
sS'rdnom'
-p24
+p21
g2
sS'model.sim'
-p25
-g23
-sS'[this.model,graphics,ok]'
-p26
-g23
-sS'model.state'
-p27
+p22
+g20
+sS'label[2-1]'
+p23
+NsS'model.state'
+p24
g2
sS'delta'
-p28
+p25
g2
sS'okk'
-p29
+p26
g4
sS'typ'
-p30
+p27
S'vector'
-p31
-sS'[ok1]'
-p32
-g2
+p28
sS'model.blocktype'
-p33
+p29
S'string'
-p34
+p30
sS'Nbr'
-p35
-g34
+p31
+g30
sS'label[1-1]'
-p36
+p32
g2
sS'model.dep_ut'
-p37
-g31
+p33
+g28
sS'gr_i'
-p38
-g31
+p34
+g28
sS'graphics.exprs'
-p39
+p35
NsS'y'
-p40
-g31
+p36
+g28
sS'x'
-p41
+p37
g2
sS'model'
-p42
-g7
+p38
+g6
s. \ No newline at end of file
diff --git a/js/Sinks/AFFICH_m.js b/js/Sinks/AFFICH_m.js
index 35e05e03..015e00f8 100644
--- a/js/Sinks/AFFICH_m.js
+++ b/js/Sinks/AFFICH_m.js
@@ -18,8 +18,8 @@ function AFFICH_m() {
this.model.firing = [];
this.model.dep_ut = [true,false];
this.model.label = new ScilabString([""]);
- exprs = [[sci2exp([this.model.in1,this.model.in2])],[string(this.font)],[string(this.fontsize)],[string(this.colr)],[string(this.nt)],[string(this.nd)],[string(0)]];
- gr_i = [];
+ var exprs = [[sci2exp([this.model.in1,this.model.in2])],[string(this.font)],[string(this.fontsize)],[string(this.colr)],[string(this.nt)],[string(this.nd)],[string(0)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new AfficheBlock(this.x);
}
@@ -47,43 +47,46 @@ function AFFICH_m() {
this.nd = parseFloat(arguments[0]["nd"])
this.herit = arguments[0]["herit"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.in1,this.font,this.fontsize,this.colr,this.nt,this.nd,this.herit,exprs] = scicos_getvalue("Set parameters",["Input Size","Font number","Font size","Color","Total number of digits","Number of rational part digits","Block inherits (1) or not (0)"],list("mat",[1,2],"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (this.font<=0) {
- mess = [[mess],["Font number must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Font number must be positive"],[" "]];
+ var ok = false;
}
if (this.fontsize<=0) {
- mess = [[mess],["Font size must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Font size must be positive"],[" "]];
+ var ok = false;
}
if (this.nt<=3) {
- mess = [[mess],["Total number of digits must be greater than 3"],[" "]];
- ok = false;
+ var mess = [[mess],["Total number of digits must be greater than 3"],[" "]];
+ var ok = false;
}
if (this.nd<0) {
- mess = [[mess],["Number of rational part digits must be ","greater or equal 0"],[" "]];
- ok = false;
+ var mess = [[mess],["Number of rational part digits must be ","greater or equal 0"],[" "]];
+ var ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (!or(this.herit==[0,1])) {
- mess = [[mess],["Accept inherited values are 0 and 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Accept inherited values are 0 and 1"],[" "]];
+ var ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(this.in1,1),list(),ones(1-this.herit,1),[]);
+ var tmpvar0 = set_io(this.model,graphics,list(this.in1,1),list(),ones(1-this.herit,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.ipar = new ScilabDouble([this.font],[this.fontsize],[this.colr],[this.nt],[this.nd],[this.in1[1-1][1-1]]);
diff --git a/js/Sinks/AFFICH_m.pickle b/js/Sinks/AFFICH_m.pickle
index c9b00e5d..17d10152 100644
--- a/js/Sinks/AFFICH_m.pickle
+++ b/js/Sinks/AFFICH_m.pickle
@@ -76,46 +76,43 @@ p21
sS'mess'
p22
g2
-sS'[this.model,graphics,ok]'
-p23
-g7
sS'in1'
-p24
+p23
g17
sS'fontsize'
-p25
+p24
g7
sS'graphics.exprs'
-p26
+p25
NsS'model.ipar'
-p27
+p26
g2
sS'typ'
-p28
+p27
g17
sS'ok'
-p29
+p28
S'boolean'
-p30
+p29
sS'model.blocktype'
-p31
+p30
g19
sS'model.dep_ut'
-p32
+p31
g17
sS'exprs'
-p33
+p32
g2
sS'gr_i'
-p34
+p33
g17
sS'y'
-p35
+p34
g17
sS'x'
-p36
+p35
g7
sS'model'
-p37
+p36
g4
s. \ No newline at end of file
diff --git a/js/Sinks/BARXY.js b/js/Sinks/BARXY.js
index ab795976..e4d9be7c 100644
--- a/js/Sinks/BARXY.js
+++ b/js/Sinks/BARXY.js
@@ -41,26 +41,26 @@ function BARXY() {
this.ymax = parseFloat(arguments[0]["ymax"])
this.thickness = arguments[0]["thickness"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.xmin,this.xmax,this.ymin,this.ymax,this.thickness,exprs] = scicos_getvalue("Set Scope parameters",["Xmin","Xmax","Ymin","Ymax","Segs Thickness"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (this.xmin>=this.xmax) {
- mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
+ var ok = false;
}
if (this.thickness<=0) {
- mess = [[mess],["Thickness must be strictly positive."]];
- ok = false;
+ var mess = [[mess],["Thickness must be strictly positive."]];
+ var ok = false;
}
if (!ok) {
message(mess);
diff --git a/js/Sinks/CANIMXY.js b/js/Sinks/CANIMXY.js
index abf2ddcc..9e16f480 100644
--- a/js/Sinks/CANIMXY.js
+++ b/js/Sinks/CANIMXY.js
@@ -23,8 +23,8 @@ function CANIMXY() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- exprs = [[string(this.nbr_curves)],[string(this.clrs)],[string(this.siz)],[string(this.win)],["[]"],["[]"],[string(this.xmin)],[string(this.xmax)],[string(this.ymin)],[string(this.ymax)],[string(this.N)]];
- gr_i = [];
+ var exprs = [[string(this.nbr_curves)],[string(this.clrs)],[string(this.siz)],[string(this.win)],["[]"],["[]"],[string(this.xmin)],[string(this.xmax)],[string(this.ymin)],[string(this.ymax)],[string(this.N)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -60,61 +60,64 @@ function CANIMXY() {
this.ymax = parseFloat(arguments[0]["ymax"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.xmin,this.xmax,this.ymin,this.ymax,this.N,exprs] = scicos_getvalue("Set Scope parameters",["Number of Curves","color (>0) or mark (<0)","line or mark size","Output window number (-1 for automatic)","Output window position","Output window sizes","Xmin","Xmax","Ymin","Ymax","Buffer size"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
+ var ok = false;
}
if (this.nbr_curves<=0) {
- mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
- ok = false;
+ var mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
+ var ok = false;
}
if (this.N<1) {
- mess = [[mess],["Buffer size must be at least 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 1"],[" "]];
+ var ok = false;
}
if (this.N==1&&this.clrs>0) {
- mess = [[mess],["Buffer size must be at least 2"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 2"],[" "]];
+ var ok = false;
}
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (this.xmin>=this.xmax) {
- mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
+ var ok = false;
}
if (!ok) {
message(mess);
} else {
- in1 = this.nbr_curves*ones(2,1);
- in2 = ones(2,1);
- [this.model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],ones(2,1)),list(),ones(1,1),[]);
+ var in1 = this.nbr_curves*ones(2,1);
+ var in2 = ones(2,1);
+ var tmpvar0 = set_io(this.model,graphics,list([in1,in2],ones(2,1)),list(),ones(1,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (this.wpos==[]) {
this.wpos = [[-1],[-1]];
}
if (this.wdim==[]) {
this.wdim = [[-1],[-1]];
}
- rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
- ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[0],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
+ var rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ var ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[0],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
this.model.rpar = new ScilabDouble(rpar);
this.model.ipar = new ScilabDouble(ipar);
graphics.exprs = exprs;
diff --git a/js/Sinks/CANIMXY.pickle b/js/Sinks/CANIMXY.pickle
index 75a79f02..806d781e 100644
--- a/js/Sinks/CANIMXY.pickle
+++ b/js/Sinks/CANIMXY.pickle
@@ -98,59 +98,56 @@ g2
sS'mess'
p26
g4
-sS'[this.model,graphics,ok]'
-p27
-g2
sS'in1'
-p28
+p27
S'string'
-p29
+p28
sS'in2'
-p30
+p29
g2
sS'N'
-p31
+p30
g2
sS'model.rpar'
-p32
+p31
g4
sS'graphics.exprs'
-p33
+p32
NsS'model.ipar'
-p34
+p33
g4
sS'typ'
-p35
+p34
g22
sS'ok'
-p36
+p35
S'boolean'
-p37
+p36
sS'model.blocktype'
-p38
-g29
+p37
+g28
sS'model.dep_ut'
-p39
+p38
g22
sS'exprs'
-p40
+p39
g4
sS'gr_i'
-p41
+p40
g22
sS'ipar'
-p42
+p41
g4
sS'y'
-p43
+p42
g22
sS'x'
-p44
+p43
g2
sS'model'
-p45
+p44
g15
sS'nbr_curves'
-p46
+p45
g2
s. \ No newline at end of file
diff --git a/js/Sinks/CANIMXY3D.js b/js/Sinks/CANIMXY3D.js
index 7b134fdb..88ddb6db 100644
--- a/js/Sinks/CANIMXY3D.js
+++ b/js/Sinks/CANIMXY3D.js
@@ -23,8 +23,8 @@ function CANIMXY3D() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- exprs = [[string(this.nbr_curves)],[strcat(string(this.clrs)," ")],[strcat(string(this.siz)," ")],[string(this.win)],["[]"],["[]"],[strcat(string(this.vec_x)," ")],[strcat(string(this.vec_y)," ")],[strcat(string(this.vec_z)," ")],[strcat(string(this.param3ds)," ")],[string(this.N)]];
- gr_i = [];
+ var exprs = [[string(this.nbr_curves)],[strcat(string(this.clrs)," ")],[strcat(string(this.siz)," ")],[string(this.win)],["[]"],["[]"],[strcat(string(this.vec_x)," ")],[strcat(string(this.vec_y)," ")],[strcat(string(this.vec_z)," ")],[strcat(string(this.param3ds)," ")],[string(this.N)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -60,78 +60,81 @@ function CANIMXY3D() {
this.param3ds = inverse(arguments[0]["param3ds"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.vec_x,this.vec_y,this.vec_z,this.param3ds,this.N,exprs] = scicos_getvalue("Set Scope parameters",["Number of curves","color (>0) or mark (<0)","line or mark size","Output window number (-1 for automatic)","Output window position","Output window sizes","Xmin and Xmax","Ymin and Ymax","Zmin and Zmax","Alpha and Theta","Buffer size"],list("vec",1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
+ var ok = false;
}
if (size(this.clrs,"*")!=size(this.siz,"*")) {
- mess = [[mess],["Colors and Size must have same size"],[" "]];
- ok = false;
+ var mess = [[mess],["Colors and Size must have same size"],[" "]];
+ var ok = false;
}
if (this.nbr_curves<=0) {
- mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
- ok = false;
+ var mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
+ var ok = false;
}
if (size(this.clrs,"*")<this.nbr_curves) {
- mess = [[mess],["You must have at least same size for clrs and the number of curves"],[" "]];
- ok = false;
+ var mess = [[mess],["You must have at least same size for clrs and the number of curves"],[" "]];
+ var ok = false;
}
if (this.N<1) {
- mess = [[mess],["Buffer size must be at least 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 1"],[" "]];
+ var ok = false;
}
if (this.N<2) {
for (i=1;i<=this.nbr_curves;i+=1) {
if (this.clrs[i-1]>0) {
- mess = [[mess],["Buffer size must be at least 2 or Change a color (must be <0)"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 2 or Change a color (must be <0)"],[" "]];
+ var ok = false;
}
}
}
if (this.vec_y[1-1]>=this.vec_y[2-1]) {
- mess = [[mess],["Ymax must be higher than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be higher than Ymin"],[" "]];
+ var ok = false;
}
if (this.vec_x[1-1]>=this.vec_x[2-1]) {
- mess = [[mess],["Xmax must be higher than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be higher than Xmin"],[" "]];
+ var ok = false;
}
if (this.vec_z[1-1]>=this.vec_z[2-1]) {
- mess = [[mess],["Zmax must be higher than Zmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Zmax must be higher than Zmin"],[" "]];
+ var ok = false;
}
if (!ok) {
message(mess);
} else {
- in1 = this.nbr_curves*ones(3,1);
- in2 = ones(3,1);
- [this.model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],ones(3,1)),list(),ones(1,1),[]);
+ var in1 = this.nbr_curves*ones(3,1);
+ var in2 = ones(3,1);
+ var tmpvar0 = set_io(this.model,graphics,list([in1,in2],ones(3,1)),list(),ones(1,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (this.wpos==[]) {
this.wpos = [[-1],[-1]];
}
if (this.wdim==[]) {
this.wdim = [[-1],[-1]];
}
- rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
- size_siz = size(this.siz,"*");
- ipar = [[this.win],[size_siz],[this.N],[this.clrs.slice()],[this.siz.slice()],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
+ var rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
+ var size_siz = size(this.siz,"*");
+ var ipar = [[this.win],[size_siz],[this.N],[this.clrs.slice()],[this.siz.slice()],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
this.model.rpar = new ScilabDouble(rpar);
this.model.ipar = new ScilabDouble(ipar);
graphics.exprs = exprs;
diff --git a/js/Sinks/CANIMXY3D.pickle b/js/Sinks/CANIMXY3D.pickle
index f5875b67..5f1b4c40 100644
--- a/js/Sinks/CANIMXY3D.pickle
+++ b/js/Sinks/CANIMXY3D.pickle
@@ -38,9 +38,9 @@ p2
sS'wpos'
p3
g2
-sS'arg1'
+sS'win'
p4
-S'object'
+S'double'
p5
sS'wdim'
p6
@@ -61,99 +61,96 @@ p11
g2
sS'graphics'
p12
-g5
-sS'x.graphics'
+S'object'
p13
-g5
-sS'siz'
+sS'x.graphics'
p14
-g2
-sS'vec_z'
+g13
+sS'siz'
p15
g2
-sS'win'
+sS'vec_z'
p16
-S'double'
+g2
+sS'arg1'
p17
+g13
sS'model.evtin'
p18
-g17
-sS'vec_x'
-p19
-g2
+g5
sS'model.firing'
-p20
+p19
S'vector'
-p21
+p20
sS'model.sim'
-p22
+p21
S'list'
-p23
+p22
sS'mess'
+p23
+g2
+sS'vec_x'
p24
g2
-sS'[this.model,graphics,ok]'
-p25
-g17
sS'vec_y'
-p26
+p25
g2
sS'in1'
-p27
+p26
S'string'
-p28
+p27
sS'in2'
-p29
-g17
+p28
+g5
sS'N'
-p30
-g17
+p29
+g5
sS'size_siz'
-p31
-g17
+p30
+g5
sS'model.rpar'
-p32
+p31
g2
sS'graphics.exprs'
-p33
+p32
NsS'model.ipar'
-p34
+p33
g2
sS'typ'
-p35
-g21
+p34
+g20
sS'ok'
-p36
+p35
S'boolean'
-p37
+p36
sS'model.blocktype'
-p38
-g28
+p37
+g27
sS'param3ds'
-p39
+p38
g2
sS'model.dep_ut'
-p40
-g21
+p39
+g20
sS'exprs'
-p41
+p40
g2
sS'gr_i'
-p42
-g21
+p41
+g20
sS'ipar'
-p43
+p42
g2
sS'y'
-p44
-g21
+p43
+g20
sS'x'
-p45
-g17
+p44
+g5
sS'model'
+p45
+g13
+sS'nbr_curves'
p46
g5
-sS'nbr_curves'
-p47
-g17
s. \ No newline at end of file
diff --git a/js/Sinks/CEVENTSCOPE.js b/js/Sinks/CEVENTSCOPE.js
index d58baea6..204e1ce0 100644
--- a/js/Sinks/CEVENTSCOPE.js
+++ b/js/Sinks/CEVENTSCOPE.js
@@ -14,8 +14,8 @@ function CEVENTSCOPE() {
this.model.ipar = new ScilabDouble([this.win],[1],[this.clrs[this.nclock-1]],[this.wpos.slice()],[this.wdim.slice()]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[sci2exp(this.nclock)],[strcat(sci2exp(this.clrs[this.nclock-1])," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.per)]];
- gr_i = [];
+ var exprs = [[sci2exp(this.nclock)],[strcat(sci2exp(this.clrs[this.nclock-1])," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.per)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -41,8 +41,8 @@ function CEVENTSCOPE() {
this.wdim = inverse(arguments[0]["wdim"])
this.per = parseFloat(arguments[0]["per"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nclock,this.clrs,this.win,this.wpos,this.wdim,this.per,exprs] = scicos_getvalue("Set Scope parameters",["Number of event inputs","colors c (>0) or mark (<0)","Output window number (-1 for automatic)","Output window position","Output window sizes","Refresh period"],list("vec",1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",1),exprs);
@@ -52,33 +52,36 @@ function CEVENTSCOPE() {
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (this.nclock<=0) {
- mess = [[mess],["Block must have at least one input event"],[" "]];
- ok = false;
+ var mess = [[mess],["Block must have at least one input event"],[" "]];
+ var ok = false;
}
if (size(this.clrs,"*")!=this.nclock) {
- mess = [[mess],["Inputs color c size must be equal to Number of inputs"],[" "]];
- ok = false;
+ var mess = [[mess],["Inputs color c size must be equal to Number of inputs"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
+ var ok = false;
}
if (this.per<=0) {
- mess = [[mess],["Refresh period must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Refresh period must be positive"],[" "]];
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list(),list(),ones(this.nclock,1),[]);
+ var tmpvar0 = set_io(this.model,graphics,list(),list(),ones(this.nclock,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
} else {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
@@ -89,8 +92,8 @@ function CEVENTSCOPE() {
if (this.wdim==[]) {
this.wdim = [[-1],[-1]];
}
- rpar = this.per;
- ipar = [[this.win],[1],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()]];
+ var rpar = this.per;
+ var ipar = [[this.win],[1],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()]];
this.model.rpar = new ScilabDouble([rpar]);
this.model.ipar = new ScilabDouble(ipar);
graphics.exprs = exprs;
diff --git a/js/Sinks/CEVENTSCOPE.pickle b/js/Sinks/CEVENTSCOPE.pickle
index 972e83a8..cbf1eae9 100644
--- a/js/Sinks/CEVENTSCOPE.pickle
+++ b/js/Sinks/CEVENTSCOPE.pickle
@@ -61,52 +61,49 @@ p16
sS'mess'
p17
g2
-sS'[this.model,graphics,ok]'
-p18
-g12
sS'model.rpar'
-p19
+p18
g12
sS'wdim'
-p20
+p19
g2
sS'model.ipar'
-p21
+p20
g2
sS'typ'
-p22
+p21
S'vector'
-p23
+p22
sS'nclock'
-p24
+p23
g12
sS'ok'
-p25
+p24
S'boolean'
-p26
+p25
sS'model.blocktype'
-p27
+p26
S'string'
-p28
+p27
sS'model.dep_ut'
-p29
-g23
+p28
+g22
sS'exprs'
-p30
+p29
g2
sS'gr_i'
-p31
-g23
+p30
+g22
sS'ipar'
-p32
+p31
g2
sS'y'
-p33
-g23
+p32
+g22
sS'x'
-p34
+p33
g12
sS'model'
-p35
+p34
g5
s. \ No newline at end of file
diff --git a/js/Sinks/CFSCOPE.js b/js/Sinks/CFSCOPE.js
index 35cba386..c01a6804 100644
--- a/js/Sinks/CFSCOPE.js
+++ b/js/Sinks/CFSCOPE.js
@@ -16,8 +16,8 @@ function CFSCOPE() {
this.model.ipar = new ScilabDouble([this.win],[1],[this.N],[this.clrs],[this.wpos],[this.wdim],[1],[1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.ymin)],[string(this.ymax)],[string(this.per)],[string(this.N)],[string([1])]];
- gr_i = [];
+ var exprs = [[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.ymin)],[string(this.ymax)],[string(this.per)],[string(this.N)],[string([1])]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -49,42 +49,42 @@ function CFSCOPE() {
this.N = parseFloat(arguments[0]["N"])
this.wu = arguments[0]["wu"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.wu,exprs] = scicos_getvalue("Set Scope parameters",["Color (>0) or mark (<0) vector (8 entries)","Output window number (-1 for automatic)","Output window position","Output window sizes","Ymin","Ymax","Refresh period","Buffer size","Links to view"],list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",-1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
+ var ok = false;
}
if (this.per<=0) {
- mess = [[mess],["Refresh period must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Refresh period must be positive"],[" "]];
+ var ok = false;
}
if (this.N<2) {
- mess = [[mess],["Buffer size must be at least 2"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 2"],[" "]];
+ var ok = false;
}
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (this.wu<0) {
- mess = [[mess],["Link to view must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Link to view must be positive"],[" "]];
+ var ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
@@ -96,14 +96,14 @@ function CFSCOPE() {
if (this.wdim==[]) {
this.wdim = [[-1],[-1]];
}
- rpar = [[0],[this.ymin],[this.ymax],[this.per]];
+ var rpar = [[0],[this.ymin],[this.ymax],[this.per]];
if (size(this.clrs,"*")>8) {
this.clrs = this.clrs.slice(1-1,8);
}
if (size(this.clrs,"*")<8) {
this.clrs[8-1] = 0;
}
- ipar = [[this.win],[1],[this.N],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()],[size(this.wu,"*")],[this.wu.slice()]];
+ var ipar = [[this.win],[1],[this.N],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()],[size(this.wu,"*")],[this.wu.slice()]];
this.model.rpar = new ScilabDouble(rpar);
this.model.ipar = new ScilabDouble(ipar);
this.model.firing = [];
diff --git a/js/Sinks/CLKOUTV_f.js b/js/Sinks/CLKOUTV_f.js
index c55bed30..fc2b84f4 100644
--- a/js/Sinks/CLKOUTV_f.js
+++ b/js/Sinks/CLKOUTV_f.js
@@ -9,7 +9,7 @@ function CLKOUTV_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- exprs = string(this.prt);
+ var exprs = string(this.prt);
this.x = standard_define([1,1],this.model,exprs," ");
return new EventOutBlock(this.x);
}
@@ -24,9 +24,9 @@ function CLKOUTV_f() {
CLKOUTV_f.prototype.set = function CLKOUTV_f() {
this.prt = arguments[0]["prt"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.prt,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CLKOUTV_f")],[" "],["Event output port"]],"Port number",list("vec",1),exprs);
if (!ok) {
@@ -47,39 +47,41 @@ function CLKOUTV_f() {
return new EventOutBlock(this.x);
}
CLKOUTV_f.prototype.getinputs = function CLKOUTV_f() {
- orig = arg1.graphics.orig;
- sz = arg1.graphics.sz;
+ var orig = arg1.graphics.orig;
+ var sz = arg1.graphics.sz;
this.x = orig[1-1]+sz[1-1]/2;
- y = orig[2-1]+sz[2-1];
- typ = -ones(this.x);
+ var y = orig[2-1]+sz[2-1];
+ var typ = -ones(this.x);
}
CLKOUTV_f.prototype.getorigin = function CLKOUTV_f() {
- [this.x,y] = this.standard_origin[arg1-1];
+ var tmpvar0 = standard_origin(arg1)
+ this.x = tmpvar0[0]
+ var y = tmpvar0[1];
}
CLKOUTV_f.prototype.getoutputs = function CLKOUTV_f() {
this.x = [];
- y = [];
- typ = [];
+ var y = [];
+ var typ = [];
}
CLKOUTV_f.prototype.plot = function CLKOUTV_f() {
- xf = 60;
- yf = 40;
- orig = arg1.graphics.orig;
- sz = arg1.graphics.sz;
- orient = arg1.graphics.flip;
+ var xf = 60;
+ var yf = 40;
+ var orig = arg1.graphics.orig;
+ var sz = arg1.graphics.sz;
+ var orient = arg1.graphics.flip;
this.prt = arg1.model.ipar;
- pat = xget("pattern");
+ var pat = xget("pattern");
xset("pattern",this.default_color[-1-1]);
- thick = xget("thickness");
+ var thick = xget("thickness");
xset("thickness",2);
this.x = orig[1-1]+sz[1-1]*[[1/2],[1],[1],[0],[0]];
- y = orig[2-1]+sz[2-1]*[[0],[1/3],[1],[1],[1/3]];
- xo = orig[1-1];
- yo = orig[2-1]+sz[2-1]/3;
- gr_i = arg1.graphics.gr_i;
+ var y = orig[2-1]+sz[2-1]*[[0],[1/3],[1],[1],[1/3]];
+ var xo = orig[1-1];
+ var yo = orig[2-1]+sz[2-1]/3;
+ var gr_i = arg1.graphics.gr_i;
if (this.type[gr_i-1]==15) {
- coli = gr_i[2-1];
- pcoli = xget("pattern");
+ var coli = gr_i[2-1];
+ var pcoli = xget("pattern");
xfpolys(this.x,y,coli);
xset("pattern",coli);
xstringb(xo,yo,string(this.prt),sz[1-1],sz[2-1]/1.5);
@@ -89,21 +91,21 @@ function CLKOUTV_f() {
xstringb(xo,yo,string(this.prt),sz[1-1],sz[2-1]/1.5);
xpoly(this.x,y,"lines",1);
}
- in1 = [-1/14,1/7,0,0,1/14,1/7,-1/14,1/7]*this.diag[[xf,yf]-1];
+ var in1 = [-1/14,1/7,0,0,1/14,1/7,-1/14,1/7]*this.diag[[xf,yf]-1];
xfpoly(in1.slice()[1-1]+ones(4,1)*(orig[1-1]+sz[1-1]/2),in1.slice()[2-1]+ones(4,1)*(orig[2-1]+sz[2-1]),1);
xset("thickness",thick);
xset("pattern",pat);
- ident = arg1.graphics.id;
+ var ident = arg1.graphics.id;
if (ident!=[]&&ident!="") {
- font = xget("font");
+ var font = xget("font");
xset("font",this.options.ID[1-1][1-1],this.options.ID[1-1][2-1]);
- rectangle = xstringl(orig[1-1],orig[2-1],ident);
- w = rectangle[3-1];
- h = rectangle[4-1];
+ var rectangle = xstringl(orig[1-1],orig[2-1],ident);
+ var w = rectangle[3-1];
+ var h = rectangle[4-1];
xstringb(orig[1-1]+sz[1-1]/2-w/2,orig[2-1]-3*h/2,ident,w,h);
xset("font",font[1-1],font[2-1]);
}
this.x = [];
- y = [];
+ var y = [];
}
}
diff --git a/js/Sinks/CLKOUTV_f.pickle b/js/Sinks/CLKOUTV_f.pickle
index ff26649c..7cb2ea99 100644
--- a/js/Sinks/CLKOUTV_f.pickle
+++ b/js/Sinks/CLKOUTV_f.pickle
@@ -2,138 +2,133 @@ c__builtin__
set
p0
((lp1
-S'standard_origin'
+S'diag'
p2
-aS'diag'
-p3
aS'default_color'
-p4
+p3
aS'prt'
-p5
+p4
aS'x'
-p6
+p5
aS'model'
-p7
+p6
aS'type'
-p8
+p7
aS'options'
-p9
-atp10
-Rp11
+p8
+atp9
+Rp10
.(dp0
-S'[this.x,y]'
+S'xo'
p1
S'double'
p2
-sS'xo'
-p3
-g2
sS'pcoli'
-p4
+p3
g2
sS'arg1'
-p5
+p4
S'object'
-p6
+p5
sS'graphics.exprs'
-p7
+p6
NsS'xf'
-p8
+p7
g2
sS'prt'
-p9
+p8
g2
sS'x.model'
-p10
-g6
+p9
+g5
sS'coli'
-p11
+p10
g2
sS'thick'
-p12
+p11
g2
sS'font'
-p13
+p12
g2
sS'orient'
-p14
+p13
NsS'orig'
-p15
+p14
NsS'pat'
-p16
+p15
g2
sS'x.graphics'
-p17
-g6
+p16
+g5
sS'model.evtin'
-p18
+p17
g2
sS'rectangle'
-p19
+p18
g2
sS'model.sim'
-p20
+p19
S'string'
-p21
+p20
sS'yo'
-p22
+p21
g2
sS'arg1.graphics'
-p23
-g6
+p22
+g5
sS'in1'
-p24
-g21
+p23
+g20
sS'yf'
-p25
+p24
g2
sS'graphics'
-p26
-g6
+p25
+g5
sS'model.ipar'
-p27
+p26
g2
sS'typ'
-p28
+p27
S'vector'
-p29
+p28
sS'sz'
-p30
+p29
NsS'arg1.model'
-p31
-g6
+p30
+g5
sS'ident'
-p32
+p31
NsS'model.blocktype'
-p33
-g21
+p32
+g20
sS'h'
-p34
+p33
g2
sS'model.dep_ut'
-p35
-g29
+p34
+g28
sS'exprs'
-p36
-g21
+p35
+g20
sS'gr_i'
-p37
+p36
NsS'model.firing'
-p38
-g29
+p37
+g28
sS'w'
-p39
+p38
g2
sS'y'
-p40
-g29
+p39
+g28
sS'x'
-p41
+p40
g2
sS'model'
-p42
-g6
+p41
+g5
sS'options'
-p43
-g6
+p42
+g5
s. \ No newline at end of file
diff --git a/js/Sinks/CLKOUT_f.js b/js/Sinks/CLKOUT_f.js
index 3cd1bbd8..4698544d 100644
--- a/js/Sinks/CLKOUT_f.js
+++ b/js/Sinks/CLKOUT_f.js
@@ -9,7 +9,7 @@ function CLKOUT_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- exprs = string(this.prt);
+ var exprs = string(this.prt);
this.x = standard_define([1,1],this.model,exprs," ");
return new BasicBlock(this.x);
}
@@ -24,10 +24,10 @@ function CLKOUT_f() {
CLKOUT_f.prototype.set = function CLKOUT_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
- exprs = exprs[1-1];
+ var exprs = graphics.exprs;
+ var exprs = exprs[1-1];
while (true) {
[ok,this.prt,exprs] = scicos_getvalue("Set Event Output block parameters","Port number",list("vec",1),exprs);
if (!ok) {
diff --git a/js/Sinks/CMAT3D.js b/js/Sinks/CMAT3D.js
index b8675a0b..d42b45dc 100644
--- a/js/Sinks/CMAT3D.js
+++ b/js/Sinks/CMAT3D.js
@@ -3,12 +3,12 @@ function CMAT3D() {
CMAT3D.prototype.define = function CMAT3D() {
this.cmin = 0;
this.cmax = 100;
- this.colormap = this.jetcolormap[25-1];
- size_c = 25;
+ this.colormap = jetcolormap(25);
+ var size_c = 25;
this.x = -1;
- y = -1;
- size_x = 1;
- size_y = 1;
+ var y = -1;
+ var size_x = 1;
+ var size_y = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["cmat3d"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1]);
@@ -19,8 +19,8 @@ function CMAT3D() {
this.model.rpar = new ScilabDouble([this.colormap.slice()],[this.x],[y]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(string(this.x)," ")],[strcat(string(y)," ")],[string("jetcolormap(25)")],[string(this.cmin)],[string(this.cmax)]];
- gr_i = [];
+ var exprs = [[strcat(string(this.x)," ")],[strcat(string(y)," ")],[string("jetcolormap(25)")],[string(this.cmin)],[string(this.cmax)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -44,31 +44,31 @@ function CMAT3D() {
this.cmin = parseFloat(arguments[0]["cmin"])
this.cmax = parseFloat(arguments[0]["cmax"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.vec_x,this.vec_y,this.colormap,this.cmin,this.cmax,exprs] = scicos_getvalue("Set Scope parameters",["Bounds Vector X (-1 for standard)","Bounds Vector Y (-1 for standard)","ColorMap","Zmin","Zmax"],list("vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.vec_x,"*")!=size(this.vec_y,"*")) {
- mess = [[mess],["Vector X and Vector Y must have the same size"],[" "]];
- ok = false;
+ var mess = [[mess],["Vector X and Vector Y must have the same size"],[" "]];
+ var ok = false;
}
if (this.cmax<=this.cmin) {
- mess = [[mess],["Error with minimum and maximum value"],[" "]];
- ok = false;
+ var mess = [[mess],["Error with minimum and maximum value"],[" "]];
+ var ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- size_x = size(this.vec_x,"*");
- size_c = size(this.colormap.slice(),1);
- ipar = [[this.cmin],[this.cmax],[size_c],[size_x]];
- rpar = [[this.colormap.slice()],[this.vec_x.slice()],[this.vec_y.slice()]];
+ var size_x = size(this.vec_x,"*");
+ var size_c = size(this.colormap.slice(),1);
+ var ipar = [[this.cmin],[this.cmax],[size_c],[size_x]];
+ var rpar = [[this.colormap.slice()],[this.vec_x.slice()],[this.vec_y.slice()]];
this.model.ipar = new ScilabDouble(ipar);
this.model.rpar = new ScilabDouble(rpar);
graphics.exprs = exprs;
diff --git a/js/Sinks/CMAT3D.pickle b/js/Sinks/CMAT3D.pickle
index b02d0603..6035c95c 100644
--- a/js/Sinks/CMAT3D.pickle
+++ b/js/Sinks/CMAT3D.pickle
@@ -8,18 +8,16 @@ aS'vec_x'
p3
aS'vec_y'
p4
-aS'jetcolormap'
-p5
aS'x'
-p6
+p5
aS'model'
-p7
+p6
aS'cmax'
-p8
+p7
aS'colormap'
-p9
-atp10
-Rp11
+p8
+atp9
+Rp10
.(dp0
S'cmin'
p1
diff --git a/js/Sinks/CMATVIEW.js b/js/Sinks/CMATVIEW.js
index d9c415f5..cc79f1f3 100644
--- a/js/Sinks/CMATVIEW.js
+++ b/js/Sinks/CMATVIEW.js
@@ -3,10 +3,10 @@ function CMATVIEW() {
CMATVIEW.prototype.define = function CMATVIEW() {
this.cmin = 0;
this.cmax = 100;
- size_c = 25;
- this.colormap = this.jetcolormap[size_c-1];
- alpha_c = 0.24;
- beta_c = 1;
+ var size_c = 25;
+ this.colormap = jetcolormap(size_c);
+ var alpha_c = 0.24;
+ var beta_c = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["cmatview"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble([-1]);
@@ -17,8 +17,8 @@ function CMATVIEW() {
this.model.rpar = new ScilabDouble([alpha_c],[beta_c],[this.colormap.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[string("jetcolormap(25)")],[string(this.cmin)],[string(this.cmax)]];
- gr_i = [];
+ var exprs = [[string("jetcolormap(25)")],[string(this.cmin)],[string(this.cmax)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -38,29 +38,29 @@ function CMATVIEW() {
this.cmin = parseFloat(arguments[0]["cmin"])
this.cmax = parseFloat(arguments[0]["cmax"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.colormap,this.cmin,this.cmax,exprs] = scicos_getvalue("Set Scope parameters",["ColorMap","Minimum level range","Maximum level range"],list("vec",-1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (this.cmax<=this.cmin) {
- mess = [[mess],["Error with minimum and maximum value"],[" "]];
- ok = false;
+ var mess = [[mess],["Error with minimum and maximum value"],[" "]];
+ var ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- size_c = size(this.colormap.slice(),1);
- sol = inv([[this.cmin,1],[this.cmax,1]])*[[1],[size_c/3]];
- alpha_c = sol[1-1];
- beta_c = sol[2-1];
- ipar = [[this.cmin],[this.cmax],[size_c]];
- rpar = [[alpha_c],[beta_c],[this.colormap.slice()]];
+ var size_c = size(this.colormap.slice(),1);
+ var sol = inv([[this.cmin,1],[this.cmax,1]])*[[1],[size_c/3]];
+ var alpha_c = sol[1-1];
+ var beta_c = sol[2-1];
+ var ipar = [[this.cmin],[this.cmax],[size_c]];
+ var rpar = [[alpha_c],[beta_c],[this.colormap.slice()]];
this.model.ipar = new ScilabDouble(ipar);
this.model.rpar = new ScilabDouble(rpar);
graphics.exprs = exprs;
diff --git a/js/Sinks/CMATVIEW.pickle b/js/Sinks/CMATVIEW.pickle
index 6509461d..f56928ee 100644
--- a/js/Sinks/CMATVIEW.pickle
+++ b/js/Sinks/CMATVIEW.pickle
@@ -2,20 +2,18 @@ c__builtin__
set
p0
((lp1
-S'colormap'
+S'x'
p2
-aS'jetcolormap'
+aS'model'
p3
-aS'x'
+aS'cmax'
p4
-aS'model'
+aS'colormap'
p5
-aS'cmax'
-p6
aS'cmin'
-p7
-atp8
-Rp9
+p6
+atp7
+Rp8
.(dp0
S'cmin'
p1
diff --git a/js/Sinks/CMSCOPE.js b/js/Sinks/CMSCOPE.js
index 66b294c3..5827d49a 100644
--- a/js/Sinks/CMSCOPE.js
+++ b/js/Sinks/CMSCOPE.js
@@ -10,8 +10,8 @@ function CMSCOPE() {
this.ymin = [[-1],[-5]];
this.ymax = [[1],[5]];
this.per = [[30],[30]];
- yy = [[transpose(this.ymin.slice())],[transpose(this.ymax.slice())]];
- period = transpose(this.per.slice());
+ var yy = [[transpose(this.ymin.slice())],[transpose(this.ymax.slice())]];
+ var period = transpose(this.per.slice());
this.model = scicos_model();
this.model.sim = list(new ScilabString(["cmscope"]), new ScilabDouble([4]));
this.model.in1 = new ScilabDouble(this.in1);
@@ -22,8 +22,8 @@ function CMSCOPE() {
this.model.ipar = new ScilabDouble([this.win],[size(this.in1,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in1.slice()],[this.clrs.slice(1-1,sum(this.in1))]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(string(this.in1)," ")],[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp([])],[strcat(string(this.ymin)," ")],[strcat(string(this.ymax)," ")],[strcat(string(this.per)," ")],[string(this.N)],[string(0)],[emptystr()]];
- gr_i = [];
+ var exprs = [[strcat(string(this.in1)," ")],[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp([])],[strcat(string(this.ymin)," ")],[strcat(string(this.ymax)," ")],[strcat(string(this.per)," ")],[string(this.N)],[string(0)],[emptystr()]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -59,69 +59,72 @@ function CMSCOPE() {
this.heritance = arguments[0]["heritance"]
this.nom = arguments[0]["nom"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.in1,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.heritance,this.nom,exprs] = scicos_getvalue("Set Scope parameters",["Input ports sizes","Drawing colors (>0) or mark (<0)","Output window number (-1 for automatic)","Output window position","Output window sizes","Ymin vector","Ymax vector","Refresh period","Buffer size","Accept herited events 0/1","Name of Scope (label&Id)"],list("vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec","size(%1,\'*\')","vec","size(%1,\'*\')","vec","size(%1,\'*\')","vec",1,"vec",1,"str",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.in1,"*")<=0) {
- mess = [[mess],["Block must have at least one input port"],[" "]];
- ok = false;
+ var mess = [[mess],["Block must have at least one input port"],[" "]];
+ var ok = false;
}
if (min(this.in1)<=0) {
- mess = [[mess],["Port sizes must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Port sizes must be positive"],[" "]];
+ var ok = false;
}
if (size(this.clrs,"*")<sum(this.in1)) {
- mess = [[mess],["Not enough colors defined (at least "+string(sum(this.in1))+")"],[" "]];
- ok = false;
+ var mess = [[mess],["Not enough colors defined (at least "+string(sum(this.in1))+")"],[" "]];
+ var ok = false;
}
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number can\'t be < -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number can\'t be < -1"],[" "]];
+ var ok = false;
}
if (size(this.per,"*")!=size(this.ymin,"*")) {
- mess = [[mess],["Size of Refresh Period must equal size of Ymin/Ymax vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Size of Refresh Period must equal size of Ymin/Ymax vector"],[" "]];
+ var ok = false;
}
for (i=1;i<=size(this.per,"*");i+=1) {
if ((this.per[i-1]<=0)) {
- mess = [[mess],["Refresh Period must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Refresh Period must be positive"],[" "]];
+ var ok = false;
}
}
if (this.N<2) {
- mess = [[mess],["Buffer size must be at least 2"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 2"],[" "]];
+ var ok = false;
}
if (or(this.ymin>=this.ymax)) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (!or(this.heritance==[0,1])) {
- mess = [[mess],["Accept herited events must be 0 or 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Accept herited events must be 0 or 1"],[" "]];
+ var ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
this.in1 = this.in1.slice();
- a = size(this.in1,1);
- in2 = ones(a,1);
- [this.model,graphics,ok] = set_io(this.model,graphics,list([this.in1,in2],ones(a,1)),list(),ones(1-this.heritance,1),[]);
+ var a = size(this.in1,1);
+ var in2 = ones(a,1);
+ var tmpvar0 = set_io(this.model,graphics,list([this.in1,in2],ones(a,1)),list(),ones(1-this.heritance,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
if (this.wpos==[]) {
@@ -131,11 +134,11 @@ function CMSCOPE() {
this.wdim = [[-1],[-1]];
}
if (ok) {
- period = transpose(this.per.slice());
- yy = [[transpose(this.ymin.slice())],[transpose(this.ymax.slice())]];
- rpar = [[0],[period.slice()],[yy.slice()]];
+ var period = transpose(this.per.slice());
+ var yy = [[transpose(this.ymin.slice())],[transpose(this.ymax.slice())]];
+ var rpar = [[0],[period.slice()],[yy.slice()]];
this.clrs = this.clrs.slice(1-1,sum(this.in1));
- ipar = [[this.win],[size(this.in1,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in1.slice()],[this.clrs.slice()],[this.heritance]];
+ var ipar = [[this.win],[size(this.in1,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in1.slice()],[this.clrs.slice()],[this.heritance]];
this.model.evtin = new ScilabDouble([ones(1-this.heritance,1)]);
this.model.dstate = [];
this.model.rpar = new ScilabDouble(rpar);
diff --git a/js/Sinks/CMSCOPE.pickle b/js/Sinks/CMSCOPE.pickle
index 9849db15..f4dc4e76 100644
--- a/js/Sinks/CMSCOPE.pickle
+++ b/js/Sinks/CMSCOPE.pickle
@@ -98,63 +98,60 @@ p26
sS'mess'
p27
g2
-sS'[this.model,graphics,ok]'
-p28
-g21
sS'in1'
-p29
+p28
g2
sS'in2'
-p30
+p29
g21
sS'N'
-p31
+p30
g21
sS'yy'
-p32
+p31
g2
sS'model.rpar'
-p33
+p32
g2
sS'wdim'
-p34
+p33
g2
sS'model.ipar'
-p35
+p34
g2
sS'typ'
-p36
+p35
g4
sS'a'
-p37
+p36
g21
sS'ok'
-p38
+p37
S'boolean'
-p39
+p38
sS'model.blocktype'
-p40
+p39
S'string'
-p41
+p40
sS'model.dep_ut'
-p42
+p41
g4
sS'exprs'
-p43
+p42
g2
sS'gr_i'
-p44
+p43
g4
sS'ipar'
-p45
+p44
g2
sS'y'
-p46
+p45
g4
sS'x'
-p47
+p46
g21
sS'model'
-p48
+p47
g7
s. \ No newline at end of file
diff --git a/js/Sinks/CSCOPE.js b/js/Sinks/CSCOPE.js
index 9c19b26b..f5886c93 100644
--- a/js/Sinks/CSCOPE.js
+++ b/js/Sinks/CSCOPE.js
@@ -18,8 +18,8 @@ function CSCOPE() {
this.model.ipar = new ScilabDouble([this.win],[1],[this.N],[this.clrs],[this.wpos],[this.wdim]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.ymin)],[string(this.ymax)],[string(this.per)],[string(this.N)],[transpose(string(0))],[emptystr()]];
- gr_i = [];
+ var exprs = [[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.ymin)],[string(this.ymax)],[string(this.per)],[string(this.N)],[transpose(string(0))],[emptystr()]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -53,48 +53,51 @@ function CSCOPE() {
this.heritance = arguments[0]["heritance"]
this.nom = arguments[0]["nom"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.heritance,this.nom,exprs] = scicos_getvalue("Set Scope parameters",["Color (>0) or mark (<0) vector (8 entries)","Output window number (-1 for automatic)","Output window position","Output window sizes","Ymin","Ymax","Refresh period","Buffer size","Accept herited events 0/1","Name of Scope (label&Id)"],list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"str",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number can\'t be < -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number can\'t be < -1"],[" "]];
+ var ok = false;
}
if (this.per<=0) {
- mess = [[mess],["Refresh period must be positive"],[" "]];
- ok = false;
+ var mess = [[mess],["Refresh period must be positive"],[" "]];
+ var ok = false;
}
if (this.N<2) {
- mess = [[mess],["Buffer size must be at least 2"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 2"],[" "]];
+ var ok = false;
}
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (!or(this.heritance==[0,1])) {
- mess = [[mess],["Accept herited events must be 0 or 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Accept herited events must be 0 or 1"],[" "]];
+ var ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([-1,1],1),list(),ones(1-this.heritance,1),[]);
+ var tmpvar0 = set_io(this.model,graphics,list([-1,1],1),list(),ones(1-this.heritance,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
if (this.wpos==[]) {
@@ -103,8 +106,8 @@ function CSCOPE() {
if (this.wdim==[]) {
this.wdim = [[-1],[-1]];
}
- rpar = [[0],[this.ymin],[this.ymax],[this.per]];
- ipar = [[this.win],[1],[this.N],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()]];
+ var rpar = [[0],[this.ymin],[this.ymax],[this.per]];
+ var ipar = [[this.win],[1],[this.N],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()]];
this.model.rpar = new ScilabDouble(rpar);
this.model.ipar = new ScilabDouble(ipar);
this.model.evtin = new ScilabDouble([ones(1-this.heritance,1)]);
diff --git a/js/Sinks/CSCOPE.pickle b/js/Sinks/CSCOPE.pickle
index e7fe344b..f28b8737 100644
--- a/js/Sinks/CSCOPE.pickle
+++ b/js/Sinks/CSCOPE.pickle
@@ -36,9 +36,9 @@ p2
sS'wpos'
p3
g2
-sS'arg1'
+sS'win'
p4
-S'object'
+S'double'
p5
sS'graphics.exprs'
p6
@@ -49,29 +49,29 @@ sS'x.model'
p8
NsS'ymin'
p9
-S'double'
-p10
+g5
sS'model.in2'
-p11
-g10
+p10
+g5
sS'graphics'
+p11
+S'object'
p12
-g5
sS'ymax'
p13
-g10
+g5
sS'x.graphics'
p14
-g5
+g12
sS'per'
p15
-g10
-sS'win'
+g5
+sS'arg1'
p16
-g10
+g12
sS'model.evtin'
p17
-g10
+g5
sS'graphics.id'
p18
NsS'model.label'
@@ -83,55 +83,52 @@ p21
sS'mess'
p22
g2
-sS'[this.model,graphics,ok]'
-p23
-g10
sS'model.in1'
-p24
-g10
+p23
+g5
sS'model.rpar'
-p25
+p24
g2
sS'N'
-p26
-g10
+p25
+g5
sS'wdim'
-p27
+p26
g2
sS'model.ipar'
-p28
+p27
g2
sS'typ'
-p29
+p28
S'vector'
-p30
+p29
sS'ok'
-p31
+p30
S'boolean'
-p32
+p31
sS'model.blocktype'
-p33
+p32
S'string'
-p34
+p33
sS'model.dep_ut'
-p35
-g30
+p34
+g29
sS'exprs'
-p36
+p35
g2
sS'gr_i'
-p37
-g30
+p36
+g29
sS'ipar'
-p38
+p37
g2
sS'y'
-p39
-g30
+p38
+g29
sS'x'
-p40
-g10
-sS'model'
-p41
+p39
g5
+sS'model'
+p40
+g12
s. \ No newline at end of file
diff --git a/js/Sinks/CSCOPXY.js b/js/Sinks/CSCOPXY.js
index 458e7eef..3b6078d3 100644
--- a/js/Sinks/CSCOPXY.js
+++ b/js/Sinks/CSCOPXY.js
@@ -22,8 +22,8 @@ function CSCOPXY() {
this.model.ipar = new ScilabDouble([this.win],[1],[this.N],[this.clrs],[this.siz],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.nbr_curves)],[sci2exp(this.clrs)],[sci2exp(this.siz)],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.xmin)],[string(this.xmax)],[string(this.ymin)],[string(this.ymax)],[string(this.N)]];
- gr_i = [];
+ var exprs = [[string(this.nbr_curves)],[sci2exp(this.clrs)],[sci2exp(this.siz)],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.xmin)],[string(this.xmax)],[string(this.ymin)],[string(this.ymax)],[string(this.N)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -59,61 +59,64 @@ function CSCOPXY() {
this.ymax = parseFloat(arguments[0]["ymax"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.xmin,this.xmax,this.ymin,this.ymax,this.N,exprs] = scicos_getvalue("Set Scope parameters",["Number of Curves","color (>0) or mark (<0)","line or mark size","Output window number (-1 for automatic)","Output window position","Output window sizes","Xmin","Xmax","Ymin","Ymax","Buffer size"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (this.nbr_curves<=0) {
- mess = [[mess],["Number of Curves cannot be negative or null"],[" "]];
- ok = false;
+ var mess = [[mess],["Number of Curves cannot be negative or null"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
+ var ok = false;
}
if (this.N<1) {
- mess = [[mess],["Buffer size must be at least 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 1"],[" "]];
+ var ok = false;
}
if (this.N==1&&this.clrs>0) {
- mess = [[mess],["Buffer size must be at least 2"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 2"],[" "]];
+ var ok = false;
}
if (this.ymin>=this.ymax) {
- mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
+ var ok = false;
}
if (this.xmin>=this.xmax) {
- mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
+ var ok = false;
}
if (!ok) {
message(mess);
} else {
- in1 = this.nbr_curves*ones(2,1);
- in2 = ones(2,1);
- [this.model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],ones(2,1)),list(),ones(1,1),[]);
+ var in1 = this.nbr_curves*ones(2,1);
+ var in2 = ones(2,1);
+ var tmpvar0 = set_io(this.model,graphics,list([in1,in2],ones(2,1)),list(),ones(1,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (this.wpos==[]) {
this.wpos = [[-1],[-1]];
}
if (this.wdim==[]) {
this.wdim = [[-1],[-1]];
}
- rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
- ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
+ var rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ var ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
this.model.rpar = new ScilabDouble(rpar);
this.model.ipar = new ScilabDouble(ipar);
graphics.exprs = exprs;
diff --git a/js/Sinks/CSCOPXY.pickle b/js/Sinks/CSCOPXY.pickle
index 462dabd2..1a1a92bd 100644
--- a/js/Sinks/CSCOPXY.pickle
+++ b/js/Sinks/CSCOPXY.pickle
@@ -94,60 +94,57 @@ g2
sS'mess'
p24
g4
-sS'[this.model,graphics,ok]'
-p25
-g2
sS'in1'
-p26
+p25
S'string'
-p27
+p26
sS'in2'
-p28
+p27
g2
sS'N'
-p29
+p28
g2
sS'model.rpar'
-p30
+p29
g4
sS'graphics.exprs'
-p31
+p30
NsS'model.ipar'
-p32
+p31
g4
sS'typ'
-p33
+p32
S'vector'
-p34
+p33
sS'ok'
-p35
+p34
S'boolean'
-p36
+p35
sS'model.blocktype'
-p37
-g27
+p36
+g26
sS'model.dep_ut'
-p38
-g34
+p37
+g33
sS'exprs'
-p39
+p38
g4
sS'gr_i'
-p40
-g34
+p39
+g33
sS'ipar'
-p41
+p40
g4
sS'y'
-p42
-g34
+p41
+g33
sS'x'
-p43
+p42
g2
sS'model'
-p44
+p43
g15
sS'nbr_curves'
-p45
+p44
g2
s. \ No newline at end of file
diff --git a/js/Sinks/CSCOPXY3D.js b/js/Sinks/CSCOPXY3D.js
index 142cf4b2..80f313d2 100644
--- a/js/Sinks/CSCOPXY3D.js
+++ b/js/Sinks/CSCOPXY3D.js
@@ -22,8 +22,8 @@ function CSCOPXY3D() {
this.model.ipar = new ScilabDouble([this.win],[8],[this.N],[this.clrs.slice()],[this.siz.slice()],[8],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.nbr_curves)],[strcat(string(this.clrs)," ")],[strcat(string(this.siz)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[strcat(string(this.vec_x)," ")],[strcat(string(this.vec_y)," ")],[strcat(string(this.vec_z)," ")],[strcat(string(this.param3ds)," ")],[string(this.N)]];
- gr_i = [];
+ var exprs = [[string(this.nbr_curves)],[strcat(string(this.clrs)," ")],[strcat(string(this.siz)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[strcat(string(this.vec_x)," ")],[strcat(string(this.vec_y)," ")],[strcat(string(this.vec_z)," ")],[strcat(string(this.param3ds)," ")],[string(this.N)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -59,72 +59,75 @@ function CSCOPXY3D() {
this.param3ds = inverse(arguments[0]["param3ds"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.vec_x,this.vec_y,this.vec_z,this.param3ds,this.N,exprs] = scicos_getvalue("Set Scope parameters",["Number of curves","color (>0) or mark (<0)","Line or Mark Size","Output window number (-1 for automatic)","Output window position","Output window sizes","Xmin and Xmax","Ymin and Ymax","Zmin and Zmax","Alpha and Theta","Buffer size"],list("vec",1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",2,"vec",2,"vec",2,"vec",2,"vec",1),exprs);
if (!ok) {
break;
}
- mess = [];
+ var mess = [];
if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
- mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
- mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
- ok = false;
+ var mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
+ var ok = false;
}
if (size(this.clrs,"*")!=size(this.siz,"*")) {
- mess = [[mess],["Colors and Size must have same size"],[" "]];
- ok = false;
+ var mess = [[mess],["Colors and Size must have same size"],[" "]];
+ var ok = false;
}
if (this.nbr_curves<=0) {
- mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
- ok = false;
+ var mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
+ var ok = false;
}
if (this.win<-1) {
- mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
- ok = false;
+ var mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
+ var ok = false;
}
if (this.N<1) {
- mess = [[mess],["Buffer size must be at least 1"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 1"],[" "]];
+ var ok = false;
}
if (this.N<2) {
for (i=1;i<=size(this.clrs,"*");i+=1) {
if (this.clrs[i-1]>0) {
- mess = [[mess],["Buffer size must be at least 2 or Change a color (must be >0)"],[" "]];
- ok = false;
+ var mess = [[mess],["Buffer size must be at least 2 or Change a color (must be >0)"],[" "]];
+ var ok = false;
}
}
}
if (this.vec_y[1-1]>=this.vec_y[2-1]) {
- mess = [[mess],["Ymax must be higher than Ymin"],[" "]];
- ok = false;
+ var mess = [[mess],["Ymax must be higher than Ymin"],[" "]];
+ var ok = false;
}
if (this.vec_x[1-1]>=this.vec_x[2-1]) {
- mess = [[mess],["Xmax must be higher than Xmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Xmax must be higher than Xmin"],[" "]];
+ var ok = false;
}
if (this.vec_z[1-1]>=this.vec_z[2-1]) {
- mess = [[mess],["Zmax must be higher than Zmin"],[" "]];
- ok = false;
+ var mess = [[mess],["Zmax must be higher than Zmin"],[" "]];
+ var ok = false;
}
if (ok) {
- in1 = this.nbr_curves*ones(3,1);
- in2 = ones(3,1);
- [this.model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],ones(3,1)),list(),ones(1,1),[]);
+ var in1 = this.nbr_curves*ones(3,1);
+ var in2 = ones(3,1);
+ var tmpvar0 = set_io(this.model,graphics,list([in1,in2],ones(3,1)),list(),ones(1,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (this.wpos==[]) {
this.wpos = [[-1],[-1]];
}
if (this.wdim==[]) {
this.wdim = [[-1],[-1]];
}
- rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
- size_siz = size(this.siz,"*");
- ipar = [[this.win],[size_siz],[this.N],[this.clrs.slice()],[this.siz.slice()],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
+ var rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
+ var size_siz = size(this.siz,"*");
+ var ipar = [[this.win],[size_siz],[this.N],[this.clrs.slice()],[this.siz.slice()],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
this.model.rpar = new ScilabDouble(rpar);
this.model.ipar = new ScilabDouble(ipar);
graphics.exprs = exprs;
diff --git a/js/Sinks/CSCOPXY3D.pickle b/js/Sinks/CSCOPXY3D.pickle
index e0b15b28..6ac1a115 100644
--- a/js/Sinks/CSCOPXY3D.pickle
+++ b/js/Sinks/CSCOPXY3D.pickle
@@ -38,9 +38,9 @@ p2
sS'wpos'
p3
g2
-sS'arg1'
+sS'win'
p4
-S'object'
+S'double'
p5
sS'wdim'
p6
@@ -61,96 +61,93 @@ p11
g2
sS'graphics'
p12
-g5
-sS'x.graphics'
+S'object'
p13
-g5
-sS'siz'
+sS'x.graphics'
p14
-g2
-sS'vec_z'
+g13
+sS'siz'
p15
g2
-sS'win'
+sS'vec_z'
p16
-S'double'
+g2
+sS'arg1'
p17
+g13
sS'model.evtin'
p18
-g17
-sS'vec_x'
-p19
-g2
+g5
sS'model.sim'
-p20
+p19
S'list'
-p21
+p20
sS'mess'
+p21
+g2
+sS'vec_x'
p22
g2
-sS'[this.model,graphics,ok]'
-p23
-g17
sS'vec_y'
-p24
+p23
g2
sS'in1'
-p25
+p24
S'string'
-p26
+p25
sS'in2'
-p27
-g17
+p26
+g5
sS'N'
-p28
-g17
+p27
+g5
sS'size_siz'
-p29
-g17
+p28
+g5
sS'model.rpar'
-p30
+p29
g2
sS'graphics.exprs'
-p31
+p30
NsS'model.ipar'
-p32
+p31
g2
sS'typ'
-p33
+p32
S'vector'
-p34
+p33
sS'ok'
-p35
+p34
S'boolean'
-p36
+p35
sS'model.blocktype'
-p37
-g26
+p36
+g25
sS'param3ds'
-p38
+p37
g2
sS'model.dep_ut'
-p39
-g34
+p38
+g33
sS'exprs'
-p40
+p39
g2
sS'gr_i'
-p41
-g34
+p40
+g33
sS'ipar'
-p42
+p41
g2
sS'y'
-p43
-g34
+p42
+g33
sS'x'
-p44
-g17
+p43
+g5
sS'model'
+p44
+g13
+sS'nbr_curves'
p45
g5
-sS'nbr_curves'
-p46
-g17
s. \ No newline at end of file
diff --git a/js/Sinks/OUTIMPL_f.js b/js/Sinks/OUTIMPL_f.js
index 68bb28fa..f7688fea 100644
--- a/js/Sinks/OUTIMPL_f.js
+++ b/js/Sinks/OUTIMPL_f.js
@@ -9,12 +9,12 @@ function OUTIMPL_f() {
this.model.ipar = [1];
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- mo = modelica();
+ var mo = modelica();
mo.model = "PORT";
mo.inputs = "n";
this.model.equations = new ScilabDouble([mo]);
- exprs = "1";
- gr_i = [];
+ var exprs = "1";
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
return new ImplicitOutBlock(this.x);
@@ -30,11 +30,11 @@ function OUTIMPL_f() {
OUTIMPL_f.prototype.set = function OUTIMPL_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[1-1];
+ var exprs = exprs[1-1];
}
while (true) {
[ok,this.prt,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","OUTIMPL_f")],[" "],["Implicit output port"]],"Port number",list("vec",1),exprs);
@@ -46,8 +46,8 @@ function OUTIMPL_f() {
block_parameter_error(msprintf("Wrong value for \'Port Number\' parameter: %d.",this.prt),"Strictly positive integer expected.");
} else {
if (this.model.ipar!=this.prt) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.ipar = new ScilabDouble([this.prt]);
graphics.exprs = exprs;
diff --git a/js/Sinks/OUT_f.js b/js/Sinks/OUT_f.js
index eff38eaa..ee146a61 100644
--- a/js/Sinks/OUT_f.js
+++ b/js/Sinks/OUT_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sinks/OUT_f.sci" */
function OUT_f() {
OUT_f.prototype.define = function OUT_f() {
- n = -1;
+ var n = -1;
this.prt = 1;
this.model = scicos_model();
this.model.sim = new ScilabString(["output"]);
@@ -11,8 +11,8 @@ function OUT_f() {
this.model.ipar = new ScilabDouble([this.prt]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = string(this.prt);
- gr_i = [];
+ var exprs = string(this.prt);
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
return new ExplicitOutBlock(this.x);
}
@@ -27,11 +27,11 @@ function OUT_f() {
OUT_f.prototype.set = function OUT_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==2) {
- exprs = exprs[1-1];
+ var exprs = exprs[1-1];
}
while (true) {
[ok,this.prt,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","OUT_f")],[" "],["Regular output port"]],"Port number",list("vec",1),exprs);
diff --git a/js/Sinks/TOWS_c.js b/js/Sinks/TOWS_c.js
index c2f0d93d..f7aa7b54 100644
--- a/js/Sinks/TOWS_c.js
+++ b/js/Sinks/TOWS_c.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sinks/TOWS_c.sci" */
function TOWS_c() {
TOWS_c.prototype.define = function TOWS_c() {
- nu = -1;
+ var nu = -1;
this.nz = 128;
this.varnam = "A";
this.herit = 0;
@@ -18,8 +18,8 @@ function TOWS_c() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- gr_i = [];
- exprs = [[string(this.nz)],[string(this.varnam)],[string(this.herit)]];
+ var gr_i = [];
+ var exprs = [[string(this.nz)],[string(this.varnam)],[string(this.herit)]];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -39,9 +39,9 @@ function TOWS_c() {
this.varnam = arguments[0]["varnam"]
this.herit = parseFloat(arguments[0]["herit"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.nz,this.varnam,this.herit,exprs] = scicos_getvalue("Set Xcos buffer block",["Size of buffer","Scilab variable name","Inherit (no:0, yes:1)"],list("vec",1,"str",1,"vec",1),exprs);
if (!ok) {
@@ -49,17 +49,20 @@ function TOWS_c() {
}
if ((this.nz<=0)) {
message("Size of buffer must be positive");
- ok = false;
+ var ok = false;
}
- r = false;
- ierr = execstr("r = validvar(varnam)","errcatch");
+ var r = false;
+ var ierr = execstr("r = validvar(varnam)","errcatch");
if (!r||ierr!=0||length(this.varnam)>19) {
message([["Invalid variable name."],["Please choose another variable name."]]);
- ok = false;
+ var ok = false;
}
execstr("if type("+this.varnam+") <> 17 | or(fieldnames("+this.varnam+") <> [\"values\"; \"time\"]) then"+" message([\"Protected variable name.\"; \"Please choose another variable name.\"]);"+" ok = %f;"+" end","errcatch");
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([-1,-2],-1),list(),ones(1-this.herit,1),[]);
+ var tmpvar0 = set_io(this.model,graphics,list([-1,-2],-1),list(),ones(1-this.herit,1),[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (this.herit==1) {
this.model.blocktype = new ScilabString(["x"]);
} else {
diff --git a/js/Sinks/TOWS_c.pickle b/js/Sinks/TOWS_c.pickle
index 7f443569..4a87ca85 100644
--- a/js/Sinks/TOWS_c.pickle
+++ b/js/Sinks/TOWS_c.pickle
@@ -72,47 +72,44 @@ p21
sS'model.evtout'
p22
g8
-sS'[this.model,graphics,ok]'
-p23
-g5
sS'model.intyp'
-p24
+p23
g5
sS'model.rpar'
-p25
+p24
g8
sS'graphics.exprs'
-p26
+p25
NsS'model.ipar'
-p27
+p26
S'matrix'
-p28
+p27
sS'typ'
-p29
+p28
g8
sS'ok'
-p30
+p29
S'boolean'
-p31
+p30
sS'model.blocktype'
-p32
+p31
g10
sS'model.dep_ut'
-p33
+p32
g8
sS'exprs'
-p34
-g28
+p33
+g27
sS'r'
-p35
-g31
+p34
+g30
sS'y'
-p36
+p35
g8
sS'x'
-p37
+p36
g5
sS'model'
-p38
+p37
g2
s. \ No newline at end of file
diff --git a/js/Sinks/TRASH_f.js b/js/Sinks/TRASH_f.js
index 4c9eca2b..e36cee9d 100644
--- a/js/Sinks/TRASH_f.js
+++ b/js/Sinks/TRASH_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Sinks/TRASH_f.sci" */
function TRASH_f() {
TRASH_f.prototype.define = function TRASH_f() {
- in1 = -1;
+ var in1 = -1;
this.model = scicos_model();
this.model.sim = new ScilabString(["trash"]);
this.model.in1 = new ScilabDouble([in1]);
this.model.evtin = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Sinks/WFILE_f.js b/js/Sinks/WFILE_f.js
index e8d9f730..b6a2a5ec 100644
--- a/js/Sinks/WFILE_f.js
+++ b/js/Sinks/WFILE_f.js
@@ -2,10 +2,10 @@
function WFILE_f() {
WFILE_f.prototype.define = function WFILE_f() {
this.in1 = 1;
- nin = sum(this.in1);
- frmt = "(7(e10.3,1x))";
- fname = "foo";
- lunit = 0;
+ var nin = sum(this.in1);
+ var frmt = "(7(e10.3,1x))";
+ var fname = "foo";
+ var lunit = 0;
this.N = 2;
this.model = scicos_model();
this.model.sim = new ScilabString(["writef"]);
@@ -15,8 +15,8 @@ function WFILE_f() {
this.model.ipar = new ScilabDouble([length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N)]];
- gr_i = [];
+ var exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -38,56 +38,59 @@ function WFILE_f() {
this.frmt1 = parseFloat(arguments[0]["frmt1"])
this.N = parseFloat(arguments[0]["N"])
warnobsolete("WRITEC_f","6.0.0");
- warnMessage = msprintf(_("Feature %s is obsolete."),"WFILE_f");
- warnAdvise = msprintf(_("Please use %s instead."),"WRITEC_f");
- warnXcosMessage = msprintf("%s %s",warnMessage,warnAdvise);
+ var warnMessage = msprintf(_("Feature %s is obsolete."),"WFILE_f");
+ var warnAdvise = msprintf(_("Please use %s instead."),"WRITEC_f");
+ var warnXcosMessage = msprintf("%s %s",warnMessage,warnAdvise);
warnBlockByUID(arg1.model.label,warnXcosMessage);
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- dstate = this.model.dstate;
- lunit = dstate[2-1];
- fname = exprs[2-1];
- frmt = exprs[3-1];
+ var dstate = this.model.dstate;
+ var lunit = dstate[2-1];
+ var fname = exprs[2-1];
+ var frmt = exprs[3-1];
while (true) {
[ok,this.in1,this.fname1,this.frmt1,this.N,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","WFILE_f")],[" "],["Write to output file"],[" "],["Write is done on:"],["&nbsp; - A binary file if no format given"],["&nbsp; - A formatted text file if a format (Fortran type) is given"]],["Input Size","Output File Name","Output Format","Buffer Size"],list("vec",1,"str",1,"str",1,"vec",1),exprs);
if (!ok) {
break;
}
this.in1 = int(this.in1);
- nin = this.in1;
+ var nin = this.in1;
this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
this.frmt1 = stripblanks(this.frmt1);
if (lunit>0&&min(length(frmt),1)!=min(length(this.frmt1),1)) {
block_parameter_error("Simulation running !!! You cannot switch<br />between formatted and unformatted when running","End current simulation first.");
- ok = false;
+ var ok = false;
} else if (lunit>0&&this.fname1!=fname) {
block_parameter_error("You cannot modify \'Output File Name\' when running.","End current simulation first.");
- ok = false;
+ var ok = false;
} else if (this.fname1=="") {
block_parameter_error("Wrong value for \'Output File Name\' parameter","You must provide a filename.");
- ok = false;
+ var ok = false;
} else if (fileparts(this.fname1)!="") {
- [pa,fn,ex] = fileparts(this.fname1);
+ var tmpvar0 = fileparts(this.fname1)
+ var pa = tmpvar0[0]
+ var fn = tmpvar0[1]
+ var ex = tmpvar0[2];
if (!this.isdir[pa-1]) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter.","Output File Name"),msprintf("Directory \'%s\' does not exist",pa));
- ok = false;
+ var ok = false;
}
} else if (this.frmt1!=""&&(part(this.frmt1,1)!="("||part(this.frmt1,length(this.frmt1))!=")")) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Input Format",this.frmt1),"You must enclose the format\'s string between parentheses.");
- ok = false;
+ var ok = false;
} else if (this.N<2) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Buffer Size",this.N),"Must be greater than 1.");
- ok = false;
+ var ok = false;
} else if (this.in1<=0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Size",this.in1),"Strictly positive integer expected.");
- ok = false;
+ var ok = false;
}
if (ok) {
- ipar = [[length(this.fname1)],[length(this.frmt1)],[0],[this.N],[this._str2code[this.fname1-1]],[this._str2code[this.frmt1-1]]];
+ var ipar = [[length(this.fname1)],[length(this.frmt1)],[0],[this.N],[this._str2code[this.fname1-1]],[this._str2code[this.frmt1-1]]];
if (prod(size(dstate))!=(nin+1)*this.N+2) {
- dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
+ var dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
}
this.model.in1 = new ScilabDouble([nin]);
this.model.dstate = new ScilabDouble(dstate);
diff --git a/js/Sinks/WFILE_f.pickle b/js/Sinks/WFILE_f.pickle
index e42167dc..895c2b46 100644
--- a/js/Sinks/WFILE_f.pickle
+++ b/js/Sinks/WFILE_f.pickle
@@ -41,91 +41,88 @@ sS'model.dep_ut'
p8
S'vector'
p9
-sS'[pa,fn,ex]'
+sS'warnMessage'
p10
S'double'
p11
-sS'warnMessage'
-p12
-g11
sS'x.graphics'
-p13
+p12
g4
sS'lunit'
-p14
+p13
g11
sS'fname'
-p15
+p14
S'string'
-p16
+p15
sS'frmt'
-p17
-g16
+p16
+g15
sS'model.evtin'
-p18
+p17
g11
sS'model.sim'
-p19
-g16
+p18
+g15
sS'nin'
+p19
+g11
+sS'model.in1'
p20
g11
sS'in1'
p21
g11
-sS'model.in1'
-p22
-g11
sS'warnAdvise'
-p23
+p22
g11
sS'warnXcosMessage'
-p24
+p23
g11
sS'graphics'
-p25
+p24
g4
sS'model.ipar'
-p26
+p25
g2
sS'typ'
-p27
+p26
g9
sS'arg1.model'
-p28
+p27
g4
sS'ok'
-p29
+p28
S'boolean'
-p30
+p29
sS'model.blocktype'
-p31
-g16
+p30
+g15
sS'frmt1'
-p32
+p31
g11
sS'fname1'
-p33
+p32
g11
sS'exprs'
-p34
+p33
g2
sS'N'
-p35
+p34
g11
sS'gr_i'
-p36
+p35
g9
sS'ipar'
-p37
+p36
g2
sS'y'
-p38
+p37
g9
sS'x'
-p39
+p38
g11
sS'model'
-p40
+p39
g4
s. \ No newline at end of file
diff --git a/js/Sinks/WRITEAU_f.js b/js/Sinks/WRITEAU_f.js
index 917f3dca..29f756ba 100644
--- a/js/Sinks/WRITEAU_f.js
+++ b/js/Sinks/WRITEAU_f.js
@@ -1,12 +1,12 @@
/* autogenerated from "macros/Sinks/WRITEAU_f.sci" */
function WRITEAU_f() {
WRITEAU_f.prototype.define = function WRITEAU_f() {
- in1 = 1;
- nin = sum(in1);
- frmt = "uc ";
- fname = "/dev/audio";
+ var in1 = 1;
+ var nin = sum(in1);
+ var frmt = "uc ";
+ var fname = "/dev/audio";
this.swap = 0;
- lunit = 0;
+ var lunit = 0;
this.N = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["writeau"]), new ScilabDouble([2]));
@@ -16,8 +16,8 @@ function WRITEAU_f() {
this.model.ipar = new ScilabDouble([length(fname)],[this._str2code[frmt-1]],[this.N],[this.swap],[this._str2code[fname-1]]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [true,false];
- exprs = [string(this.N),string(this.swap)];
- gr_i = [];
+ var exprs = [string(this.N),string(this.swap)];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -35,35 +35,35 @@ function WRITEAU_f() {
this.N = parseFloat(arguments[0]["N"])
this.swap = parseFloat(arguments[0]["swap"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- ipar = this.model.ipar;
- dstate = this.model.dstate;
- lunit = dstate[2-1];
+ var ipar = this.model.ipar;
+ var dstate = this.model.dstate;
+ var lunit = dstate[2-1];
while (true) {
[ok,this.N,this.swap,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","WRITEAU_f")],[" "],["Write \'.au\' sound file on audio device"]],["Buffer Size","Swap Mode (0:No, 1:Yes)"],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- nin = 1;
- fname1 = "/dev/audio";
- frmt1 = "uc ";
+ var nin = 1;
+ var fname1 = "/dev/audio";
+ var frmt1 = "uc ";
if (this.alreadyran&&(this.N!=ipar[5-1])) {
block_parameter_error(msprintf("You cannot modify \'%s\' when running.","Buffer Size"),"End current simulation first");
- ok = false;
+ var ok = false;
} else if (this.N<1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Buffer Size",this.N),"Strictly positive integer expected.");
- ok = false;
+ var ok = false;
}
if (this.swap!=0&&this.swap!=1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Swap Mode",this.swap),msprintf("Must be in the interval %s.","[0, 1]"));
- ok = false;
+ var ok = false;
}
if (ok) {
- ipar = [[length(fname1)],[this._str2code[frmt1-1]],[this.N],[this.swap],[this._str2code[fname1-1]]];
+ var ipar = [[length(fname1)],[this._str2code[frmt1-1]],[this.N],[this.swap],[this._str2code[fname1-1]]];
if (prod(size(dstate))!=(nin+1)*this.N+2) {
- dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
+ var dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
}
this.model.in1 = new ScilabDouble([1]);
this.model.dstate = new ScilabDouble(dstate);
diff --git a/js/Sinks/WRITEC_f.js b/js/Sinks/WRITEC_f.js
index 7b1967e9..34ec1758 100644
--- a/js/Sinks/WRITEC_f.js
+++ b/js/Sinks/WRITEC_f.js
@@ -2,11 +2,11 @@
function WRITEC_f() {
WRITEC_f.prototype.define = function WRITEC_f() {
this.in1 = 1;
- nin = sum(this.in1);
- frmt = "c ";
- fname = "foo";
+ var nin = sum(this.in1);
+ var frmt = "c ";
+ var fname = "foo";
this.swap = 0;
- lunit = 0;
+ var lunit = 0;
this.N = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["writec"]), new ScilabDouble([2]));
@@ -16,8 +16,8 @@ function WRITEC_f() {
this.model.ipar = new ScilabDouble([length(fname)],[this._str2code[frmt-1]],[this.N],[this.swap],[this._str2code[fname-1]]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [true,false];
- exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N),string(this.swap)]];
- gr_i = [];
+ var exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N),string(this.swap)]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -41,56 +41,59 @@ function WRITEC_f() {
this.N = parseFloat(arguments[0]["N"])
this.swap = parseFloat(arguments[0]["swap"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- ipar = this.model.ipar;
- dstate = this.model.dstate;
- lunit = dstate[2-1];
- fname = exprs[2-1];
- frmt = exprs[3-1];
+ var ipar = this.model.ipar;
+ var dstate = this.model.dstate;
+ var lunit = dstate[2-1];
+ var fname = exprs[2-1];
+ var frmt = exprs[3-1];
while (true) {
[ok,this.in1,this.fname1,this.frmt1,this.N,this.swap,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","WRITEC_f")],[" "],["Write to C binary file"]],["Input Size","Output File Name","Output Format","Buffer Size","Swap Mode (0:No, 1:Yes)"],list("vec",1,"str",1,"str",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
this.in1 = int(this.in1);
- nin = this.in1;
+ var nin = this.in1;
this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
this.frmt1 = stripblanks(this.frmt1);
- fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
+ var fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
if (and(this.frmt1!=fmts)) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Input Format",this.frmt1),"Valid formats are: "+strcat(fmts,", "));
- ok = false;
+ var ok = false;
} else if (this.alreadyran&&this.fname1!=fname) {
block_parameter_error(msprintf("You cannot modify \'%s\' when running","Input Format"),"End current simulation first.");
- ok = false;
+ var ok = false;
} else if (this.alreadyran&&this.N!=ipar[5-1]) {
block_parameter_error(msprintf("You cannot modify \'Buffer Size\' when running.","Buffer Size"),"End current simulation first");
- ok = false;
+ var ok = false;
} else if (this.fname1=="") {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter.","Output File Name"),"You must provide a filename.");
} else if (fileparts(this.fname1)!="") {
- [pa,fn,ex] = fileparts(this.fname1);
+ var tmpvar0 = fileparts(this.fname1)
+ var pa = tmpvar0[0]
+ var fn = tmpvar0[1]
+ var ex = tmpvar0[2];
if (!this.isdir[pa-1]) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter.","Output File Name"),msprintf("Directory \'%s\' does not exist",pa));
- ok = false;
+ var ok = false;
}
} else if (this.N<1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Buffer Size",this.N),"Strictly positive integer expected.");
- ok = false;
+ var ok = false;
} else if (this.in1<=0) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Size",this.in1),"Strictly positive integer expected.");
- ok = false;
+ var ok = false;
} else if (this.swap!=0&&this.swap!=1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Swap Mode",this.swap),msprintf("Must be in the interval %s.","[0, 1]"));
- ok = false;
+ var ok = false;
}
this.frmt1 = part(this.frmt1,1,3);
if (ok) {
- ipar = [[length(this.fname1)],[this._str2code[this.frmt1-1]],[this.N],[this.swap],[this._str2code[this.fname1-1]]];
+ var ipar = [[length(this.fname1)],[this._str2code[this.frmt1-1]],[this.N],[this.swap],[this._str2code[this.fname1-1]]];
if (prod(size(dstate))!=(nin+1)*this.N+2) {
- dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
+ var dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
}
this.model.in1 = new ScilabDouble([nin]);
this.model.dstate = new ScilabDouble(dstate);
diff --git a/js/Sinks/WRITEC_f.pickle b/js/Sinks/WRITEC_f.pickle
index f630f0aa..1b564164 100644
--- a/js/Sinks/WRITEC_f.pickle
+++ b/js/Sinks/WRITEC_f.pickle
@@ -33,9 +33,10 @@ sS'arg1'
p3
S'object'
p4
-sS'graphics.exprs'
+sS'graphics'
p5
-NsS'dstate'
+g4
+sS'dstate'
p6
g2
sS'x.model'
@@ -45,86 +46,82 @@ sS'model.dep_ut'
p8
S'vector'
p9
-sS'[pa,fn,ex]'
+sS'model.in1'
p10
S'double'
p11
-sS'model.in1'
-p12
-g11
sS'x.graphics'
-p13
+p12
g4
sS'lunit'
-p14
+p13
g11
sS'swap'
-p15
+p14
g11
sS'fname'
-p16
+p15
S'string'
-p17
+p16
sS'frmt'
-p18
-g17
+p17
+g16
sS'model.evtin'
-p19
+p18
g11
sS'model.sim'
-p20
+p19
S'list'
-p21
+p20
sS'nin'
-p22
+p21
g11
sS'fmts'
-p23
+p22
g9
sS'in1'
-p24
+p23
g11
sS'N'
-p25
+p24
g11
-sS'graphics'
+sS'graphics.exprs'
+p25
+NsS'model.ipar'
p26
-g4
-sS'model.ipar'
-p27
g2
sS'typ'
-p28
+p27
g9
sS'ok'
-p29
+p28
S'boolean'
-p30
+p29
sS'model.blocktype'
-p31
-g17
+p30
+g16
sS'frmt1'
-p32
-g17
+p31
+g16
sS'fname1'
-p33
+p32
g11
sS'exprs'
-p34
+p33
g2
sS'gr_i'
-p35
+p34
g9
sS'ipar'
-p36
+p35
g2
sS'y'
-p37
+p36
g9
sS'x'
-p38
+p37
g11
sS'model'
-p39
+p38
g4
s. \ No newline at end of file
diff --git a/js/Sources/CLKINV_f.js b/js/Sources/CLKINV_f.js
index 4daea14e..fe23a42a 100644
--- a/js/Sources/CLKINV_f.js
+++ b/js/Sources/CLKINV_f.js
@@ -9,8 +9,8 @@ function CLKINV_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = string(this.prt);
- gr_i = [];
+ var exprs = string(this.prt);
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
return new EventInBlock(this.x);
}
@@ -25,10 +25,10 @@ function CLKINV_f() {
CLKINV_f.prototype.set = function CLKINV_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
- exprs = exprs[1-1];
+ var exprs = graphics.exprs;
+ var exprs = exprs[1-1];
while (true) {
[ok,this.prt,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CLKINV_f")],[" "],["Event input port"],[" "]],"Port Number",list("vec",1),exprs);
this.prt = int(this.prt);
diff --git a/js/Sources/CLKIN_f.js b/js/Sources/CLKIN_f.js
index b6c17b87..a4b5c636 100644
--- a/js/Sources/CLKIN_f.js
+++ b/js/Sources/CLKIN_f.js
@@ -9,7 +9,7 @@ function CLKIN_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = string(this.prt);
+ var exprs = string(this.prt);
this.x = standard_define([1,1],this.model,exprs," ");
return new BasicBlock(this.x);
}
@@ -24,10 +24,10 @@ function CLKIN_f() {
CLKIN_f.prototype.set = function CLKIN_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
- exprs = exprs[1-1];
+ var exprs = graphics.exprs;
+ var exprs = exprs[1-1];
while (true) {
[ok,this.prt,exprs] = scicos_getvalue("Set Event Input block parameters","Port number",list("vec",1),exprs);
this.prt = int(this.prt);
diff --git a/js/Sources/CLOCK_c.js b/js/Sources/CLOCK_c.js
index 10cc65e7..1642f70c 100644
--- a/js/Sources/CLOCK_c.js
+++ b/js/Sources/CLOCK_c.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/CLOCK_c.sci" */
function CLOCK_c() {
CLOCK_c.prototype.define = function CLOCK_c() {
- evtdly = EVTDLY_c("define");
+ var evtdly = EVTDLY_c("define");
evtdly.graphics.orig = [320,232];
evtdly.graphics.sz = [40,40];
evtdly.graphics.flip = true;
@@ -10,19 +10,19 @@ function CLOCK_c() {
evtdly.graphics.peout = 3;
evtdly.model.rpar = [[0.1],[0.1]];
evtdly.model.firing = 0.1;
- output_port = CLKOUT_f("define");
+ var output_port = CLKOUT_f("define");
output_port.graphics.orig = [399,162];
output_port.graphics.sz = [20,20];
output_port.graphics.flip = true;
output_port.graphics.exprs = "1";
output_port.graphics.pein = 5;
output_port.model.ipar = 1;
- split = CLKSPLIT_f("define");
+ var split = CLKSPLIT_f("define");
split.graphics.orig = [[380.71066],[172]];
split.graphics.pein = 3;
split.graphics.peout = [[5],[6]];
- gr_i = [];
- diagram = scicos_diagram();
+ var gr_i = [];
+ var diagram = scicos_diagram();
diagram.objs[1-1] = output_port;
diagram.objs[2-1] = evtdly;
diagram.objs[3-1] = scicos_link(xx=[[340],[340],[380.71]],yy=[[226.29],[172],[172]],ct=[5,-1],from=[2,1],to=[4,1]);
@@ -57,19 +57,19 @@ function CLOCK_c() {
this.t0 = arguments[0]["t0"]
this.exprs0 = arguments[0]["exprs0"]
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="EVTDLY_c") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- xx = arg1.model.rpar.objs[path-1];
- exprs = xx.graphics.exprs;
+ var newpar = list();
+ var xx = arg1.model.rpar.objs[path-1];
+ var exprs = xx.graphics.exprs;
this.model = xx.model;
- t0_old = this.model.firing;
- dt_old = this.model.rpar[1-1];
- model_n = this.model;
+ var t0_old = this.model.firing;
+ var dt_old = this.model.rpar[1-1];
+ var model_n = this.model;
while (true) {
[ok,this.dt,this.t0,this.exprs0] = scicos_getvalue([[msprintf("Set %s block parameters","CLOCK_c")],[" "],["Event clock generator"],[" "],["&nbsp; Do not start if \'Initialisation Time\' is negative"],[" "]],["Period","Initialisation Time"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -77,7 +77,7 @@ function CLOCK_c() {
}
if (this.dt<=0) {
block_parameter_error(msprintf("Wrong values for \'%s\' parameter: %5.1e.","Period",this.dt),"Strictly positive number expected.");
- ok = false;
+ var ok = false;
}
if (ok) {
xx.graphics.exprs = this.exprs0;
@@ -92,13 +92,13 @@ function CLOCK_c() {
newpar[size(newpar)+1-1] = path;
}
if (t0_old!=this.t0) {
- needcompile = 2;
+ var needcompile = 2;
} else {
- needcompile = 0;
+ var needcompile = 0;
}
this.x = arg1;
- y = needcompile;
- typ = newpar;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Sources/CLOCK_f.js b/js/Sources/CLOCK_f.js
index 05832c5f..a18cfc4b 100644
--- a/js/Sources/CLOCK_f.js
+++ b/js/Sources/CLOCK_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/CLOCK_f.sci" */
function CLOCK_f() {
CLOCK_f.prototype.define = function CLOCK_f() {
- evtdly = EVTDLY_f("define");
+ var evtdly = EVTDLY_f("define");
evtdly.graphics.orig = [320,232];
evtdly.graphics.sz = [40,40];
evtdly.graphics.flip = true;
@@ -10,19 +10,19 @@ function CLOCK_f() {
evtdly.graphics.peout = 3;
evtdly.model.rpar = 0.1;
evtdly.model.firing = 0.1;
- output_port = CLKOUT_f("define");
+ var output_port = CLKOUT_f("define");
output_port.graphics.orig = [399,162];
output_port.graphics.sz = [20,20];
output_port.graphics.flip = true;
output_port.graphics.exprs = "1";
output_port.graphics.pein = 5;
output_port.model.ipar = 1;
- split = CLKSPLIT_f("define");
+ var split = CLKSPLIT_f("define");
split.graphics.orig = [[380.71066],[172]];
split.graphics.pein = 3;
split.graphics.peout = [[5],[6]];
- gr_i = [];
- diagram = scicos_diagram();
+ var gr_i = [];
+ var diagram = scicos_diagram();
diagram.objs[1-1] = output_port;
diagram.objs[2-1] = evtdly;
diagram.objs[3-1] = scicos_link(xx=[[340],[340],[380.71]],yy=[[226.29],[172],[172]],ct=[5,-1],from=[2,1],to=[4,1]);
@@ -57,19 +57,19 @@ function CLOCK_f() {
this.t0 = arguments[0]["t0"]
this.exprs0 = arguments[0]["exprs0"]
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="EVTDLY_f") {
- path = i;
+ var path = i;
break;
}
}
- newpar = list();
- xx = arg1.model.rpar.objs[path-1];
- exprs = xx.graphics.exprs;
+ var newpar = list();
+ var xx = arg1.model.rpar.objs[path-1];
+ var exprs = xx.graphics.exprs;
this.model = xx.model;
- t0_old = this.model.firing;
- dt_old = this.model.rpar;
- model_n = this.model;
+ var t0_old = this.model.firing;
+ var dt_old = this.model.rpar;
+ var model_n = this.model;
while (true) {
[ok,this.dt,this.t0,this.exprs0] = scicos_getvalue("Set Clock block parameters",["Period","Init time"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -77,7 +77,7 @@ function CLOCK_f() {
}
if (this.dt<=0) {
message("period must be positive");
- ok = false;
+ var ok = false;
}
if (ok) {
xx.graphics.exprs = this.exprs0;
@@ -92,13 +92,13 @@ function CLOCK_f() {
newpar[size(newpar)+1-1] = path;
}
if (t0_old!=this.t0) {
- needcompile = 2;
+ var needcompile = 2;
} else {
- needcompile = 0;
+ var needcompile = 0;
}
this.x = arg1;
- y = needcompile;
- typ = newpar;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Sources/CONST.js b/js/Sources/CONST.js
index f42bf2cf..82b1795b 100644
--- a/js/Sources/CONST.js
+++ b/js/Sources/CONST.js
@@ -9,8 +9,8 @@ function CONST() {
this.model.rpar = new ScilabDouble([this.C]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = strcat(sci2exp(this.C));
- gr_i = [];
+ var exprs = strcat(sci2exp(this.C));
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -25,16 +25,16 @@ function CONST() {
CONST.prototype.set = function CONST() {
this.C = parseFloat(arguments[0]["C"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.C,exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),exprs);
if (!ok) {
break;
}
- sz = size(this.C);
- nout = size(this.C,"*");
+ var sz = size(this.C);
+ var nout = size(this.C,"*");
if (nout==0) {
message("C must have at least one element");
} else if (and(sz>1)) {
diff --git a/js/Sources/CONST_f.js b/js/Sources/CONST_f.js
index ad63477d..cb76e0fb 100644
--- a/js/Sources/CONST_f.js
+++ b/js/Sources/CONST_f.js
@@ -9,8 +9,8 @@ function CONST_f() {
this.model.rpar = new ScilabDouble([this.C]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = strcat(sci2exp(this.C));
- gr_i = [];
+ var exprs = strcat(sci2exp(this.C));
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -25,15 +25,15 @@ function CONST_f() {
CONST_f.prototype.set = function CONST_f() {
this.C = parseFloat(arguments[0]["C"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.C,exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),exprs);
if (!ok) {
break;
}
- nout = size(this.C,"*");
+ var nout = size(this.C,"*");
if (nout==0) {
message("C must have at least one element");
} else {
diff --git a/js/Sources/CONST_m.js b/js/Sources/CONST_m.js
index fef8996f..c2357e68 100644
--- a/js/Sources/CONST_m.js
+++ b/js/Sources/CONST_m.js
@@ -12,8 +12,8 @@ function CONST_m() {
this.model.opar = list();
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = sci2exp(this.C);
- gr_i = [];
+ var exprs = sci2exp(this.C);
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -28,15 +28,15 @@ function CONST_m() {
CONST_m.prototype.set = function CONST_m() {
this.C = inverse(arguments[0]["C"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.C,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CONST_m")],[" "],["Constant value generator"],[" "]],"Constant Value",list("vec",-1),exprs);
if (!ok) {
break;
}
- nout = size(this.C);
+ var nout = size(this.C);
if (find(nout==0)!=[]) {
block_parameter_error(msprintf("Wrong size for \'%s\' parameter","Constant Value"),"Constant value must have at least one element.");
} else {
@@ -44,29 +44,32 @@ function CONST_m() {
this.model.opar = list(this.C);
if ((this.type[this.C-1]==1)) {
if (isreal(this.C)) {
- ot = 1;
+ var ot = 1;
} else {
- ot = 2;
+ var ot = 2;
}
} else if ((typeof(this.C)=="int32")) {
- ot = 3;
+ var ot = 3;
} else if ((typeof(this.C)=="int16")) {
- ot = 4;
+ var ot = 4;
} else if ((typeof(this.C)=="int8")) {
- ot = 5;
+ var ot = 5;
} else if ((typeof(this.C)=="uint32")) {
- ot = 6;
+ var ot = 6;
} else if ((typeof(this.C)=="uint16")) {
- ot = 7;
+ var ot = 7;
} else if ((typeof(this.C)=="uint8")) {
- ot = 8;
+ var ot = 8;
} else {
block_parameter_error(msprintf("Wrong type for \'%s\' parameter","Constant Value"),"Value type must be a numeric type (double, complex, int, int8, ...).");
- ok = false;
+ var ok = false;
}
if (ok) {
this.model.rpar = [];
- [this.model,graphics,ok] = set_io(this.model,graphics,list(),list(nout,ot),[],[]);
+ var tmpvar0 = set_io(this.model,graphics,list(),list(nout,ot),[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Sources/CONST_m.pickle b/js/Sources/CONST_m.pickle
index 2b3f2d42..787cefcc 100644
--- a/js/Sources/CONST_m.pickle
+++ b/js/Sources/CONST_m.pickle
@@ -43,53 +43,50 @@ p12
sS'C'
p13
g8
-sS'[this.model,graphics,ok]'
-p14
-g6
sS'model.out2'
-p15
+p14
g6
sS'model.rpar'
-p16
+p15
g8
sS'graphics.exprs'
-p17
+p16
NsS'typ'
-p18
+p17
g8
sS'model.opar'
-p19
+p18
g12
sS'ok'
-p20
+p19
S'boolean'
-p21
+p20
sS'model.blocktype'
-p22
+p21
S'string'
-p23
+p22
sS'model.dep_ut'
-p24
+p23
g8
sS'exprs'
-p25
-g23
+p24
+g22
sS'gr_i'
-p26
+p25
g8
sS'y'
-p27
+p26
g8
sS'x'
-p28
+p27
g6
sS'model'
-p29
+p28
g2
sS'ot'
-p30
+p29
g6
sS'nout'
-p31
+p30
g6
s. \ No newline at end of file
diff --git a/js/Sources/CURVE_c.js b/js/Sources/CURVE_c.js
index 742bfed7..0076b715 100644
--- a/js/Sources/CURVE_c.js
+++ b/js/Sources/CURVE_c.js
@@ -4,10 +4,10 @@ function CURVE_c() {
this.model = scicos_model();
this.xx = [0,1,2];
this.yy = [10,20,-30];
- N = 3;
+ var N = 3;
this.Method = 3;
this.PeriodicOption = "y";
- Graf = "n";
+ var Graf = "n";
this.model.sim = list(new ScilabString(["curve_c"]), new ScilabDouble([4]));
this.model.in1 = [];
this.model.out = new ScilabDouble([1]);
@@ -18,8 +18,8 @@ function CURVE_c() {
this.model.evtin = new ScilabDouble([1]);
this.model.evtout = new ScilabDouble([1]);
this.model.firing = new ScilabDouble([0]);
- exprs = [[sci2exp(this.Method)],[sci2exp(this.xx)],[sci2exp(this.yy)],[this.PeriodicOption],[Graf]];
- gr_i = [];
+ var exprs = [[sci2exp(this.Method)],[sci2exp(this.xx)],[sci2exp(this.yy)],[this.PeriodicOption],[Graf]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -44,70 +44,78 @@ function CURVE_c() {
this.graf = arguments[0]["graf"]
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- ok = false;
- SaveExit = false;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var ok = false;
+ var SaveExit = false;
while (true) {
- Ask_again = false;
+ var Ask_again = false;
[ok,this.Method,this.xx,this.yy,this.PeriodicOption,this.graf,exprs] = scicos_getvalue("Spline data",["Spline Method (0..7)","x","y","Periodic signal(y/n)?","Launch graphic window(y/n)?"],list("vec",1,"vec",-1,"vec",-1,"str",1,"str",1),exprs);
if (!ok) {
break;
}
if (this.PeriodicOption=="y"||this.PeriodicOption=="Y") {
- PO = 1;
+ var PO = 1;
} else {
exprs[4-1] = "n";
- PO = 0;
+ var PO = 0;
}
- mtd = int(this.Method);
+ var mtd = int(this.Method);
if (mtd<0) {
- mtd = 0;
+ var mtd = 0;
}
if (mtd>7) {
- mtd = 7;
+ var mtd = 7;
}
- METHOD = getmethod(mtd);
+ var METHOD = getmethod(mtd);
if (!Ask_again) {
this.xx = this.xx.slice();
this.yy = this.yy.slice();
- [nx,mx] = size(this.xx);
- [ny,my] = size(this.yy);
+ var tmpvar0 = size(this.xx)
+ var nx = tmpvar0[0]
+ var mx = tmpvar0[1];
+ var tmpvar1 = size(this.yy)
+ var ny = tmpvar1[0]
+ var my = tmpvar1[1];
if (!((nx==ny)&&(mx==my))) {
messagebox("Incompatible size of [x] and [y]","modal","error");
- Ask_again = true;
+ var Ask_again = true;
}
}
if (!Ask_again) {
this.xy = [this.xx,this.yy];
- [this.xy] = cleandata(this.xy);
- N = size(this.xy,"r");
+ var tmpvar2 = cleandata(this.xy)
+ this.xy = tmpvar2[0];
+ var N = size(this.xy,"r");
exprs[5-1] = "n";
if (this.graf=="y"||this.graf=="Y") {
- ipar = [[N],[mtd],[PO]];
- rpar = [];
+ var ipar = [[N],[mtd],[PO]];
+ var rpar = [];
if ((winsid()==[])) {
this.curwin = 0;
} else {
this.curwin = max(winsid())+1;
}
- [orpar,oipar,ok] = poke_point(this.xy,ipar,rpar);
+ var tmpvar3 = poke_point(this.xy,ipar,rpar)
+ var orpar = tmpvar3[0]
+ var oipar = tmpvar3[1]
+ var ok = tmpvar3[2];
if (!ok) {
break;
}
- N2 = oipar[1-1];
- xy2 = [orpar.slice(1-1,N2),orpar.slice(N2+1-1,2*N2)];
- New_methhod = oipar[2-1];
- DChange = false;
- METHOD = getmethod(New_methhod);
+ var N2 = oipar[1-1];
+ var xy2 = [orpar.slice(1-1,N2),orpar.slice(N2+1-1,2*N2)];
+ var New_methhod = oipar[2-1];
+ var DChange = false;
+ var METHOD = getmethod(New_methhod);
if (or(this.xy.slice()[1-1]!=xy2.slice()[1-1])) {
- DChange = true;
+ var DChange = true;
}
if (or(this.xy.slice(1-1,N-1)[2-1]!=xy2.slice(1-1,N2-1)[2-1])) {
- DChange = true;
+ var DChange = true;
}
if ((this.xy[N-1][2-1]!=xy2[N2-1][2-1]&&(METHOD!="periodic"))) {
- DChange = true;
+ var DChange = true;
}
if (DChange) {
exprs[2-1] = strcat(sci2exp(xy2.slice()[1-1]));
@@ -115,31 +123,34 @@ function CURVE_c() {
}
exprs[1-1] = sci2exp(New_methhod);
if (oipar[3-1]==1) {
- perop = "y";
+ var perop = "y";
} else {
- perop = "n";
+ var perop = "n";
}
exprs[4-1] = perop;
- SaveExit = true;
+ var SaveExit = true;
} else {
- [Xdummy,Ydummy,orpar] = Do_Spline(N,mtd,this.xy.slice()[1-1],this.xy.slice()[2-1]);
+ var tmpvar4 = Do_Spline(N,mtd,this.xy.slice()[1-1],this.xy.slice()[2-1])
+ var Xdummy = tmpvar4[0]
+ var Ydummy = tmpvar4[1]
+ var orpar = tmpvar4[2];
if ((METHOD=="periodic")) {
this.xy[N-1][2-1] = this.xy[1-1][2-1];
}
if ((METHOD=="order 2"||METHOD=="not_a_knot"||METHOD=="periodic"||METHOD=="monotone"||METHOD=="fast"||METHOD=="clamped")) {
- orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]],[orpar]];
+ var orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]],[orpar]];
} else {
if ((METHOD=="zero order"||METHOD=="linear")) {
- orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]]];
+ var orpar = [[this.xy.slice()[1-1]],[this.xy.slice()[2-1]]];
}
}
exprs[1-1] = sci2exp(mtd);
- oipar = [[N],[mtd],[PO]];
- SaveExit = true;
+ var oipar = [[N],[mtd],[PO]];
+ var SaveExit = true;
}
}
if ((SaveExit)) {
- xp = find(orpar.slice(1-1,oipar[1-1])>=0);
+ var xp = find(orpar.slice(1-1,oipar[1-1])>=0);
if ((xp!=[])) {
this.model.firing = new ScilabDouble([orpar[xp[1-1]-1]]);
} else {
diff --git a/js/Sources/CURVE_c.pickle b/js/Sources/CURVE_c.pickle
index 3bc4ee41..8aca82e4 100644
--- a/js/Sources/CURVE_c.pickle
+++ b/js/Sources/CURVE_c.pickle
@@ -155,796 +155,724 @@ S'string'
p4
sS'Sin_exprs'
p5
-NsS'ya'
+NsS'xenR'
p6
S'double'
p7
-sS'xenR'
+sS'x2'
p8
-g7
-sS'[orpar,oipar]'
-p9
-g7
+g4
sS'Y[j-1]'
-p10
-g7
-sS'NC'
-p11
+p9
g7
sS'Ask_again'
-p12
+p10
S'boolean'
-p13
+p11
sS'y1'
-p14
+p12
g4
sS'Amp3'
-p15
+p13
g2
sS'curwin'
-p16
+p14
g7
sS'Standm'
-p17
+p15
g4
sS'xenC'
-p18
+p16
g4
sS'yenR'
-p19
+p17
g7
sS'a.title.text'
-p20
+p18
g2
sS'xmn'
-p21
+p19
g7
sS'x1'
-p22
+p20
g4
sS'ye[zz-1]'
-p23
+p21
g2
sS'lx21'
-p24
+p22
g7
sS'xstC'
-p25
+p23
g4
sS'ymx'
-p26
-g7
-sS'Zt'
-p27
-S'matrix'
-p28
-sS'[this.xy,rpar,ipar]'
-p29
-g7
-sS'[xtt,k2]'
-p30
+p24
g7
sS'Bt'
-p31
-g28
+p25
+S'matrix'
+p26
sS'a.title.font_size'
-p32
+p27
g7
sS'xmx'
-p33
+p28
g7
sS'x1p'
-p34
+p29
g7
sS'random_n_exprs'
-p35
+p30
S'list'
-p36
+p31
sS'a.axes_visible'
-p37
+p32
g4
sS'METHOD'
-p38
+p33
g7
sS'PeriodicOption'
-p39
+p34
g4
sS'ymn'
-p40
+p35
g7
sS'NOrder'
-p41
+p36
g7
sS'var4'
-p42
+p37
g2
sS'xa'
-p43
+p38
g7
sS'yo'
-p44
+p39
g7
sS'y22'
-p45
+p40
g4
-sS'[sok]'
-p46
+sS'ya'
+p41
g7
sS'YMX'
-p47
+p42
g7
sS'yc'
-p48
+p43
g7
sS'a.title.foreground'
-p49
+p44
g7
sS'model.rpar'
-p50
-g28
+p45
+g26
sS'yy'
-p51
+p46
g2
sS'x[zz-1]'
-p52
+p47
g2
sS'Pulse_exprs'
-p53
+p48
NsS'dx'
-p54
+p49
g7
sS'dy'
-p55
+p50
g7
sS'random_n_exprs2'
-p56
-g36
+p51
+g31
sS'a.clip_state'
-p57
+p52
g4
sS'yt'
-p58
+p53
g7
sS'model.blocktype'
-p59
-g4
-sS'x21'
-p60
+p54
g4
sS'splines'
-p61
+p55
NsS'oipar'
-p62
+p56
NsS'MENU'
-p63
+p57
g2
sS't4'
-p64
+p58
g4
sS't5'
-p65
+p59
g4
sS't2'
-p66
+p60
g4
sS'x.model'
-p67
+p61
NsS'model.dep_ut'
-p68
+p62
g2
sS'menu_s'
-p69
+p63
g2
-sS'Sawt1_exprs'
-p70
-NsS'sample4'
-p71
+sS'sample5'
+p64
+g2
+sS'sample4'
+p65
g2
sS'sTp2'
-p72
+p66
g2
sS'x'
-p73
+p67
g7
sS'x12'
-p74
+p68
g4
-sS'[ny,my]'
-p75
-g7
sS'exprs[1-1]'
-p76
+p69
g4
sS'points.data'
-p77
+p70
g2
sS'j'
-p78
+p71
g4
-sS'[nx,mx]'
-p79
-g7
sS'x11'
-p80
+p72
g4
sS'arg1'
-p81
+p73
S'object'
-p82
+p74
sS'Pd3'
-p83
+p75
g2
sS't3'
-p84
+p76
g4
sS'ey'
-p85
+p77
g7
sS'ex'
-p86
+p78
g7
sS'zz'
-p87
+p79
g7
sS'sAmp'
-p88
+p80
g2
sS'a.children[2-1]'
-p89
-g82
-sS'sample5'
-p90
-g2
-sS'a.title.font_style'
-p91
+p81
+g74
+sS'Sawt1_exprs'
+p82
+NsS'a.title.font_style'
+p83
g7
sS'y2'
-p92
+p84
g4
sS'orpar'
-p93
+p85
g2
sS'x.graphics'
-p94
-g82
-sS'A[j+2-1][i+N+1-1]'
-p95
-g7
+p86
+g74
sS'menu_d'
-p96
+p87
g2
sS'menu_e'
-p97
+p88
g2
sS'ye[$+1-1]'
-p98
+p89
g7
-sS'xy[zz-1].slice()'
-p99
-g2
sS'A[j+1-1][i+N-1]'
-p100
+p90
g7
sS'a.children[1-1]'
-p101
-g82
+p91
+g74
sS'y1p'
-p102
+p92
g7
sS'r'
-p103
+p93
g4
sS'seed4'
-p104
+p94
g2
sS'seed5'
-p105
+p95
g2
sS'B[j+1-1]'
-p106
+p96
g7
sS'model.evtin'
-p107
+p97
g7
sS'y21'
-p108
+p98
g4
sS'menu_t'
-p109
+p99
g2
sS'menu_r'
-p110
+p100
g2
sS'PO'
-p111
+p101
g7
sS'x22'
-p112
+p102
g4
sS'C'
-p113
+p103
g2
sS'DChange'
-p114
-g13
+p104
+g11
sS'Cformat'
-p115
+p105
g4
-sS'[Xdummy,Ydummy,orpar]'
-p116
+sS'Q[i+N-1][i-1]'
+p106
g7
sS'rep'
-p117
+p107
g7
sS'ymx1'
-p118
+p108
g7
sS'xy[N-1][2-1]'
-p119
+p109
g7
sS'ipar[3-1]'
-p120
+p110
g7
sS'sTp'
-p121
+p111
g2
sS'wp'
-p122
+p112
g2
-sS'ystC'
-p123
-g4
sS'New_methhod'
-p124
+p113
g7
sS'PeridicOption'
-p125
+p114
g7
sS'Graf'
-p126
+p115
g4
sS'Q'
-p127
+p116
g7
sS'ok'
-p128
-g13
+p117
+g11
sS'ly11'
-p129
+p118
g7
sS'xy[k-1].slice()'
-p130
+p119
g2
sS'Z'
-p131
+p120
g2
sS'Cmenu'
-p132
+p121
g4
-sS'[xo,k2]'
-p133
-g7
sS'periodicoption'
-p134
+p122
g7
sS'w'
-p135
+p123
g4
sS'a.x_ticks'
-p136
-g82
+p124
+g74
sS'y2p'
-p137
+p125
g7
sS'A[j+1-1][i+2*N-1]'
-p138
+p126
g7
sS'YMN'
-p139
+p127
g7
sS'Q[i-1][i+N-1]'
-p140
+p128
g7
sS'y11'
-p141
+p129
g4
sS'x2p'
-p142
+p130
g7
sS'y12'
-p143
+p131
g4
-sS'Lx'
-p144
-g7
-sS'py'
-p145
+sS'NC'
+p132
g7
sS'xyt'
-p146
+p133
g2
sS'xo'
-p147
-g28
+p134
+g26
sS'ipar[2-1]'
-p148
-g7
-sS'[mv,nv]'
-p149
+p135
g7
sS'xc'
-p150
+p136
g7
sS'sok'
-p151
-g13
+p137
+g11
sS'offset'
-p152
+p138
g2
sS'splines.data'
-p153
+p139
g2
sS'perop'
-p154
+p140
g4
sS'xe'
-p155
+p141
g7
sS'Y'
-p156
+p142
g7
sS'xx'
-p157
+p143
g2
sS'xy'
-p158
+p144
g2
sS'btn'
-p159
+p145
g7
sS'xye'
-p160
+p146
g2
sS'xe[$+1-1]'
-p161
+p147
g7
sS'SaveExit'
-p162
-g13
+p148
+g11
sS'xp'
-p163
+p149
g7
sS'Method'
-p164
+p150
g7
sS'xt'
-p165
-g28
+p151
+g26
sS'xyo'
-p166
+p152
g2
sS'Q[i-1][i-1]'
-p167
+p153
g7
sS'ystR'
-p168
+p154
g7
sS'A[j-1][i+2*N-1]'
-p169
+p155
g7
sS'random_u_exprs2'
-p170
-g36
+p156
+g31
sS'px'
-p171
+p157
g7
-sS'[orpar,oipar,ok]'
-p172
+sS'py'
+p158
g7
sS'tok'
-p173
-g13
+p159
+g11
sS'ixy'
-p174
+p160
g2
sS'rect'
-p175
-g28
+p161
+g26
sS'NP'
-p176
+p162
g7
sS'Amp'
-p177
+p163
g2
-sS'x2'
-p178
-g4
sS'exprs[2-1]'
-p179
+p164
g7
sS'model.firing'
-p180
+p165
g7
sS'xy2'
-p181
+p166
g2
sS'B'
-p182
+p167
g7
sS'A'
-p183
-g7
-sS'[Value,TextInd]'
-p184
+p168
g7
sS'yenC'
-p185
+p169
g4
sS'N'
-p186
-g7
-sS'[this.xye]'
-p187
+p170
g7
sS'random_u_exprs'
-p188
-g36
+p171
+g31
sS'Sawt2_exprs'
-p189
-NsS'[btn,xc,yc,win,Cmenu]'
-p190
+p172
+NsS'XMX'
+p173
g7
sS'graphics'
-p191
-g82
+p174
+g74
sS'Exitm'
-p192
+p175
g4
sS'N2'
-p193
+p176
g7
sS'model.ipar'
-p194
-g28
-sS'[xyo]'
-p195
-g7
+p177
+g26
sS'Pw3'
-p196
+p178
g2
sS'f'
-p197
+p179
g7
sS'a.grid'
-p198
+p180
g2
sS'y[N-1]'
-p199
-g7
-sS'[dca,k]'
-p200
-g7
-sS'[this.xt,k2]'
-p201
-g7
-sS'[this.xy]'
-p202
+p181
g7
+sS'xy[zz-1].slice()'
+p182
+g2
sS'gr_i'
-p203
+p183
g2
sS'ipar'
-p204
+p184
g2
-sS'[rpar,ipar]'
-p205
-g7
+sS'ystC'
+p185
+g4
sS'mtd'
-p206
+p186
g7
sS'PERIODIC'
-p207
+p187
g4
sS'xmx1'
-p208
+p188
g7
sS'scam'
-p209
+p189
g4
sS'exprs[4-1]'
-p210
+p190
g4
sS'ans0'
-p211
+p191
g4
sS'ymn1'
-p212
+p192
g7
sS't1'
-p213
+p193
g4
sS'model.evtout'
-p214
+p194
g7
sS'rpar'
-p215
+p195
g2
sS'lx11'
-p216
+p196
+g7
+sS'model.out'
+p197
g7
-sS'np5'
-p217
-g2
sS'Bias3'
-p218
+p198
g2
sS'Tp3'
-p219
+p199
+g2
+sS'np5'
+p200
g2
-sS'model.out'
-p220
-g7
sS'np4'
-p221
+p201
g2
sS'rectx'
-p222
+p202
g7
sS'np1'
-p223
-g7
-sS'[X,Y,orpar]'
-p224
+p203
g7
-sS'[xy]'
-p225
+sS'Lx'
+p204
g7
+sS'x21'
+p205
+g4
sS'model.in1'
-p226
+p206
g2
sS'x[k-1]'
-p227
+p207
g2
sS'HIT'
-p228
-g13
+p208
+g11
sS'xstR'
-p229
+p209
g7
sS'xe[zz-1]'
-p230
+p210
g2
sS'A[j+1-1][i-1]'
-p231
+p211
g7
sS'sAmp2'
-p232
+p212
g2
sS'TN'
-p233
+p213
g2
sS'menus'
-p234
-g36
+p214
+g31
sS'sdelay'
-p235
+p215
g2
sS'points'
-p236
-NsS'[lhs,rhs]'
-p237
-g7
-sS'Q[i+N-1][i+N-1]'
-p238
+p216
+NsS'Q[i+N-1][i+N-1]'
+p217
g7
sS'TA'
-p239
-g28
+p218
+g26
sS'Datam'
-p240
+p219
g4
sS'model.sim'
-p241
-g36
+p220
+g31
sS'XMN'
-p242
+p221
g7
-sS'[tok,xytt]'
-p243
+sS'A[j+2-1][i+N+1-1]'
+p222
g7
sS'a.data_bounds'
-p244
+p223
g7
sS'menu_o'
-p245
+p224
g2
sS'd'
-p246
+p225
g7
sS'ye'
-p247
+p226
g7
sS'X'
-p248
-g28
-sS'[fd,SST,Sheetnames,Sheetpos]'
-p249
-g7
+p227
+g26
+sS'Zt'
+p228
+g26
sS'fd'
-p250
+p229
g7
sS'exprs[5-1]'
-p251
+p230
g4
sS'graphics.exprs'
-p252
+p231
NsS'phase'
-p253
+p232
g7
sS'ZERO_POINT'
-p254
-g13
+p233
+g11
sS'typ'
-p255
+p234
g2
sS'min5'
-p256
+p235
g2
-sS'[nD,mD]'
-p257
-g7
sS'a'
-p258
-g82
+p236
+g74
sS'mok'
-p259
-g13
+p237
+g11
sS'Orderm'
-p260
+p238
g4
sS'A[j+2-1][i+N-1]'
-p261
+p239
g7
sS'B[j-1]'
-p262
+p240
g7
sS'ly21'
-p263
+p241
g7
sS'y[zz-1]'
-p264
+p242
g2
sS'A[j+2-1][i-1]'
-p265
+p243
g7
sS'max5'
-p266
+p244
g2
sS'exprs'
-p267
-g28
+p245
+g26
sS'exprs[3-1]'
-p268
+p246
g7
sS'y[k-1]'
-p269
+p247
g2
sS'At'
-p270
-g28
+p248
+g26
sS'y'
-p271
-g7
-sS'XMX'
-p272
+p249
g7
sS'model'
-p273
-g82
+p250
+g74
sS'order'
-p274
-g7
-sS'Q[i+N-1][i-1]'
-p275
+p251
g7
s. \ No newline at end of file
diff --git a/js/Sources/CURV_f.js b/js/Sources/CURV_f.js
index 7bd33137..7a64af1d 100644
--- a/js/Sources/CURV_f.js
+++ b/js/Sources/CURV_f.js
@@ -1,12 +1,12 @@
/* autogenerated from "macros/Sources/CURV_f.sci" */
function CURV_f() {
CURV_f.prototype.define = function CURV_f() {
- xx = [[0],[1],[2]];
- yy = [[-5],[5],[0]];
- rect = [0,-5,2,5];
- axisdata = [[2],[10],[2],[10]];
- ipar = [[size(xx,1)],[axisdata.slice()]];
- rpar = [[xx],[yy],[rect.slice()]];
+ var xx = [[0],[1],[2]];
+ var yy = [[-5],[5],[0]];
+ var rect = [0,-5,2,5];
+ var axisdata = [[2],[10],[2],[10]];
+ var ipar = [[size(xx,1)],[axisdata.slice()]];
+ var rpar = [[xx],[yy],[rect.slice()]];
this.model = scicos_model();
this.model.sim = new ScilabString(["intplt"]);
this.model.in1 = [];
@@ -15,7 +15,7 @@ function CURV_f() {
this.model.ipar = new ScilabDouble([size(xx,1)],[axisdata.slice()]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -30,34 +30,38 @@ function CURV_f() {
CURV_f.prototype.set = function CURV_f() {
this.x = arg1;
this.model = arg1.model;
- graphics = arg1.graphics;
- rpar = this.model.rpar;
- ipar = this.model.ipar;
- n = ipar[1-1];
- xx = rpar.slice(1-1,n);
- yy = rpar.slice(n+1-1,2*n);
- gc = list(rpar.slice(2*n+1-1,2*n+4),ipar.slice(2-1,5));
+ var graphics = arg1.graphics;
+ var rpar = this.model.rpar;
+ var ipar = this.model.ipar;
+ var n = ipar[1-1];
+ var xx = rpar.slice(1-1,n);
+ var yy = rpar.slice(n+1-1,2*n);
+ var gc = list(rpar.slice(2*n+1-1,2*n+4),ipar.slice(2-1,5));
while (true) {
[ln,fun]=where()
if (!or(fun=="do_eval")) {
- [xx,yy,ok,gc] = edit_curv(xx,yy,"axy",[" "," "," "],gc);
+ var tmpvar0 = edit_curv(xx,yy,"axy",[" "," "," "],gc)
+ var xx = tmpvar0[0]
+ var yy = tmpvar0[1]
+ var ok = tmpvar0[2]
+ var gc = tmpvar0[3];
} else {
- ok = true;
+ var ok = true;
}
if (!ok) {
break;
}
- n = size(xx,"*");
+ var n = size(xx,"*");
if (or(xx.slice(2-1,n)-xx.slice(1-1,n-1)<0)) {
message("You have not defined a function");
- ok = false;
+ var ok = false;
}
if (ok) {
this.model.sim = new ScilabString(["intplt"]);
this.model.firing = [];
- rect = gc[1-1];
+ var rect = gc[1-1];
this.model.rpar = new ScilabDouble([xx.slice()],[yy.slice()],[rect.slice()]);
- axisdata = gc[2-1];
+ var axisdata = gc[2-1];
this.model.ipar = new ScilabDouble([size(xx,"*")],[axisdata.slice()]);
this.x.graphics = graphics;
this.x.model = this.model;
diff --git a/js/Sources/CURV_f.pickle b/js/Sources/CURV_f.pickle
index 0c4691cd..cd8f09a6 100644
--- a/js/Sources/CURV_f.pickle
+++ b/js/Sources/CURV_f.pickle
@@ -61,38 +61,35 @@ g11
sS'rect'
p22
g11
-sS'[xx,yy,ok,gc]'
-p23
-g9
sS'ok'
-p24
+p23
S'boolean'
-p25
+p24
sS'model.blocktype'
-p26
+p25
g15
sS'xx'
-p27
+p26
g4
sS'model.dep_ut'
-p28
+p27
g11
sS'n'
-p29
+p28
g9
sS'gr_i'
-p30
+p29
g11
sS'ipar'
-p31
+p30
g4
sS'y'
-p32
+p31
g11
sS'x'
-p33
+p32
g9
sS'model'
-p34
+p33
g2
s. \ No newline at end of file
diff --git a/js/Sources/Counter.js b/js/Sources/Counter.js
index c1fd50fe..f159e9f9 100644
--- a/js/Sources/Counter.js
+++ b/js/Sources/Counter.js
@@ -13,8 +13,8 @@ function Counter() {
this.model.ipar = new ScilabDouble([this.rule],[this.maxim],[this.minim]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.minim)],[string(this.maxim)],[string(this.rule)]];
- gr_i = [];
+ var exprs = [[string(this.minim)],[string(this.maxim)],[string(this.rule)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,8 +34,8 @@ function Counter() {
this.maxim = parseFloat(arguments[0]["maxim"])
this.rule = parseFloat(arguments[0]["rule"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.minim,this.maxim,this.rule,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","Counter")],[" "],["Integer counter generator"],[" "]],["Minimum","Maximum","Rule (1:Increment, 2:Decrement)"],list("vec",1,"vec",1,"vec",1),exprs);
diff --git a/js/Sources/FROMWSB.js b/js/Sources/FROMWSB.js
index 5f9c8d2d..31a19f1f 100644
--- a/js/Sources/FROMWSB.js
+++ b/js/Sources/FROMWSB.js
@@ -1,13 +1,13 @@
/* autogenerated from "macros/Sources/FROMWSB.sci" */
function FROMWSB() {
FROMWSB.prototype.define = function FROMWSB() {
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-159.096,811.104,-121.216,617.984,1323,1008,331,284,630,480,1426,231,1.4],Title="FROMWSB",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-159.096,811.104,-121.216,617.984,1323,1008,331,284,630,480,1426,231,1.4],Title="FROMWSB",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="FROMWS_c",graphics=scicos_graphics(orig=[260.37067,261.584],sz=[70,40],flip=true,theta=0,exprs=[["V"],["1"],["1"],["0"]],pin=[],pout=4,pein=2,peout=2,gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("fromws_c",4),in1=[],in2=[],intyp=1,out=-1,out2=-2,outtyp=-1,evtin=1,evtout=1,state=[],dstate=[],odstate=list(),rpar=[],ipar=[[1],[-31],[1],[1],[0]],opar=list(),blocktype="d",firing=0,dep_ut=[false,true],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_link(xx=[[295.37067],[295.37067],[233.23733],[233.23733],[295.37067],[295.37067]],yy=[[255.86971],[223.45067],[223.45067],[337.85067],[337.85067],[307.29829]],id="drawlink",thick=[0,0],ct=[5,-1],from=[1,1,0],to=[1,1,1]);
scs_m_1.objs[3-1] = scicos_block(gui="OUT_f",graphics=scicos_graphics(orig=[358.9421,271.584],sz=[20,20],flip=true,theta=0,exprs="1",pin=4,pout=[],pein=[],peout=[],gr_i=[],id="",in_implicit="E",out_implicit=[]),model=scicos_model(sim="output",in1=-1,in2=-2,intyp=-1,out=[],out2=[],outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[4-1] = scicos_link(xx=[[338.9421],[358.9421]],yy=[[281.584],[281.584]],id="drawlink",thick=[0,0],ct=[1,1],from=[1,1,0],to=[3,1,1]);
this.model = scicos_model(sim="csuper",in1=[],in2=[],intyp=1,out=-1,out2=-2,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=scs_m_1,ipar=[],opar=list(),blocktype="h",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list());
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([5,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -21,72 +21,72 @@ function FROMWSB() {
}
FROMWSB.prototype.set = function FROMWSB() {
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="FROMWS_c") {
- ppath = list(i);
+ var ppath = list(i);
break;
}
}
- newpar = list();
- y = 0;
+ var newpar = list();
+ var y = 0;
for (path in ppath) {
- np = size(path,"*");
- spath = list();
+ var np = size(path,"*");
+ var spath = list();
for (k=1;k<=np;k+=1) {
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path[k-1];
}
- xx = arg1[spath-1];
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (!isequalbitwise(this.xxn,xx)) {
this.model = xx.model;
- model_n = this.xxn.model;
+ var model_n = this.xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)||or(this.model.in2!=model_n.in2)||or(this.model.out2!=model_n.out2)||or(this.model.outtyp!=model_n.outtyp)||or(this.model.intyp!=model_n.intyp)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if ((size(this.model.in1,"*")!=size(model_n.in1,"*"))||(size(this.model.out,"*")!=size(model_n.out,"*"))) {
- needcompile = 4;
+ var needcompile = 4;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = this.xxn;
newpar[size(newpar)+1-1] = path;
- y = max(y,needcompile);
+ var y = max(y,needcompile);
}
}
this.x = arg1;
- typ = newpar;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Sources/FROMWS_c.js b/js/Sources/FROMWS_c.js
index 55c23a27..24babc3c 100644
--- a/js/Sources/FROMWS_c.js
+++ b/js/Sources/FROMWS_c.js
@@ -16,8 +16,8 @@ function FROMWS_c() {
this.model.firing = [0];
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,true];
- gr_i = [];
- exprs = [[string(this.varnam)],[string(this.Method)],[string(this.ZC)],[string(this.OutEnd)]];
+ var gr_i = [];
+ var exprs = [[string(this.varnam)],[string(this.Method)],[string(this.ZC)],[string(this.OutEnd)]];
this.x = standard_define([3.5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -39,8 +39,8 @@ function FROMWS_c() {
this.ZC = parseFloat(arguments[0]["ZC"])
this.OutEnd = parseFloat(arguments[0]["OutEnd"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.varnam,this.Method,this.ZC,this.OutEnd,exprs] = scicos_getvalue("Set From_Workspace block parameters",["Variable name","Interpolation Method","Enable zero crossing(0:No, 1:Yes)?","Output at end(0:Zero, 1:Hold, 2:Repeat)"],list("str",1,"vec",1,"vec",1,"vec",1),exprs);
@@ -49,25 +49,28 @@ function FROMWS_c() {
}
if (!(this.Method==0||this.Method==1||this.Method==2||this.Method==3)) {
message("Interpolation method should be chosen in [0,1,2,3]");
- ok = false;
+ var ok = false;
}
if (!(this.ZC==0||this.ZC==1)) {
message("Zero crossing should be either 0 or 1");
- ok = false;
+ var ok = false;
}
if (!(this.OutEnd==0||this.OutEnd==1||this.OutEnd==2)) {
message("Output at end option should be either 0 or 1");
- ok = false;
+ var ok = false;
}
- r = false;
- ierr = execstr("r=validvar(varnam)","errcatch");
+ var r = false;
+ var ierr = execstr("r=validvar(varnam)","errcatch");
if (!r) {
message([["Invalid variable name."],["Please choose another variable name."]]);
- ok = false;
+ var ok = false;
}
if (ok) {
this.model.ipar = new ScilabDouble([length(this.varnam)],[this._str2code[this.varnam-1]],[this.Method],[this.ZC],[this.OutEnd]);
- [this.model,graphics,ok] = set_io(this.model,graphics,list(),list([-1,-2],-1),1,1);
+ var tmpvar0 = set_io(this.model,graphics,list(),list([-1,-2],-1),1,1)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
graphics.exprs = exprs;
this.x.graphics = graphics;
diff --git a/js/Sources/FROMWS_c.pickle b/js/Sources/FROMWS_c.pickle
index f1ee6f38..ecf91390 100644
--- a/js/Sources/FROMWS_c.pickle
+++ b/js/Sources/FROMWS_c.pickle
@@ -65,50 +65,47 @@ p18
sS'model.evtout'
p19
g14
-sS'[this.model,graphics,ok]'
+sS'model.out2'
p20
g5
-sS'model.out2'
+sS'ZC'
p21
g5
-sS'ZC'
+sS'y'
p22
-g5
-sS'model.outtyp'
-p23
-g5
+g14
sS'graphics.exprs'
-p24
+p23
NsS'model.ipar'
-p25
+p24
S'matrix'
-p26
+p25
sS'typ'
-p27
+p26
g14
sS'ok'
-p28
+p27
S'boolean'
-p29
+p28
sS'model.blocktype'
-p30
+p29
g11
sS'model.dep_ut'
-p31
+p30
g14
sS'exprs'
-p32
-g26
+p31
+g25
sS'r'
+p32
+g28
+sS'model.outtyp'
p33
-g29
-sS'y'
-p34
-g14
+g5
sS'x'
-p35
+p34
g5
sS'model'
-p36
+p35
g2
s. \ No newline at end of file
diff --git a/js/Sources/GENSIN_f.js b/js/Sources/GENSIN_f.js
index 65839948..ceece8f2 100644
--- a/js/Sources/GENSIN_f.js
+++ b/js/Sources/GENSIN_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/GENSIN_f.sci" */
function GENSIN_f() {
GENSIN_f.prototype.define = function GENSIN_f() {
- rpar = [[1],[1],[0]];
+ var rpar = [[1],[1],[0]];
this.model = scicos_model();
this.model.sim = new ScilabString(["gensin"]);
this.model.in1 = [];
@@ -11,8 +11,8 @@ function GENSIN_f() {
this.model.rpar = new ScilabDouble([1],[1],[0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = [[string(rpar[1-1])],[string(rpar[2-1])],[string(rpar[3-1])]];
- gr_i = [];
+ var exprs = [[string(rpar[1-1])],[string(rpar[2-1])],[string(rpar[3-1])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -32,8 +32,8 @@ function GENSIN_f() {
this.F = arguments[0]["F"]
this.P = arguments[0]["P"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.M,this.F,this.P,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","GENSIN_f")],[" "],["Sine wave generator"],[" "]],["Magnitude","Frequency (rad/s)","Phase (rad)"],list("vec",1,"vec",1,"vec",1),exprs);
@@ -42,10 +42,13 @@ function GENSIN_f() {
}
if (this.F<0) {
block_parameter_error(msprintf("Wrong value for \'Frequency\' parameter: %e.",this.F),"Strictly positive integer expected.");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,[],1,[],[]);
+ var tmpvar0 = check_io(this.model,graphics,[],1,[],[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.model.rpar = new ScilabDouble([this.M],[this.F],[this.P]);
this.model.out2 = new ScilabDouble([1]);
this.model.outtyp = new ScilabDouble([1]);
diff --git a/js/Sources/GENSIN_f.pickle b/js/Sources/GENSIN_f.pickle
index 4afed481..8787f4b9 100644
--- a/js/Sources/GENSIN_f.pickle
+++ b/js/Sources/GENSIN_f.pickle
@@ -15,75 +15,71 @@ p6
atp7
Rp8
.(dp0
-S'arg1'
+S'model.sim'
p1
-S'object'
+S'string'
p2
-sS'graphics'
+sS'model.in1'
p3
-g2
-sS'rpar'
+S'vector'
p4
-S'matrix'
+sS'ok'
p5
-sS'x.model'
+S'boolean'
p6
-NsS'model.out'
+sS'model.blocktype'
p7
-S'double'
+g2
+sS'x.graphics'
p8
-sS'model.in1'
+S'object'
p9
-S'vector'
+sS'arg1'
p10
-sS'x.graphics'
+g9
+sS'model.out2'
p11
-g2
-sS'model.sim'
+S'double'
p12
-S'string'
+sS'model.rpar'
p13
-sS'[this.model,graphics,ok]'
+S'matrix'
p14
-S'list'
+sS'rpar'
p15
-sS'model.out2'
+g14
+sS'exprs'
p16
-g8
-sS'model.rpar'
+g14
+sS'x.model'
p17
-g5
-sS'model.outtyp'
+NsS'gr_i'
p18
-g8
-sS'graphics.exprs'
+g4
+sS'model.dep_ut'
p19
-NsS'typ'
+g4
+sS'graphics.exprs'
p20
-g10
-sS'ok'
+NsS'graphics'
p21
-S'boolean'
+g9
+sS'y'
p22
-sS'model.blocktype'
+g4
+sS'x'
p23
-g13
-sS'model.dep_ut'
+g12
+sS'model'
p24
-g10
-sS'exprs'
+g9
+sS'typ'
p25
-g5
-sS'gr_i'
+g4
+sS'model.outtyp'
p26
-g10
-sS'y'
+g12
+sS'model.out'
p27
-g10
-sS'x'
-p28
-g8
-sS'model'
-p29
-g2
+g12
s. \ No newline at end of file
diff --git a/js/Sources/GENSQR_f.js b/js/Sources/GENSQR_f.js
index 2d0a4372..4c7bc406 100644
--- a/js/Sources/GENSQR_f.js
+++ b/js/Sources/GENSQR_f.js
@@ -11,8 +11,8 @@ function GENSQR_f() {
this.model.dstate = new ScilabDouble([this.Amplitude]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = string(this.Amplitude);
- gr_i = [];
+ var exprs = string(this.Amplitude);
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -28,11 +28,11 @@ function GENSQR_f() {
GENSQR_f.prototype.set = function GENSQR_f() {
this.Amplitude = parseFloat(arguments[0]["Amplitude"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[2-1];
+ var exprs = exprs[2-1];
}
while (true) {
[ok,this.Amplitude,exprs] = scicos_getvalue(["Set Square generator block parameters"],["Amplitude"],list("vec",1),exprs);
diff --git a/js/Sources/GEN_SQR.js b/js/Sources/GEN_SQR.js
index 0f2bed09..29b8af91 100644
--- a/js/Sources/GEN_SQR.js
+++ b/js/Sources/GEN_SQR.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/GEN_SQR.sci" */
function GEN_SQR() {
GEN_SQR.prototype.define = function GEN_SQR() {
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-176.97473,421.18646,173.61587,524.41503,827,480,0,15,827,480,755,614,1.4],Title="SuperBlock",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=[["if typeof(Amin)<>typeof(Amax) then error(\'Minimum value and Maximum value must have the same type\');end"],["if and(rule<>[1;2]) then error(\'Initial Value must be 1 (for Min) or 2 (for Max)\');end"],["if Amin>Amax then error(\'Maximum value must be greater than the Minimum Value\');end"],["P=%pi/F"],[""]],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-176.97473,421.18646,173.61587,524.41503,827,480,0,15,827,480,755,614,1.4],Title="SuperBlock",tol=[0.0001,0.000001,1.000e-10,100001,0,0],tf=100000,context=[["if typeof(Amin)<>typeof(Amax) then error(\'Minimum value and Maximum value must have the same type\');end"],["if and(rule<>[1;2]) then error(\'Initial Value must be 1 (for Min) or 2 (for Max)\');end"],["if Amin>Amax then error(\'Maximum value must be greater than the Minimum Value\');end"],["P=%pi/F"],[""]],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="Counter",graphics=scicos_graphics(orig=[18.229901,339.5057],sz=[60,40],flip=true,theta=0,exprs=[["1"],["2"],["rule"]],pin=[],pout=8,pein=16,peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("counter",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=1,evtin=1,evtout=[],state=[],dstate=0,odstate=list(),rpar=[],ipar=[[1],[2],[1]],opar=list(),blocktype="c",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_block(gui="CONST_m",graphics=scicos_graphics(orig=[38.096074,293.82198],sz=[40,40],flip=true,theta=0,exprs="Amin",pin=[],pout=5,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(-1),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[3-1] = scicos_block(gui="CONST_m",graphics=scicos_graphics(orig=[37.378886,245.02389],sz=[40,40],flip=true,theta=0,exprs="Amax",pin=[],pout=6,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(1),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -41,12 +41,12 @@ function GEN_SQR() {
this.model.nzcross = new ScilabDouble([0]);
this.model.nmode = new ScilabDouble([0]);
this.model.equations = list();
- Amin = -1;
- Amax = 1;
- rule = 1;
- F = 1;
- exprs = [sci2exp(Amin),sci2exp(Amax),sci2exp(rule),sci2exp(F)];
- gr_i = [];
+ var Amin = -1;
+ var Amax = 1;
+ var rule = 1;
+ var F = 1;
+ var exprs = [sci2exp(Amin),sci2exp(Amax),sci2exp(rule),sci2exp(F)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -63,37 +63,43 @@ function GEN_SQR() {
scicos_context.Amax = arguments[0]["scicos_context.Amax"]
scicos_context.rule = arguments[0]["scicos_context.rule"]
scicos_context.F = arguments[0]["scicos_context.F"]
- y = this.needcompile;
+ var y = this.needcompile;
arg1.model.ipar = 1;
- typ = list();
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- Btitre = "Set GEN_SQR parameters";
- Exprs0 = [["Amin"],["Amax"],["rule"],["F"]];
- Bitems = [["Minimum Value"],["Maximum Value"],["Initial Value( 1= Minimum Value 2= Maximum Value)"],["Period (sec)"]];
- Ss = list("mat",[-1,-1],"mat",[-1,-1],"pol",-1,"pol",-1);
- scicos_context = struct();
+ var typ = list();
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var Btitre = "Set GEN_SQR parameters";
+ var Exprs0 = [["Amin"],["Amax"],["rule"],["F"]];
+ var Bitems = [["Minimum Value"],["Maximum Value"],["Initial Value( 1= Minimum Value 2= Maximum Value)"],["Period (sec)"]];
+ var Ss = list("mat",[-1,-1],"mat",[-1,-1],"pol",-1,"pol",-1);
+ var scicos_context = struct();
this.x = arg1;
- ok = false;
+ var ok = false;
while (!ok) {
[ok,scicos_context.Amin,scicos_context.Amax,scicos_context.rule,scicos_context.F,exprs] = scicos_getvalue(Btitre,Bitems,Ss,exprs);
if (!ok) {
return;
}
- PREVAR_scicos_context = scicos_context;
- sblock = this.x.model.rpar;
- [PREVAR_scicos_context,ierr] = script2var(sblock.props.context,PREVAR_scicos_context);
+ var PREVAR_scicos_context = scicos_context;
+ var sblock = this.x.model.rpar;
+ var tmpvar0 = script2var(sblock.props.context,PREVAR_scicos_context)
+ var PREVAR_scicos_context = tmpvar0[0]
+ var ierr = tmpvar0[1];
if (ierr==0) {
- [sblock,%w,needcompile2,ok] = do_eval(sblock,list());
+ var tmpvar1 = do_eval(sblock,list())
+ var sblock = tmpvar1[0]
+ %w = tmpvar1[1]
+ var needcompile2 = tmpvar1[2]
+ var ok = tmpvar1[3];
if (ok) {
- y = max(2,this.needcompile,needcompile2);
+ var y = max(2,this.needcompile,needcompile2);
this.x.graphics.exprs = exprs;
this.x.model.rpar = sblock;
break;
}
} else {
message(lasterror());
- ok = false;
+ var ok = false;
}
}
return new BasicBlock(this.x);
diff --git a/js/Sources/GEN_SQR.pickle b/js/Sources/GEN_SQR.pickle
index 5bb741f3..742ed299 100644
--- a/js/Sources/GEN_SQR.pickle
+++ b/js/Sources/GEN_SQR.pickle
@@ -27,7 +27,7 @@ sS'scs_m_1.objs[14-1]'
p3
S'double'
p4
-sS'scs_m_1.objs[1-1]'
+sS'arg1.model.ipar'
p5
g4
sS'model.dstate'
@@ -96,131 +96,125 @@ g4
sS'scs_m_1.objs[15-1]'
p29
g4
-sS'[sblock,%w,needcompile2,ok]'
-p30
-g4
sS'gr_i'
-p31
+p30
g7
sS'scs_m_1'
-p32
+p31
g4
sS'scs_m_1.objs[13-1]'
-p33
+p32
g4
sS'model.evtin'
-p34
+p33
g7
-sS'[PREVAR_scicos_context,ierr]'
-p35
-g4
sS'Amax'
-p36
+p34
g4
sS'scs_m_1.objs[2-1]'
-p37
+p35
g4
sS'model.label'
-p38
+p36
g20
sS'model.sim'
-p39
+p37
g20
sS'model.evtout'
-p40
+p38
g7
sS'model.equations'
-p41
+p39
g2
sS'scs_m_1.objs[8-1]'
-p42
+p40
g4
sS'scs_m_1.objs[10-1]'
-p43
+p41
g4
sS'F'
-p44
+p42
g4
sS'Ss'
-p45
+p43
g2
sS'Exprs0'
-p46
+p44
S'matrix'
-p47
+p45
sS'model.out2'
-p48
+p46
g4
sS'sblock'
-p49
+p47
g9
sS'model.intyp'
-p50
+p48
g4
sS'model.rpar'
-p51
+p49
g4
sS'model.nmode'
-p52
+p50
g4
sS'scs_m_1.objs[4-1]'
-p53
+p51
g4
sS'sblock.props'
-p54
+p52
g9
sS'graphics'
-p55
+p53
g9
sS'scs_m_1.objs[7-1]'
-p56
+p54
g4
sS'model.ipar'
-p57
+p55
g4
sS'typ'
-p58
+p56
g2
sS'model.outtyp'
-p59
+p57
g4
sS'Bitems'
-p60
-g47
+p58
+g45
sS'ok'
-p61
+p59
S'boolean'
-p62
+p60
sS'model.blocktype'
-p63
+p61
g20
-sS'arg1.model.ipar'
-p64
+sS'scs_m_1.objs[1-1]'
+p62
g4
sS'model.dep_ut'
-p65
+p63
g7
sS'exprs'
-p66
+p64
g7
sS'x.graphics.exprs'
-p67
+p65
NsS'PREVAR_scicos_context'
-p68
+p66
g4
sS'model.firing'
-p69
+p67
g7
sS'y'
-p70
+p68
g4
sS'x'
-p71
+p69
g4
sS'model'
-p72
+p70
g9
sS'model.state'
-p73
+p71
g7
s. \ No newline at end of file
diff --git a/js/Sources/Ground_g.js b/js/Sources/Ground_g.js
index 89bdf6a7..726a9fd1 100644
--- a/js/Sources/Ground_g.js
+++ b/js/Sources/Ground_g.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/Ground_g.sci" */
function Ground_g() {
Ground_g.prototype.define = function Ground_g() {
- C = [0];
+ var C = [0];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["cstblk4_m"]), new ScilabDouble([4]));
this.model.in1 = [];
@@ -13,8 +13,8 @@ function Ground_g() {
this.model.opar = list(C);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [];
- gr_i = [];
+ var exprs = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Sources/INIMPL_f.js b/js/Sources/INIMPL_f.js
index a9cf9b9d..5a5ce339 100644
--- a/js/Sources/INIMPL_f.js
+++ b/js/Sources/INIMPL_f.js
@@ -8,13 +8,13 @@ function INIMPL_f() {
this.model.ipar = [1];
this.model.dep_ut = [false,false];
this.model.blocktype = new ScilabString(["c"]);
- mo = modelica();
+ var mo = modelica();
mo.model = "PORT";
mo.outputs = "n";
this.model.equations = new ScilabDouble([mo]);
this.prt = 1;
- exprs = "1";
- gr_i = [];
+ var exprs = "1";
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
this.x.graphics.out_implicit = ["I"];
return new ImplicitInBlock(this.x);
@@ -30,11 +30,11 @@ function INIMPL_f() {
INIMPL_f.prototype.set = function INIMPL_f() {
this.prt = parseFloat(arguments[0]["prt"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==2) {
- exprs = exprs[1-1];
+ var exprs = exprs[1-1];
}
while (true) {
[ok,this.prt,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","INIMPL_f")],[" "],["Implicit input port"],[" "]],"Port Number",list("vec",1),exprs);
@@ -46,8 +46,8 @@ function INIMPL_f() {
block_parameter_error(msprintf("Wrong value for \'Port Number\' parameter: %d.",this.prt),"Strictly positive integer expected.");
} else {
if (this.model.ipar!=this.prt) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.ipar = new ScilabDouble([this.prt]);
graphics.exprs = exprs;
diff --git a/js/Sources/IN_f.js b/js/Sources/IN_f.js
index 0496b565..d3779e21 100644
--- a/js/Sources/IN_f.js
+++ b/js/Sources/IN_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/IN_f.sci" */
function IN_f() {
IN_f.prototype.define = function IN_f() {
- prt = 1;
+ var prt = 1;
this.model = scicos_model();
this.model.sim = new ScilabString(["input"]);
this.model.out = new ScilabDouble([-1]);
@@ -10,8 +10,8 @@ function IN_f() {
this.model.ipar = new ScilabDouble([prt]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = sci2exp(prt);
- gr_i = [];
+ var exprs = sci2exp(prt);
+ var gr_i = [];
this.x = standard_define([1,1],this.model,exprs,gr_i);
return new ExplicitInBlock(this.x);
}
@@ -25,21 +25,26 @@ function IN_f() {
}
IN_f.prototype.set = function IN_f() {
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
if (size(exprs,"*")==2) {
- exprs = exprs[1-1];
+ var exprs = exprs[1-1];
}
if (size(exprs,"*")==1) {
- exprs = [[exprs[1-1]],["[-1 -2]"],["-1"]];
+ var exprs = [[exprs[1-1]],["[-1 -2]"],["-1"]];
}
while (true) {
- [ok,prt,otsz,ot,exprs] = getvalue(_("Set Input block parameters"),[[_("Port number")],[_("Outport size ([-1 -2] for inherit)")],[_("Outport Type (-1 for inherit)")]],list("vec",1,"vec",-1,"vec",1),exprs);
+ var tmpvar0 = getvalue(_("Set Input block parameters"),[[_("Port number")],[_("Outport size ([-1 -2] for inherit)")],[_("Outport Type (-1 for inherit)")]],list("vec",1,"vec",-1,"vec",1),exprs)
+ var ok = tmpvar0[0]
+ var prt = tmpvar0[1]
+ var otsz = tmpvar0[2]
+ var ot = tmpvar0[3]
+ var exprs = tmpvar0[4];
if (!ok) {
break;
}
- prt = int(prt);
+ var prt = int(prt);
if (prt<=0) {
message(_("Port number must be a positive integer"));
} else if (!isequal(size(otsz,"*"),2)) {
@@ -48,8 +53,8 @@ function IN_f() {
message(_("Outport type must be a number between 1 and 9, or -1 for inheritance."));
} else {
if (this.model.ipar!=prt) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.ipar = new ScilabDouble([prt]);
this.model.firing = [];
diff --git a/js/Sources/IN_f.pickle b/js/Sources/IN_f.pickle
index 8040ac6e..71f9181e 100644
--- a/js/Sources/IN_f.pickle
+++ b/js/Sources/IN_f.pickle
@@ -9,75 +9,72 @@ p3
atp4
Rp5
.(dp0
-S'arg1'
+S'needcompile'
p1
-S'object'
+S'double'
p2
-sS'graphics'
+sS'model.sim'
p3
-g2
-sS'prt'
+S'string'
p4
-S'double'
+sS'model.out'
p5
-sS'x.model'
-p6
g2
-sS'model.out'
+sS'model.blocktype'
+p6
+g4
+sS'prt'
p7
-g5
-sS'x.graphics'
-p8
g2
-sS'model.firing'
+sS'arg1'
+p8
+S'object'
p9
-S'vector'
+sS'model.out2'
p10
-sS'model.sim'
+g2
+sS'x.graphics'
p11
-S'string'
+g9
+sS'exprs'
p12
-sS'model.out2'
+g4
+sS'x.model'
p13
-g5
-sS'model.outtyp'
+g9
+sS'gr_i'
p14
-g5
-sS'graphics.exprs'
+S'vector'
p15
-S'matrix'
+sS'model.dep_ut'
p16
-sS'model.ipar'
+g15
+sS'graphics.exprs'
p17
-g5
-sS'typ'
+S'matrix'
p18
-g10
-sS'needcompile'
+sS'graphics'
p19
-g5
-sS'model.blocktype'
+g9
+sS'y'
p20
-g12
-sS'[ok,prt,otsz,ot,exprs]'
+g2
+sS'x'
p21
-g5
-sS'model.dep_ut'
+g2
+sS'model'
p22
-g10
-sS'exprs'
+g9
+sS'model.ipar'
p23
-g12
-sS'gr_i'
+g2
+sS'typ'
p24
-g10
-sS'y'
+g15
+sS'model.outtyp'
p25
-g5
-sS'x'
-p26
-g5
-sS'model'
-p27
g2
+sS'model.firing'
+p26
+g15
s. \ No newline at end of file
diff --git a/js/Sources/Modulo_Count.js b/js/Sources/Modulo_Count.js
index 7c161252..258f4f04 100644
--- a/js/Sources/Modulo_Count.js
+++ b/js/Sources/Modulo_Count.js
@@ -11,8 +11,8 @@ function Modulo_Count() {
this.model.ipar = new ScilabDouble([this.base]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.ini_c)],[string(this.base)]];
- gr_i = [];
+ var exprs = [[string(this.ini_c)],[string(this.base)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -30,8 +30,8 @@ function Modulo_Count() {
this.ini_c = parseFloat(arguments[0]["ini_c"])
this.base = parseFloat(arguments[0]["base"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.ini_c,this.base,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","Modulo_Count")],[" "],["Modulo counter (0 to N counter)"],[" "]],["Initial State (zero or positive number)","Upper Limit (positive number)"],list("vec",1,"vec",1),exprs);
diff --git a/js/Sources/PULSE_SC.js b/js/Sources/PULSE_SC.js
index c1bc6b08..f0320ae3 100644
--- a/js/Sources/PULSE_SC.js
+++ b/js/Sources/PULSE_SC.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/PULSE_SC.sci" */
function PULSE_SC() {
PULSE_SC.prototype.define = function PULSE_SC() {
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-162.7581,435.54369,67.607292,416.67644,827,479,0,15,827,480,715,167,1.4],Title=["SuperBlock","/home/fady/Scicos_examples/"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=10,context=[["E2=E+W/100*F"],["if (W<0 | W>100) then error(\'Width must be between 0 and 100\');end"],["if (E2 >= F) then error (\'Offset must be lower than (frequency*(1-Width/100))\'); end"]],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[-162.7581,435.54369,67.607292,416.67644,827,479,0,15,827,480,715,167,1.4],Title=["SuperBlock","/home/fady/Scicos_examples/"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=10,context=[["E2=E+W/100*F"],["if (W<0 | W>100) then error(\'Width must be between 0 and 100\');end"],["if (E2 >= F) then error (\'Offset must be lower than (frequency*(1-Width/100))\'); end"]],void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="CONST_m",graphics=scicos_graphics(orig=[30.801202,158.91733],sz=[40,40],flip=true,theta=0,exprs="A",pin=[],pout=5,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(1),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_block(gui="Ground_g",graphics=scicos_graphics(orig=[31.534535,215.384],sz=[40,40],flip=true,theta=0,exprs=[],pin=[],pout=4,pein=[],peout=[],gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("cstblk4_m",4),in1=[],in2=[],intyp=1,out=1,out2=1,outtyp=-1,evtin=[],evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(0),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[3-1] = scicos_block(gui="SELECT_m",graphics=scicos_graphics(orig=[106.00652,186.09381],sz=[40,40],flip=true,theta=0,exprs=[["-1"],["2"],["1"]],pin=[[4],[5]],pout=11,pein=[[9],[8]],peout=[],gr_i=[],id="",in_implicit=[["E"],["E"]],out_implicit="E"),model=scicos_model(sim=list("selector_m",4),in1=[[-1],[-1]],in2=[[-2],[-2]],intyp=[[-1],[-1]],out=-1,out2=-2,outtyp=-1,evtin=[[1],[1]],evtout=[],state=[],dstate=1,odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="c",firing=[],dep_ut=[true,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -36,12 +36,12 @@ function PULSE_SC() {
this.model.nzcross = new ScilabDouble([0]);
this.model.nmode = new ScilabDouble([0]);
this.model.equations = list();
- E = 0.1;
- W = 30;
- F = 1;
- A = 1;
- exprs = [sci2exp(E),sci2exp(W),sci2exp(F),sci2exp(A)];
- gr_i = [];
+ var E = 0.1;
+ var W = 30;
+ var F = 1;
+ var A = 1;
+ var exprs = [sci2exp(E),sci2exp(W),sci2exp(F),sci2exp(A)];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -58,30 +58,36 @@ function PULSE_SC() {
scicos_context.W = arguments[0]["scicos_context.W"]
scicos_context.F = arguments[0]["scicos_context.F"]
scicos_context.A = arguments[0]["scicos_context.A"]
- y = this.needcompile;
+ var y = this.needcompile;
arg1.model.ipar = 1;
- typ = list();
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- Btitre = "Set Pulse Generator parameters";
- Exprs0 = [["E"],["W"],["F"],["A"]];
- Bitems = [["Phase delay (secs):"],["Pulse Width (% of period):"],["Period (secs):"],["Amplitude:"]];
- Ss = list("pol",-1,"pol",-1,"pol",-1,"mat",[-1,-1]);
- scicos_context = struct();
+ var typ = list();
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var Btitre = "Set Pulse Generator parameters";
+ var Exprs0 = [["E"],["W"],["F"],["A"]];
+ var Bitems = [["Phase delay (secs):"],["Pulse Width (% of period):"],["Period (secs):"],["Amplitude:"]];
+ var Ss = list("pol",-1,"pol",-1,"pol",-1,"mat",[-1,-1]);
+ var scicos_context = struct();
this.x = arg1;
- ok = false;
+ var ok = false;
while (!ok) {
[ok,scicos_context.E,scicos_context.W,scicos_context.F,scicos_context.A,exprs] = scicos_getvalue(Btitre,Bitems,Ss,exprs);
if (!ok) {
return;
}
- PREVAR_scicos_context = scicos_context;
- sblock = this.x.model.rpar;
- [PREVAR_scicos_context,ierr] = script2var(sblock.props.context,PREVAR_scicos_context);
+ var PREVAR_scicos_context = scicos_context;
+ var sblock = this.x.model.rpar;
+ var tmpvar0 = script2var(sblock.props.context,PREVAR_scicos_context)
+ var PREVAR_scicos_context = tmpvar0[0]
+ var ierr = tmpvar0[1];
if (ierr==0) {
- [sblock,%w,needcompile2,ok] = do_eval(sblock,list());
+ var tmpvar1 = do_eval(sblock,list())
+ var sblock = tmpvar1[0]
+ %w = tmpvar1[1]
+ var needcompile2 = tmpvar1[2]
+ var ok = tmpvar1[3];
if (ok) {
- y = max(2,this.needcompile,needcompile2);
+ var y = max(2,this.needcompile,needcompile2);
this.x.graphics.exprs = exprs;
this.x.model.rpar = sblock;
break;
@@ -90,7 +96,7 @@ function PULSE_SC() {
if ((lasterror()!=[])) {
messagebox(lasterror());
}
- ok = false;
+ var ok = false;
}
}
return new BasicBlock(this.x);
diff --git a/js/Sources/PULSE_SC.pickle b/js/Sources/PULSE_SC.pickle
index addcddc0..8e427edb 100644
--- a/js/Sources/PULSE_SC.pickle
+++ b/js/Sources/PULSE_SC.pickle
@@ -27,7 +27,7 @@ sS'A'
p3
S'double'
p4
-sS'scs_m_1.objs[1-1]'
+sS'arg1.model.ipar'
p5
g4
sS'model.dstate'
@@ -84,128 +84,122 @@ g4
sS'model.opar'
p25
g2
-sS'[sblock,%w,needcompile2,ok]'
-p26
-g4
sS'gr_i'
-p27
+p26
g7
sS'scs_m_1'
-p28
+p27
g4
sS'model.evtin'
-p29
+p28
g7
-sS'[PREVAR_scicos_context,ierr]'
-p30
-g4
sS'scs_m_1.objs[2-1]'
-p31
+p29
g4
sS'model.label'
-p32
+p30
g19
sS'model.sim'
-p33
+p31
g19
sS'model.evtout'
-p34
+p32
g7
sS'model.equations'
-p35
+p33
g2
sS'scs_m_1.objs[8-1]'
-p36
+p34
g4
sS'scs_m_1.objs[10-1]'
-p37
+p35
g4
sS'F'
-p38
+p36
g4
sS'Ss'
-p39
+p37
g2
sS'Exprs0'
-p40
+p38
S'matrix'
-p41
+p39
sS'model.out2'
-p42
+p40
g4
sS'sblock'
-p43
+p41
g9
sS'model.intyp'
-p44
+p42
g4
sS'model.rpar'
-p45
+p43
g4
sS'model.nmode'
-p46
+p44
g4
sS'scs_m_1.objs[4-1]'
-p47
+p45
g4
sS'sblock.props'
-p48
+p46
g9
sS'W'
-p49
+p47
g4
sS'graphics'
-p50
+p48
g9
sS'scs_m_1.objs[7-1]'
-p51
+p49
g4
sS'model.ipar'
-p52
+p50
g4
sS'typ'
-p53
+p51
g2
sS'model.outtyp'
-p54
+p52
g4
sS'Bitems'
-p55
-g41
+p53
+g39
sS'ok'
-p56
+p54
S'boolean'
-p57
+p55
sS'model.blocktype'
-p58
+p56
g19
-sS'arg1.model.ipar'
-p59
+sS'scs_m_1.objs[1-1]'
+p57
g4
sS'model.dep_ut'
-p60
+p58
g7
sS'exprs'
-p61
+p59
g7
sS'x.graphics.exprs'
-p62
+p60
NsS'PREVAR_scicos_context'
-p63
+p61
g4
sS'model.firing'
-p64
+p62
g7
sS'y'
-p65
+p63
g4
sS'x'
-p66
+p64
g4
sS'model'
-p67
+p65
g9
sS'model.state'
-p68
+p66
g7
s. \ No newline at end of file
diff --git a/js/Sources/RAMP.js b/js/Sources/RAMP.js
index a3d5ce57..625556b1 100644
--- a/js/Sources/RAMP.js
+++ b/js/Sources/RAMP.js
@@ -4,7 +4,7 @@ function RAMP() {
this.slope = 0;
this.iout = 0;
this.stt = 0;
- rpar = [[this.slope],[this.stt],[this.iout]];
+ var rpar = [[this.slope],[this.stt],[this.iout]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["ramp"]), new ScilabDouble([4]));
this.model.in1 = [];
@@ -14,8 +14,8 @@ function RAMP() {
this.model.nmode = new ScilabDouble([1]);
this.model.nzcross = new ScilabDouble([1]);
this.model.dep_ut = [false,true];
- exprs = [string(rpar)];
- gr_i = [];
+ var exprs = [string(rpar)];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -35,8 +35,8 @@ function RAMP() {
this.stt = parseFloat(arguments[0]["stt"])
this.iout = parseFloat(arguments[0]["iout"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.slope,this.stt,this.iout,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","RAMP")],[" "],["Ramp function"],[" "]],["Slope","Start Time","Initial Value"],list("vec",1,"vec",1,"vec",1),exprs);
diff --git a/js/Sources/RAND_f.js b/js/Sources/RAND_f.js
index ed32c6ed..0d01c76d 100644
--- a/js/Sources/RAND_f.js
+++ b/js/Sources/RAND_f.js
@@ -3,8 +3,8 @@ function RAND_f() {
RAND_f.prototype.define = function RAND_f() {
this.a = 0;
this.b = 1;
- dt = 0;
- out = 1;
+ var dt = 0;
+ var out = 1;
this.flag = 0;
this.model = scicos_model();
this.model.sim = new ScilabString(["rndblk"]);
@@ -15,8 +15,8 @@ function RAND_f() {
this.model.ipar = new ScilabDouble([this.flag]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[string(this.flag)],[sci2exp(this.a.slice())],[sci2exp(this.b.slice())],[string(this.model.dstate[1-1])]];
- gr_i = [];
+ var exprs = [[string(this.flag)],[sci2exp(this.a.slice())],[sci2exp(this.b.slice())],[string(this.model.dstate[1-1])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -38,14 +38,14 @@ function RAND_f() {
this.b = parseFloat(arguments[0]["b"])
this.seed_c = arguments[0]["seed_c"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==5) {
- exprs = exprs.slice(1-1,3);
+ var exprs = exprs.slice(1-1,3);
}
if (size(exprs,"*")==3) {
- exprs = [[exprs],[string(this.model.dstate[1-1])]];
+ var exprs = [[exprs],[string(this.model.dstate[1-1])]];
}
while (true) {
[ok,this.flag,this.a,this.b,this.seed_c,exprs] = scicos_getvalue([["Set Random generator block parameters"],["flag = 0 : Uniform distribution A is min and A+B max"],["flag = 1 : Normal distribution A is mean and B deviation"],[" "],["A and B must be vector with equal sizes"],["seed is the seed of random number generator (integer<2**31)"]],["flag","A","B","seed"],list("vec",1,"vec",-1,"vec","size(%2,\'*\')","vec",1),exprs);
@@ -55,7 +55,7 @@ function RAND_f() {
if (this.flag!=0&&this.flag!=1) {
message("flag must be equal to 1 or 0");
} else {
- nout = size(this.a,"*");
+ var nout = size(this.a,"*");
graphics.exprs = exprs;
this.model.out = new ScilabDouble([nout]);
this.model.ipar = new ScilabDouble([this.flag]);
diff --git a/js/Sources/RAND_m.js b/js/Sources/RAND_m.js
index e525f3cf..a874bdda 100644
--- a/js/Sources/RAND_m.js
+++ b/js/Sources/RAND_m.js
@@ -3,10 +3,10 @@ function RAND_m() {
RAND_m.prototype.define = function RAND_m() {
this.a = 0;
this.b = 1;
- dt = 0;
+ var dt = 0;
this.flag = 0;
- function_name = "rndblk_m";
- funtyp = 4;
+ var function_name = "rndblk_m";
+ var funtyp = 4;
this.model = scicos_model();
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([funtyp]));
this.model.in1 = [];
@@ -24,8 +24,8 @@ function RAND_m() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = [];
this.model.dep_ut = [false,false];
- exprs = [[sci2exp(1)],[string(this.flag)],[sci2exp([this.a])],[sci2exp([this.b])],[sci2exp([this.model.dstate[1-1],int(rand()*(10^7-1))])]];
- gr_i = [];
+ var exprs = [[sci2exp(1)],[string(this.flag)],[sci2exp([this.a])],[sci2exp([this.b])],[sci2exp([this.model.dstate[1-1],int(rand()*(10^7-1))])]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -49,8 +49,8 @@ function RAND_m() {
this.b = parseFloat(arguments[0]["b"])
this.seed_c = arguments[0]["seed_c"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
if (size(exprs,"*")==14) {
exprs[9-1] = [];
@@ -63,23 +63,26 @@ function RAND_m() {
if (this.flag!=0&&this.flag!=1) {
message("flag must be equal to 1 or 0");
} else {
- out = size(this.a);
+ var out = size(this.a);
if (this.typ==1) {
- function_name = "rndblk_m";
+ var function_name = "rndblk_m";
this.model.rpar = new ScilabDouble([real(this.a.slice())],[real(this.b.slice())]);
this.model.dstate = new ScilabDouble([this.seed_c[1-1]],[0*real(this.a.slice())]);
- ot = 1;
+ var ot = 1;
} else if (this.typ==2) {
- function_name = "rndblkz_m";
- ot = 2;
+ var function_name = "rndblkz_m";
+ var ot = 2;
this.model.rpar = new ScilabDouble([real(this.a.slice())],[imag(this.a.slice())],[real(this.b.slice())],[imag(this.b.slice())]);
this.model.dstate = new ScilabDouble([this.seed_c.slice()],[0*[[real(this.a.slice())],[imag(this.a.slice())]]]);
} else {
message("Datatype is not supported");
- ok = false;
+ var ok = false;
}
if (ok) {
- [this.model,graphics,ok] = set_io(this.model,graphics,list([],[]),list(out,ot),1,[]);
+ var tmpvar0 = set_io(this.model,graphics,list([],[]),list(out,ot),1,[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
this.model.sim = list(new ScilabString([function_name]), new ScilabDouble([4]));
graphics.exprs = exprs;
diff --git a/js/Sources/RAND_m.pickle b/js/Sources/RAND_m.pickle
index 39f505ac..530befda 100644
--- a/js/Sources/RAND_m.pickle
+++ b/js/Sources/RAND_m.pickle
@@ -72,70 +72,67 @@ p21
sS'model.evtout'
p22
g12
-sS'[this.model,graphics,ok]'
-p23
-g8
sS'model.out2'
-p24
+p23
g8
sS'model.intyp'
-p25
+p24
g12
sS'model.rpar'
-p26
+p25
g12
sS'model.outtyp'
-p27
+p26
g8
sS'flag'
-p28
+p27
g8
sS'model.state'
-p29
+p28
g12
sS'graphics.exprs'
-p30
+p29
NsS'dt'
-p31
+p30
g8
sS'model.ipar'
-p32
+p31
g8
sS'typ'
-p33
+p32
g12
sS'a'
-p34
+p33
g8
sS'b'
-p35
+p34
g8
sS'ok'
-p36
+p35
S'boolean'
-p37
+p36
sS'model.blocktype'
-p38
+p37
g19
sS'model.dep_ut'
-p39
+p38
g12
sS'exprs'
-p40
+p39
g2
sS'gr_i'
-p41
+p40
g12
sS'y'
-p42
+p41
g12
sS'x'
-p43
+p42
g8
sS'model'
-p44
+p43
g4
sS'ot'
-p45
+p44
g8
s. \ No newline at end of file
diff --git a/js/Sources/READAU_f.js b/js/Sources/READAU_f.js
index 045fa230..c8dc3476 100644
--- a/js/Sources/READAU_f.js
+++ b/js/Sources/READAU_f.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Sources/READAU_f.sci" */
function READAU_f() {
READAU_f.prototype.define = function READAU_f() {
- frmt = "uc ";
- fname = "test.au";
- lunit = 0;
+ var frmt = "uc ";
+ var fname = "test.au";
+ var lunit = 0;
this.N = 20;
- M = 1;
- tmask = [];
+ var M = 1;
+ var tmask = [];
this.swap = 0;
- offset = 1;
- outmask = 1;
- ievt = 0;
- nout = size(outmask,"*");
+ var offset = 1;
+ var outmask = 1;
+ var ievt = 0;
+ var nout = size(outmask,"*");
this.model = scicos_model();
this.model.sim = list(new ScilabString(["readau"]), new ScilabDouble([2]));
this.model.out = new ScilabDouble([nout]);
@@ -20,8 +20,8 @@ function READAU_f() {
this.model.ipar = new ScilabDouble([length(fname)],[this._str2code[frmt-1]],[ievt],[this.N],[M],[this.swap],[offset],[this._str2code[fname-1]],[tmask],[outmask]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[fname],[string(this.N)],[string(this.swap)]];
- gr_i = [];
+ var exprs = [[fname],[string(this.N)],[string(this.swap)]];
+ var gr_i = [];
this.x = standard_define([5,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -41,28 +41,28 @@ function READAU_f() {
this.N = parseFloat(arguments[0]["N"])
this.swap = parseFloat(arguments[0]["swap"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- out = this.model.out;
- dstate = this.model.dstate;
- ipar = this.model.ipar;
- imask = 9+ipar[1-1];
- tmask = ipar[imask-1];
- lunit = dstate[3-1];
- fname = exprs[1-1];
+ var out = this.model.out;
+ var dstate = this.model.dstate;
+ var ipar = this.model.ipar;
+ var imask = 9+ipar[1-1];
+ var tmask = ipar[imask-1];
+ var lunit = dstate[3-1];
+ var fname = exprs[1-1];
while (true) {
[ok,this.fname1,this.N,this.swap,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","READAU_f")],[" "],["(Read Audio File)"],[" "],["Read is done on a binary \'.au\' file"]],["Input File Name","Buffer size","Swap Mode (0:No, 1:Yes)"],list("str",1,"vec",1,"vec",1),exprs);
- tmask1 = [];
- outmask = 1;
- frmt1 = "uc";
- M = 1;
- offset = 1;
+ var tmask1 = [];
+ var outmask = 1;
+ var frmt1 = "uc";
+ var M = 1;
+ var offset = 1;
if (!ok) {
break;
}
this.fname1 = stripblanks(this.fname1);
- frmt1 = stripblanks(frmt1);
+ var frmt1 = stripblanks(frmt1);
if (this.alreadyran&&this.fname1!=fname) {
block_parameter_error("Simulation running !!! You cannot modify Input file name","End current simulation first.");
} else if (this.fname1=="") {
@@ -74,12 +74,15 @@ function READAU_f() {
} else if (this.swap!=0&&this.swap!=1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Swap Mode",this.swap),msprintf("Must be in the interval %s.","[0, 1]"));
} else {
- [this.model,graphics,ok] = check_io(this.model,graphics,[],1,1,[]);
- frmt1 = part(frmt1,1,3);
+ var tmpvar0 = check_io(this.model,graphics,[],1,1,[])
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
+ var frmt1 = part(frmt1,1,3);
if (ok) {
- ipar = [[length(this.fname1)],[this._str2code[frmt1-1]],[0],[this.N],[M],[this.swap],[offset,this._str2code[this.fname1-1]],[tmask1,outmask.slice()]];
+ var ipar = [[length(this.fname1)],[this._str2code[frmt1-1]],[0],[this.N],[M],[this.swap],[offset,this._str2code[this.fname1-1]],[tmask1,outmask.slice()]];
if (prod(size(dstate))!=(this.N*M)+3) {
- dstate = [[-1],[-1],[lunit],[zeros(this.N*M,1)]];
+ var dstate = [[-1],[-1],[lunit],[zeros(this.N*M,1)]];
}
this.model.dstate = new ScilabDouble(dstate);
this.model.ipar = new ScilabDouble(ipar);
diff --git a/js/Sources/READAU_f.pickle b/js/Sources/READAU_f.pickle
index efecccb8..aef1d2b2 100644
--- a/js/Sources/READAU_f.pickle
+++ b/js/Sources/READAU_f.pickle
@@ -77,61 +77,58 @@ NsS'model.sim'
p23
S'list'
p24
-sS'[this.model,graphics,ok]'
-p25
-g24
sS'M'
-p26
+p25
g12
sS'N'
-p27
+p26
g12
sS'offset'
-p28
+p27
g12
sS'model.ipar'
-p29
+p28
g4
sS'typ'
-p30
+p29
g2
sS'imask'
-p31
+p30
g12
sS'model.blocktype'
-p32
+p31
g18
sS'outmask'
-p33
+p32
g12
sS'frmt1'
-p34
+p33
g18
sS'fname1'
-p35
+p34
g12
sS'exprs'
-p36
+p35
g4
sS'gr_i'
-p37
+p36
g2
sS'ievt'
-p38
+p37
g12
sS'ipar'
-p39
+p38
g4
sS'y'
-p40
+p39
g2
sS'x'
-p41
+p40
g12
sS'model'
-p42
+p41
g6
sS'nout'
-p43
+p42
g12
s. \ No newline at end of file
diff --git a/js/Sources/READC_f.js b/js/Sources/READC_f.js
index 010bffb1..b7d8b64f 100644
--- a/js/Sources/READC_f.js
+++ b/js/Sources/READC_f.js
@@ -1,19 +1,19 @@
/* autogenerated from "macros/Sources/READC_f.sci" */
function READC_f() {
READC_f.prototype.define = function READC_f() {
- frmt = "d ";
- fname = "foo";
- lunit = 0;
+ var frmt = "d ";
+ var fname = "foo";
+ var lunit = 0;
this.N = 20;
this.M = 1;
- rpar = [];
- tmask = 0;
+ var rpar = [];
+ var tmask = 0;
this.swap = 0;
this.offset = 1;
this.outmask = 1;
- ievt = 0;
- nout = size(this.outmask,"*");
- ipar = [[length(fname)],[this._str2code[frmt-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[fname-1]],[tmask],[this.outmask]];
+ var ievt = 0;
+ var nout = size(this.outmask,"*");
+ var ipar = [[length(fname)],[this._str2code[frmt-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[fname-1]],[tmask],[this.outmask]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["readc"]), new ScilabDouble([2]));
this.model.out = new ScilabDouble([nout]);
@@ -24,8 +24,8 @@ function READC_f() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = [["[]"],[sci2exp(this.outmask)],[fname],[frmt],[string(this.M)],[string(this.N)],[string(this.offset)],[string(this.swap)]];
- gr_i = [];
+ var exprs = [["[]"],[sci2exp(this.outmask)],[fname],[frmt],[string(this.M)],[string(this.N)],[string(this.offset)],[string(this.swap)]];
+ var gr_i = [];
this.x = standard_define([4,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -56,16 +56,16 @@ function READC_f() {
this.swap = parseFloat(arguments[0]["swap"])
this.x = arg1;
this.model = this.x.model;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
- out = this.model.out;
- dstate = this.model.dstate;
- ipar = this.model.ipar;
- imask = 9+ipar[1-1];
- tmask = ipar[imask-1];
- lunit = dstate[3-1];
- fname = exprs[3-1];
- frmt = exprs[4-1];
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
+ var out = this.model.out;
+ var dstate = this.model.dstate;
+ var ipar = this.model.ipar;
+ var imask = 9+ipar[1-1];
+ var tmask = ipar[imask-1];
+ var lunit = dstate[3-1];
+ var fname = exprs[3-1];
+ var frmt = exprs[4-1];
while (true) {
[ok,this.tmask1,this.outmask,this.fname1,this.frmt1,this.M,this.N,this.offset,this.swap,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","READC_f")],[" "],["Read from C binary file"]],["Time Record Selection","Outputs Record Selection","Input File Name","Input Format","Record Size","Buffer Size","Initial Record Index","Swap Mode (0:No, 1:Yes)"],list("vec",-1,"vec",-1,"str",1,"str",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
@@ -73,8 +73,8 @@ function READC_f() {
}
this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
this.frmt1 = stripblanks(this.frmt1);
- fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
- nout = size(this.outmask,"*");
+ var fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
+ var nout = size(this.outmask,"*");
if (prod(size(this.tmask1))>1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter.","Time Record Selection"),"Must be a scalar or an empty matrix.");
} else if (and(this.frmt1!=fmts)) {
@@ -105,15 +105,18 @@ function READC_f() {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Initial Record Index",this.offset),"Strictly positive integer expected.");
} else {
if (this.tmask1==[]) {
- ievt = 0;
+ var ievt = 0;
this.tmask1 = 0;
- outpt = [];
+ var outpt = [];
} else {
- ievt = 1;
- outpt = 1;
+ var ievt = 1;
+ var outpt = 1;
}
- out = size(this.outmask,"*");
- [this.model,graphics,ok] = check_io(this.model,graphics,[],out,1,outpt);
+ var out = size(this.outmask,"*");
+ var tmpvar0 = check_io(this.model,graphics,[],out,1,outpt)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
this.frmt1 = part(this.frmt1,1,3);
if (ok) {
if (ievt==0) {
@@ -121,9 +124,9 @@ function READC_f() {
} else {
this.model.firing = new ScilabDouble([0]);
}
- ipar = [[length(this.fname1)],[this._str2code[this.frmt1-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[this.fname1-1]],[this.tmask1],[this.outmask.slice()]];
+ var ipar = [[length(this.fname1)],[this._str2code[this.frmt1-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[this.fname1-1]],[this.tmask1],[this.outmask.slice()]];
if (prod(size(dstate))!=(this.N*this.M)+3) {
- dstate = [[-1],[-1],[lunit],[zeros(this.N*this.M,1)]];
+ var dstate = [[-1],[-1],[lunit],[zeros(this.N*this.M,1)]];
}
this.model.dstate = new ScilabDouble(dstate);
this.model.ipar = new ScilabDouble(ipar);
diff --git a/js/Sources/READC_f.pickle b/js/Sources/READC_f.pickle
index 59baf645..4656e4f2 100644
--- a/js/Sources/READC_f.pickle
+++ b/js/Sources/READC_f.pickle
@@ -103,61 +103,58 @@ g10
sS'M'
p29
g2
-sS'[this.model,graphics,ok]'
-p30
-g27
sS'fmts'
-p31
+p30
g10
sS'N'
-p32
+p31
g2
sS'graphics'
-p33
+p32
g6
sS'model.ipar'
-p34
+p33
g4
sS'typ'
-p35
+p34
g10
sS'imask'
-p36
+p35
g2
sS'model.blocktype'
-p37
+p36
g21
sS'outmask'
-p38
+p37
g2
sS'frmt1'
-p39
+p38
g21
sS'fname1'
-p40
+p39
g2
sS'exprs'
-p41
+p40
g4
sS'gr_i'
-p42
+p41
g10
sS'ievt'
-p43
+p42
g2
sS'ipar'
-p44
+p43
g4
sS'y'
-p45
+p44
g10
sS'x'
-p46
+p45
g2
sS'model'
-p47
+p46
g6
sS'nout'
-p48
+p47
g2
s. \ No newline at end of file
diff --git a/js/Sources/RFILE_f.js b/js/Sources/RFILE_f.js
index f157f3d6..d16da3a0 100644
--- a/js/Sources/RFILE_f.js
+++ b/js/Sources/RFILE_f.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Sources/RFILE_f.sci" */
function RFILE_f() {
RFILE_f.prototype.define = function RFILE_f() {
- out = 1;
- nout = sum(out);
- frmt = "(7(e10.3,1x))";
- fname = "foo";
- lunit = 0;
+ var out = 1;
+ var nout = sum(out);
+ var frmt = "(7(e10.3,1x))";
+ var fname = "foo";
+ var lunit = 0;
this.N = 2;
- rpar = [];
- tmask = 0;
+ var rpar = [];
+ var tmask = 0;
this.outmask = 1;
- ipar = [[length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[this.outmask]];
- dstate = [[1],[1],[lunit],[zeros((nout)*this.N,1)]];
+ var ipar = [[length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[this.outmask]];
+ var dstate = [[1],[1],[lunit],[zeros((nout)*this.N,1)]];
this.model = scicos_model();
this.model.sim = new ScilabString(["readf"]);
this.model.out = new ScilabDouble([nout]);
@@ -20,8 +20,8 @@ function RFILE_f() {
this.model.ipar = new ScilabDouble([length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[this.outmask]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[sci2exp([])],[sci2exp(this.outmask)],[fname],[frmt],[string(this.N)],[sci2exp(out)]];
- gr_i = [];
+ var exprs = [[sci2exp([])],[sci2exp(this.outmask)],[fname],[frmt],[string(this.N)],[sci2exp(out)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -45,18 +45,18 @@ function RFILE_f() {
this.frmt1 = parseFloat(arguments[0]["frmt1"])
this.N = parseFloat(arguments[0]["N"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- dstate = this.model.dstate;
- ipar = this.model.ipar;
- ievt = ipar[3-1];
+ var dstate = this.model.dstate;
+ var ipar = this.model.ipar;
+ var ievt = ipar[3-1];
this.N = ipar[4-1];
- imask = 5+ipar[1-1]+ipar[2-1];
- tmask = ipar[imask-1];
- lunit = dstate[3-1];
- fname = exprs[3-1];
- frmt = exprs[4-1];
+ var imask = 5+ipar[1-1]+ipar[2-1];
+ var tmask = ipar[imask-1];
+ var lunit = dstate[3-1];
+ var fname = exprs[3-1];
+ var frmt = exprs[4-1];
if (size(exprs,"*")>5) {
exprs[6-1] = [];
}
@@ -67,7 +67,7 @@ function RFILE_f() {
}
this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
this.frmt1 = stripblanks(this.frmt1);
- nout = size(this.outmask,"*");
+ var nout = size(this.outmask,"*");
if (prod(size(this.tmask1))>1) {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Time Record Selection",strcat(string(this.tmask1.slice())," ")),"Empty matrix or scalar expected.");
} else if (this.tmask1!=[]&&this.tmask1<1) {
@@ -90,23 +90,26 @@ function RFILE_f() {
block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s","Outputs Record Selection",strcat(string(this.outmask.slice())," ")),"Strictly positive indexes expected.");
} else {
if (this.tmask1==[]) {
- ievt = 0;
- cout = [];
+ var ievt = 0;
+ var cout = [];
this.tmask1 = 0;
} else {
- ievt = 1;
- cout = 1;
+ var ievt = 1;
+ var cout = 1;
}
- [this.model,graphics,ok] = check_io(this.model,graphics,[],nout,1,cout);
+ var tmpvar0 = check_io(this.model,graphics,[],nout,1,cout)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
if (ievt==0) {
this.model.firing = [];
} else {
this.model.firing = new ScilabDouble([0]);
}
- ipar = [[length(this.fname1)],[length(this.frmt1)],[ievt],[this.N],[this._str2code[this.fname1-1]],[this._str2code[this.frmt1-1]],[this.tmask1],[this.outmask.slice()]];
+ var ipar = [[length(this.fname1)],[length(this.frmt1)],[ievt],[this.N],[this._str2code[this.fname1-1]],[this._str2code[this.frmt1-1]],[this.tmask1],[this.outmask.slice()]];
if (prod(size(dstate))!=(nout+ievt)*this.N+3) {
- dstate = [[-1],[-1],[lunit],[zeros((nout+ievt)*this.N,1)]];
+ var dstate = [[-1],[-1],[lunit],[zeros((nout+ievt)*this.N,1)]];
}
this.model.dstate = new ScilabDouble(dstate);
this.model.ipar = new ScilabDouble(ipar);
diff --git a/js/Sources/RFILE_f.pickle b/js/Sources/RFILE_f.pickle
index b4b40e64..d07126d0 100644
--- a/js/Sources/RFILE_f.pickle
+++ b/js/Sources/RFILE_f.pickle
@@ -85,59 +85,55 @@ g2
sS'exprs[6-1]'
p25
g13
-sS'[this.model,graphics,ok]'
-p26
-S'list'
-p27
sS'N'
-p28
+p26
g2
sS'graphics'
-p29
+p27
g9
sS'model.ipar'
-p30
+p28
g4
sS'typ'
-p31
+p29
g13
sS'imask'
-p32
+p30
g2
sS'model.blocktype'
-p33
+p31
g7
sS'outmask'
-p34
+p32
g2
sS'frmt1'
-p35
+p33
g2
sS'fname1'
-p36
+p34
g2
sS'exprs'
-p37
+p35
g4
sS'gr_i'
-p38
+p36
g13
sS'ievt'
-p39
+p37
g2
sS'ipar'
-p40
+p38
g4
sS'y'
-p41
+p39
g13
sS'x'
-p42
+p40
g2
sS'model'
-p43
+p41
g9
sS'nout'
-p44
+p42
g2
s. \ No newline at end of file
diff --git a/js/Sources/SAWTOOTH_f.js b/js/Sources/SAWTOOTH_f.js
index 655ab346..97108a8c 100644
--- a/js/Sources/SAWTOOTH_f.js
+++ b/js/Sources/SAWTOOTH_f.js
@@ -8,8 +8,8 @@ function SAWTOOTH_f() {
this.model.dstate = new ScilabDouble([0]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- exprs = " ";
- gr_i = [];
+ var exprs = " ";
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Sources/STEP.js b/js/Sources/STEP.js
index 83914ef6..a22157bc 100644
--- a/js/Sources/STEP.js
+++ b/js/Sources/STEP.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/STEP.sci" */
function STEP() {
STEP.prototype.define = function STEP() {
- rpar = [[0],[1]];
+ var rpar = [[0],[1]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["step_func"]), new ScilabDouble([4]));
this.model.evtin = new ScilabDouble([1]);
@@ -13,8 +13,8 @@ function STEP() {
this.model.rpar = new ScilabDouble(rpar);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,false];
- exprs = [[string(1)],[string(rpar)]];
- gr_i = [];
+ var exprs = [[string(1)],[string(rpar)]];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,8 +34,8 @@ function STEP() {
this.in1 = arguments[0]["in1"]
this.fi = arguments[0]["fi"]
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.temps,this.in1,this.fi,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","STEP_FUNCTION")],[" "],["Step Function"],[" "]],["Step Time","Initial Value","Final Value"],list("vec",1,"vec",-1,"vec",-1),exprs);
@@ -51,20 +51,23 @@ function STEP() {
this.fi = this.fi*ones(this.in1);
} else {
block_parameter_error(msprintf("\'Initial Value\' and \'Final Value\': incompatible sizes: %d and %d.",size(this.in1,"*"),size(this.fi,"*")),"Same sizes expected.");
- ok = false;
+ var ok = false;
}
}
if (ok) {
this.model.out2 = new ScilabDouble([1]);
this.model.outtyp = new ScilabDouble([1]);
- [this.model,graphics,ok] = check_io(this.model,graphics,[],size(this.fi,"*"),1,1);
+ var tmpvar0 = check_io(this.model,graphics,[],size(this.fi,"*"),1,1)
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
}
if (ok) {
this.model.firing = new ScilabDouble([this.temps]);
if (this.temps==0) {
- rpar = [[this.fi],[this.fi]];
+ var rpar = [[this.fi],[this.fi]];
} else {
- rpar = [[this.in1],[this.fi]];
+ var rpar = [[this.in1],[this.fi]];
}
this.model.rpar = new ScilabDouble(rpar);
graphics.exprs = exprs;
diff --git a/js/Sources/STEP.pickle b/js/Sources/STEP.pickle
index 88072f2e..e025ae99 100644
--- a/js/Sources/STEP.pickle
+++ b/js/Sources/STEP.pickle
@@ -48,54 +48,51 @@ p13
sS'model.evtout'
p14
g8
-sS'[this.model,graphics,ok]'
-p15
-g13
sS'model.out2'
-p16
+p15
g8
sS'in1'
-p17
+p16
S'string'
-p18
+p17
sS'model.rpar'
-p19
+p18
g5
sS'model.outtyp'
-p20
+p19
g8
sS'graphics.exprs'
-p21
+p20
NsS'fi'
-p22
-g18
+p21
+g17
sS'typ'
-p23
+p22
S'vector'
-p24
+p23
sS'ok'
-p25
+p24
S'boolean'
-p26
+p25
sS'model.blocktype'
-p27
-g18
+p26
+g17
sS'model.dep_ut'
-p28
-g24
+p27
+g23
sS'exprs'
-p29
+p28
g5
sS'gr_i'
-p30
-g24
+p29
+g23
sS'y'
-p31
-g24
+p30
+g23
sS'x'
-p32
+p31
g8
sS'model'
-p33
+p32
g2
s. \ No newline at end of file
diff --git a/js/Sources/STEP_FUNCTION.js b/js/Sources/STEP_FUNCTION.js
index 74ab2e2a..8f6209f0 100644
--- a/js/Sources/STEP_FUNCTION.js
+++ b/js/Sources/STEP_FUNCTION.js
@@ -1,13 +1,13 @@
/* autogenerated from "macros/Sources/STEP_FUNCTION.sci" */
function STEP_FUNCTION() {
STEP_FUNCTION.prototype.define = function STEP_FUNCTION() {
- scs_m_1 = scicos_diagram();
+ var scs_m_1 = scicos_diagram();
scs_m_1.objs[1-1] = STEP("define");
scs_m_1.objs[2-1] = OUT_f("define");
scs_m_1.objs[3-1] = scicos_link();
scs_m_1.objs[4-1] = scicos_link();
- blk = scs_m_1.objs[1-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[1-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [0,0];
graphics.sz = [40,40];
@@ -17,8 +17,8 @@ function STEP_FUNCTION() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[1-1] = blk;
- blk = scs_m_1.objs[2-1];
- graphics = blk.graphics;
+ var blk = scs_m_1.objs[2-1];
+ var graphics = blk.graphics;
this.model = blk.model;
graphics.orig = [80,10];
graphics.sz = [20,20];
@@ -28,11 +28,11 @@ function STEP_FUNCTION() {
blk.graphics = graphics;
blk.model = this.model;
scs_m_1.objs[2-1] = blk;
- lnk = scs_m_1.objs[3-1];
+ var lnk = scs_m_1.objs[3-1];
lnk.from = [1,1,0];
lnk.to = [2,1,1];
scs_m_1.objs[3-1] = lnk;
- lnk = scs_m_1.objs[4-1];
+ var lnk = scs_m_1.objs[4-1];
lnk.xx = [0,20,-20,-20,20,1];
lnk.yy = [0,-20,-20,60,60,1];
lnk.ct = [5,-1];
@@ -47,7 +47,7 @@ function STEP_FUNCTION() {
this.model.out2 = new ScilabDouble([1]);
this.model.outtyp = new ScilabDouble([1]);
this.model.rpar = scs_m_1;
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -61,59 +61,59 @@ function STEP_FUNCTION() {
}
STEP_FUNCTION.prototype.set = function STEP_FUNCTION() {
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="STEP") {
- ppath = list(i);
+ var ppath = list(i);
break;
}
}
- newpar = list();
+ var newpar = list();
for (path in ppath) {
- np = size(path,"*");
- spath = list();
+ var np = size(path,"*");
+ var spath = list();
for (k=1;k<=np;k+=1) {
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path[k-1];
}
- xx = arg1[spath-1];
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (diffobjs(this.xxn,xx)) {
this.model = xx.model;
- model_n = this.xxn.model;
+ var model_n = this.xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = this.xxn;
@@ -121,8 +121,8 @@ function STEP_FUNCTION() {
}
}
this.x = arg1;
- y = needcompile;
- typ = newpar;
+ var y = needcompile;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Sources/SampleCLK.js b/js/Sources/SampleCLK.js
index 50026829..d77bac58 100644
--- a/js/Sources/SampleCLK.js
+++ b/js/Sources/SampleCLK.js
@@ -8,7 +8,7 @@ function SampleCLK() {
this.model.blocktype = new ScilabString(["d"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [false,false];
- exprs = [[sci2exp(1)],[sci2exp(0)]];
+ var exprs = [[sci2exp(1)],[sci2exp(0)]];
this.x = standard_define([2,2],this.model,exprs," ");
return new BasicBlock(this.x);
}
@@ -26,9 +26,9 @@ function SampleCLK() {
this.frequ = arguments[0]["frequ"]
this.offset = arguments[0]["offset"]
this.x = arg1;
- graphics = arg1.graphics;
+ var graphics = arg1.graphics;
this.model = arg1.model;
- exprs = graphics.exprs;
+ var exprs = graphics.exprs;
while (true) {
[ok,this.frequ,this.offset,exprs] = scicos_getvalue("Set block parameters",["Sample time","Offset"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -36,16 +36,16 @@ function SampleCLK() {
}
if (this.frequ<0) {
message("Frequency must be a positif number");
- ok = false;
+ var ok = false;
}
if (abs(this.offset)>this.frequ) {
message("The |Offset| must be less than the Frequency");
- ok = false;
+ var ok = false;
}
if (ok) {
if (or(this.model.rpar.slice()!=[[this.frequ],[this.offset]])) {
- needcompile = 4;
- y = needcompile;
+ var needcompile = 4;
+ var y = needcompile;
}
this.model.rpar = new ScilabDouble([this.frequ],[this.offset]);
this.model.evtout = new ScilabDouble([1]);
diff --git a/js/Sources/Sigbuilder.js b/js/Sources/Sigbuilder.js
index 8dcd8461..d1fea012 100644
--- a/js/Sources/Sigbuilder.js
+++ b/js/Sources/Sigbuilder.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Sources/Sigbuilder.sci" */
function Sigbuilder() {
Sigbuilder.prototype.define = function Sigbuilder() {
- scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["Sigbuilder","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=100,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
+ var scs_m_1 = scicos_diagram(version="scicos4.2",props=scicos_params(wpar=[600,450,0,0,600,450],Title=["Sigbuilder","./"],tol=[[0.0001],[0.000001],[1.000e-10],[100001],[0],[0],[0]],tf=100,context=" ",void1=[],options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(true,33),[8,1],[1,5],list([5,1],[4,1]),[0.8,0.8,0.8]),void2=[],void3=[],doc=list()));
scs_m_1.objs[1-1] = scicos_block(gui="CURVE_c",graphics=scicos_graphics(orig=[329.63473,606.18517],sz=[40,40],flip=true,theta=0,exprs=[["3"],["[0,1,2]"],["[10,20,-30]"],["y"],["n"]],pin=[],pout=6,pein=4,peout=2,gr_i=[],id="",in_implicit=[],out_implicit="E"),model=scicos_model(sim=list("curve_c",4),in1=[],in2=[],intyp=1,out=1,out2=[],outtyp=1,evtin=1,evtout=1,state=[],dstate=[],odstate=list(),rpar=[[0],[1],[2],[10],[20],[-30]],ipar=[[3],[3],[1]],opar=list(),blocktype="c",firing=0,dep_ut=[false,true],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[2-1] = scicos_link(xx=[[349.63473],[349.49528]],yy=[[600.47089],[565.10704]],id="drawlink",thick=[0,0],ct=[5,-1],from=[1,1,0],to=[3,1,1]);
scs_m_1.objs[3-1] = scicos_block(gui="CLKSPLIT_f",graphics=scicos_graphics(orig=[[349.49528],[565.10704]],sz=[0.3333333,0.3333333],flip=true,theta=0,exprs=[],pin=[],pout=[],pein=2,peout=[[8],[4]],gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="split",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=1,evtout=[[1],[1]],state=[],dstate=[],odstate=list(),rpar=[],ipar=[],opar=list(),blocktype="d",firing=[false,false,false],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
@@ -11,7 +11,7 @@ function Sigbuilder() {
scs_m_1.objs[7-1] = scicos_block(gui="CLKOUTV_f",graphics=scicos_graphics(orig=[339.49528,505.10704],sz=[20,30],flip=true,theta=0,exprs="1",pin=[],pout=[],pein=8,peout=[],gr_i=[],id="",in_implicit=[],out_implicit=[]),model=scicos_model(sim="output",in1=[],in2=[],intyp=1,out=[],out2=[],outtyp=1,evtin=1,evtout=[],state=[],dstate=[],odstate=list(),rpar=[],ipar=1,opar=list(),blocktype="d",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list()),doc=list());
scs_m_1.objs[8-1] = scicos_link(xx=[[349.49528],[349.49528]],yy=[[565.10704],[535.10704]],id="drawlink",thick=[0,0],ct=[5,-1],from=[3,1,0],to=[7,1,1]);
this.model = scicos_model(sim="csuper",in1=[],in2=[],intyp=1,out=-1,out2=[],outtyp=1,evtin=[],evtout=1,state=[],dstate=[],odstate=list(),rpar=scs_m_1,ipar=[],opar=list(),blocktype="h",firing=[],dep_ut=[false,false],label="",nzcross=0,nmode=0,equations=list());
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
@@ -24,65 +24,65 @@ function Sigbuilder() {
return options;
}
Sigbuilder.prototype.set = function Sigbuilder() {
- ppath = list(0);
+ var ppath = list(0);
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="CURVE_c") {
ppath[1-1] = i;
break;
}
}
- newpar = list();
+ var newpar = list();
this.y = 0;
for (path in ppath) {
- np = size(path,"*");
- spath = list();
+ var np = size(path,"*");
+ var spath = list();
for (k=1;k<=np;k+=1) {
spath[$+1-1] = "model";
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path[k-1];
}
- xx = arg1[spath-1];
+ var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (diffobjs(this.xxn,xx)) {
this.model = xx.model;
- model_n = this.xxn.model;
+ var model_n = this.xxn.model;
if (!is_modelica_block(xx)) {
- modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
+ var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.odstate,model_n.odstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.opar,model_n.opar)||!isequal(this.model.label,model_n.label);
if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)||or(this.model.in2!=model_n.in2)||or(this.model.out2!=model_n.out2)||or(this.model.outtyp!=model_n.outtyp)||or(this.model.intyp!=model_n.intyp)) {
- needcompile = 1;
+ var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
- needcompile = 2;
+ var needcompile = 2;
}
if ((size(this.model.in1,"*")!=size(model_n.in1,"*"))||(size(this.model.out,"*")!=size(model_n.out,"*"))) {
- needcompile = 4;
+ var needcompile = 4;
}
if (this.model.sim=="input"||this.model.sim=="output") {
if (this.model.ipar!=model_n.ipar) {
- needcompile = 4;
+ var needcompile = 4;
}
}
if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
- needcompile = 4;
+ var needcompile = 4;
}
if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
- needcompile = 4;
+ var needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
if (this.model.sim[1-1]!=model_n.sim[1-1]) {
- needcompile = 4;
+ var needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=this.model);
- eq = this.model.equations;
- eqn = model_n.equations;
+ var modified = or(model_n!=this.model);
+ var eq = this.model.equations;
+ var eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
- needcompile = 4;
+ var needcompile = 4;
}
}
arg1[spath-1] = this.xxn;
@@ -91,7 +91,7 @@ function Sigbuilder() {
}
}
this.x = arg1;
- typ = newpar;
+ var typ = newpar;
return new BasicBlock(this.x);
}
}
diff --git a/js/Sources/TIME_f.js b/js/Sources/TIME_f.js
index 6a4e8b94..de546604 100644
--- a/js/Sources/TIME_f.js
+++ b/js/Sources/TIME_f.js
@@ -6,7 +6,7 @@ function TIME_f() {
this.model.out = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = [false,true];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Sources/TKSCALE.js b/js/Sources/TKSCALE.js
index cc019f9e..c91d07a2 100644
--- a/js/Sources/TKSCALE.js
+++ b/js/Sources/TKSCALE.js
@@ -11,8 +11,8 @@ function TKSCALE() {
this.model.rpar = new ScilabDouble([this.a],[this.b],[this.f]);
this.model.blocktype = new ScilabString(["d"]);
this.model.dep_ut = [false,false];
- exprs = [[sci2exp(this.a)],[sci2exp(this.b)],[sci2exp(this.f)]];
- gr_i = [];
+ var exprs = [[sci2exp(this.a)],[sci2exp(this.b)],[sci2exp(this.f)]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -32,8 +32,8 @@ function TKSCALE() {
this.b = parseFloat(arguments[0]["b"])
this.f = parseFloat(arguments[0]["f"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
[ok,this.a,this.b,this.f,exprs] = scicos_getvalue("Set scale block parameters",["Min value","Max value","Normalization"],list("vec",1,"vec",1,"vec",1),exprs);
if (ok) {
diff --git a/js/Threshold/GENERAL_f.js b/js/Threshold/GENERAL_f.js
index ff011cc2..70e6177c 100644
--- a/js/Threshold/GENERAL_f.js
+++ b/js/Threshold/GENERAL_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Threshold/GENERAL_f.sci" */
function GENERAL_f() {
GENERAL_f.prototype.define = function GENERAL_f() {
- rpar = [[0],[0],[0],[0]];
+ var rpar = [[0],[0],[0],[0]];
this.in1 = 1;
this.out = 1;
this.model = scicos_model();
@@ -13,8 +13,8 @@ function GENERAL_f() {
this.model.blocktype = new ScilabString(["z"]);
this.model.firing = new ScilabDouble([-ones(this.out,1)]);
this.model.dep_ut = [true,false];
- exprs = [[strcat(sci2exp(this.in1))],[strcat(sci2exp(this.out))]];
- gr_i = [];
+ var exprs = [[strcat(sci2exp(this.in1))],[strcat(sci2exp(this.out))]];
+ var gr_i = [];
this.x = standard_define([3,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -32,27 +32,30 @@ function GENERAL_f() {
this.in1 = parseFloat(arguments[0]["in1"])
this.out = parseFloat(arguments[0]["out"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
- rpar = this.model.rpar;
+ var rpar = this.model.rpar;
this.in1 = this.model.in1;
this.out = this.model.evtout;
- nin = sum(this.in1);
- nout = sum(this.out);
+ var nin = sum(this.in1);
+ var nout = sum(this.out);
[ok,this.in1,this.out,exprs] = scicos_getvalue("Set General Zero-Crossing parameters",["Input size","Number of event output"],list("vec",1,"vec",1),exprs);
if (ok) {
- [this.model,graphics,ok] = check_io(this.model,graphics,this.in1,[],[],ones(this.out,1));
+ var tmpvar0 = check_io(this.model,graphics,this.in1,[],[],ones(this.out,1))
+ this.model = tmpvar0[0]
+ var graphics = tmpvar0[1]
+ var ok = tmpvar0[2];
if (ok) {
- nout1 = this.out;
- nin1 = this.in1;
+ var nout1 = this.out;
+ var nin1 = this.in1;
if (nout==nout1&&nin==nin1) {
- rp = matrix(rpar,nout,2^(2*nin));
+ var rp = matrix(rpar,nout,2^(2*nin));
} else {
- rp = -1*ones(nout1,2^(2*nin1));
+ var rp = -1*ones(nout1,2^(2*nin1));
}
- n = size(rp,2)/2;
- result = x_mdialog("routing matrix",string(1,nout1),string(1,2^(2*nin1)),string(rp.slice().slice()));
+ var n = size(rp,2)/2;
+ var result = x_mdialog("routing matrix",string(1,nout1),string(1,2^(2*nin1)),string(rp.slice().slice()));
if (result!=[]) {
rp.slice(1-1,nout1).slice(1-1,2*n) = evstr(result);
this.model.nzcross = new ScilabDouble([this.in1]);
diff --git a/js/Threshold/GENERAL_f.pickle b/js/Threshold/GENERAL_f.pickle
index 7f2734e7..7d76ade0 100644
--- a/js/Threshold/GENERAL_f.pickle
+++ b/js/Threshold/GENERAL_f.pickle
@@ -17,9 +17,10 @@ S'arg1'
p1
S'object'
p2
-sS'graphics.exprs'
+sS'graphics'
p3
-NsS'rpar'
+g2
+sS'rpar'
p4
S'matrix'
p5
@@ -64,49 +65,45 @@ g8
sS'rp.slice(1-1,nout1).slice(1-1,2*n)'
p21
g8
-sS'[this.model,graphics,ok]'
-p22
-g18
sS'in1'
-p23
+p22
g8
sS'model.rpar'
-p24
+p23
g5
-sS'graphics'
+sS'graphics.exprs'
+p24
+NsS'nout1'
p25
-g2
-sS'nout1'
-p26
NsS'model.nzcross'
-p27
+p26
g8
sS'model.blocktype'
-p28
+p27
S'string'
-p29
+p28
sS'model.dep_ut'
-p30
+p29
g15
sS'n'
-p31
+p30
g8
sS'exprs'
-p32
+p31
g5
sS'gr_i'
-p33
+p32
g15
sS'y'
-p34
+p33
g15
sS'x'
-p35
+p34
g8
sS'model'
-p36
+p35
g2
sS'nout'
-p37
+p36
g8
s. \ No newline at end of file
diff --git a/js/Threshold/NEGTOPOS_f.js b/js/Threshold/NEGTOPOS_f.js
index d665e9da..beea2612 100644
--- a/js/Threshold/NEGTOPOS_f.js
+++ b/js/Threshold/NEGTOPOS_f.js
@@ -10,7 +10,7 @@ function NEGTOPOS_f() {
this.model.blocktype = new ScilabString(["z"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [true,false];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Threshold/POSTONEG_f.js b/js/Threshold/POSTONEG_f.js
index d6b41d93..c2cf96d8 100644
--- a/js/Threshold/POSTONEG_f.js
+++ b/js/Threshold/POSTONEG_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Threshold/POSTONEG_f.sci" */
function POSTONEG_f() {
POSTONEG_f.prototype.define = function POSTONEG_f() {
- rpar = [[-1],[-1],[-1],[0]];
+ var rpar = [[-1],[-1],[-1],[0]];
this.model = scicos_model();
this.model.sim = list(new ScilabString(["zcross"]), new ScilabDouble([1]));
this.model.nzcross = new ScilabDouble([1]);
@@ -11,7 +11,7 @@ function POSTONEG_f() {
this.model.blocktype = new ScilabString(["z"]);
this.model.dep_ut = [true,false];
this.model.firing = [-1];
- gr_i = [];
+ var gr_i = [];
this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
diff --git a/js/Threshold/ZCROSS_f.js b/js/Threshold/ZCROSS_f.js
index d9b558ef..f31d3e0a 100644
--- a/js/Threshold/ZCROSS_f.js
+++ b/js/Threshold/ZCROSS_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Threshold/ZCROSS_f.sci" */
function ZCROSS_f() {
ZCROSS_f.prototype.define = function ZCROSS_f() {
- rpar = [[-1],[-1],[0],[0]];
+ var rpar = [[-1],[-1],[0],[0]];
this.in1 = 1;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["zcross"]), new ScilabDouble([1]));
@@ -12,8 +12,8 @@ function ZCROSS_f() {
this.model.blocktype = new ScilabString(["z"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = [true,false];
- exprs = strcat(sci2exp(this.in1));
- gr_i = [];
+ var exprs = strcat(sci2exp(this.in1));
+ var gr_i = [];
this.x = standard_define([2,2],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -28,8 +28,8 @@ function ZCROSS_f() {
ZCROSS_f.prototype.set = function ZCROSS_f() {
this.in1 = parseFloat(arguments[0]["in1"])
this.x = arg1;
- graphics = arg1.graphics;
- exprs = graphics.exprs;
+ var graphics = arg1.graphics;
+ var exprs = graphics.exprs;
this.model = arg1.model;
while (true) {
[ok,this.in1,exprs] = scicos_getvalue([["Set Zero-Crossing parameters"],["All surfaces must cross together"]],"Input size",list("vec",1),exprs);
@@ -40,9 +40,9 @@ function ZCROSS_f() {
if (this.in1<=0) {
message("Block must have at least one input");
} else {
- kk = 0;
+ var kk = 0;
for (jj=1;jj<=this.in1;jj+=1) {
- kk = kk+2^(this.in1+jj-1);
+ var kk = kk+2^(this.in1+jj-1);
}
this.model.rpar = new ScilabDouble([-ones(kk,1)],[zeros(2^(2*this.in1)-kk,1)]);
graphics.exprs = exprs;
diff --git a/sci2jslex.py b/sci2jslex.py
index 36924237..faa33690 100755
--- a/sci2jslex.py
+++ b/sci2jslex.py
@@ -73,6 +73,7 @@ DOUBLE_FUNCTION_NAMES = {
UNKNOWN_FUNCTION_NAMES = {
'_',
'AutoScale',
+ 'CC4',
'CFORTR',
'CFORTR2',
'CFORTREDP',
@@ -86,6 +87,7 @@ UNKNOWN_FUNCTION_NAMES = {
'abs',
'addmenu',
'and',
+ 'arbre_decision',
'atan',
'block_parameter_error',
'cleandata',
@@ -96,6 +98,7 @@ UNKNOWN_FUNCTION_NAMES = {
'degree',
'delete',
'delmenu',
+ 'dialog',
'diffobjs',
'do_eval',
'double',
@@ -115,6 +118,8 @@ UNKNOWN_FUNCTION_NAMES = {
'floor',
'gca',
'gcf',
+ 'genSwitchInnerDiagram',
+ 'genfunc',
'genfunc1',
'genfunc2',
'get_click',
@@ -131,6 +136,7 @@ UNKNOWN_FUNCTION_NAMES = {
'int8',
'interp',
'inv',
+ 'jetcolormap',
'lasterror',
'length',
'lines',
@@ -180,6 +186,7 @@ UNKNOWN_FUNCTION_NAMES = {
'splin',
'sqrt',
'standard_define',
+ 'standard_origin',
'strcat',
'strindex',
'stripblanks',
diff --git a/sci2jsyacc.py b/sci2jsyacc.py
index 8e98e78d..15d90daf 100755
--- a/sci2jsyacc.py
+++ b/sci2jsyacc.py
@@ -496,11 +496,33 @@ def p_elsestatement_else(p):
# define assignment
+VARCOUNT = 0
+
def p_lterm_assignment_expression(p):
'''assignment : lterm ASSIGNMENT expression
| lterm ASSIGNMENT listcall'''
- p[0] = '%*s%s = %s' % (INDENT_LEVEL * INDENT_SIZE, ' ', p[1], p[3][0])
- add_var_vartype(p[1], p[3][1])
+ global VARCOUNT
+ var = p[1]
+ if var[0] == '[':
+ prefix = 'var '
+ tmpvar = 'tmpvar%d' % (VARCOUNT)
+ p[0] = '%*s%s%s = %s' % (INDENT_LEVEL * INDENT_SIZE, ' ', prefix, tmpvar, p[3][0])
+ VARCOUNT += 1
+ var = var[1:-1]
+ ltermvars = var.split(',')
+ idx = 0
+ for var in ltermvars:
+ prefix = ''
+ if var in LOCAL_VARS and '.' not in var:
+ prefix = 'var '
+ p[0] += '\n%*s%s%s = %s[%d]' % (INDENT_LEVEL * INDENT_SIZE, ' ', prefix, var, tmpvar, idx)
+ idx += 1
+ else:
+ prefix = ''
+ if var in LOCAL_VARS and '.' not in var:
+ prefix = 'var '
+ p[0] = '%*s%s%s = %s' % (INDENT_LEVEL * INDENT_SIZE, ' ', prefix, var, p[3][0])
+ add_var_vartype(var, p[3][1])
def p_model_assignment_expression(p):
'assignment : MODEL ASSIGNMENT expression'