Package: cosapp
CoSApp - Collaborative System ApproachThe primary goal ofCoSAppis to help technical departments in the design of complex systems.
To do so, the framework allows the simulation of various systems representing the different parts of the final product in a common environment.
The benefit is the ability for each subsystem team to carry out design study with a direct feedback at product level.The main features are:Butterfly effectCouple your simulation models with CoSApp to get immediate impact on main product variables and iterate to converge on a better design.Design guidanceAll systems can share design parameters associated with an acceptable range.
You can take advantage of those limited degrees of freedom without fear of breaking your collaborators' work.Flexible simulation workflowsCoSApp solvers can be combined into versatile, customized workflows that fit specific simulation intents.Have a look at theintroduction, containing many tutorials!This code is the property of Safran SA.
It uses code coming from various open-source projects (seeLICENSEfile).Try it now!Run a Jupyter Lab instance with binder to try out CoSApp features through examples.History0.15.4 (2024-02-28)Bug fixes and code qualityFix bug raised inNonLinearSolverfor systems with rates (MR#268).Minor refactoring pass (MR#274).MaintenanceDrop Python 3.8 support and add Python 3.11 test pipeline (MR#270).Update installation and contribution guidelines (MR#270).Update dependency list (MRs#269and#270).JOSS articlePublication of an article on CoSApp in theJournal of Open-Source Software, referenced to version 0.15.4 (MR#271).0.15.3 (2023-12-19)Bug fixes and code qualityFix minor bug inNonLinearSolver(MR#261).Fix incorrect return type hints inSystem(MR#259).Improve support for read-only properties in system getters and setters (MR#264).MaintenanceRemove deprecated dependency for compatibility with Python 3.12 (MR#258).Forcepythonfmu< 0.6.3 in dependency list, to prevent a crash during tests (MR#262). Temporary fix until root cause is identified.0.15.2 (2023-10-14)Bug fixesFix crash withVisJsrendering of sub-systems (MR#252).Fix minor bug inEvalString(MR#253).Fix bad synchronization of mode variables during transitions (MR#254).Improve error message when pulling variables with different roles (MR#255).FixTypeErrorwhen passingpullingargument as a tuple inSystem.add_child(MR#256).0.15.1 (2023-09-18)New features & API changesThe representation ofMathematicalProblemobjects now indicates the number of unknowns and equations, for a better readability (MR#249).Optional argumentexecution_indexinSystem.add_childandDriver.add_childcan now take a negative value, with a behaviour following that oflist.insert(MR#250).Bug fixes and code qualityAdd missing field "time" inExplicitTimeRecorder.event_data, when no recorder is set (MR#245).Fix bug with recorders inspecting systems with iterators (MRs#246and#247).Fix bug withNonLinearSolverwith NumPy array residues (MR#248).Fix initialization bug of targets involving expressions (MR#249).0.15.0 (2023-07-20)New features & API changesSuppression of defaultRunSingleCasesubdriverrunnerinNonLinearSolverdrivers (MR#239).Enable target initialization in multi-point design problems (MR#233).New utility functionswap_systemto replace on the fly a subsystem by anotherSysteminstance (MR#238).Bug fixes and code qualityRefactor driverOptimizer(MR#240).Various bug fixes (MRs#234,#235,#241).DocumentationNew tutorial onswap_system(MR#243).General update of tutorials (MRs#232and#242).0.14.1 (2023-06-08)Bug fixes and code qualityFix incorrect output file name incosapp.tools.parse_module(MR#229).Refactoring pass (MR#230).DocumentationUpgrade documentation build stack (MRs#224and#226).Fix bad rendering of ports and systems (MRs#227and#228).0.14.0 (2023-05-17)New features & API changesImproved performance, through a revised clean/dirty mechanism (MR#215).Possibility to add a contextual description to sub-systems and ports of a system, as well as sub-drivers (MR#216). This feature is useful for automatic documentation tools, and has been included in the Markdown representation of systems (also used in functioncosapp.tools.display_doc). Example:fromcosapp.baseimportSystemfrommy_moduleimportFlowPortclassMySystem(System):defsetup(self):self.add_input(FlowPort,"fl_in1",desc="Primary inlet flow port")self.add_input(FlowPort,"fl_in2",desc="Secondary inlet flow port")self.add_output(FlowPort,"fl_out")New hook function_parse_module_config, returning pre-defined settings forcosapp.tools.parse_module(MR#218). This allows module maintainers to simply callfromcosapp.toolsimportparse_moduleimportmy_moduleparse_module(my_module)instead of,e.g.,parse_module(my_module,ctor_config={"ComplexSystem1":[dict(n=1,foo=0.5),dict(n=2,foo=0.1),],"ComplexSystem2":[dict(xi=0.0,__alias__="ComplexSystem2_a"),dict(xi=1.0,__alias__="ComplexSystem2_b"),],},excludes=["Foo*","*Bar?"],)providedmy_module._parse_module_config()returns a dictionary specifying the values ofctor_config,excludes,etc.MakeSolverResultsadataclass, for easier handling ofNonLinearSolver.results,e.g.(MR#220).Expose attributeproblemin system setup (MR#221). Previously,problemwas only exposed in methodSystem.transition.Bug fixes and code qualityFix bug inNonLinearSolverlog message (MR#214).Add missing JSON file in PyPI and conda packages, preventing the use ofcosapp.tools.parse_module(MR#219).DocumentationIllustrate port and sub-system description in tutorials (MR#215).0.13.1 (2023-04-03)Bug fixes and code qualityUpdate test baseline to pass in a Python 3.11 environment (MR#200).Creation of a dummy system factory, mostly for tests (MR#201).Improve clean/dirty mechanism (MR#202) and fix incorrect clean/dirty status with surrogate models (MR#205).Fix bug in functioncosapp.tools.display_docfor classes with setup arguments (MR#208).Various code quality improvements (MRs#211,#212).DocumentationNote: extensive use of self-documenting f-strings (introduced in Python 3.8) has made tutorials incompatible with Python 3.7.Updated tutorials (MRs#203,#206,#207,#210).The image used in binder is now based on Python 3.10 (MR#204).Module parserNew functionparse_moduleincosapp.toolscollecting all system and port classes within a Python module. This parser, generating a JSON file containing the description of all CoSApp symbols, is primarily meant to be used for constructional GUI applications, developed separately (MRs#192&#209).0.13.0 (2023-02-09)Python 3.10 supportThe code is now tested for Python 3.8, 3.9 and 3.10.
Support of Python 3.7 is thus officially dropped, although no version-specific Python code was introduced in this version of CoSApp.New features & API changesModuleconnectorsmoved fromcosapp.coretocosapp.ports(MR#189).New "direct" (with no unit conversion) connector classesPlainConnector,CopyConnectorandDeepCopyConnector, incosapp.ports.connectors(MR#188).New methodMathematicalProblem.is_empty(), equivalent toshape == (0, 0)(MR#186).Improved VisJs graph rendering, by limiting node size for long system names (MR#184).New utility functionsget_stateandset_stateincosapp.utils, for quick system data recovery (MR#193):fromcosapp.utilsimportget_state,set_states=SomeSystem('s')# ... many design steps, say# Save state in local objectdesigned=get_state(s)s.drivers.clear()s.add_driver(SomeDriver('driver'))try:s.run_drivers()except:# Recover previous stateset_state(s,designed)Functionsradians,degreesandarctan2/atan2have been added to the scope ofEvalStringobjects, and can therefore be used in equations,e.g.(MR#178).Recorders can now record constant properties (MR#181).Deprecation ofSystem.get_unsolved_problemin favour of new methodassembled_problem(MR#174).Inner off-design problem of systems is now exposed as attributeproblem, but only within thetransitionmethod (MR#174). This allows users to add or remove off-design constraints during event-driven transitions, while keeping this property inaccessible the rest of the time.fromcosapp.baseimportSystemfrommathimportsin,cosclassSomeSystem(System):defsetup(self):self.add_inward('x',0.0)self.add_inward('y',0.0)self.add_outward('z',0.0)a=self.add_event('event_a',trigger='x > y')b=self.add_event('event_b',trigger='x < y')defcompute(self):self.z=cos(self.x)*sin(self.y)deftransition(self):offdesign=self.problemifself.event_a.present:offdesign.clear()offdesign.add_equation('z == 0.5').add_unknown('x')ifself.event_b.present:offdesign.clear()Bug fixes and code qualityFix serialization bugs for systems with setup parameters (MR#180) andNonevariables (MR#172).Bug fix on event time calculation involving array transients (MR#177).Bug fix on possible name conflicts in connector storage (MR#173).Fix inconsistent behaviour ofSystem.add_childwhen apullingerror is raised (MR#197).Various code quality improvements (MRs#175,#185,#186,#187,#190,#191,#194).DocumentationUpdated time driver tutorial (MR#182).Updated Tips & Tricks (MR#196).Other updates (MRs#176,#195,#198).0.12.3 (2022-09-21)New features & API changesImproved user experience:Auto-completion for dynamically added attributes of systems (ports, subsystems, inwards, outwards, events...) and drivers (sub-drivers) (MRs#164and#166);Improved representation of mathematical problems, in particular for loop equations and multi-point design problems (MRs#159,#160and#163).New methodSystem.new_problemto facilitate the creation of dynamic design methods,e.g.(MR#162).DocumentationUpdated tutorials (MRs#169and#170).Bug fixes and code qualityBug fix on unknown dealiasing (MR#157).Bug fix on port variable export (MR#158).Bug fix on system serialization (MR#161).Bug fix on subsystem read-only constants (MR#167).Various code quality improvements (MRs#154,#155,#162,#168).0.12.2 (2022-05-26)New features & API changesAutomatic tolerance inNonLinearSolver(MRs#148and#152).Optimizer.set_objectiveis deprecated, in favour ofset_minimumandset_maximum(MR#150).Loop residues are no longer normalized (MR#151).Improved type hints for ports, systems and drivers, in functions whose return type depends on arguments, such asSystem.add_child,add_driver,etc.(MR#145).DocumentationUpdated tutorials (MRs#144,#147and#154).Bug fixes and code qualityFix inconsistent behaviour of recorders (MR#143).Fix bug on event initialization (MR#146).Fix bad markdown formatting of ports occurring injupyterlab3.4 (MR#149).Fix failed test caused by a regression inpytest7.1 (MR#142).0.12.1 (2022-02-25)New features & API changesSimplification of driverOptimizer:Suppression of sub-driverrunner(MR#136). This change introduces new methodsset_objective,add_unknownsandadd_constraintsin driverOptimizer.Optimization constraints are now declared with human-readable expressions inOptimizer.add_constraints(MR#138).Before:fromcosapp.driversimportOptimizers=SomeSystem('s')optim=s.add_driver(Optimizer('optim'))optim.runner.set_objective('cost')optim.runner.add_unknown(['a','b','p_in.x'])# Enter constraints as non-negative expressions:optim.runner.add_constraints(["b - a",# b >= a"a",# a >= 0"1 - a",# a <= 1])optim.runner.add_constraints("p_out.y",inequality=False,# p_out.y == 0)s.run_drivers()After:optim.set_objective('cost')optim.add_unknown(['a','b','p_in.x'])optim.add_constraints("b >= a","0 <= a <= 1","p_out.y == 0",)New, convenient iterators and setters for ports (MR#137):fromcosapp.baseimportPort,SystemclassXyzPort(Port):defsetup(self):self.add_variable('x')self.add_variable('y')self.add_variable('z')classSomeSystem(System):defsetup(self):self.add_input(XyzPort,'p_in')self.add_output(XyzPort,'p_out')defcompute(self):self.p_out.set_from(self.p_in)# assign values from `p_in`self.p_out.z=0.0s=SomeSystem('s')# Multi-variable setter `set_values`s.p_in.set_values(x=1,y=-0.5,z=0.1)s.run_once()# Dict-like (key, value) iterator `items`:forvarname,valueins.p_out.items():print(f"p_out.{varname}={value})DocumentationUpdated tutorials on ports (MR#139) and on optimization (MR#140).Bug fixes and code qualityFix bug in Jacobian computation for negative perturbations (MR#129).Fix bug inRunOnceandRunSingleCaserecorders withhold=False(MR#130).Resolve input aliasing in time driver scenarios (MR#135).Fix bugs with events (MRs#123,#126,#128).Discard empty connectors, and send a warning (MR#132).Other code quality improvements (MRs#127,#131,#133,#134).0.12.0 (2022-01-17)New featuresImplementation of multimode systems and hybrid continuous/discrete time solver (MRs#100,#103,#105-#108,#110-#121):Possibility to declare events and mode variables in systems.New methodSystem.transitiondescribing system transition upon the occurrence of events.Event detection inExplicitTimeDriver.Possibility to specify a stop criterion in time simulation scenarios (MR#107).DocumentationNew tutorial on hybrid time simulations and multimode systems (MRs#116and#120).Updated build config file following up a bug fix ingithub.com/readthedocs(MR#109).0.11.8 (2021-11-24)New features & API evolutionsNew modulecosapp.base(MR#96) containing base classes for user-defined classes (in particular,Port,SystemandDriver). Also containsBaseConnector, base class for custom connectors (see "User-defined and peer-to-peer connectors" below), as well as CoSApp-specific exceptionsScopeError,UnitErrorandConnectorError.Note:Port,SystemandDrivercan still be imported fromcosapp.ports,cosapp.systemsandcosapp.drivers, respectively.Public APIcosapp.base.SurrogateModelto define custom surrogate models used inSystem.make_surrogate(MR#97).
Pre-defined models have been moved to modulecosapp.utils.surrogate_models.System-to-system connections (MR#94).classLegacyPortToPort(System):defsetup(self):a=self.add_child(ModelA('a'))b=self.add_child(ModelB('b'))# Explicit port-to-port connectionsself.connect(a.p_in,b.p_out)self.connect(a.outwards,b.inwards,{'y':'x'})classAlternative(System):"""Same as `LegacyPortToPort`, with alternative connection syntax"""defsetup(self):a=self.add_child(ModelA('a'))b=self.add_child(ModelB('b'))# Alternative syntax: connect systems, with port or variable mappingself.connect(a,b,{'p_in':'p_out','y':'x'})User-defined and peer-to-peer connectors (MR#87and MR#98).importnumpyfromcopyimportdeepcopyfromcosapp.baseimportPort,System,BaseConnectorclassDeepCopyConnector(BaseConnector):"""User-defined deep-copy connector"""deftransfer(self)->None:source,sink=self.source,self.sinkfortarget,origininself.mapping.items():value=getattr(source,origin)setattr(sink,target,deepcopy(value))classCustomPort(Port):defsetup(self):self.add_variable('x',0.0)self.add_variable('y',1.0)classConnector(BaseConnector):"""Connector for peer-to-peer connections"""deftransfer(self)->None:source,sink=self.source,self.sinksink.x=source.ysink.y=-source.xclassMyModel(System):defsetup(self):self.add_input(CustomPort,'p_in')self.add_output(CustomPort,'p_out')self.add_inward('entry',numpy.identity(3))self.add_outward('exit',numpy.zeros_like(self.entry))classAssembly(System):defsetup(self):a=self.add_child(MyModel('a'))b=self.add_child(MyModel('b'))self.connect(a,b,{'exit','entry'},cls=DeepCopyConnector)self.connect(a.p_in,b.p_out)# will use CustomPort.ConnectorDocumentationUpdated tutorials (MR#102).Include latest API evolutions in tutorials on ports and systems.New tutorial on user-defined connectors.New section on user-defined surrogate models.Bug fixes and code qualitySimplify loop resolution (MR#77,#101).Improve connector transfer (MR#99).Update binder settings, to take advantage of prebuilt plotly extension for jupyter lab (MR#95).Other code quality improvements (MR#76,#82,#90).0.11.7 (2021-09-21)New featuresPossibility to define unknowns and equations at solver level (MR#65).
Minor API evolution facilitating the definition of nonlinear problems and of multi-point design problems.engine=Turbofan('engine')solver=engine.add_driver(NonLinearSolver('solver'))# Add design points:takeoff=solver.add_child(RunSingleCase('takeoff'))cruise=solver.add_child(RunSingleCase('cruise'))# Unknowns defined at solver level regarded as *design* unknownssolver.add_unknown(['fan.diameter','core.turbine.inlet.area'])# Local off-design equations can be directly defined at case leveltakeoff.add_equation('thrust == 1.2e5')cruise.add_equation('Mach == 0.8')New recursive iteratortree()for systems and drivers, yielding all elements in a composite tree (MR#68).head=CompositeSystem('head')bottom_to_top=[s.nameforsinhead.tree()]top_to_bottom=[s.nameforsinhead.tree(downwards=True)]Visitor pattern for composite collections of systems, drivers and ports (MR#68).fromcosapp.patterns.visitorimportVisitor,sendassend_visitorclassDataCollector(Visitor):def__init__(self):self.data={}defvisit_system(self,system):key=system.full_name()self.data.setdefault(key,{})self.data[key]['children']=[child.nameforchildinsystem.children.values()]send_visitor(self,system.inputs.values())defvisit_port(self,port):# specify what to do with a portdefvisit_driver(self,driver):# specify what to do with a driverhead=CompositeSystem('head')collector=DataCollector()send_visitor(collector,head.tree())print(collector.data)DocumentationNew tutorials, and new "Tips & Tricks" notebook (MR#71).Bug fixes and code qualityImproved tests on clean/dirty status (MR#66).Bug fix in tutorial notebook on validation (MR#67).Code quality improvements (MR#69).MakeSystem.exec_ordera view onSystem.childrendictionary keys, rather than an independent attribute (MR#70). Execution order can still be specified, via a dedicated setter forexec_order.Fix solver bugs occurring when system structure changes (MR#73).0.11.6 (2021-06-25)Bug fixes and code qualityResolve unknown aliasing for pulled input variables (MR#58).Resolve bugs and issues related toadd_target(MR#61).Fix wrong comparison of Jacobian matrixjac is Noneafter converting it as anumpyarray (MR#56).Set transparent background inPortMarkdownFormatter(MR#59).Other code quality improvements (MR#55,#57,#60).0.11.5 (2021-05-07)New featuresNewbinder container,
allowing anyone to run interactively the tutorials used in the online documentation
(MR#30and#36).Deferred equations to set targets:New methodadd_target, defining a deferred equation on on a target variable (MR#48).
In effect,add_targetcreates an equation whose right-hand side is evaluated dynamically prior to each execution of the nonlienar solver.In the example below, the feature is illustrated in design mode. Outwardzis a function of two independent variablesxandy.
When design method'target_z'is activated, the actual value ofz, set interactively, is used as a target value, with unknowny:classSystemWithTarget(System):defsetup(self):self.add_inward('x',1.0)self.add_inward('y',1.0)self.add_outward('z',1.0)# Define design problem with a target on `z`design=self.add_design_method('target_z')design.add_unknown('y').add_target('z')defcompute(self):self.z=self.x*self.y**2s=SystemWithTarget('s')solver=s.add_driver(NonLinearSolver('solver',tol=1e-9))# Activate design method 'target_z': outward `z` becomes a targetsolver.runner.design.extend(s.design_methods['target_z'])s.x=0.5s.y=0.5s.z=2.0# set targets.run_drivers()asserts.y==pytest.approx(2)# solution of x * y**2 == 2asserts.z==pytest.approx(2)s.z=4.0# dynamically set new targets.run_drivers()asserts.y==pytest.approx(np.sqrt(8))# solution of x * y**2 == 4asserts.z==pytest.approx(4)Targets can be also be declared in off-design mode, by callingself.add_target(...)inSystem.setup.DocumentationUpdated tutorials onSystem,Driver, and design methods (MR#41).Typo fix and improvements in time driver tutorial (MR#33)Bug fixes, minor improvements and code qualityReport variable name in unit-related Connector warning message (MR#32).Automatically include fieldtimeinDataFramerecorders attached to a time driver (MR#34).Bug fix inMonteCarlodriver (MR#37).Replacecondabymambain CI scripts (MR#39).Revamp markdown and JS rendering of systems and ports (MR#40and#43,#47and#51).Fix bug inratetype inference (MR#44).Other code quality improvement (MR#35,#38,#42,#46,#50,#52,#53).0.11.4 (2021-03-08)New featuresRecorders:
It is now possible to add evaluable expressions in recorders (MR#27):point=PointMass('point')driver=point.add_driver(RungeKutta(order=3,time_interval=(0,2),dt=0.01))recorder=driver.add_recorder(recorders.DataFrameRecorder(includes=['x','a','norm(v)']),# norm(v) will be recorded in DataFrameperiod=0.1,)DocumentationNew tutorial onSystemSurrogate(MR#15).Bug fixes, minor improvements and code qualityInitialization bug in time simulations (MR#23).Bug in nonlinearity estimation inNumericalSolver(MR#22).Do not raiseArithmeticErrorwhen an unknown is declared several time (MR#18).Suppress deprecation warnings raised bynumpy(MR#20and#24).Suppress undue warning raised bynumpyinNonLinearSolver(MR#19).Fix incompatibility betweenpandasandxlrd(MR#21).Other code quality improvement (MR#16,#17,#26,#27).0.11.3 (2020-12-16)New featuresSurrogate models:
It is now possible to create a surrogate model at any system level with new methodSystem.make_surrogate(MR#3and#12):plane=Aeroplane('plane')# system with subsystems engine1 and engine2# Say engine systems have one input parameter `fuel_rate`# and possibly several outputs, and many sub-systems# Create training schedule for input datadoe=pandas.DataFrame(# loads of input datacolumns=['fuel_rate','fan.diameter',..]# input names)plane.engine1.make_surrogate(doe)# generates output data and train modelplane.run_once()# executes the surrogate model of `engine1` instead of original compute()# dump model to fileplane.engine1.dump_surrogate('engine.bin')# load model into `engine2`:plane.engine2.load_surrogate('engine.bin')# deactivate surrogate model on demandplane.engine1.active_surrogate=plane.engine2.active_surrogate=FalseBug fixes, minor improvements and code qualityAdd several US-common unit conversions (MR#2).New method to export cosapp system structure into a dictionary (MR#5)Make recorders capture port and system properties (MR#8).Fix Module/System naming bug:'inwards' and 'outwards' are allowed as Module/System names(MR#9).Broad code quality improvement (MR#11).Replacetyping.NoReturnbyNonewhen appropriate.Rewording pass, typo and error fixes in tutorial notebooks.Suppress aDeprecationWarningraised bynumpyin classVariable.Reformat many strings as Python f-strings, for clarity.Symplify many occurrences ofstr.join()for just two elements.Global rewording of tutorial notebooks, including a few error fixes.0.11.2 (2020-09-28)First open-source version.
No major code change; mostly updates of license files, URLs in docs, and CI scripts.0.11.1 (2020-07-22)FeaturesAdd the possibility to set boundary condition of transient simulation from interpolate profile.Add the possibility to prescribe a maximum step for transient variables.Bugs and code qualityBug fix inRunOncedriver, preventing undue call torun_oncemethod.Bug fix in AssignString: force copy for numpy arrays.New tutorial for advanced features of time simulations in CosApp.0.11.0 (2020-05-12)FeaturesImprove documentation at various places, add documentation about the cosapp packages structure and sequence diagram for transient simulation.Add a advanced logger feature for CoSApp simulations.Update FMU export to PythonFMU 0.6.0New methodSystem.add_propertyallowing users to create read-only properties.Bugs and code qualitySuppress deprecation warnings raised by external dependencies.Fix bug in AssignString with arrays,AssignStringof the kind'x = [0, 1, 2]'won't change variablexinto an array of integers,  ifxis declared as an array of floats.FixTimeStackUnknownnot able to stack transient variables defined on a children System or with partially pulled transient variable.Fix the bug related to the initialization ofrateattributes in systems.0.10.2 (2020-04-21)Features[BETA] Export CoSApp System as FMUBugs and code qualityApply Broyden correction on Jacobian matrix for iteration without Jacobian updateSupport varying time stepFix time not being set beforesetup_runare called.Fix reference for residues inIterativeConnector(it equals 1. now)Drop pyhamcrest for pytest0.10.1 (2020-01-15)FeaturesTime varying boundary conditions are now possible:system=MySystem('something')# system with transient variables x and vdriver=system.add_driver(RungeKutta(time_interval=(0,2),dt=0.01,order=3))driver.set_scenario(init={'x':0.5,'v':0},# initial conditionsvalues={'omega':0.7,'F_ext':'0.6 * cos(omega * t)'# explicit time-dependency})Bugs and code qualityFix various bug on the transient simulation frontCorrect implementation of step limitation in the Newton-Raphson solverUsing a logger atDEBUGlevel will now display the call stack through the systems and driversRework of the Python evaluable string to be more efficient0.10.0 (2019-10-23)Introduce continuous time simulations with dedicated time drivers (seeTimeDrivernotebook in tutorials).Suppress notion of (un)freeze; all variables are considered as known, unless explicitly declared as unknowns.Drivers no longer use ports.Connectors are now stored by parent system.Migrate to pytest.API ChangesPorts:add_variable("x", units="m", types=Number)=>add_variable("x", unit="m", dtype=Number)freeze=> removedunfreeze=> replaced byadd_unknownin Systems and Driversconnect_to=> replaced byconnectat system levelSystems:time_refis no longer an argument of methodcompute:def compute(self, time_ref):=>def compute(self):Create a new connection betweena.in1andb.out:self.a.in1.connect_to(self.b.out)=>self.connect(self.a.in1, self.b.out)add_residues=>add_equationset_numerical_default=> Pass keyword toadd_unknownadd_inward("x", units="m", types=Number)=>add_inward("x", unit="m", dtype=Number)add_outward("x", units="m", types=Number)=>add_outward("x", unit="m", dtype=Number)Drivers:add_unknowns(maximal_absolute_step, maximal_relative_step, low_bound, high_bound)=>add_unknown(max_abs_step, max_rel_step, lower_bound, upper_bound)add_equations=>add_equationEquations are now represented by a unique string, instead of two strings (left-hand-side, right-hand-side):add_equations("a", "b")=>add_equation("a == b")add_equations([("x", "2 * y + 1"), ("a", "b")])=>add_equation(["x == 2 * y + 1", "a == b"])ForNonLinearSolver:fatolandxtol=>tolmaxiter=>max_iterForOptimizer:ftol=>tolmaxiter=>max_iter0.9.6 (2019-10-10)More correction for VISjs viewer and System HTML representation0.9.5 (2019-09-25)Correct D3 & VISjs Viewers0.9.4 (2019-09-25)Introduce an optional environment variableCOSAPP_CONFIG_DIR0.9.3 (2019-07-25)API ChangesMonteCarlo:Montecarlo=>MonteCarloMontecarlo.add_input_vars=>MonteCarlo.add_random_variableMontecarlo.add_response_vars=>MonteCarlo.add_responseMonteCarlo has been improved by using Sobol random generatorViewers code onSystemis moved in a subpackage ofcosapp.toolsResidue reference is now calculated only onceVarious bug fix0.9.2 (2019-07-01)In nonlinear solver, store LU factorization of the Jacobian matrix, rather than its inverse.Minor refactoring of the core source code, with no API changes0.9.1 (2019-04-23)CreateVariableclass to manage variable attributeswatchdogis now optionalConfiguration is now inside a folder$HOME/.cosapp.dAPI changes:get_latest_solution=>save_solutionload_solver_solution=>load_solutionVarious bug fix0.9.0 (2019-03-04)This release introduces lots of API changes:Core ports and unit are available incosapp.portsCore systems are available incosapp.systemsCore drivers are available incosapp.driversCore recorders are available incosapp.recordersCore tools are available incosapp.toolsCore notebook tools are available incosapp.notebook(! this is now a separated package)datahave been renamed ininwardsandadd_datainadd_inwardlocalshave been renamed inoutwardsandadd_localsinadd_outwardBaseRecorder.record_iterationrenamed inBaseRecorder.record_stateHuge code refractoring: cosapp is now aPython namespace.cosapp.notebookhas been moved to an independent packagecosapp_notebook. But it is still accessible fromcosapp.notebook.IntroduceSignal/Slotpattern to connect to internal event (implementation fromsignalslot, included incosapp.core.signal)Module.setup_ran: Signal emitted after thecall_setup_runexecutionModule.computed: Signal emitted after the fullcomputestack (i.e.:_postcompute)Module.clean_ran: Signal emitted after thecall_clean_runexecutionBaseRecorder.state_recorded: Signale emitted after therecord_stateexecution0.8.0 (2018-10-26)Add Jacobian partial matrix updateAdd numerical features to variables to ease convergence controlAdd monitoring of solver residuesAdd restoration of solver result for initializationRework residues and unknowns handling (remove virtual port and pulling port)Rework optimizer to be more homogeneous with non-linear solverImprove linear Monte Carlo computation timeImprove data viewer for non-linear solverCreate viewer for Monte CarloAdd dropdown widget for enum variables0.7.0 (2018-09-17)Add helper functions to present solver evolutionsAdd new d3 visualization of systems0.6.0 (2018-08-14)Implement clean-dirty policyRestore compatibility with Python 3.4Display influence matrix0.5.0 (2018-07-20)Simplify drivers structure, all actions for a case are supported by a single classRunSingleCaseAdd support for vector variables; they can be partially (un)frozen and are handled correctly by the solver.AddMonteCarlodriverAdd recording data capability0.4.0 (2018-06-15)SystemandDriverhave now a common ancestorModule=>Drivervariables are now stored as data or localsAdd visualization ofSystemconnections based on N2 graph (syntax:cosapp.viewmodel(mySystem))0.3.0 (2018-04-05)API changes:System.add_driverandDriver.add_childtake now an instance ofDriverAdd external code caller SystemAdd validation range attributes on variablesAdd variable visibilityAdd metamodel training and DoE generatorAdd helper function to list inputs and outputs variables of aSystem0.2.0 (2018-03-01)Stabilization of the user API0.1.0 (2018-01-02)First release.