model.setGlobalVariable(index, phase, value)
Sets current global variable value. See also model.getGlobalVariable()
Parameters
index
zero based global variable index, use 0 for GV1, 8 for GV9phase
zero based phase index, use 0 for Phase 1, 5 for Phase 6value
new value for global variable. Permitted range is from -1024 to 1024.
Return value
none
Notice
If a parameter is missing from the value, then that parameter remains unchanged.
Global variable can only store integer values, any floating point value is converted (todo check how) into integer value.
Examples
Example
this is a sample example
model/setGlobalVariable-example
function foo(bar)
local x = bar * 2
end