Analysis
This tutorial provides a quick tour of the generation of Analysis
.
The Analysis
object stores the main objects of the analysis which are:
Analysis.form
: theFormDiagram
of the analysis,Analysis.envelope
: theEnvelope
of the analysis,Analysis.optimiser
: theOptimiser
of the analysis,
Creating an Analysis object
The Analysis
object can be created based on one or all of the three elements that it composes.
from_elements
from_form_and_optimiser
from_form_and_shape
Beyond defining each element separately, a series of functions has been implemented to create the optimiser for a specific problem. Nevertheless, when these are created, the user should check if the Analysis.optimiser.settings dictionaty contains the right information for the analysis.
Main Analysis Methods
When the elements are added to the Analysis object, the following methods are useful to assign specific constraints on the problem
After assigning all modifications necessary, the problem needs to be set up and run with the following commands
A full list of relevant methods should be checked at the Analysis
documentation.
Create a minimum thrust analysis
The code below creates a minimum thrust analysis in a shallow crossvault and using the cross form diagram. This example is discussed detail here.
from compas_tna.envelope import CrossVaultEnvelope
from compas_tna.diagrams import FormDiagram
from compas_masonry.viewers import MasonryViewer
from compas_tno.analysis import Analysis
envelope = CrossVaultEnvelope(x_span=(0.0, 10.0),
y_span=(0.0, 10.0),
thickness=0.5,
n=100)
form = FormDiagram.create_cross_form(discretisation=10)
analysis = Analysis.create_minthrust_analysis(form, envelope)
analysis.apply_selfweight()
analysis.apply_envelope()
analysis.set_up_optimiser()
analysis.run()
view = MasonryViewer(formdiagram=form, envelope=envelope)
view.setup()
view.show()
Disclaimer about the solution
The problem of finding a connected network within the bounds of a masory geometry is nonlinear. Therefore, a solution is not guarantee. For this reason the output of the Analysis should always be checked to see if the exitflag is satisfactory, i.e., if the problem was indeed solved.