1 / 1

Constrained Objects for Modeling Complex Systems

class beam {. attributes. real E,. Sy. , L, W, H, F, I, Sigma;. constraints. Pi = 3.141;. Conditional. L > 0; W > 0; H > 0; I > 0;. Constraint. I = W * H * H * H / 12;. -. (I = (. F * L* L) / (Pi * Pi * E)) :. -. F < 0;. -. F > 0;. F =. Sy. * W * H :.

sailor
Télécharger la présentation

Constrained Objects for Modeling Complex Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. class beam { attributes real E, Sy , L, W, H, F, I, Sigma; constraints Pi = 3.141; Conditional L > 0; W > 0; H > 0; I > 0; Constraint I = W * H * H * H / 12; - (I = ( F * L* L) / (Pi * Pi * E)) : - F < 0; - F > 0; F = Sy * W * H : constructor beam(E1, Sy1, L1, W1, H1,F1) { E = E1; L = L1; H=H1; W=W1; F = F1; } } Building Elements (Kalay et al 1998) Overall architecture of Cob environment Domain Specific User interface Domain Specific User interface Overall Class Diagram Constraint Object Computational Engine Constrained Object Database Management System constraint solvers for different domains Comparison with Related Approaches Constraints + Objects Constraints + Objects Applications Applications Constraints Constraints Constraint Constraint Model Analyzer Revision System ....... Compiler, Debugger ......... Solving Solving ThingLab ThingLab (1980) (1980) Physics & geometry Arithmetic Arithmetic User User - - defined defined experiments experiments methods methods Borning,et Borning,et . al. . al. Kaleidoscope(1992) Kaleidoscope(1992) GUI development, GUI development, Arithmetic Arithmetic Delta Delta - - blue, blue, Freeman Freeman - - Benson, et. al. Benson, et. al. Constraints for Constraints for Indigo Indigo imperative imperative prg prg . . Siri Siri (1992) (1992) Constraints for Constraints for Arithmetic & Arithmetic & Term rewriting Term rewriting imperative imperative prg prg . . Symbolic Symbolic Horn Horn Modelica Modelica (1998) (1998) Engineering Engineering Arithmetic, Arithmetic, Matlab Matlab Papers on Constrained Objects Modeling Modeling Boolean Boolean Fritzson Fritzson , et. al. , et. al. Cob (2001) Cob (2001) Complex Complex Arithmetic, Arithmetic, CLP(R), CLP(R), • B. Jayaraman and P. Tambay, Constrained Objects for Modeling Complex Structures, Conference on Object-Oriented Prgramming Languages Systems and Applications, 2000. • B. Jayaraman and P. Tambay, Compositional Semantics for Diagrams using Constrained Objects, Intl. Conf. on Theory and Application of Diagrams, 2002 • B. Jayaraman and P. Tambay, Modeling Engineering Structures using Constrained Objects, Symp. on Practical Aspects of Declarative Languages, 2002. • P. Tambay, Constrained Objects for Modeling Complex Systems, Ph.D. Dissertation, University at Buffalo, 2003 • B. Jayaraman and Y. Zhang, Constrained Object for Intelligent Building Design, CSE TR, University at Buffalo, 2004 Compositional Compositional Boolean, Boolean, Maple Maple Systems Systems Symbolic Symbolic Future Work • Constrained Objects for Dynamical Systems • Support Numerical Libraries and Constrant Solvers Constrained Objects for Modeling Complex Systems Pallavi Tambay, Yang Zhang, Prof. Bharat Jayaraman Constrained Objects > Constraints + Objects What is a Constrained Object? • Constraint languages + Constraints model behavior - No resemblance to structure - Complex system is a flat collection of constraints - Constraints cannot be visualized • Object-oriented languages + Objects model structure - Methods not appropriate for modeling behavior of complex systems • Visualization tools + Natural, intuitive geometric representation - No representation of semantics or behavior of system - Modeler may not understand underlying representation • An object is a container of data that is accessed via a well-defined interface of procedures. (Imperative) • A constrained object contains data that is governed by laws, or constraints. (Declarative) • Examples: resistor in a circuit, a joint in a truss, a cell in a spreadsheet, etc. • Cob is a programming language combining Java-like classes with declarative constraints instead of methods. Principles underlying Constrained Objects • Compositionalspecification of structure  objects • Declarative specification of behavior  constraints • Visual specification of structure  smart diagrams Typical Modeling Scenario Truss as Constrained Object modeling ::= define_Cob_classes; build_object_structure; solve_structure ; [ [ modify_structure ; re_solve_structure ] +; query_structure * ] + CUML: Constraint-based UML(with R. Jyotwani) class joint { attributes bar [] Bars; load [] Loads; constraints (sum X in Bars: X.B.F* sin(X.A)) + (sum L in Load: L.F * sin(L.A)) = 0; (sum Y in Bars: Y.B.F* cos(Y.A)) + (sum M in Loads: M.F* cos(M.A)) = 0; constructor joint(B1, L1) { Bars = B1; Loads = L1; } } Domain-Specific Visual Language(with A. Dev & N. Menon) class slab { attributes level Pl; beam[] Peripherialbeams; real Z; constraints forall B in Peripheralbeams: B.Z = Z; constructor slab(L,B) { Pl = L; Peripherialbeams = B; } } Compilation and Execution What is Partial Evaluator Input o P : CCLP - translation of a Cob Program • G : CCLP - translation of a Cob Query • Evaluate parEval( G , [ ], C ) o Output o C : Set of constraints • P C G ╞ → • Partial Evaluator (PE) - Strategy parEval(true, C, C). parEval((A,B), Cin, Cout) :- parEval(A, Cin, Cout1), parEval(B, Cout1, Cout). parEval(G, C, C) :- (clp_built-in(G); unification(G); cob_builtin(G)), call(G).

More Related