Sources and Parameters
Learn about Calculation Sources and their Parameters
Last updated
Learn about Calculation Sources and their Parameters
Last updated
CalcTree uses Pages to organises calculation works. The CalcTree Page consists of a document and can contain a variety of calculations and data Sources.
Sources define calculation logic and data. Each source defines Parameters that hold calculated values.
Sources: define calculation logic and data
Parameters: hold calculated values and data of a source
Read more about CalcTree Pages and Documents:
CalcTree supports a variety of sources including:
Python scripts: can be added and edited using CalcTree Python environment
Math formulas: can be added and edited right inside the document area
Spreadsheets: can be uploaded, or re-uploaded to make changes in the spreadsheet logic
CSV files: can be uploaded, or re-uploaded to make changes in the data
Templates: they are verified CalcTree pages used as calculation sources
Jump right in:
Parameters hold calculated values. These values are recognised as one of these data types:
Number: numeric values, such as 10
or 2.85
Quantity: a number and a physical unit, such as 1.5 hours
String: string of characters, such as OK
DateTime: represents a date and a time coming soon
Boolean: either True
or False
Table: a two dimensional array of the above types
File: an arbitrary binary file coming soon
You can link multiple sources to create more complex calculations. That means a source picks up a result from another source and does more calculations on it. In order to link a source to other calculations, it needs to refer to the value of another source's parameters.
Source linking in CalcTree is done in two ways:
Inside editable sources, by typing a parameter name of another source. This works inside Python editor and Math formulas
Via assigning a parameter of another source into an input of one source. This is for sources that aren't editable on the CalcTree page i.e. Spreadsheets and Templates
All parameters defined by all other sources are accessible by typing their names in Python editor or in Math formulas. That means you can simply refer to them by typing those parameter names. The following diagram illustrates this type of linking:
See examples of linking Python or Math formulas to other sources:
To link a Spreadsheet or Template to other sources, you can connect a parameter of those other sources to an input of the spreadsheet or template. The following diagram illustrates this type of linking:
See examples of linking Spreadsheets or Templates to other sources:
Getting started
CalcTree Pages
Add documentation
CalcTree Documents
Create calculations
Python
Create calculations
Math formulas
Create calculations
Spreadsheets
Create calculations
Templates
Create calculations
CSV files
Create calculations
Python
Create calculations
Math formulas
Create calculations
Spreadsheets
Create calculations
Templates
a
and b
) by
connecting them to Spreadsheet or Template inputs (x
and y
)