Cancel
Showing results for 
Search instead for 
Did you mean: 

Why is PlantSimulation not accepting formulas in memory tables?

Builder
Builder

I have the following situation (comparing):

 

There is a given table with three values and a formula:

Table_1.jpgOriginal table

Now I want to create the same using Simtalk:

 

is
tab: table;
do
tab.create;

tab.setDataType({1, *}..{3, *}, "length");
tab.setDataType({4, *}, "real");
tab.initialize({1, 1}..{3, 1}, 0.05);
tab.setFormula({4, 1}, "?[1, yself] * ?[2, yself] * ?[3, yself]");
end;

PlantSimulation 11.0.12 is not accepting the formula, when the table is created using SimTalk.

 

Why?

 

1 REPLY

Re: Why is PlantSimulation not accepting formulas in memory tables?

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

? in the formula refers in this case to the method, you need to use @  instead

is
 tab: table;
do
 tab.create;

 tab.setDataType({1, *}..{3, *}, "length");
 tab.setDataType({4, *}, "real");
 tab.initialize({1, 1}..{3, 1}, 0.05);
 tab.setFormula({4, 1}, "@[1,yself] * @[2, yself] * @[3, yself]");
end;
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net