After you have built up a model by defining variables and components, organizing them into a hierarchy, and connecting them together, you then need to call the setup() method to have the framework do some initialization work in preparation for execution. You can control some details of that initialization with the arguments that you pass into setup(), and it is important to note that you cannot set or get any variable values, nor run until after you call setup().
Problem.setup(vector_class=None, check=False, logger=None, mode='rev', force_alloc_complex=False, distributed_vector_class=<class 'openmdao.vectors.petsc_vector.PETScVector'>, local_vector_class=<class 'openmdao.vectors.default_vector.DefaultVector'>)[source]