spnLogBlock {spectrino} | R Documentation |
Log some text and/or values in the blocks log or in the console. The user can send some text, or use some special syntax for listing one or all properties.
Alernative to that command you can use a log template (set from block's menu) which contains text and $property.name$ the last one will be replaced by that property value. The log template will ber used at each iteration.
spnLogBlock(Block, text)
Block |
- the name(character string) of the target block; if cannot be found (e.g. "") the main log (console) is used. |
text |
- message character string to be logged. Usually it's a some text message, but there are some special cases: |
spnLogBlock
returns TRUE if successful, FALSE - if the log of that block is disabled (not Enabled).
Teodor Krastev
spnChartBlock , spnIteration
# Initialization of Spectrino spnNew() # generate test group of blocks spnOpenGroupOfBlocks("<test>") # write into the console spnLogBlock("","some text") # intialize the iteration to expected 20 count spnIteration(20) for(i in 1:20) { spnSetProperty("test1", "objective.0", sin(i/2)) spnLogBlock("test1","<objective.0>") spnSetProperty("test1", "sug.epsilon", cos(i/2)) spnLogBlock("test1","<sug.epsilon>") spnLogBlock("test1","===================") spnIteration(); Sys.sleep(0.1); } # Release of Spectrino spnFree(TRUE)