[FE] new API and replaceable support - work in progress - to use, just add +d=nfAPI to the OMEdit simulation flags - handling of getComponentAnnotations via NF (some models are about 6x faster) - some crashes in OMEdit, not debugged yet, for example: Modelica.Fluid.Examples.AST_BatchPlant.BatchPlant_StandardWater
Update the connection instead of deleting and adding it Moved the updateConnection API to ModelicaBuiltin.mo Added a new API updateConnectionNames which updates the connection connectors.
[BE] Add jacobian dependencies - Preparation for initial state selection, used for matching - The dependencies of a jacobian are all unknowns contained in it
Added new API parseEncryptedPackage Works similar to `parseFile`. Added support for creating .mol packages without encryption which means they only contains the .mo files and also updated `loadEncryptedPackage` to be able to load such packages.
fix for ticket:5340 - handle DAE.INITIAL_TERMINATE in BackendDAECreatelowerEq - correctly add DAE.TERMINATE to the regular equations, not the initial equations
fix ticket:5305 - handle ModelicaStandardTables in SimCodeFunctionUtil.getLibraryStringInMSVCFormat - fix some msvc C codegen issues (some linker issues stil remain) - now models with tables work fine with --target=msvc --simCodeTarget=Cpp
on mingw C runtime link statically with sundials - on mingw define LINK_SUNDIALS_STATIC before including sundials headers - fix rule for dataReconcilation.cpp (was overwritten before)
more fixes for ticket:5030 - fix variable cross reference for equations in modelinfo.c - fix equation display in html in default_profiling.xsl - fix a bad string comparison (str == "") in systemimpl.c
copy values of fmi2CallbackFunctions in fmi2Instantiate - copy fmi2CallbackFunctions* functions in fmi2Instantate as it could be freed by the caller environment after the call
adjust text height to extent height if no text size is specified add option to create only a warning if a files already exists accept floats for any decimal number
fix for ticket:5130 and ticket:5131 - do not free memory on fmi2Terminate as it should be possible to call fmi2GetXXX after it, just set the modelTerminated status - move memory free from fmi2Terminate to fmi2FreeInstance
make impure functions be of variability continuous (ticket:5127) - remove the check for impure in NFFrontEnd/NFCeval.mo - add check for impure in NFFrontEnd/NFCall.mo
all synchronous features except state machines should work (ticket:5127) - do not constant evaluate impure functions - better fix for sample that requires no patching of NFModelicaBuiltin.mo
patch sample overload if --std < 3.3 (ticket:5127) - reparse builtin for each language standard, associate the builtin file with both grammar and language standard - change sample definition if --std < 3.3
add more synchronous features (ticket:5127): interval, firstTick, overload sample - firstTick and interval are specified in NFModelicaBuiltin.mo - sample is handled specially in NFBuiltinCall.mo
add Clock synchronous features to the new front-end (NF), ticket:5127 - currently only Clock operators are supported, no clock variables - change the ugly intGe(Flags.getConfigEnum(Flags.LANGUAGE_STANDARD), 33); to Config.synchronousFeaturesAllowed(); - unbox external function arguments if __OpenModelica_UnboxArguments is present so that previous polymorphic definition in NFModelicaBuiltin.mo works fine - do not simplify sum and other builtin operators if nfScalarize flag is disabled
improve the build process - remove mkbuilddirs target - create directories before runing the first target if OMBUILDDIR is not empty - avoid build of some dependencies if they are already built
fix MetaModelica examples on mingw - this is until we fix PR: https://github.com/OpenModelica/OMCompiler/pull/2138 - compile also with -fno-ipa-pure-const - link functions with -lOpenModelicaCompiler if MetaModelica flag is on
Fixes for ticket:5117 and ticket:5119 - link in static libs (even for Modelica tables) for FMU and for the generated executable (all except sundials) - on 32bit, pass gcc flag -mstackrealign to reallign SSE functions (so they can be used from other Windows processes, such as fmuChecker) - build SimulationRuntime/c/ with -mstackrealign
fix checkAllModelsRecursive reporting and add a flag - add the nfAPI flag so we don't get conflicts on changes to this file - report the number of failing models for checkAllModelsRecursive
adapt to latest msys2 and mingw clang - set prefix on all configure (msys2 sets it to default /mingw64 or mingw32) - override the needed cflags - remove -fPIC on windows
use 'start' attribute if parameter has no binding (ticket:5065) - better Component.getFixedAttribute implementation - use start attribute if the component has no binding and has fixed=true (or has no fixed and is a parameter or structural parameter)
[NF] better error messages and more evaluation of parameters - evaluate parameters with annotation(Evaluate=true), make them structural parameters - give the deduced variability of the expression that doesn't match the expected variability - fix ticket:5062, add an warning message for parameter Type p(fixed=true) annotation(Evaluate=true); with no binding - handle ticket:5061 by accepting parameters in the public section of the functions and issue a warning
better handling of builtin and extern C functions (ticket:5057) - check if the non fullyqualified name of the function is the same as the name of the external function - if the non fullyqualified name is not the same, generate the function and call the extern definition - fix definition of builtin integerMax and numBits
[NF] fixes to overconstrained connection graph (OCG) - strip subscripts from the overconstrained components when used in the graph or the equalityConstraint function - lookup "fill" in top - add flag (no)nfScalarize to be able to disable scalarization in NF
[NF] finalize overconstrained connection graph (OCG) - generate zeros(:) = OverconstrainedType.equalityConstraint(A, B) equations - replace broken connects with the generated equalityConstraint equation - also run the Connections.* operator evaluation on initial equations - do not delete inner outer nodes as it will fail miserably
[NF] overconstrained connection graph (OCG) - creating and breaking of the OCG is working - replacement of broken connect equation with the equalityConstraint call is missing - update common
fix simulation code compilation on Windows - use g++ to link the executable on Windows with -static-libstc++ - remove c++ includes from the SimulationRuntime/c/simulation/simulation_runtime.h - guard some files with extern "C" so we can always use g++ to compile the generated code
Fix FMU build on Windows and other FMU fixes - use fmuTargetName instead of fileNamePrefix to remove the fmu - use rm -f if System.removeDirectory doesn't work on Windows - compile with static libstdc++ and pthreads - don't add extra dlls to the binary directory - fix resource copy on Windows
fixes to FMI modelDescription import - do not require the imported file to be named modelDescription.xml - do all the zipping operations in the temporary folder and cleanup after
Load encrypted package Checkout the SEMLA and OMEncryption repositories inside the OM super project i.e., at the same level where OMCompiler is. Run the makefile with OMENCRYPTION=yes i.e., `make -f Makefile.omdev.mingw OMENCRYPTION=yes` on Windows. Configure on Linux `./configure --with-ENCRYPTION`. loadEncryptedPackage API takes a .mol file and decrypts the package and load it into the AST.
Build SEMLA Checkout the SEMLA repository inside the OM super project i.e., at the same level where OMCompiler is. Run the makefile with `OMENCRYPTION=ON` i.e., `make -f Makefile.omdev.mingw OMENCRYPTION=ON`.
Fatemeh Davoudi implementation of the symbolic model reduction algorithm For detailed description see http://www.ep.liu.se/ecp/043/090/ecp09430136.pdf The algorithm is implemented in the cpp runtime in Core/ReduceDAE At the moment for the ranking method the residuen ranking is implement in class Core/ReduceDAE/Ranking.cpp The reduction mehtods cancel terms, linearize terms and substitute terms are implemented in class Core/ReduceDAE/Reduction.cpp The label algorithms for cancel terms, linearize terms and substitute terms are implemented in OMCompiler/Compiler/SimCode/ReduceDAE.mo The method can be used with: setCommandLineOptions("+simCodeTarget=Cpp --labeledReduction --disableExtraLabeling -d=writeToBuffer"); loadFile("your model file"); simulate(yourmodel);
[NF] handle discrete variability better - if the type of component is discrete return discrete if is lower variability than the explicit component variability - handle discrete builtin calls (String, Integer, pre, edge, change)
workaround for PNLib in PNlib the LBINARY expression "{} and not {}" must be handled and should not be simplified to "false" by ExpressionSimplify.simplifyLBinary
Added flags for input and output path. Input path flag `-inputPath` is used to read the model_init.xml and model_info.json files. `-f` flag for model_init.xml file gets the preference over `-inputPath`. Output path flag `-outputPath` is used to write the output files like model_res.mat, model_prof.intdata etc. `-r` flag for model_res.mat file gets preference over `-outputPath` flag. Fixes ticket:4583 where we need to set a different working directory for simulation executable.
fix for ticket:4459 and ticket:4491 - support both BuildType and BUILDTYPE on command line - update 3rdParty/ModelicaExternalC tables C source code to the latest version from MSL: https://github.com/modelica/Modelica/commit/8209e73d7739ebcacd779f0d189d0a2885dfe105
fixed error in the lacking precision of double precision handling that was introduced during refactoring in commit f2f0b7eb56785e14bf78f2acb0ab888596a998d3, so this criterion is applied successfully again.
added new abort criterion for nonlinear solver based on sign changes in case of errors due to lacking precision of double precision variables implemented in commit b433b2d6ec92460fae06a9dd1b5243ee438cf0a7. Now this criterion is applied after each iteration step and not after a complete iteration cycle.
Added a new flag for interactive mode. `--interactive=none|corba|tcp|zmq` The flags `-d=interactive` and `-d=interactiveCorba` are still valid with a depreciation message. The flag -d=interactiveZMQ is removed.
ticket:4381 Updated the implementation of fetching connect equations. Build a list of connections and then use the list for getting a specific connection. Also moved `getConnectionCount` API to ModelicaBuiltin.mo
added windows makefile flags to build cpp runtime with Klu and trilinos make runtimeCPPinstall USE_KLU="true" USE_TRILINOS="true" for trilions the 3rdparty packages has to be build before with make -f Makefile.omdev.mingw nox on windows
Fix the front-end part of ticket:4304 - add new DAE.INITIAL_ASSERT and handle it in the front-end - add new DAE.INITIAL_TERMINATE and handle it in the front-end - added preliminary back-end handling
Fixes for ticket:3894 - improve the File package, support for file names in error messages, etc. - get rid of failures on Windows 32bit (where isNone(fromID) returned true for existing files) - add partial support for dladdr in Windows
fix MSVC compilation of new added solver - remove jacobian variable (not used) - MSVC 2010 does not support definition of variables with size from local or stack variables, use malloc/free instead
fix MSVC build of simulation runtime C - jacobian is not used, comment it out for now - the MSVC 2010 does not support declarations of variables using sizes from local stack variables
new front-end connection handling preparation - adapt the old front-end with some changes needed for the new front-end - add DAE.CONNECT_EQUATION - use DAE.ConnectorType inside DAE.Attributes.ATTR instead of SCode.ConnectorType
partial implementation of class extends - the class extends changes are not applied to the baseclass, only the local scope - check if this is the correct way to implement this, or we actually need to replace in the base class
more improvements to new frontend - provide souce information to all DAE elements - flatten all statements and equations (except connect) - use a for loop in DAEUtil.getVarBinding
new frontend improvements - copy sections from inherited classes to the instantiated class in NFClass.instExpandedClass - fix some typing issues - handle "pre" - do some pour man's evaluation on the dae - handle FOR equations with simple ranges - handle WHEN equations - transform SCode.ENUMERATION in a class with parts - whith this about 37 models from ScalableTestSuite are flattening
small fixes for Windows building - we don't have mico anymore, use use omniOrb - set global roots to zero by default - if we find OpenCL.dll in Windows generate libOpenCL.a so that ParModelica can be used
Separated nonlinear and linear system and the corresponding solver in two classes -adapted Newton,Kinsol,Umfpack,Hybrj,Broyden for new linear and nonlinear System/AlgLoopDefaultImplementation.cpp -separted AlgLoopDefaultImplementation in two classes -adapted cpp and fmu cpp tempalted to new linear and nonlinear System/AlgLoopDefaultImplementation.cpp
unify the way we handle version in Windows / Linux - add OpenModelica prefix to the CONFIG_REVISION in omc_config.h - removed OpenModelica prefix from Windows generated revision.h
adapt code to MSVC2015 - the compilation will now use the existing VS 2015, 2013, 2012, 2010 in that order - use VSVERSION=20NN to change the order - fix a minor warning in the CPP runtime CMakeLists.txt
some small optimizations - remove arrSize from records, size of array can be determined in O(1) time - make BackendEquation.addEquations() add all equations in a loop instead of calling addEquation() for each equation - use addEquations() instead of List.fold(lst,addEquation,eqns) - avoid some intermediate lists
small memory optimizations - free the array in List.mo - return the input in SystemImpl__iconv if to == from - signal that we don't want malloc_atomic in arrayCreateNoInit
Fixes for ticket:3955 - enable GC parallel marking in Windows (Makefile.omdev.mingw) - enable parallel parsing in Windows (Compiler/FrontEnd/ClassLoader.mo) - give parallel parsing thread 2MB stack (Compiler/runtime/System_omc.c)
introduce List.splitr() which returns the first list in reverse order - optimizes code that does (l1,l2)=List.split() + listAppend(l1,l2) by avoiding double listReverse on first list: (l1r,l2)=List.splitr() + List.append_reverse(l1r,l2);
implementation of new Backend inline module - started fixing [ticket:3510](https://trac.openmodelica.org/OpenModelica/ticket/3510) - also [ticket:3785](https://trac.openmodelica.org/OpenModelica/ticket/3785)
move inline from BackendCreate to modul (normalInlineFunction) - issues with complex function - remove force inline don't work (e.g. for ThermoPower, Mdedia.TwoPhaseWate)
added additionl compiler target flag for Visual Studio versions there are now the target msvc,msvc10,msvc12,msvc13,msvc15 for visual studio builds, the target msvc uses the latest, installed visual studio
- the init-XML-file of the cpp runtime does now consider the column-major storage of the arrays -> this will produce correct value references for multi dimensional arrays and fix some initialization issues
- improved stop criteria in ExpressionSolve.solve - reduce simplify-calls in ExpressionSolve.solve2 - fixed start value for iterration var in simplifyComplexFunction
- improved stop criteria in ExpressionSolve.solve - reduce simplify-calls in ExpressionSolve.solve2 - fixed start value for iterration var in simplifyComplexFunction
workaround for [https://trac.openmodelica.org/OpenModelica/ticket/3531 #3531] - added option inline function with array type (defaulte= false) - option will be irnored insidedynamicStateSelection
* Functionality to include the Jacobian in the FMU * This code adds an extra callback function in the C runtime to call the Jacobian evaluation. This changes also force the generation of the Jacobian code in the generated FMU. Only the A matrix of the Jacobian is supported by now (i.e. derivatives of state derivatives with respect to other states).
- fixed segfault in writer-class (occured because boost::make_tuple was used for std::tuples) - removed the ifdef-stuff in writer.h (now there are new classes called "DefaultContainerManager" and "ParallelContainerManager" to handle the container stuff) - renamed busywaiting_barrier.hpp to barriers.hpp
- made c++ runtime more c++11 friendly, which means that explicit namespaces are removed for boost (example: boost::shared_ptr -> shared_ptr) - cmake now detects if the compiler is able to work with c++11 and it will switch the following types from boost to std: bind, function, thread, atomic, mutex, memory_order_release, memory_order_relaxed, condition_variable, unique_lock, array, tuple, shared_ptr, weak_ptr, dynamic_pointer_cast
- dummy initialization for complex types added, to prevent linker error with GCC 4.4 --> this workaround should be removed if a newer compiler is the default compiler
- added a flag "solverThreads" to the c++ runtime. With this flag the number of threads that is used by the solver can be controlled (e.g. for parallel jacobian evaluation)
- debug flag "hardcodedStartValue" added -- this will put the initial values of parameters and variables as fixed values into the c++ code and will not read if from the initXML-file (C++ runtime only) - simple fixes for vector-constructor in CodegenCpp.tpl
- sundials is now available again, if static linking is selected (c++ runtime) - fixed an issue with the std::vector fill constructor, because he could not distinguish between the different constructors in GCC 4.4 (MinGW)
- changed the name of "USE_FMU_KINSOL" to "USE_FMU_SUNDIALS" because otherwise we have to add such defines for CVode and IDA as well - added a SimController_FMU and System_FMU library to the build of the c++ runtime -- otherwise we can not turn off sundials for the FMUs - the function OMCFactory::loadSimControllerLib was created, now we are able to overload the loading mechanism in StaticOMCFactory - StaticOMCFactory is now header only and added to the build process again
- enabled JOM for build of C++ simulation runtime - changed folder-name build_msvc to Build_MSVC, to be consistent to GCC build - boost-property tree header are now copied to output folder as well
- strings are now handled in arrays as well - initial values are taken from xml file - number of HPCOM threads can now be variied for different systems (ode, all, zeroFuncs) - changed Logger::write to LOGGER_WRITE - changed flag "nls_continue" to "nls-continue"
- improved memory management of measure-time - removed some memory leaks in OMCFactory and MeasureTime - removed some compiler warnings caused by uninitialized member variables in constructors (see CVode and IDA)
- changed the -r" flag of the cpp-runtime to "-F" to have a consistent flag-behaviour - added some asserts to array-classes of c++ runtime - fixed Kinsol-FMU support - some typos - added the possibility to overwrite flags in the c++ simulation runtime -- we can now replace "-r=file" with "-F=file" and "-w" with "-V all=warning"
- Fix #3326 and #3332. - Update KernelFunctionInterfacegenerations. - Fix 64 bit integer issues with parmodelica. - Fix the parmodelica makefiles. - Disable freeing of parallel arrays for now (need to handle the return variable).
- c++ modelica-exceptions can now be suppressed - so no error is printed - "--help" is working in c++ simulation runtime - c++ command line arguments are divided into hidden and available flags - unrecognized flags produce a warning on std::cerr again
- build type (release, debug or relwithdebinfo) of the c++ simulation runtime can now be switched with the help of configure (--with-cppruntime-args=BUILD_TYPE=Release)
- added makefile dependency from runtimeCPPinstall to omc, because the suitesparse libraries should be used by the cpp-runtime - the "--nls_continue" flag is now working again, if the kinsol solver is used
some fixes in Kinsol of cpp runtime - reduced max number of iterations - increased tolerance for function norm - start earlier with line search method - increase tolerance for jacobian eps, if Kinsol fails in line search method
some fixes in Kinsol of cpp runtime - reduced max number of iterations - increased tolerance for function norm - start earlier with line search method - increase tolerance for jacobian eps, if Kinsol fails in line search method
some fixes in Kinsol of cpp runtime - reduced max number of iterations - increased tolerance for function norm - start earlier with line search method - increase tolerance for jacobian eps, if Kinsol fails in line search method
some fixes in Kinsol of cpp runtime - reduced max number of iterations - increased tolerance for function norm - start earlier with line search method - increase tolerance for jacobian eps, if Kinsol fails in line search method
- removed the old Kinsol_lapack - flag of the cpp-runtime - KinsolLapack will now work with new and old versions of sundials - Non linear solver can now continue simulation instead of throwing an exception, if it does not reach the given precision, by passing a flag to the executable
- added some helper functions to extract data from objects (getCompsOfMatching and getSimVarMappingOfBackendMapping) - HPCOM is now able to handle models with NO_MATCHING()
- logger can now be used in several classes (including the model class) of the cpp-runtime - cpp-runtime is now build in debug-mode by default on linux/mac - internal StatArrays can now be applied to internal StatArrays
fix for getStateJacobian method, wrong return type was generated added additional linear solver to Kinol solver which uses complete pivot lu factorization fix for Kinsol solve iteration, added iteration method section
- Logger of Cpp runtime is now enabled by default, the standard log level was reduced to "warning" - Kinsol will no continue solving non linear equation systems if the convergence criteria was not reached -> a warning is printed instead until we have a solver that is able to solve the systems correctly
- Peer solver (openMP flavor) is now working - copy constructor of model extension class makes a deep copy of all important variables now - openmp is now added to all simulation runs, if cmake has find it
- Peer solver (openMP flavor) is now working - copy constructor of model extension class makes a deep copy of all important variables now - openmp is now added to all simulation runs, if cmake has find it
- removed input and output variables from simVar to index mapping, because they are already part of the other variable arrays and thus they are added twice - commented out the -DUSE_UMFPACK statement, until Niklas has delivered a fix for the umfpack solver
changed A Matrix to ublas matrix in Algloop class removed template functions in AlgLoop classes to calc A matrix, only one A matrix type can be used now(sparse matrix can be used with a flag later) adapted non linear solvers on new getSystemMatrix method
changed A Matrix to ublas matrix in Algloop class removed template functions in AlgLoop classes to calc A matrix, only one A matrix type can be used now(sparse matrix can be used with a flag later) adapted non linear solvers on new getSystemMatrix method
- handle BackendDAE.NO_MATCHING inside BackendDAEUtil.getStrongComponents - remove msgpack include as we don't have it anymore in 3rdParty (why is that?)
- changed output point type OPT_EMTPY to OPT_NONE - if outputFormat in mos-skript is set to "empty", no result file is created in the cpp simulation runtime anymore
- HPCOM-FMU-Support added - the HPCOM-ODE-System size is now checked against the number of sim code equations - Cpp-Runtime does now create a valid modelDescription.xml
- replaced boost_log with logger-class of cpp-runtime - moved the implementation of StaticNonLinSolver-, StaticLinSolver- and StaticSolverOMCFactory to code files (because otherwise we are not able to disable cvode and kinsol for FMU export, easily) - FMU is now using Newton instead of Kinsol by default - FMU has no dependencies to sundials anymore
Improved handling of inverse algorithms - Discrete variables do no longer appear as iteration variable - Proper error message for systems that need to have discrete iteration variable
Solve for inputs (or a combination of inputs and outputs) of an algorithm section if necessary Therefore, the algorithm is treated as a nonlinear loop. This should be improved for discrete or hybrid systems (mixed continuous and discrete systems). See #3081 TODO: Handle discrete algorithm outputs properly.
Removed optional initialization This removes obsolete code that was introduced to make numeric initialization available as fall-back solution if the symbolic initialization failed. Since the numeric initialization is removed for some time, this should be removed as well.
- all libraries of cpp runtime are now compiled with -fPIC on Linux systems - boost log completely deactivated -> I will change the boost logger to the new logger code, soon - fixed FMU compilation (now the static libraries are used)
- removed clean in makefile-target "runtimeCPP", to reduce the build time - removed RUNTIME_STATIC_LINKING from ModelicaConfig (Cpp-Runtime) - Modelica-import in busywaiting-barrier is now correct again
- removed clean in makefile-target "runtimeCPP", to reduce the build time - removed RUNTIME_STATIC_LINKING from ModelicaConfig (Cpp-Runtime) - Modelica-import in busywaiting-barrier is now correct again
Some changes to "remove simple equations" and related stuff * [fixed] propagation of variable attribute "unreplaceable" within the back end * [fixed] all variables that have unreplaceable=true will now get skipped by "removeSimpleEquations" * [improved] reimplemented function selfGeneratedVar that is used to figure out if a variable was generated internally (by the back end) * [prepared] After doing casualization no new alias variable will be introduced (substitutions will be still made) by the back end. This will be needed once the system get split up right after the casualization module into systems for initialization and simulation.
- cmake should now select the correct libraries (either debug or release) for the c++-runtime - fixed fmu export for windows (c++-runtime) - changed default cmake_build_type to debug
- static libraries are now created with each build of the cpp-runtime - turn on static linking by using +d=runtimeStaticLinking of omc - cleanups and bug-fixes
- cmake should now select the correct libraries (either debug or release) for the c++-runtime - fixed fmu export for windows (c++-runtime) - changed default cmake_build_type to debug
- static libraries are now created with each build of the cpp-runtime - turn on static linking by using +d=runtimeStaticLinking of omc - cleanups and bug-fixes
- static libraries are now created with each build of the cpp-runtime - turn on static linking by using +d=runtimeStaticLinking of omc - cleanups and bug-fixes
- attempt disable dynamic state selction in dyn. optmization - cosmetic changes in IndexReduction.mo - using for loop construct - scale heutistic in IndexReduction for StateSelection
- Fix expansion of enumeration dimensions on bindings when using inner/outer. - Renamed Types.isArray to Types.isNonscalarArray and implemented a new Types.isArray that actually checks if a type is an array.
added doxygen call to generate documentation for cpp runtime in main CMakefile it can be generated with BUILD_DOCUMENTATION=true. the documentation is build in SimulationRuntime\cpp\Build\Doc
- Fix expansion of enumeration dimensions on bindings when using inner/outer. - Renamed Types.isArray to Types.isNonscalarArray and implemented a new Types.isArray that actually checks if a type is an array.
added doxygen call to generate documentation for cpp runtime in main CMakefile it can be generated with BUILD_DOCUMENTATION=true. the documentation is build in SimulationRuntime\cpp\Build\Doc
- fixed the ordering of the array elements in RefArray class - added a counter for the number of ODE-evaluations to CVode - included version check for Sundials, colored jacobians are now enabled if the version is new enough - some typo fixes
Fix extrapolation error - Use the stopTime for the last point to avoid rounding errors - Add better error-messages if getting the value of a variable fails
- removed the boost shared pointers in the sim var class, because the reference is never passed to the outside - alignment for the sim var arrays is now working correctly
- a lot of typo fixes in CodegenCpp.tpl and CodegenCppHpcom.tpl - removed some unused functions in CodegenCpp.tpl to shrink the size of the file a litte bit - splitted cpp code generation for the initialization of constant values (e.g. string parameter) - improved memory optimization of hpcom - added var to index mapping to the simCode-structure - enums can now be handled in var to array index mapping
- added a new array-class to c++ runtime (StatRefArray), that can be used to handle sub-arrays of the SimVar-Array - if the array-variables are consecutive, the c++ runtime now generates a StatRefArray - first code snippets for vectorized for-loops added to c++ codegeneration (not working at the moment, because we don't know at which point the iterator-variable is located in the body-expressions)
- some fixes for hpcom-memory-mapping - isVarIndexListConsecutive-function added to SimCodeUtil - we are now able to check if all elements of an array are stored consecutive
- CodegenCpp.MemberVariableInitialize and CodegenCpp.MemberVariableDefine have now a similar interface - scalar variables are now added as #define in C++ code - some cleanups in CodegenCppHpcom.tpl - changed SimVars array getter to non constant return value
- some bug fixes for hpcom memory - moved some code from hpcom-cpp-template to cpp-template - variable initialization is now seperated into multiple functions
- using the var-index mapping of the cpp runtime for hpcom memory optimization - removed debug output - fixed a mapping bug in cpp code generation - updated the git ignore file
Multiarch patch: install libraries to OMHOME/lib//omc - This will allow users to install multiple versions of the simulation libraries at the same time
- removed for-loop in in RefArray-constructor (sorry, I was not able to remove the cast in RefArray2RefArray) - added missing variables to array-allocation, hopefully this will fix all "Wrong variable index"-exceptions
Some cross-compilation fixes. - Adding switches to disable compiling parts for a bootstrapped compiler. - New switches mainly used to cross-compile a minimal omc on the build platform that can be used to compile omc for the host platform.
- added a mapping for variables to storage positions, to support efficient code generation that keeps array-variables as arrays - a new HashTable is now part of the code, that maps a ComponentReference to an array of Integers and a list of Integers - HpcOm memory optimization disabled - initAliasArray-interface extended in SimVars-Class - some typo fixes
Some fixes for splitting the OM repository - Save idl-file in share/omc - Save qwt includes in include/omc/qwt - Use a corba.m4 so it is easier to update common autoconf parts between repositories (possibly making this part of a small common repository)
- Generate a second tearing set for simulation DAEs with weaker constraints in solvability (not passed along to the runtime yet) - Renamed some functions in Tearing.mo - Use list instead of list> for the order of the inner equations in tearing sets
Prepared Backend for the introduction of dynamic Tearing (tearing set can be changed during runtime) In detail: - introduced record BackendDAE.SOLVABILITY_SOLVABLE, which means the equation is analytically solvable for the variable, regardless of how the variable occurs in the equation - function BackendDAEUtil.tryToSolveOrDerive (old: getFactorForX) can be activated by parameter in getAdjacencyMatrixEnhancedScalar - introduced uniontype BackendDAE.TearingSet, restructured record TORNSYSTEM - introduced ConfigFlag "dynamicTearing"
- removed debug output in HpcOmMemory - some simple improvements in HpcOmMemory - CodegenCpp.tpl: Number of real, int, bool and pre variables can now be passed as argument to simulationMainFile-template - some more fixes for hpcom code generation -> memory optimization is still not working for arrays with the new variable structure - sim var arrays are now aligned to default cache line size of 64 byte - testsuite update for some hpcom tests
Fix bug: #3243 - set the useStream array as done in simulation_runtime.cpp, function setGlobalVerboseLevel - maybe we should have a function that sets these things which could be called from FMI and not use variable useStream directly
- some smaller fixes for hpcom memory optimization - MemberVariablePreVariables-code is now separated from the simulationCppFile-Code in the CodegenCpp.tpl - _event_system is now initialized to NULL in the continousEvents-Class
- fix Windows / Linux differences in testsuite/openmodelica/parser/* - proper interface for omc_Absyn_isDerCref - make testsuite/openmodelica/parser/ParseModel.mos more friendly as on Windows the output from system command is not shown
- basic structure for DAE-parallelization to HPCOM added - simcode now contains only one hpcom element - list scheduler is not used anymore, if the selected scheduler fails - update for expected output
- attempt to fix partial negation of the lhs inside createNonlinearResidualEquationsComplex - added warnings for generateCrefsExpFromExp and generateCrefsExpLstFromExp
added SimVars class to cpp runtime which stores all model variables removed [Model]PreVariables class in cpp template and moved functionality to SimVars class modified get/set methods,array class,eventhandling classes to new SimvVars class
Fix bug: #3269 - add code for deleteFile in Compiler/Script/CevalScript.mo - add test in: testsuite/openmodelica/interactive-API/Bug3269_deleteFile.mos
Fix bug #3255 - append the annotation from the constrained class to the annotations of the component - added test inside testsuite/openmodelica/interactive-API/choicesAllMatching.mos
- Preparation for new "remove simple equations" module: This introduces a new variable attribute named "unreplaceable". This is needed to prevent unintended replacements for generated variables (e.g. symbolic jacobian, encapsulated when conditions, substituted common sub-expressions, ...)
Properly fix bug: #3261 - replace ',' with '|' when not inside arrays and then tokenize on '|' - update test: testsuite/simulation/modelica/others/Bug3261.mos to test for -output and one dimensional array
Fix bug: #3254 - return component annotations that are not graphical classes also - added test: testsuite/openmodelica/interactive-API/choicesAllMatching.mos
- fix Windows builds broken since r25335. - make sure that BOOST_EXTENSION_EXPORT_DECL is not undefined for Windows! - force cmake show what is doing (verbose makefile).
- helper to bug #3196 - added setComponentDimensions(class, component, {dim1, dim2, dim3}) - added test for it in testsuite/openmodelica/interactive-API/interactive_api_calls.mos
- improved memory management with +d=hpcomMemoryOpt - graphml-graphs now contain information if the nodes belong to the ODE- or eventsystem - cpp-locks are now memory aligned - lapack-support for sundials can now be used with the c++ runtime - update for one hpcom test
- return empty string when checkModel fails and set add error message. - Only show InformationDialog if instantiateModel & checkModel succeed otherwise put the error message in Messages Browser.
- changed minimum cmake version to 2.8.6 - changed DIRECTORY to PATH keyword, because this is not available in CMake < 2.8.11 (this should fix the linux nightly build)
#3240 - Fixed FMI 2 import issues. - Generate code for enumerations. - Generate nice Modelica code to get rid of initial condition are not fully satisfied warning. - Make sure exported parameters are generated as parameters in the imported code.
- some more cleanups for path-stuff in cpp-runtime - added some debug output to see the content of the ModelicaConfig.inc file at the beginning of cmake-build - update for reference-file of NPendulummath-test (umfpack cpp runtime)
- try to fix Ticket #3232 - Paths in ModelicaConfig.inc - file are now relative to OMHOME-Makefile variable - Boost-Header files that are required for windows-cpp-runtime simulations are now copied into build/include/omc/cpp - msvc-build on windows not testet at the moment
- Fix one of #3214 issues. - Fill in missing subs with whole dims when elaborating subs. - Update overlooked array assignment case in code generation for arrays.
- partial fix to #3067 - move initialize*Systems from fmi2EnterInitializationMode to fmi2Instantiate because after an fmi2Reset fuction fmi2EnterInitializationMode will be called again which would allocate memory for systems again
- bump gitlibs to [changeset:69daa48/OpenModelicaLibraries] - remove class counting from the LibraryCoverageTrend.sh, will be in the Hudson job for easier adding of libs
+ Handle nested array types when creating array equations. + Correct subscript ordering when expanding crefs. + Fix List.combinationMap to properly order combinations and combination lists. Also accumulate the results. + Added List.combination.
- fixing Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation by changing alias start-value and nominal-value selection. - prioritise the own variable attribute-value - downgrade test Modelica.Fluid.Examples.HeatingSystem.mos for now.
Fix #3095 - add class modifiers from extends to the environment - add testsuite/flattening/modelica/modification/MissingModifiersPackages.mo - 55 tests will fail, I'll update them asap
Fix #3051 - merge modifiers for the class from the environment - add tests: testsuite/flattening/modelica/modification/MissingModifiers.mo, testsuite/flattening/modelica/modification/TestMissingModifiers.mos
- a bit more optimization in the TplParser for #3193 but still not good enough, rewrite needed to use match instead of matchcontinue in TplParser.restOfTemplLine
Fix #3187 (well, not really) - re-added support for array equations of the form: der(x_arr) = fcall() * x_arr; in SimCodeUtil.createSingleArrayEqnCode (r24947 changes removed that) - added test testsuite/simulation/modelica/arrays/Breaker_total.mos - minor change in Compiler/Template/DAEDumpTpl.tpl
- Improved array-equation handling in the backend - Array equations now contain Exp for lhs - Fix #3184 again (broke it with r24930) - Test cases for #3184 and #3188
- dumpCrefToSimVarHashTable function added to dump the crefToSimVarHT informations - a lot of refactoring in HpcOmTaskGraph - additional fields to task graph meta added, that show if a component belongs to the ode or event system
Fix #3187 - seems that SimulationRuntime/c/util/boolean_array.c got stuck with some old code (i now used the one from integer_array.c) - removed commented out code from SimulationRuntime/c/util/real_array.c
- Improved deduction of implicit iteration ranges in for-loops. - Added ALG_ASSERT, ALG_TERMINATE and ALG_REINIT to SCode.Statement, to mimic how SCode.EEquation is structured. - Various code cleanup.
Add some code that checks if the external Library from the annotation exists before trying to compile Later on, we can use this as a heuristic to automatically compile the C-sources
- you need to strdup the message otherwise you get bad messages containing invalid XML characters, see: https://test.openmodelica.org/hudson/job/MSL_trunk_cpp_Simulation/351/console and https://test.openmodelica.org/hudson/job/OpenModelica_TEST_LIBRARIES/ws/OpenModelica/BuildModelTest/MSL_trunk_cpp/BuildModelRecursive.sim.xml
- added a function to find all parameters of an equation - parameter-equation-mapping is now part of hpcom - improved HPCOM-GRS - some HPCOM code improvements
+ Cleaned up ComponentReference handling in the code generators. Less clutter. Reuse functions as much as possible. + Now we can use offsetting to index arrays in generated code. works for qualified Crefs as well. - Some issues still remain (e.g. alias elimination) so we don't use offsetting by default. only used when the cref involves variable indexes for now. Still might give erroneous results if some array members are missing though. + Improved handling of multi-variable return functions (*tuple returns). + fix for a case where wrong types were used when creating crefs in front-end.
- fix target runtimeCPPmsvcinstall, use static cminpack.lib for msvc too - add FMI +target=MSVC test for C runtime - update testsuite/openmodelica/cruntime/msvc/Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum.mos
Additional fixes to #3137 - fix FMI generation and import for +target=msvc - build static cminpack.lib for msvc - export equations in Model_05evt.c - compile fmil msvc (unfortunately static does not work for some reason) - fix ansi C in the FMI interfaces files - more CMakeLists.txt fixes in SimulationRuntime/c/
- get the proper process exit code for System.systemCall command on Windows - put the error code inside the Model.log file - remove Compiler/scripts/CompileMSVC.bat as is not used
- added the possibility to pass CMake-Parameters through the makefile.common to the cpp runtime cmake (e.g. 'make runtimeCPPinstall CMAKE_SUNDIALS_ROOT=$HOME/local')
- added IDA-library support for static linked cpp-runtime - fixed static cpp-runtime linking on windows - all static generated libraries have now the suffix "_static" - changed all busy-waiting tests to n=1
- Moved getClaasRestriction & getParameterNames to ModelicaBuiltin.mo. - updated getClaasRestriction to scripting API. Removed some unused APIs from OMCProxy.
- split qt-clients build on windows so one can build just the ones who is interested in - better Compiler/Script cleaning - clean OMEdit generated files on clean - get rid of some warnings - do Print.clearBuf() a bit differently in Main
- use runProcess("cmd /c command") on windows instead of system(command) so that no console window appears - remove some f2c include directories - enable parallel mark in windows
- build OMEdit using the OpenModelicaCompiler.dll on Windows - i think we should have both dll loading and corba in the same OMEdit and toggle it on a flag (so that is easier for testing) - make handleCommand public in Main.mo as otherwise you cannot import it
- removed deprecated numeric initialization approach - removed simflags: "-iom=*" and "-iim=numeric" - another commit will remove more code that belongs to the numeric initialization approach
- send threadData to dynamically loaded external function - do not fail in writeBuf if there is no buffer or there is no data - update test BatchPlant_StandardWater
- don't generate SourceInfo_SOURCEINFO again as is already in meta_modelica_builtin.c and we get duplicate definitions in Windows - small optimization in Compiler/BackEnd/BackendEquation.mo, don't start from 1 (findFirstUnusedEquOptEntry consumes 12% for Spice3BenchmarkFourBitBinaryAdder)
Handle more things for minimal simulation runtime: - Numeric initalization disabled - f2c disabled - Most NLS solvers disabled due to f2c dependencies (Only set with OMC_MINIMAL_RUNTIME=1)
- move cse module to the postOptModules - activate it for simulation/libraries/3rdParty/ThermoPower/Bug2537.mos, since it reduce drastically the time of the critical path in the testsuite.
Add make option OMC_MINIMAL_RUNTIME=1, which skips compilation of many object files in the simulation runtime (to make it easier to cross-compile for real-time targets)
- changed name of "Analyzation_Mode" to "Runtime_static_linking" - removed flag "hpcomAnalyzationMode" - moved Runtime_static_linking into cpp-template - added a flag to link boost statically to the cpp-runtime
- added debug pre-opt-module addDerAliases, fixes some issues in algebraic loops, but doesn't work for all models. - can be activate via +d=addDerAliases
- new pre-opt module: CSE - eliminates common sub expression in acausal environment - Different options are available: - +cseCall: consider duplicate call expressions - +cseEachCall: consider each call expressions - +cseBinary: consider duplicate binary expressions - NOTE: This is currently just an experimental prototype to demonstrate interesting effects
- initAlgloopSolverVariables is now called in initialize, to prevent an invalid free - renamed initAlgloopSolverVariables to initializeAlgloopSolverVariables - added umfpack to analyzation mode
- renamed "HpcOmTaskGraphMeta.nodeDescs" to "HpcOmTaskGraphMeta.compDescs" - improved the array-unrolling functions in HpcomMemory - changed CheckODESystemSize of HPCOM -> it checks the scheduled graph now - added a resize-function to the cpp-arrays (required for array unrolling)
- Fix initialization of primary/secondary parameters. The analysis of the symbolic initialization is now used instead of the one from the old approach.
#2956 - Do not set a default value of origin. Use the origin as transformation origin point only if it is defined in actual modelica code otherwise extract it from extent points. - Only call snapPointToGrid when creating a shape/component otherwise use movePointByGrid.
- added memory-map for cpp-runtime default behaviour and thread-scheduling - LocCo-included (a heuristic value to evaluate memory structure for parallel simulation runs) - c++-classes are now memory-aligned - improvements for hpcom-testsuite - removed metis-debug-output
- Added error message if discrete variable cant be solved explicitly in none of the equations - +d=tearingdumpV now also contains the dumps of +d=tearingdump
- added linear sparse solver umfpack for large linear algebraic loops - activated umfpack for default compilation - revise and adapt all a bit linear solver - added measurment clock for all linear solver - added more linear test cases
Switched default tearing method to Cellier Tearing. Following tests have problems with Cellier Tearing and still run with omcTearing: ./simulation/libraries/msl31/Modelica.Electrical.Analog.Examples.CharacteristicThyristors.mos ./simulation/libraries/msl32/Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_YD.mos ./simulation/libraries/msl32/Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMR_Inverter_MultiPhase.mos ./simulation/modelica/events/bug1228.mos
- fixed bisection by calculating the maximum needed iterations for a given tolerance - 04_HandleEvents.mos needs a finer grid, since otherwise some events are missed.
- added linear sparse solver umfpack for large linear algebraic loops - activated umfpack for default compilation - added measurment clock for all linear solver - added more linear test cases
- vector-name of state derivatives can now have a different name than "__zDot" - fixed a issue with memory optimization of hpcom - removed some debug output in BackendDAEOptimize - added scheduler specific GRS for levelfix-scheduler - fixed hpcom code generation for cpp-runtime
- added intel tbb and pugiXML to the CMake-Configuration of the cpp-runtime - fixed the old tbb-code for HPCOM - changed hpcom-default-scheduler to the level-scheduler - extended the testsuite for hpcom with some tests for tbb and levelfix-scheduling - evaluateConditions is calling evaluateAll now in generated C++ Code
- improved splinlock and busy-waiting barrier of cpp runtime - changed the busy wainting tests to n=2, so that they can be executed on dual core machines
- prototype for scheduler based graph rewriting rules added to HPCOM - adopted the new cpp file structure to cpp-hpcom - added a filterOnFalse-function to the list module - some new test models are now part of the hpcom cpp testsuite - fixed listr-scheduler of cpp-runtime - fixed mergeSimpleNodes
- return something in SimulationRuntime/c/util/integer_array.c - hopefully fix condition in SimulationRuntime/c/simulation/solver/initialization/initialization.c - try to use proper data types in function interfaces - get rid of some of the warnings - transform to char* where needed
- Optimized some excessively used functions (crefPrefixOf, crefEqual, expEqual) - Small pattern matching optimization, don't match against RECORD() patterns in switch-optimized match-expressions (the switch already does the matching).
- Some more detailed information about level-scheduling added if hpcom dump is set - Removed "simulationMainFile" template function from hpcom-susan file - Improved Profiling of cpp-runtime
#2130, #2776, #3011 - Call fmiSet* for parameters before initializing the FMU. - Call fmiGet* for dependent parameters after initializing the FMU. - Created a separate section for FMU instantiate and FMU initialize. - Generate a better Modelica code to avoid initialization warnings.
- partial fix for bug #2980 (the model given in the ticket works but the last model in the comments does not yet) - use malloc_atomic instead of malloc_string as use use modelica_string now - typedef m_string as modelica_string - use *malloc instead of *malloc_atomic in some more places - add test gc.mos
Added new nonlinear solver based on damped Newton algorithm in combination with homotopy strategy. Set as default nonlinear solver for running the coverage tests tonight. Already support of current testsuite, although some details are not implemented completely: - Proper assert handling - Use of Modelica homotopy operator - Improved scaling of homotopy functions - ...
added preprocessing for ExpressionSolve.solve: sort and split equation like h(x,y) = g(z) -> h(x) = k(y,z,pre(x),delay(x,const),start(x)) - remove some recursive parts - move some solver rules inside preprocessding - using loop - not need swaps args, because equation is already sorted - support more cases e.g. - tanh, sinh, cosh, if() +- if(), pow(x*y,z)*x = 0, abs(x) = 0, delay(x,const) = x,... - added testcase - remove pow(f(x),y) = z -> sign(pre(x))*pow(z,inv(y)) - rewrite some rules - work with "terms" and "factors" (see Expression.terms, Expression.allTerms, Expression.factors) and not longer with localy expression neighborhood - fixed some rules for der(x) - solve (hope all) linear expression without derivation
- Moved module encapsulateWhenConditions to FindZeroCrossings.mo - Cleaned up some patterns - New auxiliary function List.mapFold2 to avoid unnecessary tuples - Changed +d=dumpEncapsulateWhenConditions to +d=dumpEncapsulateConditions
- fix #2989 (build shared compiler on Windows) * on Windows compile the main inside the lib so that all globals are used from the dll (as in Windows the process and the loaded dll DO NOT SHARE the same global data)
- Add capability to OMEdit to link directly against omc (gives a good performance increase especially if calling used functions directly without requiring parsing strings) - Add OMCOutput parser to OMEdit, to parse the most common OMC Values.Value outputs (no records yet; only sequences and values); the output is a QVariant - Update getClassInformation to use ModelicaBuiltin.mo - Add a mockup of the OpenModelicaScriptingAPI.mo we should be able to create from ModelicaBuiltin.mo, and OMC_API.{cpp,h} that should be automatically generated Qt/C++ files corresponding to the same API
- Fixed dump of event information (Wrong event information were dumped for c runtime since event information are stored redundant to provide different data structures for different runtime systems.)
- improved memory layout for fixed level scheduler (HPCOM) - fixed measure time: - cpp-runtime produces correct time values now that are mapped correctly to the task graph
Change the Modelica string to be implemented as a MetaModelica string (boxed) - Note: Some Modelica functions might have become slower if string literals were not put into the _literals file
- Fixed some code generation issues for subscripted crefs in tuples. - Code cleanup. - Updated and enabled some MetaModelica tests which had started to work.
- Generate homotopy information for all systems. Until now, these information were only available for initialization and not for simulation. - Mark each system locally if it contains a homotopy call. Until now, there was only a global marker that indicates if there is a homotopy call at all.
- HPCOMLevelScheduling: - Tasks are now ordered regarding their executiontime, to handle big tasks first - CPP-Runtime Profiling: - getThreadNumber is now part of the main file, to make it available for profiler initialization - improvements - HPCOM LevelFixedScheduler: - uses a busy waiting barrier now - HPCOM: - fixed openmp deadlock in codegeneration - The array-module has now a reduce function, similar to List.reduce
Add SerializeModelInfo (JSON) version to the compiler, using +d=modelInfoJSON - JSON is faster to generate and parse than the XML format (roughly 10 seconds saved for running the testsuite) - Not enabled by default since: - OMEdit needs to fully support it - 1 test fails with different results: fmi/ModelExchange/2.0/HelloFMIWorldEvent.mos
- Removed obsolete functions from SimCodeUtil.mo (all these functions were protected and not used anywhere including comments): - filterNonConstant - extractDiscEqs - emptyHashTable - stateindex - createAlgorithmAndEquationAssertsFromAlgsEqnTraverser - bytesToRealMBString - indexSubscriptToExp - isMixedSystem - getCallPath - removeDuplicatePaths - Belonging auxiliary functions were removed as well
- Collect all linear solver names and descriptions to provide automatically generated help text for available linear solver methods - Revised interface to new linear solver "totalpivot" from r23167 - Fix ls/nls description in simulation_options.c - TODO: This should be automatically generated
Big changes. You will need to bootstrap omc from scratch. - Added function `sourceInfo()`, which returns the file and positions of the call in the source code (useful to produce error-messages that point inside the compiler itself). - Changed all Absyn.Info to the built-in SourceInfo uniontype - Added SourceInfo to GlobalScript.IEXP (previously only statements had SourceInfo) - Changed System.readLine to fail if the file does not exist. The scripting function returns an empty string on failure.
- disable parallel mark for GC in Windows as it crashes dll loading - override CFLAGS in some places so the CFLAGS given at command line get propagated correctly - remove MMC_INIT from in_function generated for dll loading
- Add new package Util/GC.mo. Moved functions from System into GC - Added new flag --debug=gcProfiling, which uses a new call to gc_prof_stats - Added GC_expand_hp to ModelicaBuiltin.mo; used it for the library tests - Disable munmap in the gc configure
- merge cases based on output from rml -Eunify (https://dev.openmodelica.org/~adrpo/rml-unifications-original.txt) - increase size given to GC_expand_hp to 300M to get a bit more speedup
Fix for #2935: - Rewrote flag parsing: * Now handles both - and -- flags correctly. * -- now stops processing flags like most Linux commands, so e.g. omc -- -somefile works. - Changed + to - and -- in the help text to be more unixy (+ flags still work as usual) and removed text about runtime flags.
- Enabled some error messages by default: don't hide error messages of failing functions as long as the function is not supposed to fail in certain cases - Fixed zcEqual and getMinZeroCrossings to also handle sample-calls - Cleaned up more patterns
- improved scorep-support for c++ runtime profiling - fixed analyzation mode -> precompiled headers are used now - profiling sections can now be turned on and off in measure_time.hpp
- merge cases based on output from rml -Eunify (https://dev.openmodelica.org/~adrpo/rml-unifications-original.txt) - set G_SLICE to always-malloc - GC_expand_hp only 150M (1G is too much, maybe we should do it when we have plenty of memory)
- merge cases based on output from rml -Eunify (https://dev.openmodelica.org/~adrpo/rml-unifications-original.txt) - time the bootstrapped compilation in Makefile.omdev.mingw
Add System.dladdr for easier debugging of things that should not go wrong - dladdr returns the C name of a symbol in the file (typically a function pointer)
- merge cases based on output from rml -Eunify (https://dev.openmodelica.org/~adrpo/rml-unifications-original.txt) - fixed e^-N where N is integer constant - fixed some other bad cases in Expression.mo and ExpressionSimplify.mo
- Add FileInfo to the top-level scope and fix the builtin environment to build the data structures needed to use this - Handle import MetaModelica in the dependency analysis
- Split up package BackendDAEOptimize (moved some stuff to new package SymbolicJacobian and other packages) - Marked functions as protected if they should be - Removed redundant/obsolete code - Removed symbolic matrix G that was used to improve old initialization approach, since it is deactivated for a long time and isn't working anymore anyway
- replace numArrayDim with ExpressionDump.dimensionIntString only in the simCodeVar and not in the backendVar - some dumpSimCode extension for constant and parameter vars
#2481 - added flags for better control of integration methods - flag for initial step size of dassl - flag for choosing jacobian of dassl - flag for no equidistant time grid -noEquidistantTimeGrid - flag to avoid restart dassl after an event - removed some of the old solver methods
- Make more functions work with one-based indices: - List.replaceAt - List.positionOnTrue - List.positionList - Use listGet instead of listNth in some places - Add tests for List.List.replaceAt and List.replaceAtIndexFirst
- Rewrote List package to take advantage of bootstrapped features. - Refactored Util, moved some functions to new Array package, some to List. - Better handling of conditional components. - Various optimizations to handle larger models.
- removed obsolete/unused code from package Differentiate - function getFunctionResultTypes - function differentiateExpCrefFunction - function differentiateExpCref - function differentiateFunctionPartial - function differentiatePartialFunctionwrt - function addElementVars2AllVars - function addElementVars2InDep - function addIndependentVars
#2480 - Added IntegrationAlgorithms.pdf to build/share/doc/omc/SimulationRuntime/IntegrationAlgorithms/. - Added references of Appendix C in sections 2.5.1 and 14.1.5 in users guide.
- Load dependent libraries when using the command-line (`omc a.mo Modelica` now loads ModelicaServices) - Allow calling the compiler without running any files (`omc +i=Modelica.Blocks.Examples.Filter`) - Print a parser error message if we fail to load a library from command-line (also if this is the "main" file)
- Add loadFile(uses=false) to not use the uses-annotation to load additional libraries - Automatically call loadModel() if the model is missing when running the front-end
Make loadFile("Modelica/package.mo") also consider the uses-annotation and load those packages (just like loadModel does, but with a different MODELICAPATH)
Add package BackendInline (the backend parts of Inline are moved there) - Marked more packages as using Interface="backend". Now only BackendInterface.mo has Interface="backendInterface"
- Added a backend interface package so that frontend modules doesn't use backend modules directly. - Moved some code around to further separate the frontend from the backend.
- Added support for a new annotation `__OpenModelica_Interface`, and the corresponding scripting function `checkInterfaceOfPackages` - Using this function and annotating every source package, it is possible to restrict and document which packages are part of the front-end and which are back-end modules - The interface types are given in the call to `checkInterfaceOfPackages` - Currently, too many packages have the backendInterface type (allowing front-end modules to call it even though it is a back-end module. Only one package should be a backendInterface once we refactor) - Improved Susan to be able to insert a custom class annotation at the end of the class (so we automatically add the required `__OpenModelica_Interface` packages) - Note that this requires installing an updated omc in order to compile susan files. (or run touch Compiler/Template/*.mo to skip trying to compile these, then touch the tpl files once you have an updated susan compiler) - Improved SCodeDumpTpl to include non-blacklisted class annotations without +showAnnotations - Removed the non-standard built-in function differentiate (re-add it as a scripting function if needed, or using bootstrapping tests to test differentiation)
- fix bug: #2916 - ignore Connections.root and Connections.potentialRoot and Connections.branch getting crefs being arrays of zero size - return false from Connections.isRoot, rooted wich get crefs being arrays of zero size - do not consider potential variables having equality constraint as counting in connector balance (return 0 for T_SUBTYPE_BASIC with equality constraint) - do not simplify T_SUBTYPE_BASIC types with equality constraint - handle T_SUBTYPE_BASIC in CodegenC.tpl - proper error message in BackendDAEUtil.mo instead of print
- fix bug #2877 - add "_total" to the dummy class that we build extending the class we want - actually unparse the modfiers on model extends X(mods) when dumping the SCode (ignored before) - always show the string comments, show annotations only if +showAnnotations is given
- moved SimCode.SimVar to SimCodeVar.SimVar to prevent circular dependencies in HPCOM - added SimVar object to dependency tasks in HPCOM - some updates for the measure time functionality of the cpp runtime - added measureTime to CVode - changed default hpcom-scheduler to levelfix and codegen to pthreads
Implement #2886 and #2887 - Added try/else statements to MetaModelica (syntactic sugar for matchcontinue) - Added support for algorithm sections in match-expressions (equations are still possible to use)
Fix for #2881: - Skip analysing recursive modifiers in NFSCodeDependency. - Fixed order of conditional expression and constraining class in SCodeDumpTpl. - Allow redeclare of non-replaceable components if the type isn't changed.
- added new flag for dyn. optimization - greating dyn. optimization became more user friendly with OMEdite - change default values like numberOfIntervals for dyn. optimization - added test for it - update application optimize
- handle mixed systems using tearing (new approach) - remove poor handling of mixed systems from the back end (old approach) - remove unused record BackendDAE.MIXEDEQUATIONSYSTEM - remove flag +d=MixedTearing - update two result files - break Modelica.Fluid.Examples.HeatingSystem (msl32) due to non-linear solver issues - fix #1728, #2432 (and probably more)
- remove Compiler/FrontEnd/Env.mo (bye bye, you served us well for quite some years now) (replaced everywhere by Compiler/FrontEnd/FGraph.mo and Compiler/FrontEnd/FCore.mo) - other minor changes - let's see how it goes and a 1.9.1 Beta3 will come next
- ignore illegal components in records and give a warning - display the restriction first, then the path in Types.unparseType - fix typo in testsuite/flattening/modelica/redeclare/Makefile - update test (Linux has 64 bit, use that)
- properly propagate attributes of components on redeclare - properly fill cref subscripts in Static.fillCrefSubscripts (still stuck in old days with T_ARRAY of only one dim) - show the connector components when there is a connection mismatch
- add proper error messages in some cases where print was used - handle DAE.INITIAL_NORETCALL in the BackEnd/BackendDAECreate.mo and FrontEnd/DAEUtil.mo (thanks to go to models: Buildings.Fluid.Chillers.Examples.ElectricEIR|ElectricReformulatedEIR)
- partial fix for #2858 (does not yet work with for iterators indexing the array of records) * some tests are now actually giving correct results - partial support for Connections.uniqueRoot and Connections.uniqueRootIndexes * non standard operators: Connections.uniqueRoot and Connections.uniqueRootIndices are only partially implemented * Connections.uniqueRoot currently does nothing, only collects information * Connections.uniqueRootIndices needs to be implemented, it returns an array of ones (1) of size of first input * See specification for these here (Modelica_StateGraph2): https://github.com/modelica/Modelica_StateGraph2 and https://trac.modelica.org/Modelica/ticket/984 and http://www.ep.liu.se/ecp/043/041/ecp09430108.pdf * any takers for the actual implementation? is not that complicated :) - changed the way array types are printed out to be easier to follow
Change the build script to not symlink or copy files into the build directory '''''Note: You will need to update the omc version that you are using to compile omc. The old one is unable to bootstrap omc. (It should also be possible to use the Makefile.sources from the tarball in order to skip this step as a temporary workaround if you do not want to bootstrap from the tarball.)'''''
Simplify some record references in reductions Used in MSL trunk Modelica.Magnetic.QuasiStatic.FundamentalWave.Examples.BasicMachines.SynchronousMachines.SMR_CurrentSource. No test-case was added because models saved with saveTotalModel worked.
- new unit check module (flag +newUnitChecking, disabled by default) - for all variables unspecified units get calculated if possible - inconsistent equations get reported in a user friendly way - new debug/dump flags for unit check module: dumpUnits, dumpEqInUC, dumpEqUCStruct - add some examples for testing
- added more parameters to codegencpp.tpl-functions, that allows us to remove some duplicated code in codencpphpcom.tpl - deactivated the "Deactivate profiling if you want to simulate in parallel" - feature, because performance benchmarks are now possible with hpcom
Fix bug: #2854 (do scope versioning also in the top scope, but not for builtin classes and builtin types) - note that flattening/modelica/declarations/Constant12.mo is actually correct now, see m:#1397, well, except for the fact that it should tell that A.y does not have a binding
- rise priority of imported start attributes compared with bounded start attributes (see #2673) - disable openmodelica/modelicaML/twotankmodel.mos since it seem to be wrong anyway for a while
- optimized parallel write output - added profiling points for the write output functionality - added profiling based on papi counters to the cpp-runtime
- added stringVar as type for the communication type in hpcom - extended HpcOmTaskGraph.getUnsolvedVarsbySCC for strings and enumerations - some changes in graphML dump for systems of equations regarding indexing of nodes in torn systems
#2804 Optimize `(x,_,_) = fn(y)` into `x = TSUB(fn(y),1)`. Triggered some unwanted optimisations/inlining of function calls that were handled by forcing ceval of some function calls in the backend
- Change some back end data types for base-/sub-clock partitions - Change some names (e.g., INFERREDCLOCK to INFERRED_CLOCK) to match common code style - Update expected output
#2815 Handle fold reductions of user-defined functions with polymorphic types - Also handle folding functions of type A,B->B, if the second argument has a constant default binding
- measureTime of CPP-Runtime produces a valid json-file now - the hpcom json file reader will now exit correctly if the json file is invalid - fixed a bug in HPCOM-TaskGraph -- the execcosts of the nodes are correctly mapped to the json-file-values - moved execstat measure commands to the correct locations
+ Propagate dimensions in prefixes so that qualified crefs get the correct type and dimension. + Fix wrong uses of subscripts as dimensions. - Disable non-expanded array compilation test for now. It is broken.
#2794 Add some error detection for div/mod by zero - Also added line information to external C functions - Moved external function includes to a separate file (`Model_includes.h`), and added #line directives so the debugger can point to these lines of code
- Fixed getVars in SimulationResultsCmp so that variable names don't get corrupted and make the Compare.mos test fail. - Got rid of Clang warning in optimization runtime.
+ Move includes from headers to the source files. Reduces binary sizes considerably. Every package/source includes all the headers it needs individually so there is no need to have the chain includes.
- support partial final constraint via annotation marker - added structure for final constraints - codegen for final constraints - modification dyn. optimization methode for final constraints - added tests for final constraints
Fix for #2790: - Implemented type checking of array dimensions for array modifiers. - Fixed Types.getDimensionNth to work for all kinds of dimension configurations.
- rewrite DynamicOptimization parts in BackEnd - create DynamicOptimization.mo - mv some parts inside DynamicOptimization.mo - added annotation marker for DynamicOptimization - update tests for DynamicOptimization
- compile without optimizations for bootstrapping - better handling of verification of if equations that do not "set" anything i.e. (x = y): if cond then reinit(v, 0); reinit(s, 1); else reinit(v, 2); reinit(s, 3); end if; maybe we should also check if the same reinit variables are used in the if branches (no idea what the spec says). unfortunately the back-end doesn't support yet reinit inside if equations in when clauses.
- removed the Include/Core - Folder from the Include-Path (this will break the CPP-Runtime on Windows with MSVC) - moved some header-files from cpp/Core to cpp/Include/Core - added experimental version of level-scheduler (levelfix) to HPCOM
Fix Expression.isConst to also work for function calls. Changed most ExpressionSimplify routines to call isConstValue instead (since they try to do things like constant folding which fails for compound expressions anyway).
Add error message for when SCodeUtil fails to translate an operator that uses class extends (which is lacks a valid legal use case and we thus lack a case for)
Started using elabExpInExpression instead of elabExp in many places (so functions returning multiple outputs work better) Note: This interferes slightly with the MetaModelica type system (things RML did not handle; so no changes needed). The changes cause MetaModelica models using equations with tuples to fail (but that is okay; we do not use MetaModelica in models)
- changed USE_THREADS to USE_PARALLEL_OUTPUT, because otherwise the boost_thread library can not be used by HPCOM - some updated for the hpcom testsuite
- all String are now exported into a CDATA-Field in GraphML - improvement for level-scheduler added - debug output of HpcOmMemory changed - cleaned up the HpcOmTaskGraph-file
Use the file info from the binding when generating an error about type mismatch in the binding (since it is very hard to know where the binding is coming from compared to finding out the type of the declared component)
Report flattening errors in the coverage reports when there was an error instantiating the functions (previously, the function list would not be checked until the lowering phase)
- listDelete is using zero-based indexing instead of one-based indexing as it should use. List.delete is added as a workaround. - for now, List.delete should be used instead of listDelete - I will push my fix to listDelete as soon as the rml stuff is gone
Add scripting function stringVariableName Also made it possible to do things like `val(stringVariableName("b"),...)` or `v:=stringVariableName("b");val(v,...);`
- cleanup and simplification - generate more efficient data structures - setupVarReplacements (former equationsReplaceEquations) is now only traversing marked components instead of all of them - function compsMarker - ... generates now also a list with all indices of the marked equations - ... will be revised completely in one of the next revisions
- merged revision(s) r21547-r21703 from branches/initialization/ - completely new initialization approach for under-determined, over-determined and simultaneously under- and over-determined systems - symbolic consistency check for over-determined (sub-)systems
CevalFunction: Handle `size(arr,1)` where arr is an array with unknown dimensions (previously, 0 was used regardless if the array had been assigned to)
- we are now using boost_LIBNAME_found instead of boost_LIBNAME_library to check if the boost library was found on the system. This should fix the linux_nightly_build
- some changes for the HPCOM Memory-Optimization - added the boolean variable useFlatArrayNotation to the cpp-runtime, which will access arrayElements by name_index instead of name[index] - another change of the cpp-runtime cmake-script which will hopefully fix the linux nighlty build
Activate doLinearTearing by default, therefor - expanded SimCode.SES_LINEAR for directional derivatives - adjust all codegen templates - generates by default directional derivatives for linear systems in calculateStrongComponentJacobians. - added capacity to runtime lapack solver to handle that jacobians. - Ajusted tests. - Follwiong 3 examples start to fail now: - Modelica.Electrical.Analog.Examples.DifferenceAmplifier.mos - Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_YD.mos - Modelica.Mechanics.MultiBody.Examples.Elementary.LineForceWithTwoMasses.mos so they run for now with nodoLinearTearing. - Also the 2 hpcom examples don't run with doLinearTearing. - Also for the Cpp runtime it's deactived for now and can be actived, when the cpp-runtime is prepared therefore.
- equations to evaluate conditions added to simcode-structure (currently only available with hpcom) - the event-taskgraph exported by hpcom is now correct - conditions can now be evaluated with evaluateConditions instead of evaluateAll - prototype for asynchronous writeOutput added to cpp runtime - removed some stuff from the cvode-implementation (hopefully this will not damage any tests) - the boost log and thread libraries are now optionally included into the cmake build process - added logging for cvode if the boost log-library is available - the cpp runtime is now able to differentiate between varios output methods (write all output steps + event steps, just output steps, no output) - some comments and small bug fixes
Fix for #2743: - Extended Expression.transposeArray to handle >2 dimensions. - Removed evaluation of transpose from Static and Ceval, let ExpressionSimplify handle it instead.
- CALCTASK_LEVEL_SERIAL removed -> the level-scheduler has a list of tasklist-items now, which can be serial or parallel (see HpcomSimCode) - Codegeneration for BLS-Scheduler added (seems not to work correctly at the moment)
saveTotalModel change - The exported model is added at the end of the file, extending from the base class and with the original annotations added (for experiment annotations) - showAnnotations=false (the default) will now only remove useless annotations like graphical annotations. experiment, Evaluate and other things not on the blacklist will pass through.
`+d=execstat` now adds the information to the Error.mo buffer instead of stdout - execstat now records cumulative time - Boehm GC now reports memory consumption - Made the execstat report smaller (1 entry for sorting, 1 for matching, instead of 30000 entries for every small work item)
- Removed some redundant calls to simplify1 in ExpressionSimplify.simplifyBinaryCoeff. Speeds up instantiation of BatchPlant_StandardWater with 25% (4m45s => 3m30s for me).
- Implemented BaseHashTable.copy and used it in InstExtends.fixClassdef, instead of the previous slow way of building a new hashtable element by element. fixLocalIdents went from 40s to 15s for BatchPlant_StandardWater for me.
- fixed some compiler warnings of the cpp-runtime build with gcc - added HPCOM_MEMORY_OPT-Flag to use experimental memory optimization - some simple optimizations for the cpp-runtime - papi-support to hpcom-codegen added
Remove string_util.{c,h} since that version of strtod spins in too many cases. Going back to strtod, which is locale-dependent, but at least works as long as external C code does not set the locale.
- improve over-determined initialization approach - If it is necessary to evaluate parameters for the consistence check, the check will now be performed during runtime.
Fix for #2729: - Don't try to evaluate crefs which are not function parameters when resolving default bindings in Static.addDefaultArgs. - Some random code improvements.
Updating ThermoSysPro to 3.1 - Note: 1 testcase now fails (TestStaticCentrifugalPumpWaterSolution). I cannot verify if the new results are in line with Dymola, so someone else should check it.
- linear solver interfaces for equation systems added - command line options for linear and nonlinear solver added ("-L name" and "-N name") - sparse solver format included - umfpack-solver dummy added (will be filled soon by mkloeppel)
- revert r21108 as it breaks almost everything (1k failing tests and 2h53m clang runtime instead of 6m): https://trac.openmodelica.org/OpenModelica/changeset/21108
Add debug flag `+d=acceptTooManyFields` - The flag is disabled by default, and will accept calling a function with a record that has more fields than expected - This behaviour is considered breaking the Modelica spec in m:#1245 - The flag makes Fluid.Dissipation work again, and it is the default for library testing until Fluid.Dissipation is updated
simulationruntime: doublecheck, that the number of allocated linear/nonlinear/mixed systems and statesets is greater or equal to the number used in the generated c-code Otherwise we get unexpected behaviour which is quite hard to find
- fix for impure built-in calls - define impure built-in functions in ModelicaBuiltin.mo - don't override isImpure attribute for built-in calls - somewhere is still an error for delay calls at least
Changed OMPython version from 1.0 to 2.0 - The 2.0 version uses session (OMCSession objects) instead of a global object created when importing OMPython
- revised dassl implmentation - added additional rhs evalution to ensure a consistent ringbuffer for extrapolation - removed f2c binding - rename simData to data
+ Separate discrete real variables in to a different list. No we know where they start and end i.e. will not be mixed and sorted with the rest of algebraic variables. will have to be changed later when we use index lists instead of variable lits. For now this should be enough.
Use alarm everywhere instead of ulimit in BuildModelRecursive.mos. This should make a slow buildModel followed by a slower simulation print simulation failure instead of a crash.
Fix some of the sorting of components based on dependencies in the bindings - Would silently fail in some cases in the past - Some models now give no warnings in compile-time and run-time - AIMS_Start gives a different result for one variable - UnevaluateableFixedAttribute.mos gives different results for RML and bootstrapped omc versions
- introduced manual selection of tearing variables using annotations (works only for cellier tearing heuristic MC3 yet) -> attributes: tearingSelect = always: variable is forced to be iteration variable tearingSelect = prefer: variable gets better chances to become iteration variable tearingSelect = avoid: variable gets less chances to become iteration variable tearingSelect = never: variable won't be iteration variable as long as it is possible to solve for it algebraically (otherwise: warning)
- choose which entries of the incidenceMatrix you want to get (all,positive,negative) via an additional input in SimCodeUtil.getSimVarsInSimEq and SimCodeUtil.getSimEqsOfSimVar
+ New sorting for back-end variables. - subscripts are compared only if the crefs match without considering subs. i.e. pushed to the end of the cref. + Fixed state-sets generation and initialization to use the correct indexing. - Used to be transposed.
- added a further solver method "dasslsteps" - behave like our default dassl solver option, but without consideration of numberOfintervals or stepSize. Output point are internal dassl steps.
make SimulationResultsCmp fail, if a variable has not been found and add a test for it also add a test for constant singular linear systems which are consistent (or inconsistent) - currently both fail in omc
+ Separate equation evaluation for the cpp runtime. Equations can be evaluated individual or in groups based on index. Needed for QSS solver implementation. + Moved some common code to CodegenUtil.tpl
- new statistics flag: LOG_STATS_V - LOG_STATS_V shows in addition to LOG_STATS the number of function evaluations for some selected functions - new TRACE output for dynamic runtime analysis
- reactivated hpcom tests using json files - always use the numProc given in the flag, output a warning on hpcomDump when this number is higher than the available number
Various bugfixes and new features - A new implementation for overloaded (binary) operators. * Follows the specification more strictly and produces less fewer warnings for legal code * matrix*matrix and matrix*vector uses reduction expressions to implement sum and array * Checked that inlining of the generated functions works and produces simple expressions * The code has been split into its own file since it is 2200 LOC and very few things in there actually depend on Static.mo (most of the remaining ones should be refactored) - Implemented inlining of functions that assign to record members instead of call the record constructor in a single statement - When evaluating function inputs to determine output array dimensions, keep the evaluated results - Adding new preOptModule evaluateReplaceProtectedFinalEvaluateParameters which replaces evaluateReplaceFinalEvaluateParameters as a default module * Causes problems for NPendulum.mos and PrismaticConstraint. They have different preOptModules set in the tests - Added simulation flag `-abortSlowSimulation` used for the library tests in the testsuite - EngineV6 now causes chattering behaviour. It was set to a Compilation test. * The test will not spin thanks to the `-abortSlowSimulation` flag - Improve elaboration, simplification, evaluation, and code generation for reductions * Each operator now has unique indexes to avoid conflicts when replacing iterator crefs * We can now simplify user-defined operators * Added a new kind of mode for reductions: DAE.THREAD(), as opposed to the standard DAE.COMBINE() - When we have multiple iterators, the default DAE.COMBINE() is used and iterates over all combinations of the expressions in the iterators. DAE.THREAD() instead assumes the arrays have equal length and folds over the reduction expression with the n-th expression in each iterator at a time. Used by operator overloading to implement element-wise and `sum` operations. * This changes the DAE slightly - Implemented DAE.FuncArg as a uniontype instead of tuple (DAE change) - Some better simplification for ASUB (ranges and reductions) - And some more things. Hopefully the major changes are all listed.
- attempt to fix Windows build * remove coinmetis from the link flags * make sure you remove Ipopt-3.11.6/Makefile if there is no Ipopt-3.11.6/Ipopt/Makefile so configure is ran again!
- generalize zero crossing detection, so that continuous zero-crossing functions get detectable - fix error code of mixed_system evaluation (from -3 to -4) - minor code simplifications
- fix usage of storedRelations (formerly hysteresisEnabled) - new, more precise names: - array hysteresisEnabled renamed to storedRelations - function storeRelations renamed to updateRelationsPre - function updateHysteresis renamed to storeRelations - cleanup: - function printHysteresisRelations removed - function activateHysteresis removed
Support for Figaro. exportToFigaro builtin added. New file Figaro.mo. New error message type. Important: import and call commented out in CevalScript.mo because else it will not build from trunk. The extension is made for the bootstrapped version.
- fix handling of relations, which triggered assertions in nonlinear system during initialization - msl32/Modelica.Fluid.Examples.HeatingSystem.mos starts to simulate
Inline.mo: Handle inlining of functions with record output that is split into assignments like: {{{#!mo output RecType rec; algorithm rec.r1 := 1.0; rec.r2 := 2.0; rec.r3 := 1.5; }}}
- fixed initial guess in optimization - added flag for initial guess file for externalInput - added flag for number of points in a subinterval in optimization - support approximation order 1 and 5 in optimization - added test for initial guess in optimization - creat result with order 1 - using the result for order 5
- I had to reinclude some headers to get the ANALYZATION_MODE running (sorry Niklas, maybe we can find a better solution soon) - Precompiled headers are now disabled if using ANALYZATION_MODE -> otherwise it will not compile with our tracing-tool
- passing ANALYZATION_MODE-flag from top-level-makefile to SimulationRuntime/cpp/Makefile.omdev.mingw (can be used by invoking 'make runtimeCPPinstall ANALYZATION_MODE="true"')
Handle replacement of qualified crefs when simplifying iterators - `{c.r for c in cs}` now simplifies to `{cs[1].r,...,cs[n].r}` - `{c.r for c in cs}` previously simplified to `{c[1].r,...,c[n].r}`
- added function: BackendDAEUtil.replaceKnownVarsInShared - extended Expression.getComplexContents for ASUB and cref defined arrays - extended ExpressionDump.dumpExpStr for ASUB BOX and UNBOX
- variable declarations to cref1 added (required for parallel calculation of jacobian) - changed get -> boost::get and added boost/tuple/tuple.hpp to algloop-header file
Revert r20364,r20365,r20367 - no boost dependency in omc.exe unless you add and compile all of it in 3rdParty No C++ code at all if avoidable (remove any C++ code you can replace with pure C)
- Transpose the profiling data for faster reading - Split into 2 files: uint32 and double in split files to transpose them easier - OMEdit can read the data, but the transformation widget has nowhere to display the graphs yet - Some minor fixes for equations that were not profiled - Handle profiling of noretcall
- Change +d=measureTime to +profiling=none,blocks,all,blocks+html - Code generation switches between blocks and all equations - rtclock.h can now keep track of the overhead of calling the tick and tock (used to reduce the cost of very simple equations) - Handle assert(false) as the only statement in a function (skip reporting unassigned values) - Remove inline equations from the runtime - Started using the enumeration instead of integer constants all over the simulation runtime - Skip displaying non-linear equations in both top-level and as a child in the OMEdit transformations browser
- HpcOmSimCode -> HpcOmSimCodeMain - HpcOmMemory-module added for memory optimizations - simple renamings in HpcOmTaskGraph - checkCodeGraph function added for validations - RDTSC() clock is now available for linux-systems - fixed Analyation-mode for the cpp-runtime
When running the profiler, also output a smaller prof.json in addition to the xml - The OMEdit transformations browser will now look at the prof.json and display a summary for the profile blocks
Replace measureTime=true with +d=measureTime in buildModel/etc - Fix code generation for profiling of function calls (was disabled) - Fix the counter for number of profiling blocks so the profiling now includes the measured blocks again
- display graph on the fly via GraphStream (later we can support Gephi easily) - some minor changes to FFrontEnd/ files - i guess Linux builds will break but i'll fix them
- Added fmu version argument to translateModelFMU (by default version is 1. Version 2 is not fully functional yet.) - Copy fmi2 files. - Started creating a modelDescrition.xml file for FMI2.0
Updated the parsing of info.xml - Does not add a name for equations anymore. Added indexes to simulation xml output instead. - Does not need a hashtable lookup from string to variable (we just store a list of variable names since that is all we used it for)
Update Absyn expression traversal - Takes two arguments instead of a tuple (to reduce the number of allocations) - traverseExp now just calls traverseExpBidir (with one argument being a dummy function) - This means some expression types not handled by traverseExp now works (like traversing match expressions) - Some fixes for using external objects in polymorphic functions
- optimized replacement management in partial function evaluation - changed BackendVarTransform.removeReplacement, it only needs a key and not a replacement
Since we use a static version of cdaskr, do not put it in build/lib/omc - We now put it inside the libSimulationRuntimeC.a object (it was already statically linked into the shared object versions)
- fix the debugger on Windows: the filenames changed to form: X:/path/to/file.mo instead of X:\path\to\file.mo due to some changes on handling realpath.
Error handling updates - Strip trailing whitespace from error-messages (error-messages add a trailing newline by default; we do not want 2 of them) - Register Modelica*Error functions in ErrorExt.mo (for the bootstrapped compiler) - This means we can use Modelica libraries and simply treat ModelicaError in an external function as Error.addMessage + throw()
- push next working status of partial function evaluation including: - correct path names for new functions - prediction of if-outputs with not-evaluable cases
Updated the MessagePack implementation. - It handles everything now, but size is not much less than JSON due to being mostly maps and strings so I might re-implement it
- fix Cpp FMU handling on Windows: use mkdir.exe instead of mkdir in the makefile Compiler/Template/CodegenFMUCpp.tpl - better English in the error message about state select uniqueness: * SimulationRuntime/c/simulation/solver/initialization/initialization.c * SimulationRuntime/cpp/Core/SimController/Initialization.cpp - small comment fix in SimulationRuntime/c/simulation/solver/stateset.c
Fix bug: #2655 - check if the externalInput.csv is empty and exit if it is. - remove externalInput.csv in testsuite/simulation/modelica/solver/Makefile before running the tests.
- function evaluation of tuple-functions, removeSimpleEquations after function evaluation, fixed bug with missing statement - updated tests - added function Expression.isTuple
- fix Windows simulation file linking: * add -Wl,--allow-multiple-definition because -lblas-mingw and -lcdaskr contain the same symbols * any other ideas on how to fix this? forcing allowing multiple definitions is rather bad
Various fixes - Expression.typeof now handles match expressions - Changed DAE.SOURCE.instanceOptLst is now instanceOpt (we only ever stored a list of 0 or 1 NONE() or SOME() element) - Fixes in the runtime for C++ compilation (extern C) - Updated MessagePack implementation
- Only consider two records type-compatible if they have the exact same number of elements - For code generation, sort record elements so it is possible to pass records to functions without casting them (cast is a no-op)
Fix bug: #2650 - proper prefixing of outer when you have same name several times in the prefix. - added testsuite/flattening/modelica/scoping/InnerOuterSamePrefix.mo
- fix Compiler/boot for Windows (seems to work OK now) * propagate the $defaultMakefileTarget as is different for Windows/Linux * use forward slash in Parser.parse filenames * remove MessagePack.mo and SerializeModelInfo.mo from Compiler/boot/LoadCompilerSources.mos as they are *not portable* yet - add FFrontEnd files to the compilation * add builtin graph creation to Builtin.mo * add calls to FInst in CevalScript.mo
- fixes for #2648 - added a threshold for minimal step sizes. - skip steps after a sample event, if the normal output point and the sample events time point are equal - added a header with some epsilons
- deleted redundant functions in Tearing.mo - renamed Cellier-tearing from "tearingSystem1_1" to "CellierTearing" - set default heuristic for Cellier tearing to MC3
- way faster matrix creation (speedup of about 50% for some AVM models) - when using Boehm GC do not explicitely call GC_collect_a_little during simulation
Adding a newer version of the refactoring script to Compiler/boot/refactor-fix-notifications.py - It is now a python script - It now checks that code compiles after performing the operations - Only the matchcontinue-to-match is performed at the moment
- fix Windows build: WE DO NOT RUN configure on Windows! - rename HpcOmSchedulerExt.h.in to HpcOmSchedulerExt.unix.h.in - create a new file HpcOmSchedulerExt.h that includes HpcOmSchedulerExt.unix.h for anything but Windows
the evaluation of zerocrossings take now only needed equations into account - less equations are needed to evaluate function_ZeroCrossings, not the whole rhs) - Modelica.Fluid.Examples.Tanks.EmptyTanks.mos works again
Allows to link against an existing metis or patoh library using ./configure --with-METIS=DIR or --with-PATOH=DIR These libraries can then be used as schedulers in the HpcOm module.
Changing the way functions are generated - No struct is returned. Outputs 2..n are passed by reference - We could implement isPresent in code generation if we wanted to now (but it was removed in Modelica 3.0) - Many array functions now take a value as input instead of pointer - Since we no longer generate a temporary for all called functions, we cannot pass the pointer of a temporary to the function - Most of the simple array functions should be inlined or macro'd and common functions moved to base_array.h - Fewer temporaries should be generated now. The compressed tarball is ~20% smaller - NORETCALL statements in match-expressions now remove statements without effect (`_ := boolAnd()` and the like can be optimized away) '''''Do make clean, especially if using 32-bit omc'''''
- Removed unused variables in optimization - restructure data for optimization (continuing) - diminsion counter for all variables - default value for gradient
- Removed unused Absyn/SCode/DAE.TRY/THROW/CATCH ('''make clean''' is recommended) - Changed the filtering of unused as-bindings to also check assignments to local variables, and catch a lot more occurances (earlier if a variable was used in any case it was not removed from cases where it was unused) - Added MessagePack.mo and SerializeModelInfo.mo to the bootstrapped compiler sources. - They are not called from any package, and do not work with RML
SimulationRuntime/c/util/string_util.c - proper type sizes for 32 bit - fix cycle in reading of csv file for test simulation/libraries/msl32_cpp/Modelica.Thermal.FluidHeatFlow.Examples.ParallelPumpDropOut.mos
- revert r19750 as it generates exp(NaN * ...) in the C code This is the diff for the C code after r19750: - tmp498 = exp((NaN * fabs(v))); + tmp498 = exp((-754.1940416432905 * fabs(v)));
- move function getArraySubs from SimCodeUtil to ComponentReference - move functions getZeroCrossings and getRelations from SimCodeUtil to FindZeroCrossings - make some functions from package SimCodeUtil protected
- avoid stringListStringChar like the plague in Util.stringReplaceChar (use System.stringReplace) - fix huge memory leak in System.stringReplace (basically the result was strdup-ed and never freed) - enable Boehm GC in MSVC. - still some issues with things like Util.xmlEscape as if the string is rather big (40Mb or so) we will run out of memory as Boehm GC will not kick in until the function returns as all the temps are on the local stack!
- cleanup MetaModelica GC interface, remove obsolete files - use alloc atomic whenever possible - use alloc ignore off page for array allocation as they are quite big - register pointer displacement (0) and if RML_STYLE_TAGPTR is defined register pointer displacement (3) also
Prefer symbols defined in loaded shared objects over the ones in the executable - This prevents the bootstrapped compiler from using a local function, say List.map, when running a testcase that is supposed to test this function
- Split +d=rml into 2 different debug-flags: +d=rml (transforms arrays into lists) and +d=strictRml (checks that the function inputs/outputs are in the same order as the match expression)
Fixes for 32-bit Linux - boxptr-functions return a struct containing the outputs. Even for built-in functions. - This also goes for regular boxptr-functions accessed in the external C run-time and parser
- add "checkcompiler" make target to check the compiler sources using the bootstrapped compiler - very useful before making a commit to check if the sources work with the bootstrapped compiler
Extended StateSelection interface in cpp runtime for second A Matrix added agloop solver code to Jacobian class if it has algloops added initialize method to Jacobian class adapted cpp FMU and HPCOM template
Handle expression with aliases - Expressions like the following are handled - `match x as ... case REC() then x.field;` - `match x case REC() then x.field;` - An alias `x` is treated as an implicit input component inside the match-expression. It may not be re-assigned. - `x as pat` patterns are still explicit and need `x` to be declared as a component
- AnalyzationMode added, which will link the libraries statically. It can be used by adding "-D ANALYZATION MODE" in the makefile and by compiling your model with "+d=hpcom, hpcomAnalyzationMode"
Introduce new MetaModelica language feature: dot-access of as-bound records - See new testcase testsuite/metamodelica/meta/MatchDotNotation.mos - Some compiler sources were updated because you may no longer update some as-bound variables (like: `case x as REAL(_); equation x = INT(1);`) ''If you are still using rml-mmc, you will need to update to mm:r272''
- level scheduling structure is now using the task-uniontype - nodeMark-multiplicator will now be applied on dumping - added code generation and scheduler for OpenMP 4.0 task dependencies - remove comment-signs before "applyFilters..."
- push this in so I don't have to merge it each time somebody plays with the flags - cleanup the flags a bit - add new flags for upcoming front-end changes
- Added new annotation: `annotation(__OpenModelica_FileInfo=("parserModelica.y",718));` on something with file information (e.g. equation,algorithm,class) now changes the file and line - Changed the OMCC grammar syntax. You no longer define the types returned by each rule - everything is an AstItem (a uniontype containing all types). - The above changes allow us to use only 1 stack for AstItem (previously, we had to allocate memory for all 80+ types and push them for each reduction) - The grammar was updated (and tested on the given testsuite) - The grammar was also fixed. Some rules previously used $1 and $2 even though $1 and $3 were to be used. It worked anyway because $2 and $3 were in different stacks... - Halved the time Machines.mo takes to parse
- reactivate r19458 because it fixes some bugs - handling of different attributes in alias-sets is still not working correctly (this should become a ticket)
- added module to evaluate a function partially / check if the output or parts of the output are constant - added function BackendVarTransform.getReplacementCRefFirst and Debug.bcallret1_2 - added debug flag "evalConstFuncs"
- changed merge of nominal values for alias variables - don't calculate arithmetic mean instead choose via componentReference depth (like for start values) - also don't negate nominal values - one testcase fails for some different reasons(non-linear solver), so deactived for now(Modelica.Fluid.Examples.BranchingDynamicPipes.mos).
- Change start state from Integer to list as an optimization (!). This variable was always used to re-initialize the current states (a list), by creating a list from the start state (costs 1 allocation). By always keeping it as a list, you do 0 allocations (not even when changing start state: all those assignments are constant values which are optimized). - Added new MetaModelica function, MetaModelica.Dangerous.arrayGetNoBoundsChecking which is also inlined by macro (saves a surprising amount of run-time performance)
added modelicastandardtables build in cpp runtime CMakeFiles changed cpp runtime executable name with Main suffix added StateSelection class to cpp solver component added stateselection methods of cpp system in cpp template
Allow the user to override start-values and parameters in the JavaScript webworker - By sending {basename: basename, override: {r: 35, stopTime: stopTime, tolerance: tolerance, stepSize: +stopTime / intervals}}, all override variables are joined and sent as argv in the simulation
Added substring as a MetaModelica builtin (it uses strlen as external "C"; this is incredibly slow compared to MMC_STRLEN) - Updated OMCC to pass around the entire file contents and token start/end positions (to replace passing around lists of integers that need to be converted)
- added testcase for external input via file for different solvers - fixed small bugs in external input reading - suppress prints of inputs to LOG_SIMULATION
- moved calculation of jacobian matrix for non-linear strong components from SimCodeUtil to module in BackendDAEOptimize. - moved functions (replaceDerOpInEquationList, replaceDerOpInExp, transformXToXd) from SimCodeUtil to BackendEquation, Expression, BackendVariable. - fixed bug with calculation of analytic jacobians in non-linear solver. - module is still deactived, since it needs more fixes to pass whole testsuite, further it conflict still with removeUnsedFunctions.
Partial changes for the new build system with more fine-grained dependency analysis - Sort of works already (generates C-code), but a few tweaks will be needed to sort out all dependencies (headers still #include other modules; we want them to be more independent) - Need to move files from testsuite to Compiler/ or somewhere nicer
Working on faster workflow for the bootstrapped compiler - Adding exportKind=OpenModelica.Scripting.ExportKind.MetaModelicaInterface to the list() interface (to be tuned) - Removed Makefile.sources (generated automatically during the build process) - Generate interface files to use for more fine-grained dependency analysis (no comments, etc) - We should be able to generate good enough signature files that we only need to load a small set of signature files to compile a package (instead of requiring all full files be used)
- moved the GraphML-Module to Unused/GraphMLOld.mo - renamed the GraphMLNew-module to GraphML - added some memory management logic to HpcomSimCode - cleaned up the HpcomTaskGraph-Module
By default: do not output protected variables to result-file - To override: Add simflags="-emit_protected" - The library testing now adds -emit_protected if the compareVars is non-empty (and adds a variableFilter to only output these variables)
- the cpp runtime can now be debugged with the g++ by adding "-D CMAKE_BUILD_TYPE=RelWithDebInfo" to the cmake file - changed System.mo:getOMPCCompiler -> System.mo:getOMPFlag to use the openmp-flag for the cpp runtime, too - added a new method to GraphMLNew.mo to get an attribute by name and target type - added hpcom level scheduling support to the cpp runtime
- winter cleanup (preparing for front-end changes) * deprecate +scodeInstShortcut * moved Compiler/FrontEnd/F*.mo to Compiler/Unused * disabled Modelica.Media.Examples.R134a.* for now as it used +scodeInstShortcut and didn't work anyway.
+ Added automatic parallelization implementation. - A generic task system. - A generic level scheduler. - Model representation for OM models. - An interface for OM model runtime. - support for loading model info from XML. Compile time loading to come. - dumping system graphs to graphviz and graphml formats.
Some updates to the JavaScript target - pre.js is now included with the omc sources - It is now possible to use nodejs to run the generated code. An executable wrapper script is generated and the simulate() command now works - The XML files are embedded within the JS code now (just like we do for FMI) - We use -override arguments to pass stopTime,stepSize,tolerance and outputFormat instead of a full xml-file in a virtual file system
- additional rewrite rules support this is only applied via dumpXMLDAE with a rewriteRulesFile set. new interface: rewriteFrontEnd(from, to) or rewrite(from, to) -> applied on front-end expressions rewriteBackEnd(from, to) -> applied to back-end expressions before writing them to the .xml
- fix inlineEventInfo - add missing 'or b3' - do not inline old data structure samples (cpp runtime should switch to new data structure for timeEvent, so that the old structes can be removed)
- Removed forgotten old print for torn systems (it's part of the error buffer now) - BuildModelRecursive.mos script now uses +d=backenddaeinfo by default, and colour-codes the links (red,orange,blue for error,warning,notify)
- simplify rule x/r = x *(1/r) with test of numerical issues can someone have a look of ./simulation/libraries/3rdParty/ThermoSysPro/ThermoSysPro.Examples.SimpleExamples.TestJunctions4.mos
- fixes for function differentiation handling - set correct header type for derivative annotation - handling of tuples - fixed sorting result in symbolic jacobian - moved getArrayCref from SimCode to ComponentReference
- GraphMLNew added -> this module will replace the GraphML-Module in the next weeeks - The hpcom-openmp-code is now static - The hpcom-module creates another graph now, which contains cache-line informations (this is a prototype at the moment and will be extended soon)
- Improved pretty-printing of list() API for when-equations/etc - Added equation comments inside when-equation/etc blocks instead of after the whole when-equation
More heuristics for #2566 - if fixed=false, no start value, and a binding -> give a warning and use the binding as start value - if fixed=false, a start value, and a binding -> give a warning, use the start value and ignore the binding
- Added disableRecordConstructorOutput debug flag. - Handle matrices in min/max better. - Handle arrays with more than two dimensions better in product. - Fix array types when slicing vars with more than two dimensions.
Renamed crefEqualStringCompare to crefEqualVerySlowStringCompareDoNotUse - crefEqual now uses crefEqualNoStringCompare - only cppruntime uses crefEqualVerySlowStringCompareDoNotUse
- Changed lib/omlibrary/Modelica... to Modelica... for testsuite messages (to work better with build symlinked to /usr) - Added reading of env.var CC at start to be able to change CC in pre-compiled omc version
- reverted previous commit - simcode needs omc but omc was not copied yet from Compiler/omc_release to build/bin, however omc needs simcode (how does this work?)
- fix bootstrapping - strangely SOME(outRules) := getGlobalRoot(Global.rewriteRulesIndex); does not work directly in the bootstrapped compiler, you get: Error: Invalid pattern: SOME(rules) of type ##T_UNKNOWN#
- support for rewrite rules - the rewrite rules are only used in dumpXMLDAE if a rewrite rule file is given as last parameter (if interest exists we can make it part of the usual front-end chain) - example of a rewriteRules.txt file rewrite(abs('$x'), if ('$x' >= 0) then '$x' else -'$x'); rewrite('$x' ^ 2, '$x' * '$x'); // rewrite(semiLinear(0.0, '$x', '$y'), 0.0); // rewrite(semiLinear('$x','$y','$z'), if ('$x' >= 0) then '$x'*'$y' else '$x'*'$z'); rewrite(noEvent('$x'), '$x'); rewrite(Modelica.Fluid.Utilities.regRoot('$x','$y'), if ('$x' >= 0) then sqrt('$x') else -(sqrt(-'$x'))); rewrite(Modelica.Fluid.Utilities.regStep('$x',y1,y2,e), if ('$x' > e) then y1 else y2); rewrite(Modelica.Math.Matrices.isEqual('$x','$y','$e'), (size('$x',1)==size('$y',1) and size('$x',2) == size('$y',2) and sum('$x' .- '$y') == 0));
change ModelicaExternalC library from cpp runtime to use c files form MSL. Adapted cpp template for external objects removed unused files in cpp runtime
- rearranged code for resolveLoops - some bugfixes for resolveLoops - introduced resolvedLoops as a postOptModule that handles StrongComponents (not yet finished) - updated tests
- Add numberOfIntervals and stepSize as input/output of getSimulationOptions - OMEdit now respects the Interval experiment annotation in the simulation setup - Enable output of the statements in the match equation sections (for error messages)
- Implement feature #2542 - Use: +replaceHomotopy Replaces homotopy(actual, simplified) with the actual expression or the simplified expression. Good for debugging models which use homotopy. The default is to not replace homotopy. Valid options: * none (default) * actual * simplified Use with +replaceHomotopy=actual|simplified or setCommandLineOptions("+replaceHomotopy=actual|simplified") via scripting. - Added testsuite/flattening/modelica/others/Homotopy.mos for testing the new facility.
- Added API reloadClass to reload a class from file only if the file changed - Added getErrorString(warningsAsErrors=true), to report warnings as errors - BuildOMC.mos now fails if any warning is generated, even if it generates code (unbound variables, etc; let's keep the compiler sources strict to avoid potential problems)
- added simplification of homotopy(e, e) -> e (maybe we should add a warning?) - commented out diff(homotopy(e1, e2)) -> homotopy(diff(e1), diff(e2)) in Differentiate.mo for now
- Add timestamp (mtime) to parsed files - Added getTimeStamp(className) that returns the seconds since epoch, as well as a string (as returned by ctime) - Don't initialise GC if we won't use it
- Better error-messages for operator record requiring operator function members and the other way around - Fix LoadCompilerSources not setting echo(true) if echo was disabled
- fix calls of assertStreamPrint() and throwStreamPrint() - fix some warnings - reduce scope of objects - "unsigned" -> "unsigned int" for better readability
- fix some meta tests on Windows (crashes because of gc parallel mark, now disabled in Windows) - update Global.rewriteRules index to 18 (as 10 is already taken) and renamed it to Global.rewriteRulesIndex
- Changes to reduce the number of warnings -Wall gives for omc-generated code (unused labels, etc) - Changes that make more things thread-safe, including + Making tmpTick be thread-local + Making index 0..8 of setGlobalRoot actually be setLocalRoot (which I did not want to add to rml) - Removed the old fork method of building omc (while fast, it did not work the way you expect it to, actually restarting the build process several times) - Added a pthreads implementation that works well enough to bootstrap omc (not enabled by default) + NOTE: This is slow because GC halts *all* threads making spawning multiple processes faster despite parsing the compiler sources again. Tweaking libgc could help us though. As could adding GC_free where we know a temporary is no longer used You are strongly recommended to make clean if you were using the bootstrapped compiler before
Changed realString to be thread-safe (using the old routines, but %.16g so results are mostly the same as dtoa). NOTE: You need rml-mmc r268 for all results to be the same (else ~8 will fail)
Fix bug #2505 - remove zero sized loops from the DAE - added test testsuite/simulation/modelica/arrays/ZeroSizeLoop.mos - updated test testsuite/flattening/modelica/arrays/EmptyArraySubscript.mo
#2531 - Do not show the extends final modifiers in the OMEdit parameters window. - Added a new API isExtendsModifierFinal. - updated interactive_api_param.mo & interactive_api_param.mos
- fix #2528 - add test case for #2528 - deactivate test case ./simulation/modelica/hpcom/Modelica.Electrical.Machines.Examples.SynchronousInductionMachines.SMEE_LoadDump.mos temporarily, until it is updated
Fixes to #2524 - update Dialog annotation record in Constants.mo to Modelica Spec 3.2 revision 2 New components: parameter Boolean colorSelector = false; parameter Selector loadSelector; parameter Selector saveSelector; Where Selector is: record Selector parameter String filter=\"\"; parameter String caption=\"\"; end Selector; - build the instantiated environment if needed in Interactive.mo for getComponentAnnotations - added test DialogAnnotation.* - update interactive_api_annotation.mos
- Fixed #2410: XML Dump doesnot generate equation for Linear Systems and Non-Linear Systems. - Fixd Iinitial equations - Generate XML for delay function
- added new preOptModule "resolveLoops", this is looking for loops of simple equations which can be resolved to create independent equations instead of a big equation system. (as far as I can see this can be applied to some electrical models to implement Kirchhoffs laws). NOT YET FINISHED
- Use -rdynamic for simulation code and enable backtrace on segmentation fault in simulations - Name eqFunction_ to ModelName_eqFunction_ to avoid name conflicts in FMU's (could also have used GCC attribute protected visibility to prevent the linker from merging eqFunction_4 in the FMU and the simulation code; but renaming the function is portable)
Fixes for the new instantiation: - Added new package NFInstPrefix and moved the Prefix type and related functions to it. - Fixed several prefixing issues.
- initial commit for GraphvizDump template - new debug-flag: +d=graphvizDump - this activates additional graphical output (as *.dot files) for backend dumps (currently only +d=dumpinitialsystem is supported) - this is currently only useable with small/simple models
fix for algloop event iteration -added isConsistent to IAlgLoop to check if a condition has changed moved setCondition and getCondition to SystemDefaultImplementation
- Added option to the simulation runtime: +logFormat=[text|xml] - The XML-based format will make it possible to read most messages into OMEdit in a structured way. Some messages may need to be collapsed into a single call in order to treat it as a single call - The macros INDENT() and RELEASE() have been removed as they are specific to the text-based output. The message functions now take more arguments instead.
- hpcom restricts or recommends the number of scheduled threads - functions to dump simCode on stdout (incomplete for some cases) - added case to simplify equations when partitioning linear torn systems
- added a first part of mapping from Backend equation index to SimCode equation index (strong components omit for now) - update equation in ZeroCrossings
Added argument to System.systemCall: output file (redirect stdout and stderr) - Fixes some issues with OSX not redirecting segmentation faults - Also added this option to Scripting.system()
- Moved where CFLAGS for generated code are defined (in configure instead of logic in the code generation) - Added configure env.vars RUNTIMECC and RUNTIMECFLAGS if the user wants different compilers for the generated code and omc itself (typically to use clang for generated code) - Always include delay.h in generated simulation code. Revert previous change that made Counter and Counter3 work (relied on the wrong delayImpl being used) - Moved performSimulation into the callback interface
- The interface to generated code is now in a struct callback, to avoid conflicting names when we load dynamic libraries (FMU's) - Fixed lots of clang warnings
Changes the way OpenMP is handled. Now there is a configure variable: ./configure CC=clang CXX=clang++ OMPCC="gcc-4.4 -fopenmp" will use clang as default, and gcc-4.4 when OpenMP is requested.
- Don't output type min/max values in the xml-file: This is handled when parsing the files using default values - Output variable type name and more in the info.xml - OSX fixes setting @rpath for .dylib files
- fixed hpcom for models with equations that cannot be solved and therefore are handled as nonlinear eqsysts - added hpcom test - updated hpcom test files (output includes size of ode system)
- replaced the Derive.mo by a Differentiate.mo (and adjusted all relevant parts) - capability to differentiate Modelica functions. - now all differentiation rules are only once in the compiler. - adjusted some tests
- Updated SimCodeDump to include more accessible information in the XML - Added a Qt-based streaming XML parser so OMEdit can use the _dump.xml information for the symbolic debugging
- fix +target=msvc test - add omc_msvc.h to model_help.c as we need round in there - fix definition of round in omc_msvc.h (the msvc test generated a HUGE .mat file before i killed it because round did not work correctly and the step was not advanced) - delete some more stuff in: testsuite/openmodelica/cruntime/msvc/Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum.mos
- fixed bug at ALAP-computation and quicksort - added function getFinishingTimesForSchedule - added function predictExecutionTime - removed some debug prints
Pass FMI variables unmodified (unboxing may lose int precision; unbox+box may also alter the Integer if it was not a valid boxed integer to begin with)
- use MoveFileEx on Windows for System.rename - remove System.renameFile (as we have System.rename) - Causalize.mo do not create something that is not used!
Reduce bucket size since there won't be very many bindings to update. Would probably be good to lower it even more, possibly making it "1" for length 0 or 1 in the list of components
- Added new API: compareFilesAndMove (compares two files and replaces the destination if they differ) - BuildOMC.mos uses fewer system() calls now, instead using built-in API functions - Fixed code generation of MMC_TRY for matchcontinue to use the faster MMC_TRY_INTERNAL instead (~2% performance gain for the bootstrapped compiler)
- Remove useless case in simplify (makes code slower) - Removed some flattening tests since whenever a tiny simplify change is performed all thermosyspro and multibody flattening examples needed to be updated. They are simulated, and that is what is important.
-pass tolerance to cpp runtime cpp runtime fixes -fix for condition initializations -fix for break -fix for arrays of arrays -fix for integer range - fix for when equations
+ Added support for local/shared variables for ParModelica. + Added parallelism to function arguments. + More checks on scope to determine parallelism. + Allow assignment to inputs in ParModelica.
- Support match->switch also for uniontypes with a default case (else) - Changed ExpressionSimplify to not create new expressions if the expression changed (using referenceEq instead of passing a boolean around) - Changed ExpressionSimplify to use switch semantics for the main case - Added env.var OPENMODELICA_BOOTSTRAPPING_DEBUG_FLAGS to set command-line options to be passed to the separate compilation script (e.g. to use +d=patternmAllInfo to see if match->switch optimisation was performed) - Disabled some cppruntime testcases because they now fail in code generation due to noEvent
- Recalibrate time series better if we detect that the left limit of an event has already been used - Don't read time into every variable in the mat-file
- Change the mat reader to be able to read all data in one chunk also for transposed files (performance) - Moved the error calculation to its own routine
- Safer (but slower) removal of uninteresting points using a recursive algorithm - Previously we could remove a point because it could be reconstructed using linear interpolation of its neighbours... But those could also be removed. - Swap arguments to addRelativeTolerance (relative was absolute and other way around)
Handling of dimensions for input arrays whose dimensions/type depend on the type/value of other input arguments. e.g. input Integer i; input Integer a[i];
- partial fix for bug: #2385 give the correct dimensions in the DAE to the virtual component in the expandable connector still remains to expand the array component DAE into DAE for each array element
- fix FMU build during testsuite run - there is no build/MinGW/bin during the testsuite so copy the required dlls to build/bin and in the FMU from build/bin -> platform/
- Handle the case when the time scale is smaller than usual - Remove irrelevant time points from the plot - Pass correct relative tolerance (arguments swapped) - Don't remove as many points from the end (still sometimes too many points are missing and not compared, but it is better than before)
- Update the library testing: - Output both the actual signal interpolated and raw so we can see if interpolation did something odd to it - Add a tolerance setting for (max-min)*reltol to avoid problems comparing signals close to 0 - Added an API call that can directly output html instead of a csv-file (so we could serve html-pages directly from two result-files by doing the diff on-line)
Add getSimulationOptions as typed API call, and call this from OMEdit. A default tolerance, startTime, stopTime may be provided to prefer these over OpenModelica defaults if the experiment annotation is not present
Removed operator record restriction. Now operator records are special cases of record restrictions. saveTotalSCode should work now for models containing operator records.
Improved the comparison with tubes - Add all time events from the target file to the base timeline in order for events to not be interpolated - If an event occurred, do not do an error check at this time point since it is probably off by eps in time and the tubes might not have expanded enough if the points are close enough in time
- uncomment the extra cases in Expression.containFunctioncall to fix SystemDynamics models: SystemDynamics.IntroductoryExamples.Gilpin SystemDynamics.WorldDynamics.World2.Scenario_5 - Mahder will need to find another way to handle record constructors
- remove public function BackendDAEOptimize.inlineArrayEqnShared - remove 'remove simply equations stuff' from BackendDAEOptimize.mo (updateEquationSystemMatching, updateStrongComponent, updateEquationSystemComp, updateEquationSystemMatching, updateStrongComponent, updateEquationSystemComp, updateVarArray, updateEquationArray) - move BackendDAEOptimize.lateInlineFunction to Inline.lateInlineFunction - move 'optimize inital system' from BackendDAEOptimize.mo to Initialization.mo - move public function BackendDAEOptimize.getConditionList to BackendDAEUtil.getConditionList
- remove unused functions from IndexReduction.mo - function getDeterminants - function getDeterminants1 - function getDeterminantDigraphSelect - function solveOtherEquations - function solveOtherEquations1 - function traverseOrgEqnsExp - function hasDerivative - function processComps1 - function compareOrgEqn - function processCompInv - function processComp - function getOrgEqn - function getOrgEqns - function getCompVars - function selectDummyDerivatives - function selectDummyDerivatives1 - function selectDummyDerivatives2
- remove unused functions from IndexReduction.mo - function processComps - function processCompsWork - function processComps1New - function processComps2New - function processComps3New
New instantiation improvements: - Put modifiers in the environment instead of a separate table. - Moved NFEnv AVL tree implementation to it's own package. - Propagate basic type properties correctly.
Update bootstrapping tarball Search for omc for bootstrapping Added targets omc-rml and omc-bootstrapped. The bootstrapped target will now use the tarball automatically if the configured omc is missing
- add ModelicaBuiltin.mo and MetaModelicaBuiltin.mo directly to the initial environment in Builtin.initialEnv and NFSCodeEnv.buildInitialEnv - this way we avoid translating them and adding them to SCode.Program again - also, as a bonus we get saveTotalSCode to NOT display any classes from the builtin environment
added ModelicaError to cpp runtime and template fix for function tuple returns in cpp template fix conditions in algloops removed defines for alias state vars fix for some array declarations with indices fix zero crossing initialization
Look for bad libraries containing both ClassName.mo and ClassName/package.mo - Sometimes this occurs on Windows when the installer fails to uninstall an old package and the structure changed
- introduced new configuration flag (TEARING_HEURISTIC) for testing different modifications in Cellier heuristic (will be removed when finished testing)
Fix for #2383: - Replaced class restriction with specialized class in error messages. - Use pretty-printing of class specialization in ClassInf.assertValid.
- dumpXMLDAE changes: + remove index=0 from variables as it told nothing + added differentiatedIndex="1" derivativeName="y" when we have that information for state + add new XML element aliasVariables to the XML file containing the alias variables + changed the output of the dumpXMLDAE API function to a tuple: output Boolean success "if the function succeeded true/false"; output String xmlfileName "the Xml file"; so we don't return the contents of the file anymore as is really not needed. also, you have to call getErrorString() after the call to dumpXMLDAE to get any errors displayed.
- fix bug #2422 send "" as prio in ClassLoader.loadFile as we really want that directory not another! - add *all* BackendDAE.VarKind in Compiler/Template/SimCodeTV.mo and handle them in Compiler/Template/CodegenXML.tpl
- fix FMI on windows (both import/export) due to main C file split (also DllExport was only for MSVC and not for gcc in SimulationRuntime/fmi/export/fmiModelFunctions.h) - fix +target=msvc due to main C file split (fix makefile, forward equation functions, use extern "C")
- last fixes for ExternalMedia + fully qualify paths in ClassInf.State + do List.unique on records so we don't get duplicates + now at least 5 models in ExternalMedia can be compiled - fix an issue with lookup where path to be looked up contains the name of the model in the scope we're in. this fixes instantiation of ThermoPower.Examples.BraytonCycle.ClosedLoopSimulator, probably more models in ThemoPower. added test: testsuite/flattening/modelica/others/ThermoPower.Examples.BraytonCycle.ClosedLoopSimulator.mos
Adding API function diffSimulationResults, similar to cmpSimulationResults - Outputs a list of csv-files with the compared values (which might be interpolated)
- remove Parser/antlr-3.2 directory (we have it now in ../3rdParty/antlr) - support both ANTLR 3.2 and ANTLR 3.4 (add a lot of initialization of ast elements and locals to rules)
- fix #2419 - getMessagesStringInternal will now return unique messages if (unique = false) is not given - added test for this in intractive_api_calls.mos - update test
Run gcc in parallel by default when using buildModel. - Note 1: OMEdit should be updated with an option to set +numProc (in case the user wants to use number of CPU's - 1) - Note 2: OMEdit should not use the buildModel command. It should use translateModel and call make itself since this blocks omc for a shorter period of time
- fix bug #2418 + add test - more support for ExternalMedia library change the way we declare the external function prototype: + if there is an include annotation for the function DO NOT DECLARE the function prototype + if there is no include annotation for the function declare the function prototype
- split initialAnalyticJacobian into several functions one for each sparsity pattern (gets the compilation memory down for Spice examples) - updated tests
- Handle skipped tests in the compile XML (checked wrong timer) - Less output (still get backend print statements that should be in Error.mo; but that is hard to avoid) - Use system-out also for failed tests since messages don't include newlines in hudson
changed event integration in cpp runtime - added discrete and continuous update type used during event iteration. - changed conditions handling for zero crossings, conditions are evaluate during discrete update - changed IEvent interface - adapted initialization on new update type
- some support for ExternalMedia (some more work is needed for full support) - add function calls and external function inputs to dependency analysis in element sorting - use Inst.updateCompeltsMods just in Inst.instElementList2
- additional fixes for r17574 - fix regexp for matching modelicaLine for Windows - fix escaping of \ in file names - get rid of perl calling in testsuite/openmodelica/bootstrapping/LinkMain.makefile.*
- correct the filtering of the modifiers for a redeclare Type x(ModsForSomeCompsNotInY) constrainedby Y; Now ThermoPower.Test.DistributedParameterComponents.TestWaterFlow1DFV_B (and probably others too) started working.
- split Inst.mo into more packages to make it more manageable: + Inst.mo -> instClass*, partialInst* functions + InstVar.mo -> instVar* functions + InstFunction.mo -> instFunction* functions + InstDAE.mo -> daeDeclare* functions + InstBinding.mo -> makeBinding*, instBinding* functions + InstUtil.mo -> all other functions that are just support for instantiation
- fix bug #2403 (quite many changes, do make clean) - properly count tuple equation size in the BackEnd BackendDAE.ALGORITHM gets a new component called expand (DAE.Expand) which tells that this algorithm was translated from an equation as in this case we SHOULD NOT expand array crefs to the full size - added test for bug #2403 testsuite/simulation/modelica/algorithms_functions/ ModelicaTest.Fluid.Dissipation.Verifications.HeatTransfer.Channel.kc_evenGapLaminar.mos - fix counting of tuples in CheckModel.mo
#2400 - Added a new expression type: DAE.RECORD (to eventually replace DAE.CALL for calling record constructor) - This is more tied to the record type than the constructor function (which does not take the protected components as input, and thus cannot represent records in a good way) - Minor changes are needed to the backend. Most is related to code generation.
- properly fix bug #2385 - expandable connectors are not that obvious. handling them is rather complicated (see ConnectUtil.removeUnusedExpandableVariablesAndConnections: 1. collect all expandable variables crefs 2. collect all expandable crefs used in the DAE (with the expandable variables THAT HAVE NO BINDING removed) 3. get all expandable crefs that are connected ONLY with expandable 4. substract: (3)-(2) 5. remove (4) from the DAE and connection sets 6. get all the connected potential variables 7. substract (2) from (1) 8. substract (6) from (7) 9. remove (8) from the DAE (5)
- fix bug #2385 - remove the expandable variables that are not used in the DAE. it makes things slower but more correct, before we only kept the ones used in connects. - add testsuite/flattening/modelica/expandable/ExpandableVariableUsed.mo
- Skeleton for external hpcom-Scheduler added - critical path' will now be displayed with gray edges in the task graphs - PN-Converter for task graphs added to the hpcom-testsuite - made some hpcom profiling updates
Fix bug: #2374 - Modelica.Electrical.QuasiStationary.Machines.Examples.TransformerTestbench.mos now works and gives correct results - handle // ASUB(CAST(e)) -> CAST(liftArray(t), ASUB(e)) in ExpressionSimplify - handle CAST(cref) in SimCodeUtil.createSingleComplexEqnCode2
- fix flattening of Modelica.Electrical.QuasiStationary.Machines.Examples.TransformerTestbench - still some work to do to get it to compile (some wrong casting of non records to records)
Added new parser for OMPython (use OMPython.sendExpression()) - Handles the typed OpenModelica API, and returns basic Python types that are simple to use (dict,tuple,string,boolean,numbers)
- added functions to disassemble linear torn systems into various singleEquations and a reduced linear torn system - added the debugFlag partlintornsystem to use this - hpcom can now simulate in parallel without prof_xml file by estimating the task costs
The documentation generation now uses SVG icons (instead of no icons) - The sample scripts now includes generate_icons.py - a script that uses OMPython to export SVG icons. The code is not perfect, but it works for many cases and should not be very hard to extend.
Resolve URIs correctly even when the loaded library does not have a version annotation (or a version annotation that does not match its directory name)
- fix for r17388: do not display commented smooth expression in CodegenC.tpl as it might be smooth inside smooth (used the Buildings lib) and that generates errors.
Fix for bug: #2346 - sort also the variable components for instantiation based on their bindings - sort the DAE in the order it is defined in the Modelica file
- list schedule reverse added to hpcom - mergerParentNodes is a second filter-rule and now part of hpcom - GraphML-Nodes can now have multiple labels - GraphML-EdgeLabels can have multiple font-sizes - Some bug fixing - TaskGraph-Representation changed to achieve a better look
- fix broken tests by including generic_array.h :) well, C thinks is something returning int if is not defined and it actually returns void*. - beautify some stuff in CodegenC.tpl
- fix bug: #2339 + add record constructor when you cannot look it up based on the type, connector ComplexOutput = output Complex will now generate a record constructor. + fix some issues in codegen with arrays of records to get the models to work. - now these models work: Modelica.Electrical.QuasiStationary.MultiPhase.Examples.BalancingDelta Modelica.Electrical.QuasiStationary.MultiPhase.Examples.BalancingStar
- at least these models started to work: Modelica.Electrical.Digital.Examples.RAM ThermoPower.Test.DistributedParameterComponents.TestWaterFlow1DFV_A some models in: ModelicaCompliance.Redeclare.ConstrainingType.*
- fix the inst of some of the failing new Media models (add locals to ht in classes with parts!) - fix some code generation issues for handling crefs of arrays of records. - some models might fail, I'll see.
- Fix for bug #2356 make the error message a warning and proceed with flattening. - add testsuite/flattening/modelica/others/ExternalObjectVariable.mo to test this.
- fix +target=msvc (include msvc) fix copying of files needed for +target=msvc add needed files to SimulationRuntime/c/meta/CMakeLists.txt - fix copying of include files for Ipopt
- add testlogwindows in Makefile.omdev.mingw (to be used in the Windows job) - always link with -fopenmp on Windows MinGW in Compiler/runtime/config.h - convert integer array to real array if needed in SimulationRuntime/c/util/read_write.c
- Changed NFEnv.Env to be a list of frames instead of one big frame. - Added checks for protected and partial elements in NFLookup. - Implement state machine to validate names found during lookup in NFLookup. - Made Util.applyOption human readable.
The error module now uses thread-local storage - Any spawned thread will have its own error-messages - It is not yet possible to push errors from one thread onto another
- include pthread for Visual Studio in simulationruntimecmsvc - copy the pthreads for Visual Studio to lib/omc/msvc - add libphreadVC2.lib for the +target="msvc" in the nmake makefile in Compiler/Template/CodegenC.tpl
- update optimiziation tests - compare results (used mumps) - delete removeAliasOpt (alias variable case is now in BatchRactor) - added flag "ls_ipopt": switch linear solver for ipopt - possible that configure must be changed (e.g. -lcoinhsl)
Fix bug: #2338 - better handling of removal from sets of broken overconstrained edges. Compiler/FrontEnd/ConnectionGraph.mo Now models: Modelica.Electrical.QuasiStationary.MultiPhase.Examples.BalancingDelta Modelica.Electrical.QuasiStationary.MultiPhase.Examples.BalancingStar are balanced, however code generation fails for them, handing over to -> Mahder - overloaded operators issue. - better circular message in Compiler/BackEnd/RemoveSimpleEquations.mo
- added a list scheduler to the hpcOmScheduler Module - cleaned up the hpcOmSimCode Module - changed the getCriticalPath method - modified the CodegenC including the SimCodeTV to create parallel code based on the list scheduling - added a config flag to switch between different hpcom-Scheduling algorithms - modified the hpcom testsuite
- move testsuite/simulation/optimization to testsuite/openmodelica/cruntime/optimization - include optimizations tests into testsuite - remove CPU time dump for optimization
- UPDATE your OMDev so you get Ipopt compiled with OMDev/MinGW - always use Ipopt when compiling with OMDev/MinGW - added ipopt libs in config.h - properly clean SimulationRuntime/c/optimization in SimulationRuntime/c/Makefile.common - add the ipopt include in SimulationRuntime/c/Makefile.omdev.mingw - the tests in testsuite/simulation/optimization/basic are all working now, they should be added to the testsuite. - TODO: link with ipopt libs only if +g=Optimica is active as the executables become quite large (11MB) we should discuss in how we can make it more consistent and homogeneous when we add new lib dependencies to OpenModelica.
- revert r17084-r17081 as it breaks way too many models. - please run the testuite before you do the commit and re-do the commit. - ExpressionSolve.mo: add more information to singular expression assert and make it a warning. do we need an error here?
minor changes to makefiles of cppruntime. Targets 'runtimeCPPinstall' 'runtimeCPPmsvcinstall' seem to work now. Running both of them causes CMake to fail as they share some paths.
- remove commented handling of if equations because this was already moved to the Backend (r12372?) - comment unused inline solver implementation (this is Backend stuff anyway)
Bootstrapping fixes - Fixed stack overflow in backend - Return an error-message when separate code generation fails for a package that does not give an error-message - Don't free() before last use in system_parallel (sometimes gave wrong exit status)
Added code to make separate compilation use dummy .stamp files instead of updating C-code. By comparing the generated code to the old, we only re-compile files that actually changed. Added new debug-flag to be able to turn off function inlining (made separate compilation non-deterministic).
Fix bug #2300 - remove statements containing arrays of zero - this also affects #1907 maybe we should keep the function call but remove the lhs (make it wild)
New debugging functionality - Added MetaModelica debugging function: referenceDebugString (takes any function pointer as input and returns for example the name of the function symbol it points to) - +t now prints /*ASUB*/ for ASUBs
- Return the correct number of components even if the placement annotation for a component is not found. - If the result count is not correct for some reasons don't allow the GUI to crash.
Update scripts and code for separate code generation. It actually works (Makefiles updated for Linux) - Some external were commented out because no one wrote bootstrapped implementations for them or called them in any existing function. - Moved some stuff from Interactive.mo to GlobalScript.mo (type definitions)
- remove irrelevant information from description strings (e.g. the identifier that belongs to the description string) - minor changes to improve consistent formatting
- more attempts to fix SimulationRuntime CPP build. - fix weird includes (what about Linux if you use defined(_WIN32) everywhere?) - use #error instead of error.
- use number of allocated elements to check if array has been filled completely instead of comparison of fill value. This avoids possible inconsistencies (for reals) and improves overall performance
Modified cpp runtime - outsourced object creation in own classes - changed some interface method names - removed unused interface methods - add get/set method to IContinuous for simulation variables - adapted cpp template - adapted cpp fmu template - added SimManager for time events and removed time event handling from solver - added SimController class to start stop simulation, create Modelica system
- added a mapping between simCodeEquations and BackendDae.StrongComponents to the createSimCode-method - fixed a bug in TaskGraphResultCmp.cpp -> the xml-file will now be read at once - enhanced code-generation for hpcom is now part of the c-susan-template - modified some nonlinearsolver-f2c-code -> i just removed some static keywords to be able to calculate more than one nonlinear system in parallel - modified some nonlinearsolver-c-code -> i changed some function-headers, to remove the simulationInfo.currentNonlinearSystemIndex-dependency between different calculations - improved the hpcom-Benchmark
- fixed index mapping between sccs ans simeqSystems for hpcom - added openmp sections to CodegenC.tpl for hpcom - extended the hpcom testsuite with a fluid example - added a small python benchmark-script to the hpcom testsuite
+ Improved handling of unary not operation on boolean array (#2286) - does not work recursively (also for 'and' and 'or') - (a and b and c) fails - (not (a and b)) fails - (not a and b) fails - (a and not b) succeeds
- critical path check is now part of the compareTaskGraphResults-method - added support for custom graph-attributes to the graphML-Module - updated the hpcom-testsuite
- Added a named argument useQuotes to getExtendsModifierNames. Returns the array of strings where each string is enclosed in quotes if useQuotes is true.
- Added some methods to create and handle parallel informations to HpcOmSimCode.mo - Extended the SimCode-Structure with simple parallel informations for HpcOm - An error message is now shown if the profiling-xml file is missing and the hpcom-flag is set - OpenMP based code-generation of HpcOm is now part of the Susan-C-Codegen - Added a new clock to the rtclock-structure. It is now possible to measure the time in cpu-cycles with RDTSC under Windows
- setlocale(LC_CTYPE, "") returns null when omc is launched via double clicking on OMEdit.app. This results in strdup(null) which leads to omc crash. Just check if setlocale(LC_CTYPE, "") is not null then use it otherwise use the default value.
- add longestPathMethod for computing criticalPath and nodeLeveling on taskGraph - removed some unused stuff - fixed bug in rootNodes in taskGraphMeta for the ODE-system
- Additional attributes for GraphML-Edges are now supported - Measure time function for the HpcOmBenchmark updated - HpcOm-Tests are now part of the testsuite - Added communication costs to graphml-taskgraph
- Benchmark-function for equations added to rtclock - HpcOmBenchmark is now based on the prof.xml results - Extended countOperations method with a new Integer for trigonometric values - Mapping for SimEq -> Sccs added
- prepare postOptModule BackendDAEOptimize.addInitialStmtsToAlgorithms - this replaces the previously existing function BackendDAEUtil.expandAlgorithmsbyInitStmts
- ansi C fixes - reworked string trimming - fixed horrible "do-not-free-constants" code - put single char directly into string instead of using sprintf
- treat entire arrays as output if they are used as lhs of algorithm sections [#2271] - do not replace lhs of algorithms (due to array/scalar differences) [#2271] - prettify RemoveSimpleEquation dumps
Latest MAC versions assigns different tmp directories to different processes. So in order to have same tmp directory for CORBA object reference file we pass the tmp directory of OMClient to OMC via the config flag CORBA_OBJECT_REFERENCE_FILE_PATH. This makes sure that omc dumps the CORBA object reference file in the same directory where OMClient is trying to read from.
- improvements and fixes for FMU C++ target - fixed broken number of zerocrossing functions in model description - add support for algebraic loops - add some tests
- Communication and execution costs added to taskGraph - CountOperations method was extended with an Integer for trigonometric values - Added a printComponent-method to BackendDump.mo - Filled the hpcom-benchmark with dummy values - Extended the c-code generation with a ode-measurement-function
added forward declaration to fix msvc build, still missing: ModelicaExternalC and linker complains about solver.lib(radau.c.obj) : error LNK2019: unresolved external symbol _isnan referenced in function _radau5Res
+ Handling arrays of records. + A new generic array structure to handle arrays of random types. + Underscores for qualified names too. e.g. _a._b. Needed for records like record R Integer int; end R; + recordArray[i].recordComponent works now. Deeper versions should also work. - Multi-dimensional arrays of records need more support for default values. Right now default values handled only for one dimensional arrays of records.
- new type structure for the task graph (TaskGraphMeta and TaskGraph) - added additional information to TaskGraphMeta (nodeMark,costs...) - some useful dump functions
Separate compilation: Adding API call to get dependencies of the packages (transitive closure of imports is too general; causing hundreds of packages to be recompiled on small edits)
- Changing the scope of DAEDump.dumpInlineTypeStr - Using Print.saveAndClearBuf for function ValuesUtil.valString - Applying replacements on ASUB subindices
Included a taskgraph-testsuite with a taskGraph compare script-method Added a Benchmark stub for the hpcom project to the runtime Custom attributes for graphml-nodes added Some changes at the HpcomTaskGraph-module
- Changes to how OPENMODELICAHOME is handled on Linux and OSX: Use OS-specific functions to find out the directory of omc - Build static libraries on OSX since macports does not like rpath (it thinks the executable is linked wrong, but there is no problem trying to execute it)
- do *NOT* add the instantiated class to the symboltable because we will run out of memory if we have a script in which we instantiate really big models one after another!
#1515 #2237 - fixed handling of Modelica asserts by using setjmp and longjmp - added three different layers for exceptions: SIMULATION,INTEGRATOR,NONLINEARSOLVER - integrator tries to handle asserts by reducing the step-size - default non-linear solver tries to handle asserts by vary iteration variables - added and modified related tests
- Optimized ExpressionSimplify.simplify - Optimized VarTransform.mo (do only perform union every 7th addition.) - made DAEDump.dumpInlineTypeStr public - Improved Expression.isConst (now also returns true for constant CALL expressions) - Improved Expression.containFunctioncall (now also checks ASUB) - Improved Values.valString, now stores and resets Print buffer using handle. - Added VarTransform.addReplacementLst
Some fixes for separate compilation - Make sure all package are marked encapsulated since otherwise it does not work - Moved generation of literals to the body instead of the header (they have to be there since we want to include headers from other files)
#2212 Fixed the remaining debug-flags (removed execFiles as it was unused) Updated some unused compiler sources (usually not compiled by the boostrapping since they are unused)
- Generate assertions for log/log10 (which are still ignored by the runtime...) - ComplianceSuite: More quiet - OMEdit: SVG default, use OS-like choice of image formats
- (Hopefully) added the total number of models to the coverage test since these change over time - Added simflags option to the new model testing scripts
- Improved warnings for failing nonlinear systems during initialization. Now, there will be a message that shows the used start-values of the iteration variables.
- updated C# target template - implemented zero crosing hysteresis, - event triggering math functions, - system metadata class, - nominal attributes, - fixed as attribute, - NLS pre-allocation and nominal attributes initialization - when Initial conditions - other minor issues - report an error in function SimCodeUtil.cref2simvar() on failed lookup - (!!)fixed again a bug that I fixed in rev. 15482 (5th march 2013) the generated library directories in makefiles should have this order: /Resources/Library/mingw32, /Resources/Library/win32, /Resources/Library/ see more comment in rev. 15482 - added ModelicaStrings_length as known external function to ceval - nonlinearSolverHybrd.c ... a copy-paste typo fix - CodegenC.tpl - some code(style) refactorings - template functionXXX_systems() fix to handle also empty cases when compiling with an ANSI prudent compiler.
Do not try to ceval constants since they might become different constants (unknown type dimension-0 arrays, etc). Should possibly apply for Value in general, storing its type so these errors don't occur in the future.
Verify that external object constructors are called with parameter input in model context (and evaluate them as far as possible since otherwise we have problems)
- Bump MSL - Build ModelicaExternalC (and the new tables) from the latest MSL sources + Note: m:#1143 - there is a bug for the tables in MSL so some tests will fail. I had success with some of them locally. - Patched MSL to avoid printing warnings for some unused inputs in Tables - Patched MSL to link against the correct library (ModelicaExternalC) instead of ModelicaStandardTables (this is the same as the beta branch, but trunk does not yet have this fix) - Changed some tests using tables to use MSL 3.1 since then we can test the old table implementation (which is different)
Fix for #2192: - Made ComponentReference.expandSlice fail silently, since it's used in places where it's expected to fail. - Fixed code generation for variable subscripts.
- catch unsolved (linear, nonlinear, mixed) equations systems during initialization - this is just a workaround and shout be replaced by a proper handling for such unsolved systems - 3 more failing tests due to singular linear systems during initialization: - ./simulation/libraries/msl32/Modelica.Electrical.Spice3.Examples.Spice3BenchmarkFourBitBinaryAdder.NAND.mos - ./simulation/libraries/msl32/Modelica.Electrical.Spice3.Examples.Spice3BenchmarkFourBitBinaryAdder.ONEBIT.mos - ./simulation/libraries/msl32/Modelica.Electrical.Spice3.Examples.Spice3BenchmarkFourBitBinaryAdder.TWOBIT.mos
partial fix for bug: #2106 - a bit of a hack, more work is needed recordArray[i].recordComponent does not work yet, just recordArray[i] directly. - generate array operations on all records in Model_functions.h - models that now compile: Modelica.Media.Examples.RealGasAir.MoistAir* Modelica.Media.Examples.Water95.*
Compiler/FrontEnd/InstExtends.mo - handle SCode.DERIVED (for class extends X) - strip environment prefix from crefs and paths. Compiler/Template/AbsynDumpTpl.tpl - handle Absyn.PARTEVALFUNCTION Compiler/FrontEnd/F* - add first draft of graph for SCode. - not used yet testsuite/flattening/* - fix tests due to environment strip.
- QUITE SOME CHANGES. Do make clean! - fix old inst to work with Media and Fluid by default with no flags. - got rid of some files and some of the error messages - i will still keep +d=scodeInstShortcut for a while longer until I test more. - Modelica.Fluid.Examples.IncompressibleFluidNetwork.mos segfaults on Linux, works in Windows, Modelica.Fluid.Examples.HeatingSystem does not work anymore (NLS problems again) I guess due to parameters moving around. I will investigate more these issues in the next days.
Removing warning about fixed parameter without start-value or binding equation since the warning is often wrong. The check should probably be made in the backend if it is needed.
- Compiler/Template/CodegenCpp.mo: - Add "giveConditions" function to C++ Target again. - Add a call to "saveAll()" within Event-Iteration this will make Modelica "pre()" Operator act more like discribed in Modelica Specification. - SimulationRuntime/cpp: - moved AlgLoopSolverFactory.h to the more public Include directory. - Bug fixes and updates too the FMU C++ Target.
- Handle ceval of tuple subscripting - Changed the UriLookup to return the error-message instead of printing to stdout since it is also used in simulations (and you really do not want it every time step; especially if the code looks for different modelica://-links to recover from Dymola not implementing the full ModelicaServices functionality)
- Use -Wl,-rpath=/path/to/LibraryDirectory (finds .so-files without LD_LIBRARY_PATH) - Do not look for "." in Library annotation - check if the file exists instead
Revert r15962 (accidently replaced 8 spaces with 2 spaces; was supposed to be 1 tab to 2 spaces but text editors messed up the command) Contact me if you have problems merging your working copy
+ Moved the main simulation loop to perform_simulation.c. Included in and compiled with the generated code later. + OpenMP has its own version omp_perform_simulation.c + Easier to maintain this way.
Abstract syntax change. make clean comes highly recommended. - Class annotations are now stored as a list of annotations at the end of a class (like the Modelica3 grammar says except we allow multiple annotations). - This is a transition so we can create warnings or errors later on. - No major changes can be seen except when using OMEdit or API that lists the position of annotations
Remove arrayCref from test for array in the adevs code generator. Replaced this with a messier, but seemingly more reliable, ifdef to avoid duplicate definition.
+ Preparing the run-time for multi-thread execution. + Moved performSimulation from simulation runtime to generated code. + Fixed omp undefined references. + Generate extra equation info. Just the crefs used in equation. To build graphs later. + Hope nothing fails.
Fix bug: #2089 [https://trac.openmodelica.org/OpenModelica/ticket/2089] - do not die on getComponents(Modelica.Media.Examples.*) - modifications of extends have to be fixed (qualified) in the env of extends and local names should not be qualified! - some more tweaks in testsuite/openmodelica/bootstrapping/LinkMain.makefile.mingw - test bug fix with: testsuite/openmodelica/interactive-API/Modelica.Media.Examples.getComponents.mos
Pushed BuildModelTest.sh into trunk instead of my home directory - Modified BuildModelTest.sh to be more generic (easy to add new packages) - Updated the BuildModelRecursive.mos to look for exact revision of the tested library (only works if building with the experimental package collection)
- fixes to support ExternalMediaLibrary better. - fixes to SCode dependency to not remove package constants that appear in external function declaration some external functions do not have any annotation but they do have external arguments in external "C": Example: replaceable function getCriticalPressure output AbsolutePressure pc; external "C" pc = TwoPhaseMedium_getCriticalPressure_(mediumName, libraryName, substanceName); end getCriticalPressure;
+ Preparing the run-time for multi-thread execution. + Moved performSimulation from simulation runtime to generated code. + Fixed omp undefined references. + Generate extra equation info. Just the crefs used in equation. To build graphs later. + Hope nothing fails.
- get rid of spurious warning about protected elements (https://trac.modelica.org/Modelica/ticket/975) we currently don't know from where the modifier came.
#2129 - handle the projection of actual arguments to formal arguments better in functions with unknown dimensions that depend on the input parameters - better message when we cannot evaluate a structural parameter - added AdvancedDimensions.mo test (derived from some AVM model).
- fixed some Media tests by adding +d=scodeInstShortcut and regenerating result files where MSL changed - correctly split non-const modifiers out of redeclare - fixed PropagateRedeclareMod1.mo (part of ParameterBug.mos) + as far as I can understand from the spec the modifier on the chain is discarded (only the original mod is kept, plus the one given from the top) but we should check this a bit more
Protect from stack overflow in partialInstClassIn and instDerivedClasses - Sadly, the error-messages are rolled back in most cases, but it is better than getting a stack overflow in OMEdit
- Added an error rollback when calling elabCall. In interactive mode some functions are elaborated by StaticScript.elabCall but the error messages are kept.
Fix bug #2139 - better handling of if equations counting if false then eq; end if; - add test for it: testsuite/flattening/libraries/msl32/testquasi.mo testsuite/flattening/libraries/msl32/testquasi.mos
- use the appropriate types everywhere in SimulationRuntime/c/ f2c defines subroutine as typedef /* Subroutine */ int (*S_fp)(...); so use that as the type of the functions sent in to the solvers. - enable -Wall in MinGW makefiles and get rid of most of the -Wall warnings.
- second attempt to fix bug #2113, let's see how many tests we break. - added an error message for when we have a structural parameter/constant with no binding. - handle negative integers in fill. - handle non-local constants in external function declarations. - some left-out minor edits. - expected output: testsuite/flattening/modelica/arrays/NonExpArray2.mo testsuite/flattening/libraries/msl31/fluid/Modelica.Fluid.Examples.HeatingSystem.mos - added a test model for #2113 and a test model for unknown dimension due to a parameter with no binding testsuite/flattening/modelica/arrays/TestArrayUnknown.mo testsuite/flattening/modelica/arrays/TestFill.mo
Changed rand() to tinymt64 (Mersenne Twister). This implementation provides deterministic "random" matching. The randomness is always the same :) - A few more tests are failing, but some started succeeding. Probably only need to update expected results for the changed ones.
- revision 6155 of MSL has changed "Lapack" Library annotations to "lapack" so we need to handle it also in the function evaluation via the internal Lapack module. - this was the problem with the huge time taken by the tests: testsuite/simulation/libraries/msl32/Modelica.Fluid.Examples.In*.mos
- fixed bug in differentiation of tanh(x) in function differentiateCallExp1Arg - added missing derivatives for sinh,cosh,tanh to function differentiateExpTime - made some optimizations to other derivatives (like: (1/a)*b = b/a)
- Implemented array subscripting and slicing for assignments in Interactive. - Restructured Main.handleCommand so that it only prints a parser error on an actual parser error. - Fixed List.findMap* to do what it's supposed to do.
Update to C# template - splits generated code into more files when model is too big (for VS) - a workaround (a HACK) to not generate useless start values assignments in FunInitialEquations() (we do not hold start values of states in any array, they are set in the model instance itself; so we need this workaround)
#2129 - Handles some more things when dimension sizes are expressions. * One thing we now handle is matrix multiplication where dimensions are expressions. * We also make size(a,2) return the known size of size(a,2), which might be size(a,1). Might help with some matrix stuff in MSL that uses this idiom to tell the compiler the input is a square matrix.
Add FMU interface for c++ simulation target. "SimulationRuntime/cpp/Core/System/..." Add a static library libOMCppSystem_static for linking with c++ fmu simulation traget. "SimulationRuntime/cpp/Include/FMU/..." Add FMU interface for c++ simulation target. "Compiler/Template/CodegenCpp.tpl" c++ simulation target, add member funktions for accessing values of algebraic variables and parameters. "Compiler/Template/CodegenFMUCpp.tpl" changed to generate new FMU interface for c++ simulation target.
EventHandling.cpp: * Changed the implementation of "EventHandling::change" and "EventHandling::changeDiscreteVar" to a version, which works better for int and double. This effects Modelica "change" operator. * "EventHandling::IterateEventQueue" changed the order of function calls, which has been sensless before.
Added function elabExpInExpression which is guaranteed to return a DAE.PROP and never PROP_TUPLE. - This is useful for operators and actually most expressions since there is a very limited set of ways tuple assignments/equations can exist in Modelica - transpose now uses this (new) - min/max was rewritten to use this instead of multiple cases to especially cover this case - Many more operators still need to be updated
- Made WSM-internal flags INTERNAL, so OMC helptext does not include it - Stopped the madness of using matchcontinue for code that doesn't need it and is called a lot
#2121 Changed the parser to not accept subscripted modifiers (not allowed in the parser) Also updated Absyn to use a Path instead of ComponentRef for these
- Fix to a possibly nasty error (I've got it) when platform specific external libraries are located in their platform specific folders (e.g., mingw32/ and win32/) The problem is when compiling simulation code with g++ on windows and a .lib version library is found before its .a version e.g., for MyExternal library, if there is Resources/Library/mingw32/libMyExternal.a and Resources/Library/win32/MyExternal.lib Previously, the Library paths generated in the makefile was in the opposite order, so that Resources/Library/win32/MyExternal.lib was picked first by g++ ((wtf??) the lib was compiled by MSVC 2010) In my case, the difference was that simulation failed in time = 0.5 because of NLS solution failed ... really weird - Now, the library paths are generated in the expected order (back again), from the most specific (stating with mingw32 on Windows) to the least specific (this "bug" was introduced only lately by changing the order with more sophisticated conditional cons-ing ...) - using extern inline in model_help.c to prevent MSVC making the functions static - an update to CodegenCSharp.tpl
+ added XML code generation for - islinear - component reference for Optimica - builtin function sin, cos and exp + remove extra line spaces between templates
- leftover from r15458 (VarTransform bug fix). This might cause performance problems since before the code was broken but now it works, which means that replacement rules will take longer time to create. If this is a serious problem, the VarTransform must be redesigned so that inverse rules are not kept as a list that must be taken the union of when updating rules. Instead a HashTable or avltree could be used. An alternative could be to have two data structures for variable replacements, one that is always kept transitive and one that doesn't have the transitive property.
- Fixed stack overflow in r15458 (but left out change in VarTransform since I suspect that might cause performance problems, checked in separately to be able to verify).
Fix for ticket #2099: - Fixed simplification of array multiplication. - Changed behaviour of Expression.arrayContainZeroDimension to do what the name suggests it should do.
- Fixed wrong type in component references (was considering subscripts, but it shouldn't) - Inst.mo Fixed bug when Ceval fails for functions. The binding equation was then removed from the dae, now it isn't. - Print_rml.c: Added initialization of buffer in saveAndClearBuf - HashTable6.mo used crefEqualNoStringCompare instead of crefEqual - VarTransform.mo: Fixed bug in inverse mapping for variable replacements. Before, inverse rules were broken, causing makeTransitive to not work properly.
- speed up List.flatten implementation, now the already flattened list is not traversed again and again - add List.uniqueIntNArr, basically the same as List.uniqueIntN but the user has to provide the flag array, this is faster because the flag array needs no to allocated each time the function is called
- Added a nice little signal handler that can gracefully recover from stack overflows, but causes other segmentation faults to make the executable die. - Only implemented for the main function of the bootstrapped compiler. We will need to use some more code to make omc recover from a failed CORBA command or model instantiation, etc.
- Revert r15347 (breaks Linux compilation, breaks setModelicaPath() API) - If this functionality is needed; do the caching for both Linux and Windows. And make sure setModelicaPath updates the cached path instead of just set the env.var
Fixed bugs in unparsing of enumeration literals: - Allow enumerations with only one enumerator/literal. - Do not print a space after last literal if no comment is available.
- fix impure testcase by adding the keyword impure - add Boolean isImpure to DAE.CALL_ATTR - protect impure functions from evaluating to constant values
- Clean-up location of FMI runtime library - It's now a library linked separate from other (not part of Compiler/runtime, which includes System.mo; not what we need for FMI stand-alone simulations) - Still, FMI for model exchange segfaults in testsuite, but it seems to be a valid error since a NULL pointer is sent around. Couldn't use valgrind to find it because the FMU template doesn't accept changing CFLAGS using env.vars (illegal instructions if using -O2)... - Probably messed up some Makefiles. I moved things around a lot
- reimplement evaluation of parameters (final and annotation Evaluate) - not yet aktivated - do evaluation of final and annotation Evaluate parameters together - improve BackendEquation.listEquation, less time and memory - add function BackendVariable.setVarAt
- revise command line arguments for c-runtime (third part) - better warnings. If a flag is used twice, we will now report an error. Previously we considered only the first one without any notification. - consistence check. If new flags are added without a description, we get an error (during simulation – that should be improved to an error during compilation). - it is no longer possible to introduce flags that do not occur in the help-text - now all flags (with values) can be used with <-f=value> as well as <-f value> - new debug-output to verify used and interpreted command line options (runtime needs to be compiled with #define USE_DEBUG_OUTPUT)
- Converted options.cpp to C89 code, and made it more memory-efficient - Added option -clock=CPU (or -clock=RT) for the simulation executable (in case the user wants a different clock on Linux)
#2072 - Started looking for undefined outputs of record components in functions - Patched MSL 3.2.1 in the places we had these (mostly Spice3, some Fluid) - Updated tests that use this (mosty ThermoSysPro and Modelica 3.1; I don't care enough to make them run without warning)
- fix: simulation_options.c deleted non-existing options in FLAG_DETAILED_DESC and FLAG_TYPE that was already deleted previously from FLAG_NAME and FLAG_DESC very strangely: it was not discovered by GCC ... but MSVC (2012) - an extern "C" enclosing in simulation_options.h for C++ - simulation_options.c/.h added to CMakeLists.txt
Fix for #2056: - Use 32-bit integer arrays for external fortran functions. - Added test case LapackInverse, and removed incomplete and broken test case JoinThreeVectors2.
-Implemented ComponentReference.hashComponentRef that performs hashing of component reference without printing the cref, instead it hashes each part individually and accumulates. -Implemented Expression.hashExp in the same fashion (TODO: hashing of metamodelica expressions). -Changed all affected hashtable modules to use these instead.
- simulation_input_xml.cpp / doOverride() function uses omc_ModelInput in a mutable way which saves one copy constructor/destructor call (a lot of reallocations, all of the loaded params/vars, so a lot of time for HumMod model) - a small correction of SimulationRuntime/c/CMakeLists.txt (paths in macros now works also for an out-of-trunk cmake call)
- fix: template functionInitialResidual() a stronger test for no residual equations it could produce an empty array initialization when there is only an "initial algorithm" section and no "initial equation" in the model (so that residualEquations is not empty {}, but it has no SES_RESIDUAL(__)) - fix: a copy/paste typo error in template literalExpConst() to properly count lengths of the unescaped strings
Susan now reports a template call failure as an error (to prevent confusion from other reasons of failure, e.g., simulation fail) - fortunately, it was not observed in current templates when some day a call of a function from within a template will fail, the added error message will say it happened (I've tested it will)
- Susan uses "match" instead "matchcontinue" in generated template code - this is for Hudson test (I've tested locally that terstsuite run the same) Be aware: template imported functions MUST NOT fail to render the running template (imported functions are those imported via SimCodeTV.mo), otherwise the whole template call fails
- Someone has changed the #modelicaLine file path formats and as a result the debugger won't work anymore. Who has time to check the svn logs.... I have fixed the convert lines script to handle the new file path format.
Partial fix for #2056: - Keep expression dimensions when doing implicit function instantiation. - Added some more hacks to figure out the types of functions by using the input arguments. - Removed a couple of hacks that's no longer needed. - Updated a couple of tests which now work better, and added testcase from #2056.
Fix for #2057: - Evaluate the dimension when constant evaluating self-referential size expressions, instead of hoping that it happens to be an integer.
- Don't close the simulation result files. Use the closeSimulationResultFile() if you want to really close it. - fixed the csv file reading. Don't open the file twice just pass the file handle.
- bugfix stateselection, selection of always states with known derivatives - dumpSystemGraphML: add case to dump strong connected component graph to yED, we should make this availible via phase module configuration
- Fix some tests by making the path for the Absyn.INFO not be testsuite friendly (so we can use the absolute path, etc) - Some other tests might break because of this change (readonly/writeable?)
-Added Print.saveAndClearBuf that temporarily clears the buffer but keeps a handle to the content. This can be restored with a call to Print.restoreBuf. Useful when the print buffer is temporarily needed while already in use.
- Tiny update. It won't break anything. I promise. - Moved some of the debug information to reading the generated xml-file instead of compiling it into the C-code - TODO: Read the names of all systems, instead of only nonlinear. Populate the FILE_INFO, etc
Fix for bug #2033: - Rewrote Static.promoteExp to be more efficient and not mess up the types. - Added simplification min/max(multi-dim array) => min/max(flat array).
- Modify makefiles to be able to compile omc without RML installed (configure --without-rml; make bootstrap-from-tarball) - Pray the RML makefiles were not broken
Partial evaluation/application: Fix variable name generation and positioning of partially papplied arguments. Enables partial application of single functions for normal and recursive functions.
- change version to beta4 - improve checkSettings() + give the compiler version + show PATH variable - set Windows paths right after OMC is started + do some checks too to see if we find the needed MinGW things.
Move ModelicaUtilities into the default runtime instead of ModelicaExternalC (it is defined in the spec, not in MSL, and should be usable in any external function)
- replace calloc by malloc where allocated memory is directly initialized - fix types - optimize round-up division - make local functions "static" - more aggressive memory allocation for realloc()
- added symbolic jacobian support to newton solver - use newton solver for linear tearing systems - added tests for newton solver - suppress warning of non-linear solver
- new c-runtime flag –w shows all warnings during simulation (warnings are hidden by default) - new c-runtime lv-option LOG_EVENTS_V shows even more than LOG_EVENTS - shrink dump from LOG_EVENTS
#2039 - We now sort all equations before putting them in the runtime and verify that they are all there * This makes it possible to print the correct equation name for nonlinear systems * Fixed segfault for nonlinear systems - Removed the commented-out "simulation" command since it should not have been added in the first place
- remove helpVars from Backend (was used to handle when-conditions and sample-calls) - revise event-system (c-runtime) - unfortunately break other runtimes (please contact me, if you need more detailed information)
- try to fix cppruntime. - do not use hidden attribute as it doesn't seem to work with clang and gcc-4.4: #define BOOST_EXTENSION_IMPORT_DECL __attribute__((visibility("hidden")))
- Move regex() to utility.c - Better allocators (pass mk_scon or init_modelica_string to regex) - Never fail (pass 0 match and the error-message on failure; let the user handle it) - Removed #ifdef for regex (fix cmakefiles instead to get regex working)
- Tons of API functions updated and/or added (regularFileExist uses ModelicaInternal now, etc) - Made it possible to easily change the error-messages to print more detailed file locations in the future (will be added today or tomorrow; will need to update a lot of tests) - Modified uriToFileName (it now uses the scripting environment and builtin functions that also work at runtime). The reason it works is that we can read the paths of each library at compile-time and use that information to resolve the URI at runtime. - ModelicaServices now uses uriToFileName to resolve URIs - More ModelicaExternalC functions have a builtin compiler implementation now - Assigning to arrays with unknown dimensions is now a little more stable at runtime - runtest.pl now knows of the directive partest-link: (see UriLookup.mos for an example)
Updated C# template to the no-helpVars changes - fix: "inline" keyword macroizing is forbidden in C++ from VS 2012, see omc_inline.h (hope it'll work with VS2010) - fix: copy/paste errors when checking the results of map.find() in simulation_result_mat.cpp - fix: C++ string emptiness should be tested via size() (an error when run with the debug version of STL)
More work on new environment and lookup: - Copied some parts of NFInstTypes (those that depended on NFSCodeEnv) to NFInstTypesOld, for use by the shortcut. - Copied the few functions from NFSCodeInst used by the shortcut into NFSCodeAnalyseRedeclare, and removed NFSCodeInst. - Added a couple of new packages, NFInst and NFMod, and changed CevalScript.runFrontEndWork to use NFInst instead of NFSCodeInst. - Disabled most of the scodeinst tests for now, will enable as I fix the new new instantiation. - Added some utility functions to List and SCode.
- remove special handling of $when, bassed on disscussion with Lennart encapsulateWhenConditions will be moved behind removeSimpleEquations in POST_OPT_MODULES
- BackendDAEOptimize.getConditionList1: report an error message - minor changes to statesorting - do not prever internal variables - add only used prevariables from not discrete variables to initial system
- do not intruduce extra derivative variables while do index reduction - add information about derivative name to STATE - replace state alias variables - improve singular system check, use absoulte incidence matrix for check and not the one with extra information for states
- continue removing helpVars (now from when algorithm statements) - fix when-algorithms for numeric initialization - fix bug in preOptModule encapsulateWhenConditions for when/elsewhen algorithm statements
#2021 - removed second call of symbolic initialization. - fixes #2021, but break two other tests, which will be fixed, when help-vars for algorithm are finally removed.
- workaround for pivoting, report no error message if the first pivoting fails because of singulare jacobian, the default selection is used in this cases
- Moved around some realtime timer indices (keep them together so we don't use the same index at the same place by accident) - Made the simulate() command faster, by using any qualified classname as it is, without looking in the symboltable - Enabled a few more tests
- continue removing helpVars - when-coditions are checked without using helpVars anymore (c runtime) - testsuite/simulation/modelica/initialization/gaspropreties.mos fails, because updateDiscreteSystem is called before the symbolic initialization is done. This is related to some kind of annoying workaround and will hopefully removed soon.
- add unique indices to sample calls - this will help to replace the annoying helpVars - hopefully soon - equal sample-calls are getting the same index
- Changed translateModel to return a Boolean instead of text that is hard to parse - Changed compareSimulationResults to return an array of strings instead of sometimes a string and sometimes a list of strings
- new preOptModule: encapsulateWhenConditions - this module encapsulates each when-condition in a boolean-variable - debug-dump with: +d=dumpEncapsulateWhenConditions
- remove path from "Get Var " error message - incidenceRowExp1 matchcontinue -> match - add uode index reduction method, this is the underlying ODE without any constrained stapilization or projection techniques - add print message to unneccesary case in traversingincidenceRowExpSolvableFinder
- bugfix inlinesolve and nonlinear system, init also the nonlinear systems for inline solver - bugfix/workaround for nonlinear system and inline solver, set the nonlinear index also in odeequations - try to get fmu with state selection working -> no success - free stateselection data
- bugfix nonlinear system - expected results - move pivoting before initialization, check after initilization if pivoting change and report error message
- use Integer for Enumeration types in modeldiscription.xml instead of Real as type, this fixes the "Warning: Assuming fixed start value for .. " warnings - switch of debug output in IndexReduction - Update fmi/ModelExchange tests
- fix bug "Memory performance issue in 1.9.0 beta 2" reported by MathCore. + use internal RML allocation for Print.getString and Print.getErrorString + do not use strdup in Print_omc.cpp for Print.getString and Print.getErrorString
- switch of case for a^b = f(..) -> a = (if pre(a)==0 then 1 else sign(pre(a)))*(f(...)^(1/b)), because not all have variables get memory for pre in code generation
- improve indicenceMatrix::SOLVABLE, if a function is inlineable check the inlined function - improve index reduction, differentiat less equations by checking the differentiated equation for needed derivatives - improve tarjans algorithm to handle also underconstrained system with full matching for equations
- add Config Flag MAXTRAVERSALS, used to set the maximum number of traversals when looking for simple equations in the acausal System - delete Flag DYNAMIC_PIVOT - fix tabs - fix compilation (Initialization.mo) - expected output
- improve dynamic state selection, use both strategies, if the first fails try the second - get rid of the wanrings when build bootstrapped compiler - add some comments
- Read matlab file with only 1 column for parameters (start and stop value are always the same; more compact format) - Simulation results now look for the "time" or "Time" variable before it does lookup on it (avoids error-messages added if "Time" was used)
Compiler/BackEnd/Initialization.mo - coding-style Compiler/Template/CodegenC.tpl - generate inlineVars again Compiler/BackEnd/SimCodeUtil.mo - minor changes to error messages - add case for SOLVED_EQUATION
- DELAY_BREAK_LOOP -> config flag, true by default - > update Tests - ExpressionSolve: add case for cr = start(cr), Integer(cr) = ... - if guid is not present in xml file report warning and simulate, this makes debugging easier
- initialization: bugfix inline inaktive whenstatment - SimCode: hack for if-equation to if-exp when variable to solve for is not present in all branches
- List.mo: intersectionIntN, setDifferenceIntN and unionIntN: use less memory, tail recursive, check inN - incidenceMatrix(SOLVABLE): consider only variables in if expessions uccure in then and else branche - Initialization: do not fix an underconstraint system to an overconstraint system
- use List.isNotEmpty for BackendVariable.existsVar - do not replace state set candidates - replace algorithm for selection of variables to set fixed=true in case of under determined initialsyst
- Initialization: collect discrete States, check when inline when if pre(var) is used in the time equations and var and pre(var) are used in the initial equations, if not set var fixed and report warning
- remove again inline solver vars from code generation because it generates duplicated names for Modelica.Mechanics.MultiBody.Examples.Constraints.ConstrainUniversalJoint +dynamicPivot (this is the new index reduction and will be aktivated as default soon)
- BackendDump: use capital letters for constants - RemoveSimpleEquations: do not replace discrete variables and do not merge fixed and start for discrete variables, fixes issues with symbolic initialization, (Modelica.Blocks.Exmaples.Interaktion1) - Initialization: bugfix for inaktive when transformation to equations if only one assignment
- ignore state set variables for initial variables - add state set statecandidates to initial variables - convert single inaktive when algorithm sections to equations
- remove one extra run of buildModel done for no apparent reason (probably just a copy paste error). - add flags: setMatchingAlgorithm("PFPlusExt"); setIndexReductionMethod("dynamicStateSelection");
- bugfix SimCodeUtil, do not ignore the previus generated tempvariables in createInlineSolverEqns and createInitialResiduals - add case for enumerations in addTempVars - add needed prevars from alias vars to simcode
- playing with modifiers to fix: Modelica.Electrical.Digital.Examples.DFFREGL and others. - do not apply redeclares in operators - make the error about modification or redeclaration of protected elements a warning plenty of models in MSL that have these! - display the dimensionality in the connect mismatch. - some models will fail, I'll deal with them next.
- added initial steps to support BackendDAE.IF_EQUATION - added missing case in most BackendDAE* files - added a new SimCode equation type SES_IFEQUATION - added cases to suppport this equation in SimCodeUtil - added one first test case for them
- Update rtest so that it automatically removes all files generated by Tpl.textFile() and CevalScript.compileModel() - This makes teardown_command not needed for most tests
- split up SimCodeUtil.mo in SimCodeMain.mo and SimCodeUtil.mo - SimCodeMain.mo is the entry module to create SimCode and is the only file that import Codegen* modules, since it took forever to load them. - SimCodeUtil.mo contains only public function that are called in SimCodeMain.mo. - started to sort functions in SimCodeUtil that belongs together.
- Revamped +simCodeTarget=Dump. It now create $MODEL_dump.xml. Which, together with OPENMODELICAHOME/share/scripts/simcodedump.xsl produces a pretty html report. Will be improved further.
- Turn on redeclare splitting when +d=scodeInst is given (but only for components, class modifications aren't yet handled in scodeInst). - Make sure we stop if an error occurs during modifier merging. - Implemented List.findMap[1-3]*. Like map, but with the possibility of stopping. - Added test cases for duplicate modifications and redeclare modification propagation.
- added support of analytical jacobians for non-linear solver(hybrid-method). - for now they can be activated by debug flag "+d=NLSanalyticJacobian". - added some new tests for non-linear solvers-
Partial fix for #1956 - Split redeclares into redeclare bit and modifier bit in SCodeUtil for easier error checking. - Fix modifier propagation in SCodeMod.
- attempt to fix bugs: #1987 #1988 - always consider inner/innerouter classes in *Dependency.mo - add inner classes to the InnerOuter.InstanceHierarchy lookup outer classes in the InnerOuter.InstanceHierarchy - right now the support for inner/outer classes is rather primitive. - added testsuite/simulation/modelica/others/Bug1987.mos to test for both bugs.
- fixes for Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator bad errors: Error: Trying to override final variable in component and scope Modelica.Electrical.Machines.Interfaces.InductionMachines.PowerBalanceSMEE by using modifiers: final - we might break a few tests as I changed the way we print modifiers and also send pre instead of NOPRE in Inst.mo
- have a look at undifferentiable mss at the end - report warning about structural singulare set earlier - do not sort equations and variables, it is useless
- fix minor mistace in removeSimpleEquations, in case of unreplacable variables were not all possible vars are replaced - add flag for equations to know if an equation was differentiat and should not differntiated again - remove useless code
- more fixes for fixes for bugs: #1917, #1983 :) isn't that recursive? - get rid of wrong error messages of type: [package.mo:4549:7-4549:59:writable] Error: Variable reference_X not found in scope Modelica.Media.Interfaces.PartialMedium.specificEnthalpy_pTX - let's see how many tests we break/fix now :)
- get rid of bad warnings/error messages of form: [Incompressible.mo:164:5-165:51:writable] Warning: Invalid public variable hasHeatCapacity, function variables that are not input/output must be protected.
- attempt to fix bugs: #1917, #1983 - quite some tests might fail, let's see how it goes. - if is a parameter component with a record type that has all bindings and the actual component has no binding build the binding from the type. - check for fixed = false for parameter before showing the warning. - Static.elabCallArgs2 do lookup class first as lookupType is much more complex!
SimulationRuntime/c - rename initialization flag -iim state to -iim numeric (hopefully I forget nothing: fmi, omEdit, ...) - improve the finale initialization dump - fix some issues with LOG_STDOUT (the dump stream should be selected much more carefully) - some minor code simplifications
Compiler/BackEnd/Initialization.mo - fix for when-statements in algorithm sections - remove flag TRACE_INITIAL_SYSTEM - remove function analyzeInitialSystem1 (fix discrete vars to get rid of unneeded pre-vars) - fix under-determined systems with zero initial equations SimulationRuntime/c/simulation/solver/initialization/initialization.c - fix initialization of ringbuffer SimulationRuntime/c/ - some improvements for the readability of LOG_EVENT, LOG_SOLVER, LOG_DDASRT, ... - some minor formatting changes testsuite/simulation/modelica/algorithms-functions - adjust expected output to new initialization (symbolic)
- get rid of unnecessary "Not Enough Time Points Warning" - initialize rand for cheap matching (this could be done better once at the begining of omc's life)
- in case of variables with variable indices (for example u[i,1]) replace the indices with WHOLEDIM (maybe this could be improved by evaluating i) to get at least all potential variables in the incidence matrix
Compiler/BackEnd/Initialization.mo - introduce some kind of structure - first try - next steps to solve under-determined initial systems - add some fallback-clauses, to provide current testsuite (probably not so clever... ?!) Compiler/BackEnd/BackendDAEUtil.mo - improve validity of some names - internally generated call start(v) depends not on v - simplify some snippets Compiler/BackEnd/SimCodeUtil.mo - remove unneeded output Compiler/BackEnd/BackendEquation.mo - add function emptyEqns() - as listEquation({}) is often used instead testsuite/simulation/modelica/initialization/ - conform expected outputs to current messages for - underdeterminedTest1.mos - underdeterminedTest2.mos - new test for under-determined initial systems - underdeterminedTest4.mos - underdeterminedTest5.mos - underdeterminedTest6.mos
- BackendVarTransform. add case for not Cr for when assigment - add case for jacobian for remove simple equations - add case for not(not(exp)) -> exp - add case for not cr = ... for CodegenC.writeLhsCref
- make BackendVariable.vararrayNth protected use BackendVariable.getVarAt - add LOG_DEBUG Info to callExternalObjectConstructors - continue new Remove Simple Equations
- small fixes for modelica3d support, still dit not work on my computer, please can one of the modelica3d people have a look at it if it works in generall
- activate dtostr in realString.c for MinGW32 too. - get rid of some warnings in SimulationRuntime/c/ + try to use existing defined types instead of casting as that might generate problems. int is rather a bad type on different platforms so use integer or fortran_integer directly instead of casting. - let's see if we run into any problems.
- second attempt to fix bugs: #1405 and #1970 it will generate some missing each warnings for modifiers but it will work otherwise. i'll get rid of the warnings later. - added tests with both models and more: testsuite/flattening/modelica/arrays/TypeTest.mos - let's see how many tests will fail now.
- Compiler/BackEnd/BackendDump.mo These file is subdivided into several section: section for all print* functions section for all dump* functions section for all *String functions section for all debug* functions unsorted section Please follow the introduced naming style (above) and sort all new functions into the corresponding section (except unsorted section). - Compiler/BackEnd/Initialization.mo - small changes in pedantic output - new debug output via traceinitialsystem - testsuite/simulation/modelica/initialization - new test for underdetermined system
- attempt to fix bugs: #1405 and #1970 - added tests with both models and more: testsuite/flattening/modelica/arrays/TypeTest.mos - let's see how many tests fail.
- fix potential bug for simplified if equations in old remove simple equations - add new file RemoveSimpleEquations.mo - add new tests for singular systems
- checks for bug #1972 in InstSection.mo with helpers in SCode.mo and Absyn.mo make the way we check the when equations and when statements more uniform. added testsuite/simulation/modelica/initialization/filterBlock1.mos back to test the error reporting for #1972.
- Compiler/BackEnd - move some functions from BackendDAEUtil.mo to BackendVariable.mo and BackendEquation.mo - move code for initialization to Initialization.mo
- buy time with memory, now the avm model finishes remove simple equations after around 15 Minutes (last try was not finished after 9 hours), so it was not a loop, we need a new implementation of BackendVarTransform because this is the bottleneck (the inverse hashtable, the lists crow dramatical) - use the model size to alloc memory for the replacements - remove unused code from Inline.mo - add new tests for index reduction
- Compiler/BackEnd/ - solve dependencies for parameters during initialization - fix for equations from bindings - Compiler/Template/ - print error message, if symbolic initialization is selected but not generated - SimulationRuntime/c - always dump error messages - testsuite/ - activate case for ticket #1964
- Fix to try scodeInstShortcut in BuildModelRecursive.mos. Only uses it if buildModel fails, and then succeeds with the shortcut. Green cells become yellow if the shortcut was used.
- BackendDAECreate.lower3: add missing case for DAE.INITIALDEFINE - SimCodeUtil.createNonlinearResidualExp: add case for Enumerations - Expression.expAdd,expSub: add case for Enumerations
- fixes for bugs: #1946 #1969 - do not allow subtype(Tuple, nonTuple) - do type conversion of Tuple -> DAE.TSUB(Tuple, 1) when the actual type is tuple and the expected type is not. also check that the first type of the tuple agrees with the type of the non-tuple. - added tests for these bugs testsuite/flattening/modelica/built-in-functions/AbsIssues.mo testsuite/flattening/modelica/built-in-functions/MultiFunctionReturnValueUseOnlyFirst.mo - let's see how many tests fail :)
- expressions with unfixed parameters cannot moved to simple equations because they are calculated before the unfixed parameter values are calculated, 2th try
- bug #1963 cannot be fixed right now as the fix is breaking too many models. - to fix this bug we need to know in Static which parameters are final and we have no way of knowing that right now.
- second attempt to fix #1963 constant with parameter index -> DO NOT CONSTANT EVALUATE. this time it should work fine, i even added a test: testsuite/flattening/libraries/msl32/Modelica.Electrical.Digital.Examples.DFFREG.mos
- attempt to fix #1963 constant with parameter index -> DO NOT CONSTANT EVALUATE. - i guess a lot of tests will fail, i'll fix them when i get the result from Hudson
- improve algortihm for handling undifferentiable mss - copy also lapack and blas for msvc debugging - comment for further developemnt to BackendDAE.STATE
- remove debugging printout in CodegenC.tpl daeExpIf because the expression inside /* */ can contain /* */ and you get a lot of issues add it back if you want to debug that part!
- add a warning about files and directories (containing package.mo) that are not present in package.order *AND ALSO LOAD THE ONES THAT ARE NOT PRESENT*. I've got bitten by this waaaay too many times to let it slide! Now we got 3 more test models in the AVM lib from this.
- Merge some code in BackendDAEEXT so we do not have a different version for bootstrapped (it was broken, causing errors in libc malloc, making the process into a zombie)
+ Type checking for operators and operands for the new FrontEnd. + Arithmetic operations + Logical operations + Relations + Fix for type checking of assignment and equality equation statements .
- improve Pantelites algorithm to handle also not differentiable singulare subsets - move Modelica.Magnetic.FluxTubes.Examples.SaturatedInductor.mos to working tests - add flag to dump trace in HTML usage with +d=bltdump +dumpTarget=log.html it is a first try, shure we have to improve it but it can be quiet usefull in case of large trace files
- rename SimulationRuntime/c/meta/gc.* to SimulationRuntime/c/meta/mmc_gc.* - to use the Boehm GC uncomment: #define _MMC_USE_BOEHM_GC_ in SimulationRuntime/c/meta/mmc_gc.h and recompile the SimulationRuntime/c and the bootstrapped compiler. note that you will have to link omc or the bootstrapped compiler with Boehm GC (for OMDev the flags are already in place but commented out, search for boehm in the Makefiles.omdev.mingw, also the compiled libgc was added to OMDev).
small fixes to runtime - simulation_runtime.cpp - added correct solver to callSolver - dassl.c - use colored sparse structure for dasslwort - nonlinearSolverHybrd.* - added a case for using values as scaling factos - model_help.c - fixed uninitialized value - testsuite/* - adjust tests
- better failtrace message in Compiler/FrontEnd/SCodeFlattenRedeclare.mo - new functions for dimension comparison on Compiler/FrontEnd/Expression.mo not used yet in Compiler/FrontEnd/Types.mo as I did not want to allow Types.subtype(Type[0], Type[N]) to return true (we'll see if we need to allow it).
- revert changes to templates: Compiler/Template/CodegenC.tpl Compiler/Template/ExpressionDumpTpl.tpl as things started to break for no apparent reason! - revert changes to tests.
- fixes for bug #1951 add DAE.TSUB to array(fcallReturningTuple for i in range) -> array(tsub(fcallReturningTuple, 1) for i in range) - handle DAE.TSUB in prefixExp - add testsuite/flattening/modelica/arrays/ArrayTuple.mo
Fixes for #1946 - guard Types.subtype2(ty1, tuple(ty2, _)) -> Types.subtype2(ty1, ty2) and Types.subtype2(tuple(ty1, _), ty2) -> Types.subtype2(ty1, ty2) to be executed only for normal Modelica and not MetaModelica
Fixes for #1946 - Types.subtype2: + check of tuple vs. type: i.e. abs(fcallReturningTuple) we try subtype of the first tuple element with the other type!
- bugfix for array_algorithm, replace also lhs of array assign statement, test does still not work because values of parameters seems to be written to early (before initialisation) in mat file
Makefile.common - remove testing from runtimeCPPinstall and move it to testsuite/Makefile to be part of the full test. - some build might fail, I'll fix them as it goes.
- partial support for Media Models - Matching.c: do not generate transposet incidence madrix if not necessary - move some Media Models to working group
- Fixed connect with multiple inheritance, in both old and new instantiation. - Added test case MultipleInheritanceConnect and updated Modelica.Fluid.Examples.HeatingSystem test which is now balanced.
- print more info on +d=showEquationSource - add more info from where the unconnected flow comes (add Element info to added inside flow) to get nicer +d=showEquationSource display.
SCodeAnalyseRedeclare.mo - do not crash omc on types containing functions referring to the type the testsuite now works without issues with +d=scodeInstShortcut and has 309 failures.
- Rewrote extends qualifying phase to handle more cases and do more checking. Now checks for inherited extends and checks all parts of the base class name for replaceability. - Added new package EnvExtends and put most of the extends stuff in it. - Added check for missing redeclare keywords when redeclaring classes (see MissingRedeclare1.mo test case). - Implemented better propagation of modifiers to multiple extends. - Renamed test folder flattening/modelica/inheritances to extends.
- set the type of T_UNKNOWN to "complex" (void*) when +g=MetaModelica and to "real" (modelica_real) when not. - have the type of the inStream operator to be T_REAL_DEFAULT as T_UNKONW reaches the code somehow.
- don't do the second dependency analysis in CevalScript.mo and the third in Inst.instantiateClass when +d=scodeInstShortcut is active (it doesn't work yet in all cases)
- make models dumped with +d=scodeInstShortcut able to instantiate when loaded again in OMC. Check differently the last ident if __OMC__ is present otherwise you get: first element is: .Modelica.Fluid.Interfaces.FluidPort_a__OMC__70 port_a; second element is: .Modelica.Fluid.Interfaces.FluidPort_a__OMC__88 port_a;
- fix for replace not pre,change,edge with alias, still not enough to get all working because if edge and change will not be replaced tarjans algorithm cannot sort in right order
- do not replace PreVariables with information from time-equation-systems - move simplifyTimeIndepFuncCalls behind solveinitialsystem to replace all the pre variables for code generation
- continue redesign remove simple equations - BackendVarTransform add functionalety to replace der(cr), this is realy helpfull to handle states - redesign ExpressionSolve.mo
+ Optimica: + handle Optimica vars with opt. instants in class attributes. e.g. x(finalTime) + 1, where x is a variable. + Added a new flag for Optimica. + Added new class attribute objectiveIntgrand.
Compiler - remove unneeded function BackendDAEUtil.addBackendDAEEqSystem - add warning to Expressions.containsInitialCall - remove most of the changes from r13894 regarding BackendDAEUtil.mo testsuite - move StateGraph tests to WRONGRESULTTEST, as long as the implementation let other tests fail
- get Modelica.StateGraph.Examples.ControlledTanks.mos working - move expandAlgorithmsbyInitStmts to SimCodeDump - improve Error Message "Inverse Algorithm needs to be solved for ..."
- get 6 from 7 StateGraph examples working with solveinitialsystem - collect all variables used in pre, and add equation for each unused pre var indroduced by a inaktive when equatin an equation pre(var) = var.start - BackendVariable.varStartValueType - ComponentReference.isPreCref - Expression.containsInitialCall: ... or Initial() - ExpressionSimplify: cases for a and not a > false, a or not a -> true, a and a -> a, a or a -> a maybe split simplifyBinary in simplifyBinary and simplifyLBinary
initialization - continue with handling of under-determined initial system testsuite - add test for under-determined initial system - remove unneeded test
- do not change discreter variables in der-function to states - diverentiate also complex equations and records - continue redesign remove simple equations - rename MyModel->ParameterCycle to avoid conflicts
#1922 - Handle type-casting from records with the same components but different names' - Improve scalarization of record equations in the front-end. Made it worse in the back-end (back-end does not handle cast of records)
Compiler/BackEnd - fix symbolic initialization of discrete vars - fix handling of when-clauses during initialization - remove some misspellings from function descriptions - add debug-flag: +d=pedantic SimulationRuntime/c - fix a bug in evaluating residuals for global homotopy testsuite - add test cases for initialization of discrete variables - add testcase for initialization of fullRobot
- print types if components are not there in Types.printConnectorType - InstSection.validConnector now allows expandable connector components even if they are not connectors - print the type of the outer of a missing inner component (a couple of tests will fail, I'll fix them in my next commit)
- fixes for expandable connectors (AVM 09 & 11 are working now): + do not delete the components already defined inside the connector + remove from DAE / connection sets all expandable variables that are not connected to real variables - use ComponentReference.crefEqualNoStringCompare in ConnectionGraph.mo - activate forgotten 07.mo in testsuite/flattening/modelica/expandable/ExpandableConnectors.mos - expected output for: testsuite/flattening/libraries/msl32/Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot.mos testsuite/flattening/libraries/msl32/Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.oneAxis.mos
- initialization - always generate all the stuff for the numerical initialization (even if +d=solveinitialsystem is used) - add executable-flag [-iim symbolic] to solve the initialization problem symbolically (currently you also need +d=solveinitialsystem) - remove obsolete function: - ./Compiler/BackEnd/SimCodeUtil.addJacobiansToSimCode - SimulationRuntime/c - introduce new initialization option: -iim symbolic - improve dumps - remove c++ comments - remove unused vars - make some code fragments more readable - use comments - even for function descriptions! - use meaningful variable names - use spaces between arguments
- fixes to connection of expandable connectors array instances (AVM 07 model works now). - added example with for equations testsuite/flattening/modelica/expandable/07.mo
- quite big change to c simulation runtime - solving non-linear systems (almost) always continuous - update debug output of non-linear systems - generate additional only relations - updated testsuite
bug fixes - BackendDAECreate.mo fixed findZeroCrossings, scan when clauses with all other shared stuff - CodegenC.tpl fixed memory leak in updateBoundParameters.
- fixes for Ticket #1923 - correct and way faster handling of overconstrained connection graph (not based on equation source which deleted more equations than it should have in some cases) now the broken connects are removed from the connect sets and the allowed ones are put back. - move the handling of overconstrained connection graph to ConnectUtil.equations so we do everything in one place. - fixes to testsuite/simulation/libraries/msl32/Makefile (USE THE FILE NAME NOT THE TEST NAME!) - probably a lot of flattening models will fail now because the equations will be moved around. i'll fix these when I get the output from Hudson.
- Reimplement DivisionByZero easier, solves Ticket #1895 - fixes vor msvc compile in case of empty residualEquations or zeroCrossings - fix order of Equations for DynamicStateSelection
- fix algorithms for initialization - disable some FMI/ModelExchange tests, as long as they are built on a buggy implementation of algorithms in the initialization
event handling update: - zero-crossings are handled as hysteresis function - improved selection for sample or state event Testsuite updates: - updates to some result files - enabled Modelica.Mechanics.Rotational.Examples.HeatLosses - disabled Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects (has some issues with state selection and current event handling) - disabled Modelica.Electrical.Analog.Examples.NandGate (other results) - disabled Modelica.Electrical.Analog.Examples.ControlledSwitchWithArc (non-linear solver) - disabled Modelica.Electrical.Analog.Examples.SwitchWithArc (non-linear solver)
- Fixed various issues with function instantiation in the new instantiation. - Added new package InstFlatten (work in progress). - Switched back partial instantiation to be an error in the new instantiation.
- BackendDAECreate: - remove asserts,terminates from if-equations - check type on EqEquations and Tuple-Equations when generate Equations - BackendDAEOptimize: - remove also termintates from if-equations
- BackendVarTransform: do not replace iteration variables from for loops, why is not CREF_ITER used for these variables, this would make thouse thinks much easier.
- Updated MSL 3.2.1 to latest version (should improve selection of fixed variables for some more examples) - All MSL 3.2.1-related files are now picked from svn:externals and not just the Modelica package - Removed obsolete pltpkg.mo
- add postoptimization module to replace constants in the system - used for Modelica.Electrical.Spice3.Examples - switch off eqequation to alias - ThermoSysPro.Examples.SimpleExamples.TestJunctions4.mos fails because source.Q(start = 500.0) , source.Q(start = 100.0), sourceP.Q the same - PlanarMechanicsForTesting.Examples.SingleTrackWithEngine.mos - stateselection - PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear.mos - rename ERROR -> ERROR0 to avoid warning
- removed Compiler/FrontEnd/SCodeTransform.mo replaced by Compiler/FrontEnd/SCodeInstShortcut.mo - added +d=scodeInstShortcut,showSCode flags to call the new SCodeInstShortcut package. - we might even get rid of passing class names around in SCodeInst as is not needed anymore. - first version of new Compiler/FrontEnd/SCodeInstShortcut.mo package works rather fine for some models and has issues with others. More context of qualified types is needed to fully make it work. - fix scodeinst tests. - allow input RealInput and output RealOutput in InstUtil.mergeDirection as this is used in MSL 3.2.1: Modelica.Blocks.Math.Add3 (maybe we should fix MSL?) - more flags in testsuite/openmodelica/bootstrapping/LinkMain.makefile.mingw to get rid of warnings.
- solve the inital system symbolical in case of equal var and equation size - skip external objects from algorithm outputs - fix test Modelica.Electrical.QuasiStationary.SinglePhase.Examples.Rectifier
- move equalityConstraint equations to removed equations - move Modelica.Magnetic.FluxTubes.Examples.SaturatedInductor.mos and Modelica.Electrical.QuasiStationary.SinglePhase.Examples.Rectifier to working test
- replace evaluated parameters in if-expressions before index reduction - move Modelica.Electrical.Machines.Examples.DCMachines.DCPM_QuasiStationary to working tests
remove initial algorithms from initial equations (they are called in bound parameter equations), I have no clue what the reason is but is was done before also, maybe Lennart know the reason
- added support for {cref,cref,cref,cref} = .... - improve residual code generation for array equations, calculate array equation only once and do not asub
- bugfix SimCodeUtil.createNonlinearResidualExp for bool and string - bugfix SimCodeUtil.makeSES_RESIDUAL1, use createNonlinearResidualExp instead of Expression.expSub, this works also for bool and string - CodegenC.daeExpLbinary, report better error message
- improve implementation for residuals of algorithms, replace also array crefs with tmp crefs - ToDo: we need case for ARRAY({cr,cr,cr,...}) in CodegenC.writeLhsCref - add comments for missing cases for tuple equations
- avoid divisions by zero in residual equations - add parameter equations to equationInfo, because they could also have nonlinear systems - add listAppend to SimCodeTV, how it is posibble to append two list and store this list in a variable? - fix tabs f2c.h - improve test ParameterCycle, check results of var1 and var2
- C# template update toward the new zero-crossing treatment - rename of the mixed helper function nextVar() -> NextMixedBoolCombination() - better code for DIVISION()
- bugfix for runtime Cpp in case of incomplete arrays - remove testsuite/cppruntime because there is the same directory ad testsuite/openmodelica/cppruntime - fix tests
- Absyn.mo: add crefFirstEqual - ClassInf.mo: add stateToSCodeRestriction - Expression.mo: add DAE.ENUM_LITERAL in unelabExp - Inst.mo: try to handle Modelica.Mechanics.MultiBody.Examples.Elementary.Surfaces but it doesn't work yet.
- Improved cref prefixing in SCodeInst, now uses less magic. - Changed InstTypes.Prefix to be a proper uniontype instead of a list, for no apparent reason. - Some small class extends improvements.
- remove Simple Equations, use BackendVarTransform.replaceWhenClauses to replace aliases in reinit - replace BackendDAE.DAEHandlerArg with BackendDAE.StructurallySingularSystemHandlerArg - bugfix dynamic State Selection, remove last subs and replace last type of set - report more information in case of Reference file has not enough time points - fix tests
- Expression: check type before add,sub,mul,div expression - ExpressionSolve.mo: cases for cr = exp, exp=cr, -cr=exp,exp=-cr,!cr=exp,exp=!cr - ExpressionSimplify: pre(a+b) -> pre(a)+pre(b) - move some test to working group
- initialization: update some function descriptions for better documentation - Initialization: remove redundant data-structs - initialization: minor fixes (e.g. memory leaks) - initialization: do not longer handle hybrid system different for each initialization method - testsuite: initialization: add new testcase for discrete changes during initialization - testsuite: ThermoSysPro: update simulation results - testsuite: fix failing tests regarding the number of intervals - SimulationRuntime/c: avoid warnings
Changes for event handling. - From now as zero-crossing functions are used the conditions instead of single relations. - main changes in BackendDAECreate.findZeroCrossings. - it collects now samples, relations and zerocrossings in different lists. - relations are still collected for cpp-runtime. - fixed also #1866
- try to remove aliases like state = state, but this needs some more thinks to do - keep zero start values - dynamicstateselection, prever states with short names - move some tests back to working group
- change cmake files and add target simulationruntimecmsvc to Makefile.omdev.mingw to call cmake to generate msvc libs (does not yet work because camke does not configue nmake files)
- added case for SCode.EQ_NORETCALL in SCode.equationEqual2. fixes duplicate elements not identical error in model: Modelica.Mechanics.MultiBody.Examples.Constraints.ConstrainPrismaticJoint however, the model seems to go in an infinite loop in the back-end.
- add case to generate nmake makefile for visual studio 2010 todo: copy libs libexpat.lib from OMDEV/lib/expat-win32-msvc to lib sundials_kinsol.lib sundials_nvecserial.lib from OMDEV/lib/3rdParty/Sundials/lib/release/vc100 to lib f2c.lib initialization.lib math-support.lib meta.lib ModelicaExternalC.lib results.lib simulation.lib solver.lib util.lib from OMDEV/lib/c_runtime_msvc to lib improve Compile.bat to call vcvarsall.bat and nmake in case of target=msvc add dlls (expat,kinsol) to path
- use brackets to avoid warning in tables.c - update cmakefiles and small change to simulation_runtime_cpp to get simulationruntime c compilable with vs2010
- initialization: fix in scaling: use the solution of scaled initialization for final improvement of accuracy - testsuite: add new testcase for initialization of nonlinear system - testsuite: refine the description of case initial_equation.mos (previous: Initialization.mos)
- uh, this was easier than I imagined. - added startOrigin to DAE.VAR_ATTR* which is set to: SOME(DAE.SCODE("type")) -> start comes from type SOME(DAE.SCODE("binding")) -> start comes from component binding NONE() -> no idea - use +d=showStartOrigin to show the startOrigin=... in the DAE output of instantiateModel. - Jens F., please see if you can use it for Alias selection (always prefer startOrigin = "binding"), seems to work correctly for the AVM model we talked about via email. Real differential_Open.env.heatCapacitor.T(start = 293.15, nominal = 300.0, startOrigin = "binding");
- ALWAYS take the inner outer prefix from the original declaration not the redeclare which HAS NO inner outer (the grammar doesn't permit it!) + this fixes some AVM models: Class C2M2L_Ext.C2M2L_Delivered_Component_Implementations.Drive_Line.Gearbox_90_Degree.Test_90degree_Gearbox_VU has 243 equation(s) and 243 variable(s). 180 of these are trivial equation(s).
- c-runtime: move all files regarding initialization to separate folder inside simulation/solver - testsuite: change if-condition to move event from simulation to initialization - initialization: switching off scaling nearby the final solution
- Removed the special case for Real casts when dumping expressions, since Modelica does not have a Real() function. - Some SCodeInst fixes. - Fixed compiler warnings in corbaimpl.cpp. - Updated testcases due to the expression dumping change.
- Replaced the import FMU with the new functionality. importFMU => importFMUOld and importFMUNew => importFMU. - Updated some of the test cases. Few test cases still uses the old API.
- updates to generation of sparsity pattern and linearization - updates for correct sorting of the sparsety pattern - added API call linearize() - updates the linearization tests
- fix for nonlinear system/tearing, generate code for all equations - switch tearing on in some tests (still fail Modelica.Electrical.Analog.Examples.CauerLowPassSC msl221 and msl31 see #1804)
- New procedure to update MSL 3.2.1: Update the svn:externals revision and run make omlibrary-diff to create the patches. Update the copy in build/lib/omlibrary unless you want to commit the patch upstream to modelica.org (only possible if you have an account there)
- bugfix mergestartvalue for alias variables, use the value from the variable with less dots in the name according to MSL - bugfix variable operations for alias var
- added BugFix for #1872 Bugfix is for now a workaround that prevents the collation of STMT_WHEN conditions. Since I want to rewrite some of that helpVar stuff with regarding to Ticket #1866, this should work for now.
- Better export of C-code + MSL 3.1 generates 600MB of C sources and a 350MB o-file. So it is too large to be shipped anyway. Not to mention it takes >30 minutes to compile and link
- Added argument exportAsCode to list - This creates C-code that could be used to compile that part of the AST into an executable or library - But it is too large to be useful at the moment (a single 108MB expression for Modelica 3.1) - Could be changed to use more efficient C-code generation
- fix bug for if-equation simplification - fix bug for if-equation dump - simplify if equtions (if .. then a=.. elseif .. then a=... else a=.. end if) to a=if .. then .. else if .. then else ..;
- check expression type before transform to residual form in if-equation simplification. (do no transform boolean equations to 0 = ...), this causes my some tests to fail, but if a test fail we have to at a ticket in trac, the check is really necessary
- Added now working simulation test Modelica.Fluid.Examples.DrumBoiler.DrumBoiler + Note: The correctness of the results has not been verified, but it does produce results
- fix MDT: do not expand the uniontypes anymore when parsing via loadFileInteractiveQualified as is done again via SCodeUtil.translateAbsyn2SCode (MetaUtil.createMetaClassesInProgram) and leads to duplicate definitions. Lookup of Absyn.CLASS paths will not work anymore via list(Absyn.CLASS) from MDT until we fix it in MDT.
- add -overrideFile functionality to the simulation runtime to be used when you have a lot of variables to override and the command line size does not suffice.
- Made a subset of libSimulationRuntime.a called libOpenModelicaRuntime.a + This can be used by dyn.loaded functions and omc itself without messing with the simulation runtime functions + Do partial linking of the object-files in these archives to prevent linking issues in OSX
- update OMDev. FMI Import - Separated the FMI Interface and the FMI external interface. - Use more records for code generation. FMI Export - Don't print log if user sets fmiSetDebugLogging off.
#1833 - Some automagic code clean-up using automagic - In Patternm.mo, elabExp uses false instead of allowTopLevelInputs - In Static.mo make checkAssignmentToInput2 succeed even on error - Create the log-file `omc +g=MetaModelica MainTest.mos | grep input | sort > log` {{{ #!/bin/bash
- changed event handling with dassl - while every dassl step the ZeroCrossings are tested - changed many results, since now the simulation is more accurate - changed the check for Modelica assert, now some models produce warnings for variables outside min and max values
- preliminary typechecking in SCodeInst, much more will come later after testing. - add parent to InstTypes.PACKAGE to be able to get dimensions for a.b.PACKAGE.c through it + still problems here as bindings do not seem to have correct propagatedDimensions through package, Per, any ideas? + see scodeinst/eq9.mo - handle DAE.T_ARRAY(dim1::dim2::dim3) better in Types.mo conversion and subtype - Makefile.common wrap time ... into (time ...) to work properly in Windows.
- add -fopenmp when linking with omcruntime - add -fopenmp in LinkMain.makefile.mingw instead of libgomp-1.dll (that might change with a new MinGW GCC)
- Fix bootstrapping (seriously, we needed this feature? so much work...) + Now we support codegenration for if-expressions returning tuples (comes from match-expression optimizations) - Enabled SusanTest.mos full test since tail-recursion makes it run fine - T_TUPLE is no longer simplified into a MetaModelica type - We can now handle code-generation for tuple-expressions (creates an anonymous record)
- Added missing 'each' prefixes to more models - Made DAE.TYPED and DAE.UNTYPED modifications contain Absyn.Info and started using that whenever possible - This makes error-messages appear at the source of the modification instead of at the component being modified, which is better since it is easier to look up the component than to figure where the #!#&@ the modification came from
- Towards more separation between Script and FrontEnd. - All the calls from Interactive and CevalScript to Ceval.ceval are concentrated through CevalScript.ceval. - All the calls from Interactive and CevalScript to Static.elabExp are concentrated through StaticScript.elabExp.
Some connection improvements for the new instantiation: - Print error message when connecting expandable connector to non-expandable. - Some prefixing fixes.
changed interface for solving nonlinear systems in the c runtime - get rid of macros for solving - easier itegeration of further solver - added scaling of error function - added x scaling
#1798 - External C functions can now throw assertions by calling ModelicaError - Assertions thrown in function code now causes the function to fail() properly
- bugfix dynamic state selection for stateSelect = StateSelect.always - add test for EngineV6 (compile and simulation time together around 1 minute but nonliniear solver has trouble)
- replace residual replacements by adding varname = xloc[..] at the beginning of each residualfunction, this makes handling of complex and algorithm equations easier in residual systems
- fix tests, switch of tearing for some models because nonlinear solver has trouble see Ticket #1804 - improve adiacency matrix, check if expressions branch variables - fix bug for determinant calculation in dynamic state selection - fix bug for temp variables in simcode
#1801 - Fix problem with matrix-vector operations being converted into array-multiplication of vector and scalar - All tests that worked still work except for one: ./libraries/msl31/simulate/Modelica.Mechanics.MultiBody.Examples.Elementary.PointGravityWithPointMasses2.mos, presumably because of a better solution now
#1793 - Updated the C runtime for the loadModel command. We now look for targets in a better order, should be more robust, and we should now support loading any 3.2.x.y when 3.2 is requested and not found. Even on Windows.
- Return the TranslatableContent record from runtime. So that getMessagesStringInternal() can work fine. - Moved the TranslatableContent from Util.mo to Error.mo - Added a testcase for getMessagesStringInternal(). - Some minor fixes in FMI. - The translation file msgid and msgstr should be same.
- Added new package ConnectionSets to handle connection sets. - Lots of connection handling improvements. - Some updates of the omc translations. - Added case for SCodeInst to CevalScript.runFrontEndWork which mimics the old instantiation, to make it easier to compare the new and old instantiation. - Probably lots of other things too...
- add Exp.ASUB case to BackendDAEOptimize.derive - minor changes in tearing var selection, check for unsolvable vars befor select tearing var - ExpressionSimplify add case for DAE.MUL_ARRAY_SCALAR with Zero scalar value - IndexReduction make state sorting heursitic easier, do not use the old one from dummyderivative
+ Finally found why setCommandLineOptions() doesn't work for a new grammar, pheew + 1 more API for getting the default device. + compile with -fPIC -O3
- cp -u is not a valid cp option - g++ is not a real C compiler - C does not support overloaded functions - g++ is not the system-configured C++ compiler
+ Added a flag and API to specify default OpenCL device. + Free dangling array after returning from a function. (y) + Show device selection only if default device is not set.
- move Modelica.Mechanics.MultiBody.Examples.Loops.Engine1b.mos, Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GyroscopicEffects.mos, Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.oneAxis.mos and Modelica.Mechanics.Translational.Examples.PreLoad.mos to working tests
Fix for bug #1774: - Better sorting of elements in Inst.instElementList by considering qualified crefs. - Added testcase Modelica.StateGraph.Examples.ControlledTanks. - Enabled the forgotten Modelica.Blocks.Continuous testcase.
+ check calls to functions depending on function type and scope type, parallel functions can be built-in too. + changed some of the parmodelica built-in functions to parallel built-in functions
- improve dynamic state selection, still problems with initialisation - move PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection.mos and PlanarMechanicsForTesting.Examples.KinematicLoop.mos to working tests
- fix derivativ of min/max, ToDo implement derivative of min/max for more than two arguments - bugfix dynamic state selection, state changes during runtime works now well - improve calculation of jacobian - improve analysation of jacobian - move BackendDAEUtil.jacobianTypeStr to BackendDump - improve calculation of liniear system rhs - move Modelica.Mechanics.MultiBody.Examples.Elementary.PendulumWithSpringDamper.mos and Modelica.Mechanics.MultiBody.Examples.Elementary.ThreeSprings.mos to working tests
- remove Hash mapings from alias Variables, because they not needed anymore ->(AliasVariables now Variables) - small fixes for dynamic state selection - move Pendulum.mos and DummyDerMatching.mos back to working tests
- remove Boolean output from past optimisation modules (modules have to change matching of equation system if rerun of matching algorithm is necessary)
- Do not evaluate lhs of tuple-assignments (fixes testcase) - Make generation of sqrt(abs(x)) smarter - do not generate code for events and stuff if it is known to be a positive argument
- take care for state selection to select derivatives of dummy_states as dummy_states - move Modelica.Mechanics.Translational.Examples.InitialConditions.mos to working tests
The Second part of the potentially buggy places in .tpl files due to the (confusing) semantics of iteration expressions and the "empty" option - made explicit "empty" option on all the suspicious places (those that are not obvious to produce an output for every iteration) - CodegenC.tpl and CodegenCPP.tpl covered so far - some small code styling in CodegenCPP.tpl
- bugfix mixed equation systems - move Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.GearConstraint.mos Modelica.Electrical.Analog.Examples.ShowVariableResistor.mos Modelica.Electrical.Machines.Examples.DCSE_Start.mos Modelica.Electrical.Analog.Examples.HeatingResistor.mos Modelica.Electrical.Analog.Examples.CharacteristicIdealDiodes.mos to working tests
First part of the potentially buggy places in .tpl files due to the (confusing) semantics of iteration expressions and the "empty" option - only for CodegenC.tpl yet
#1764 - Improve sorting of package.order elements + Actually sorted now + Handle MSL 3.2-style Math.mo where elements may be inserted in the middle of the package.mo
- Removed Absyn.ELEMENT.name (redundant and wrong) #1764 - Changed ClassLoader to respect package.order + This means most packages are parsed differently than before and many tests (especially Media) changed
#1757 - loadFile("package.mo",encoding="xxx") now takes the chosen encoding into consideration * Note: package.encoding overrides the argument in the function call
- bugfix unbound local variables - reimplement BackendDAEUtil.getEqnsysRhsExp - Expression.add case for a+(-b) = a-b - Expression.sub case for a-(-b) = a+b and -a-b=-(a+b)
BackendDAEOptimize.mo: An other heuristic for the tearing is now implemented. The residual equations are solved using Newton’s method: u_{n+1} = u_n – (f‘(u_n))^{-1}*f(u_n). During each iteration, the linear system f’(u_n)*du = -f(u_n) is solved for du. Thus, the Newton step can be rewritten in the form u_{n+1} = u_m + du, where du is the solution of the linear system. The function “tearingSystem1” now creates this linear system and solves for it using the function “tearingSystemNew”. Flags.mo: a new flag „tearing_and_relaxation“ is added to activate the above system in BackendDAEOptimize.mo. BackendDump.mo: added the case for RESIDUAL_EQUATION in “printEquation” and “dumpEquation” Expression.mo: added the function “makeDifference”
- Added a System.gettext() call - To try out localization of the omc kernel, see directory Compiler/Translation/README. Run make on it after setting up the strings to be translated and your language since we do not run the target by default.
#1421 - no more duplicates of annotation by addClassAnnotation. - Look for annotation in all parts of the class. If found just update it. - If no annotation is found then add a new one in public section.
- add BackendDAEOptimize.simplifyIfEquations - move evaluation of parameters with annotation evalute=True to backend - move handling of if equations to backend
- Added Integer index to for-stmt (in DAE and InstTypes) as well as CREF_ITER - This allows us to assign a unique index for each local scope, making it easier to traverse/replace expressions in later phases
- BackendDAEUtil: avoid Zero entries in JacMatrix - fix order in equationToExp for arrayEquations - fix order in createNonlinearResidualEquations for arrayEquations
- Switched CVode as default solver for cpp runtime - removed unused cpp case in SimCode createEquationsForSystems - added test model BouncingBall to cppruntimetest- folder
Pre-vacation code dump: - Added List.accumulateMap. - Replaced InstUtil.print* functions with the template based InstDump. - Lots of connection handling and other fixes.
- set operator type to T_BOOL_DEFAULT for logical and relational operators in instOperator - select the type of the operator if is not T_UNKNOWN in typeExp - more builtin functions - use args instead of pos_args in instFunctionCall (copy/paste error?) - instFunction: add instead of addUnique as get(path) uses a non fully qualified path and it does not work. - do not stop in typeFunction (for functions with unknown dimensions it fails but we should type these somehow, maybe starting from the call arguments). - instEngineV6 gets further but still not working.
- handle some of the builtin functions - handle records - add a Compiler/FrontEnd/TypeCheck.mo for type checking (does nothing for now, more will come later).
- New inst: Added topological sorting of array dimensions, some expansion rules for functions (allow unknown dimensions) - New DAE statement: Array allocation (for new inst only) - TODO: Expansion of statements in functions - TODO: Topological sorting of init statements+array dimensions
add CheckModel.mo: does the Model check without the backendend. Need less memory, should be faster, changes in backend affect less testcases add HashSet.mo, BaseHashSet.mo: copy implementation from HashTable but without a value
- better help for the generated simulation code on -? or -help - support -override x1=v1,x2=v2 -output a,b,c for the generated simulation code which will override the values already in the Model_init.xml file and output a, b, c on the command line at the end of the simulation. - massive OpenTurns connection speedup using Model -override -output (no temp directory generated, etc) - enable full example in testsuite/uncertainties/CantileverBeam_MC-template.py as now it only takes 15 minutes instead of a lot of hours before. - add testsuite/uncertainties/TestModels/ThermoSysPro/package.encoding to circumvent loading errors issues. - delete all generated files in testsuite/uncertainties/CantileverBeam.mos - small fixes to Compiler/BackEnd/OpenTURNS.mo (we should maybe give the distribution order in the OpenTurns OMC API).
- this change is to enable querying of Modelica Standard Library 3.2 which has a class called Code. - changed Code quoting to use $Code in Parser/BaseModelica_Lexer.g + allow $Code in END_IDENT token (to be able to use type $Code end $Code; in ModelicaBuiltin.mo). + changes in Compiler/FrontEnd/ModelicaBuiltin.mo to use $Code instead of Code. + documentation updates in doc/OpenModelicaAPI-Howto/OMC_API-HowTo.tex and doc/OpenModelicaUsersGuide.doc + changes to Compiler/FrontEnd/Dump.mo to dump CodeNode using $Code. + changes everywhere where Code was used to use $Code (.mo, .mos, .onb, .c*) + updated OMEdit and OMOptim to use $Code. + more interactive tests in testsuite/interactive/interactive_api_calls.mos (from doc/OpenModelicaAPI-Howto/OMC_API-HowTo.tex) + show statements in more testsuite/interactive tests. + update the Parser/omcc/* files - removed testsuite/HumMod directory - removed doc/OpenModelica-TortoiseSVN+Putty-HOWTO.doc as is way old and not useful anymore.
ExpressionSimplify.mo: add simplifyList1, condsymplify Expression:mo : add replaceCref DAEUtil.mo: add replaceCref BackendVarTransform.mo: replaceEquations tailrecursive and with less simplify of expressions BackendEquation.mo: add equationSize, equationOptSize, equationLstSize BackendDAEUtil.mo: add equationArraySize, incidenceMatrixScalar BackendDAEOptimize:mo: rename lateInline to lateInlineFunction BackendDAECreate.mo: use inlineVar not inlineVarOpt Inline.mo: do less simplify (simplify not if there was nothing do inline) continue to get rid of wrapper equations
- Added some List utility functions. - Progagate more Absyn.Info in SCodeInst. - Fixed propagation of visibility for extends in SCodeInst. - Added arguments to builtin Connections functions.
- finishing up the OpenTURNS wrapper. - templates in share/omc/scripts/OpenTurns with all the needed stuff - added runOpenTURNSPythonScript to run the python file - everything works fine now on windows, can be easily adapted for Linux! - see testsuite/uncertainties/CantileverBeam.mos - fixed warning in solver/solver_main.c
- minor changes to derivall for tearing - remove depug outputs from tearing - bugfix AdjacencyMatrixEnhanced - dynamic state selection, set start value of contition not static
- updated non-linear systems solving algorithm - changed extrapolation data - added nominal values for scaling - adjusted the strategy of solving - marked some more ThermoSysPro examples as working
-Added generation of covariance matrix to openturns python script. Currently there is a limitation due to insufficient support of records inside vectors, so the covariance matrix must be defined using an algorithm section and the size must be declared as a constant, like this:
- treat each initial_residual with a scaling factor of zero as unscaled initial_residual - [kinsol] switch globalization strategy (applied to the Newton method) to linesearch if the default one fails - introduce scaling for kinsol initialization method - fix invalid free-call after exception (THROW-macro)
- add AdjacencyMatrixTEnhanced - C-Implementation of Matchingalgorithms from Kamer Kaya, Johannes Langguth and Bora Ucar see: http://bmi.osu.edu/~kamer/index.html - improve tearingNew - fix coundOperations -> countOperations - minor changes to dump functions - remove getNumberOfEquationArray, is the same like equationSize - add new dynamic state selection module (not yet finished) - add source info for division by zero - add GraphML.mo (dumps grahml files see http://www.yworks.com, Matching.mo (some Matching Algorithms DFS,BFS,MC21A,PF,PFPlus,HK,HKDW,ABMP,PR_FIFO_FAIR,cheapMatching), IndexReduction (dynamic state selection, Pantelides index reduction)
-Added attribute to builtin classes real and integer for uncertainty distributions called distribution with record definition: record Distribution String name; Real params[:]; String paramNames[:]; end Distribution; -Improved BackendDAEOptimize.removeParameters. Now also visits attributes of builtin classes (needed for uncertainty tests) -Introduced aliases in BackendDAEUtil so you don't have to write so much when declaring new variables from BackendDAE. -Added function BackendDAEUtil.getAllVarLst that retrieves all variables (incl. parameters) from the dae. -Added testsuite folder for uncertainties -Added functions BackendVariable.{setVarAttributes,varDistribution,varHasDistributionAttribute} -Added package Backend/OpenTURNS.mo and begun implementation of python script generation (distributions added) -Added script function buildOpenTURNSInterface(className,templateFile)
- Send enumerations to a function expecting enumerations instead of strings - Use the correct function header - Added bounds checking Thanks to Curt Siffert for reporting the bug
- BackendEquation.mo: add functions equationUnknownCrefs and traverseBackendDAEEqnList - BackendVariable.mo: splitt function createpDerVar in createpDerVar and copyVarNewName avoid side effects in mergeVariables by copy var array
- Added documentation for referenceEq - Made Builtin.mo load MetaModelicaBuiltin.mo using the correct filename+line numbers - Added fileName argument to val()
- added: getShortDefinitionBaseClassInformation(path) -> returns: {} if no base class or no short definition or not found or {path, ""|"flow", ""|"stream", "unspecified"|"discrete"|"parameter"|"constant", "unspecified"|"input"|"output", {dimension}}
- removed start-values from initial_residual - moved lambda from initial_residual into SimulationRuntime - split initialization up into several files - provide information inside SimulationRuntime whether start/nominal values are used or not - some minor fixes
- Cleaned up checking of connector types and added warning for connecting two sources. - Moved visibility attribute from DAE.Var to DAE.Attributes. - Removed direction prefix from components created by expandable connections, since we can't determine them reliably yet. - Other minor fixes to connections.
- Run convert lines perl script on Model_functions.c file as well. - Don't generate #modelicaLine and don't run convert lines perl script unless user sets +d=gendebugsymbols flag or the grammar is MetaModelica.
Compiler/susan_codegen/SimCode/CodegenFMU.tpl - fix the FMU linking on Windows to Sundials Makefile.omdev.mingw - copy only the .a from OMDev Sundials to not use .dlls
- NOTE: update OMDev from Subversion! - fix the broken compilation in Windows (add the OMDev/lib/3rdParty/Sundials/include in the proper places) - use copy -pu to only copy newer files - get rid of omdev_qtdeps as they are no longer needed since a while now because sendData is no longer. - include events.h in initialization.c for initSample function and add the proper include flag. - copy the Sundials libraries to build/lib/omc as they are needed by the generated simulation code (initialization) and they also should be part of the new OpenModelica build.
- improved Backend compile time for big models with many parameters a lot. +BackendDAEUtil.mo - shifted evaluation of depending parameters to runtime as it's much faster than at compile time. +SimCode.mo - actually nothing. +BackendVariables.mo - removed a sorting function for translateDAE instead sort by merge sort from List module. It scales much better.
- compareSimulationResults: report vars in case of file not equal and print error messages if command failed - msl31/simulate: delete all generated files
- created PastOptModules for Symbolic Jacobain and Symbolic Linearization. They can be actived by "generateSymbolicJacobian" or "generateSymbolicLinearization" - Imporoved the performance of generating sparsity pattern - added therefore symbolicJacobian to BackendDAE
- undefine macros if they exist because we really need to replace them in that context because the already defined ones contain references to undeclared variables.
- improve handling of complex equations - improve evaluation of parameters with Evaluate=True annotation - add built in functions to set machtingalgorithm - update testsuite
SCodeInst fixes: - Improved instantiation/typing of equations. - Handle deleted components in connections. - Improved propagation of prefixes, now also propagates class prefixes.
- Fixed isReplaceAble API. - Added testcases for some APIs. - Added French & Romanian to language dropdown. - Moved the translations file to OMEdit/OMEditGUI/Resources/nls/.
- BackendDAE.mo: add Comment - extend Backend pipeline with functionalety to select matching algorithm - Bugfix for DynamicStateSelection, in function BackendEquation.equationAddDAE do not throw incidenceMatrix away - add function BackendVariable.daenumVariables, return the number of Variables in BackendDAE
- PTII environment variable not required anymore. - Changed PTII to OMPTII. - Removed OMPython-UserManual. OMPython documentation is moved to OpenModelica usersguide.
- fixed "setParameterValue" API in Interactive.mo to update the program. - added tests for this functionality in testsuite/interactive/interactive_api_param.mos
- fix so that loadModel works fine; geez, this was a weird one, libModelicaExternalC.a re-defined (badly) opendir, readdir and some other dirent.h functions, but MinGW already has them. This made SystemImpl__getLoadModelPath to fail.
- Renamed members of DAE.RANGE to something sane. - Added various List.threadMapReverse functions. - Added BaseHashTable.addUnique. - Instantiation/typing improvements for equations in SCodeInst. - Various other SCodeInst improvements.
- Changed the Dependency+SCode+Inst calls everywhere to: + CevalScript.runFrontEnd(...), which does more error-checking - Removed Inst.{instantiate,instProgram} as they are not needed (they were used to inst the last class of the program; which can be performed by asking for the last class of the program and instantiating that)
- optimized fmi-export calculations - added support input and output vars for fmi-import and a test-case - added a better flow control for fmi-import models
- Also look for package.encoding in the library directory if the file is a mo-file and not a directory of its own + Note: This affects all packages stored as file in this directory
- Added option to loadFile(..., encoding="ISO-8859-1"), to convert from one encoding to UTF-8 - loadModel(): Added support for package.encoding (OM extension)
- force UTF-8 encoding in project: .settings/org.eclipse.core.resources.prefs - get rid of tab in Compiler/runtime/SimulationResultsCmp.c - fix expected output in failing tests in testsuite/libraries/msl31/simulate/*
- BackendDAEOptimize.mo: improved Aliasvar selection, check if var is generated by omc (Dummer_der) and prefer other candidate - SimulationResultsCmp.c: prepair all to report vars with different values in time @Adrian: ToDo: return string with variables - Update msl3.1/simulate examples - add check for NAN while divide, torn on with define CHECK_NAN
- Fixed some path issues. - Generate two packages OMPython and OMPythonIDL. - Generate _OMCIDL instead of a very generic name _GlobalIDL. - Fixed Popen problem. - Write omc output to a log file.
- Added simplify all expressions before/after optimization phases - Removed odd hacks that assume Expression.isConst is actually Expression.isConstValue + The difference is that you need to simplify a const non-value for it to become a value
- add new heuristic to Compiler/BackEnd/BackendDAEOptimize.mo if two aliases have different start value choose the one more closer to the top of the instance hierarchy. - add ComponentReference.crefDepth in Compiler/FrontEnd/ComponentReference.mo' - fixed testsuite/mosfiles/nonConstantParam.mos output
- Added crefs to linear systems in the simulation info (same as for non-linear systems) - Added system sizes to the description of linear and non-linear systems
+ Merging the parallel extensions. + Traversal and analysis of parallel for loops. Checks all component references in the body and makes sure they are valid. + parallel and kernel functions are handled in the Front-end now. + parallel variables are handled in the Front-end now. - some checks and restrictions remain, but nothing that affects the normal OM compilation. * so far so good.
- BackEnd/BackendDAETransform.mo: remove some unused matches, cleanup code - BackendDump.mo: new function debugStrCrefLstStr - SimulationResultCmp: use C style comments - add flag "stateselection" to dump selected states of the model, use it with flag "backenddaeinfo" - fix CMakeList files - read_matlab4: - improve reader, read now also latest dymola files with single pressision
- implement new remove simple equation modules (removeSimpleEquationsFast,removeSimpleEquationsPast) speed up around 40% for backend - use IncidenceMatrix BackendDAE.SOLVABLE for Matching - function vararrayList is protected use BackendDAEUtil.varList - fix tests
- Expected output - Removed support for type-conversion from integer to enum * Note: Integer literal to enum is still in use. It will be the next to go, but MSL needs some more updates
- replace array constants with their binding (maybe we should only do that for package constants). - added testsuite/3rdParty/TestMedia [from Francesco Casella] which now works to simulate too. - 17 more Modelica.Media models now work, 3 left. NOTE HOWEVER that simulation fails in some cases due to divisions by zero or other issues, but at least the models compile.
- add Incidencematrix type SOLVABLE - add compleqs to traverseBackendDAE and checkBackendDAE functions - use traverseBackendDAE in PartFn -> easier maintainance - more information if createOdeSystem fails
- force inline again for complex equations but check function has only one assignment - check while inline if all inner variables are replaced - 3 Media tests back in game
Fix for bug #1705 #1706 - Added the flag to set plot silent +plotSilent=true (if true then outputs the data instead of showing the OMPlot). - Some fixes for OMNotebook plotting. - Fixed the file saving issue.
Modified the generated Makefiles for models. - "clean" should not be a dependency for the main target. If we have multiple threads making the target then they will try to clean and compile at the same time. - do "clean"s explicitly - Made sure that *_records.c is compiled always. (i.e. The executable will be compiled too) - Also the main target(executable) should be dependent on ModelName_functions.c since this is not compiled separately but is included in the ModelName.c file.
- Implemented filtering of duplicate extended components in SCodeInst. Needs more work, just assumes all elements are equal right now. - Fixed handling of conditional components that contain other conditional components.
- check subtyping of T_ARRAY(dims = list_of_more_than_one) as we can really get these types now after the removal of DAE.ExpType. - don't be lazy and do better checking in Inline. - testsuite should be ok now? Hudson will tell us :)
- Fix OMOptim Compilation. - Don't add \ at the end of the last item in .pro file. - Build OMOptimBasis in the bin directory of OMOptim. - Added OMOptimBasis to OMTools.
+ Merging the parallel extensions. + parallel and kernel functions are handled in the Front-end now. + parallel variables are handled in the Front-end now. - some checks and restrictions remain, but nothing that affects the normal OM compilation. * so far so good.
- Added support to parse line/block-comments as class elements (similar to annotations) - Any comment in an expression is moved out of the element and put on its own line
- Added rule exp[] => exp (ASUB'ing nothing does nothing) Finds diff like the following for Modelica.Media - 190.56[],0.01604246[],9.86e-05[],0.011[],0.0[] + 190.56,0.01604246,0.0000986,0.011,0.0
- Added rules for string and boolean relations (==,<>,>=,>,<,<= where applicable) - Added rules for element-wise matrix mul,div,pow - Added rules for element-wise vector pow - Added rule for {} X => {} (for certain operations)
- Changed structure for storing the result from SCodeInst from lists to a tree. - Added new phase, SCodeExpand, which expands the result from SCodeInst into a DAE.DAElist. - Implemented inner/outer support in SCodeInst, not complete yet.
- GOT RID OF the old trunk/c_runtime and old templates SimCodeC.tpl/SimCodeFMU.tpl - HIGHLY RECOMMENDED make clean - renamed SimCodeXXX.tpl CodegenXXX.tpl - merged the needed things from SimCodeC.tpl into CodegenQSS.tpl. - all tests except the usual mishaps go. - targeted all trunk/c_runtime references used in Makefiles / C (Qt OMPlot) / Other files to their SimulationRuntime/ counterparts.
- Collected all function kind restrictions(normal, external, operator) in to one restriction with its own attributes. R_FUNCTION() -> R_FUNCTION(FunctionRestriction), FunctionRestriction(FR_NORMAL_FUNCTION, FR_EXTERNAL_FUNCTION, FR_OPERATOR_FUNCTION, FR_RECORD_CONSTRUCTOR) This will also help for more compact function handling when the ParModelica parallel and kernel functions are added. + Added FR_RECORD_CONSTRUCTOR restriction to SCode so that we can handle record constructors differently.
+ Merging The parallel extensions. + parallel variables are handled in the Front-end now. - some checks and restrictions remain, but nothing that affects the normal OM compilation. * so far so good.
- Add more realtime timers and an internal scripting query so we can ask for approximate timing in a mos-file even if the API call does not return the times
#1687 - added some algorithm fixes - added algorithm without output vars nevertheless to the solved system. (See Bug 1687) - fixed Bug 1687 - fixed algorithm to initial the lhs values by - A non-discrete variable is initialized with its start value (i.e. the value of the start-attribute). - A discrete variable v is initialized with pre(v). - removed functionAliasEquations, since it contained only algorithms without output vars - fixed CodegenC LHS cast value
- Added scriptable API functions: isPartial isModel regularFileExists - Added script BuildModelRecursive.mos to systematically try to build every example in MSL
- Don't close the simulation result set since we have a caching to mat format. - closeSimulationResultFile() :: Closes the current simulation result set. OMEdit uses it for windows to close the result file. - some minor fixes in OMPlot.
#1681 - Add an error message when Lookup.lookupClass(msg=true) is used - Made msg=false for some functions that assume msg=true generates no error-message (they were all written by gremlins who hacked the system during the night)
- Added applyOptionOrDefault and applyOptionOrDefault1 to Util. - Added Util.nextPrime to find the nearest larger prime number to a number. - Added printGraph and printNode to Graph, useful for debugging graphs. - Cleaned up BaseHashTable by declaring all hashtable types as package types.
- compile the c runtime with debug symbols. - changed the -ggdb flag to -g. - Updated the version numbers in .onb, .doc, .pdf and config.h file. - some small changes in the Users Guide chapter 10.
- port the changes to meta and GC to the new runtime. not on yet and not all changes added. - some fixes to linking for FMI on windows - do not set the x=x before tailcall. - fixes to the new runtime to be able to compile using VS - use the safe real (union of words).
+ Support for overloading of Modelica element-wise operators. Now these are deduced from the scalar versions whenever necessary. + Normal operators can also be vectorized now if there is no other option. That is: when there is no exact match found for operating on arrays but there is/are some for corresponding scalars. + This is full support for operator overloading. + There are some deviations from the Specifications. See comments in testsuite/records/OperatorOverloadComplexArray.mo and Static.mo
- removed redundant equations for initialization - removed unused code - renamed SIMCODE attribute initialEquations to startValueEquations (in order to avoid confusion)
- geClassNames accepts a new named argument showProtected to list the protected classes. getClassNames(Modelica.StateGraph.Interfaces.PartialStep) => {} getClassNames(Modelica.StateGraph.Interfaces.PartialStep, showProtected = true) => {OuterStatePort} - checkAllModelsRecursive also accepts a new named argument checkProtected to check the protected classes as well. - visualize API now calls the OMVisualize.exe by passing it the visualization filename and the result filename. OMVisualize will be added to trunk soon. - some other minor fixes.
- added graph coloring algorithms to utilize the sparse pattern for a faster evaluation of the analytical jacobians - usage by solver method="dassljac"
+ Small fix for slowly failing expressions due to search for overloaded operators + Always Print 2 digit exponents when running testsuite. exponent digit differences between Windows and Linux. 1e005 vs 1e05 makes actual mismatches easier to locate.
+ Fix for missing parameter passing for records. Bug #1675 + Fix for missing bindings for records with classmod modifications on output variables. + Fix for constant evaluated bindings to default values for record to record assignments.
- Fixed List.toString so that it always prints out the list name. - Better handling of modifiers in SCodeInst. - Partial implementation of variable typing in SCodeInst. - Various other SCodeInst changes.
Bug [# 1678] fix return value for Modelica.Blocks.Tables.CombiTable2D if input signal is out of bound - add warning if other smoothness than LinearSegment is used
- Make it an error if we fail to fully load a library (if a within-statement is fault for example) - This was previously printed to stdout and silently ignored
fix for bug Bug [# 1608] - functions with inputs (parameters and discrete) have zero derivative - Derive, BackendDAEUtil, BackendVariable - BackendDAETransform: update Debug code
- Forbid subscripted arrays. They are an OM extension and have been removed from the Modelica specification (and not supported by Dymola), and will not be supported in the new instantiation. They are therefore disabled now, to discourage any further usage of them. - Added Absyn.Info to Absyn.MODIFICATION and SCode.MOD to allow better error messages for modifiers. - Changed SCode.REDECL to have a single component instead of a list, since you can only redeclare one element at a time. - Implemented handling of modifiers in SCodeInst.
- GenerateDoc: Use an html-parser in perl to (much slower) replace modelica:// links (but doesn't replace documentation that tries to tell the user how modelica:// should work) - Added version annotation to ModelicaReference - Send symbolTable in elabCallArgs (so now we can call writeFile(getSourceFile(M),list(M)), etc
Added interface for ReduceDAE algorithm -SimCode.mo: added args input for removeTerms algorithm in translateModel, generateModelCode and createSimCode -SimCode.mo: added labels for generateLabeledDAE algorithm in ModelInfo and createModelInfo -Flags.mo, Config.mo: added configuration flags and wrappers for generateLabeledDAE and removeTerms algorithms -CevalScript.mo: changed compileModel from protected to public -Interactive.mo: added cases for generateLabeledDAE and removeTerms algorithms in evaluateGraphicalApi_dispatch -SimCodeCpp.tpl: added template functions for ReduceDAE algorithm
- GOT RID OF ALL ASSIGNMENT TO INPUT FROM THE COMPILER please run testsuite/bootstrapping/MainTest.mos always before commit! or the testboot make target (which is the same) - used the strict double with padding from RML (a union instead of directly the double) - refactored a bit the GC and added the generational GC (not on yet) DO NOT PORT IT TO SimulationRuntime/c yet, i'll do it myself later. - use the old realString for Windows for now - removed Windows.h include from modelica.h - stop generating junk in OMDev\tools\mingw\bin (fixes in Compiler/scripts/Compile.bat) - fixes to some tests - some fixes so that the bootstrapping works with VS.
+ Operator overloading for OpenModelica +Precedence RA + RB 1- Left side -> RA.'+'(RA, RB) IF NOT THEN 2- Construct right side -> RA.'+'(RA, RA.'constructor'(RB)) ELSE 3- Right side -> RB.'+'(RA, RB) ELSE 4- Construct left side -> RB.'+'(RB.'constructor'(RA), RB) ELSE FAIL
- getComponents API now takes a named argument useQuotes, getComponents(M1); // returns the result in the same old format getComponents(M1, useQuotes=false); // returns the result in the same old format getComponents(M1, useQuotes=true); // returns the list of strings with all elements enclosed in quotes. - Some new API calls, + isEnumeration(M1) // returns true/false + getEnumerationLiterals(M1) // returns the enumeration literals as list of strings. + getNthComponentCondition(M1,1) // returns the Nth component condition. + isReplaceable(M1, "withinClass") // returns true if withinClass is replaceable.
OMC - Changed the omniOrb message size limit to 2GB. - Changed the getComponents API output. Now all elements are enclosed in quotes. - New API calls added. + getAnnotationCount(M1) // returns the number of annotation in the class. + getNthAnnotationString(M1,1) // returns the nth annotation string. (non flattened annotation). + getClassComment(M1) // returns the class comment + getComponentComment(M1, x) // returns the component comment. Takes the class name and component name. OMEdit - Added the new method unparseArrays to parse the omc arrays based results. - Updated code to accommodate new format of getComponents.
- Call Static.canonCref before prefixing the cref in InstSection.instAssignment2, to get rid of some failtrace. - Changed unbalanced connector warning to an error.
- Rename redeclared class declarations in InstExtends.updateComponentsAndClassdefs2 so that their names are correct. - Stop iterating in Inst.matchModificationToComponents when we get an empty modifier. - Added another Siemens test (not working yet).
- YOU WILL NEED TO UPDATE YOUR OMDEV FOR THIS! - fix iconv.h header and systemimpl.c - do not copy the libiconv-2.dll as we now link with the static one.
HUGE update to SVN with *a lot* of changes: DO MAKE CLEAN! ========================================================== - The DAE.ExpType is *no more* - The BackendDAE.Type is *no more* Both got replaced by DAE.Type! - The DAE.ExpVar is *no more* It got replaced by DAE.Var! Now we have *ONLY ONE* type in the compiler: DAE.Type!
- Added flag +d=checkSimplify, which tries to estimate if the simplified expression is actually simpler (usually the case) or not (more common than it should be)
[newSimulationRuntime] - removed old globalData object - adjust most files - most test cases are working now (only some fails most due to different output) - more work on initialization needs to be done
+ Merging The new parallel extensions. The new keywords can be enabled by using +g=ParModelica. Actually enabling +g=MetaModelica also enables the ParModelica keywords, but not the other way around. I couldn't find a way to enable them completely separately. I will fix it if I can. But it will not cause problems since the new keywords are not common words. The testsuite didn't report any errors related to the new keywords. But just make sure not to use them from now on while programming in MetaModelica. + The keywords don't have any effect now. They are just consumed by the parser. + the keywords are - parallel - parglobal - parlocal - parkernel - parfor
+ Merging The new parallel extensions. The new keywords can be enabled by using +g=ParModelica. Actually enabling +g=MetaModelica also enables the ParModelica keywords, but not the other way around. I couldn't find a way to enable them completely separately. I will fix it if I can. But it will not cause problems since the new keywords are not common words. The testsuite didn't report any errors related to the new keywords. But just make sure not to use them from now on while programming in MetaModelica. + The keywords don't have any effect now. They are just consumed by the parser.
- Changed instClassDecls to not filter out the class to instantiate, since this causes problems when instantiating a top model. - Added test cases to test the fix.
- YOU WILL NEED A NEW MMC-RML for this (>= revision 223)! svn up OMDev on windows, svn up rml on Linux or wait for a build. - moved setStackOverflowSignal to RML. - various other fixes so the bootstrapped compiler works with MSVC. - hashtable for DaE.Type -> DAE.ExpType (unfortunately doesn't work to use it in Types.elabType as is slower than the current solution) - removed the above hashtable from the compilation as is not used. - other small code edits (mostly comments).
- Changed behaviour of setCommandLineOptions, which now appends debug flags instead of overwriting them. +d=-flag can now be used to disable a flag instead. - Updated MetaModelica exercises.
- Removed operators from DAE.mo: scalar .+ array => array .+ scalar array .- scalar => array .+ (-scalar) scalar .* array => array .* scalar These are equivalent and reduces the code we need to maintain (duplicate cases, etc)
- FMI fixes: + run unzip in quiet mode (no more file names) + do not exit in freeElement with EXIT_FAILURE, just return as we need fmiimport to exit with code 0. - updated tests.
New compiler flag handling: - Removed RTOpts and OptManager packages, which are replaced by Flags and Config. - Updated all source files to use the new flag handling. - Split Parser into Parser and ParserExt, so that extra arguments can be sent to the external functions. - Added some string manipulation functions to Util.
[newSimulationRuntime] - switched completely to new structure - adjusted solver(rungekutta, euler), eventHandling, input and results - changed rotation direction of the ringbuffer remains TODO: initialization, dassl, algebraic systems, minor bugfixes
- include the modifiers and dimensions in the dependency analysis in Inst.instElementList - move annotation checking functions from DAEUtil to SCode. - convert type of the Value in the binding if needed (to get rid of things like min = 0, instead of min = 0.0) - in partial instantiation disregard parameters, instantiate only constants. - rename the really bad name "subs" to restCref in Static.elabCrefSubs. - clear errors when loadingFileInteractiveQualified API and parseFile API - added vaporizing.mo test
- check for connect(A, A), give a warning and ignore it! (a model from VI-Grade contained something like this). - added testsuite/mofiles/ConnectTheSameConnector.mo to test it.
- fixed memory pool (init states both in the generated code and in the executable!). - do not cat the testsuite-trace.txt as it can be very large and kill eclipse.
- Don't enter base classes that the lookup is coming from in SCodeLookup to avoid infinite loops when extending a base class further down in the environment. - When doing dependency analysis on an extends clause, remove it from the environment so that we don't look it up in itself.
- YOU WILL NEED A NEW RML FOR THIS: Windows (svn up on OMDev), Linux (svn up and compile or wait to update to a new one). - do NOT die if there is a stack overflow in Inst.instantiateClass, continue on. try this script with the Buildings library: loadModel(Buildings); getErrorString(); instantiateModel(Buildings.Airflow.Multizone.Examples.NaturalVentilation); getErrorString(); 2+3; 5+6; ------------ you will get something like this ----------- SCodeLookup.lookupSimpleName SCodeLookup.lookupSimpleName2 SCodeLookup.lookupInLocalScope Stack overflow! Failing the current function stack chain until the stack overflow signal is caught! "" "Error: Error occurred while flattening model Buildings.Airflow.Multizone.Examples.NaturalVentilation. The compiler got into Stack Overflow!" 5 11 - OMEdit will no longer die (but will not display parts of the model).
- pushd doesn't understand any string with forward slashes, use cd instead. - add more info to the log files so we can debug a bit if needed. - force just the paths we need and NOTHING else.
- Fixed stack overflow in IncompressibleFluidNetwork by only updating untyped modifiers in Inst.updateCompeltsMods. - Filter out unique outer crefs in InnerOuter.printInnerDefStr to get better error messages. - Added List.unique and List.uniqueOnTrue.
- re-enable the SCode.DERIVED case in the Inst.instClassdef2 as it gives way better function names (correct environment) and error locations. also, we would have a function name clash in the function tree if we have two short class definitions with the same name, same base class, but different modifiers! - for SCode.DERIVED elaborate the modifiers in the parent scope both for full and partial inst! this fixes the error for derived functions with modifiers. - better location in call to Inst.matchModificationToComponents. - get rid of some commented unused code.
- Fixed stack overflow in HeatingSystem fluid model by replacing Static.buildExpList with List.fill. - Improved List.fill a bit by only checking bounds once, and printing a failtrace instead of using print if the count is negative.
Fix for function modifiers: - Added source info to unbound parameter warning in Static.elabCref2, since it doesn't cause any real problems anymore. - Added a case to DAEUtil.bindingExp to use the evaluated expression if it's available. - Commented out the case for derived classes without array dims in Inst.instClassdef2, since it solves some problems and makes the compiler faster. - Added test case mofiles/ModifyFunction1 to test function modifiers. - Updated test suite.
- do not evaluate functions if we do partial instantiation - handle smooth in Derive.mo (needed for Modelica.Media) - replace constant with binding even if you cannot constant evaluate - BackEnd/BackendDAECreate.mo (fixes to make some Media models simulate) + force inline of record = functionCall(...) in complex equations + handle normal equations in extendRecordEqns (as we have a recursive call) - split function evaluation/generation outside of Ceval.cevalCallFunction to be easier to manage.
- Added a flag to OMC, +std, to set the Modelica language version to use. API calls setLanguageStandard and getLanguageStandard are also implemented for this. - The Modelica language version is now set automatically if a specific version of the MSL is loaded, and gives a notification if the version has changed. - Added new package RTOptsData, which contains data types and some functions which can't be in RTOpts since RML doesn't allow mixing external and non-external things. - Turned on error messages for replaceable base classes if Modelica version is at least 3.0. - Turned on balance checking of connectors if Modelica version is at least 3.0. - Updated test suite, and added a new test case redeclare/ReplaceableBaseClass.
- Moved get/setSourceFile to ModelicaBuiltin.mo - Slightly changed their output (from Ok/error to true/false and filename to "filename") - Updated OMEdit to consider these changes
- Fix binaries directory of FMU to linux32,linux64 as in the FMI spec. We use the openModelicaPlatform() name on unspecified platforms (i.e. darwin-x86_64)
Fixes for bug: #1637 - commented out the first case in Static.makeIfexp (thanks to Martin for pointing it out). case (cache,env,e1,DAE.PROP(type_ = (DAE.T_BOOL(varLstBool = _),_),constFlag = c1), e2,DAE.PROP(type_ = t2,constFlag = c2),e3,DAE.PROP(type_ = t3,constFlag = c3),impl,st,_, _) equation true = Types.semiEquivTypes(t2, t3); c = constIfexp(e1, c1, c2, c3); (cache,exp) = cevalIfexpIfConstant(cache,env, e1, e2, e3, c1, impl, st, inInfo); then (cache,exp,DAE.PROP(t2,c)); - all tests go.
- Fixed record component assignment in CevalFunction. - Removed nogen and noevalfunc flags from fluid tests that don't need them. - Removed some unused code.
- disable instantiation as basic type for anything other than type and connector (causes 1 test to fail). - some fixes for expandable-expandable connection (should be the union of all of them).
Fixes to FMU (mingw commands conflicting with Windows commands) - force cmd.exe to choose mkdir.exe instead of mkdir - use && instead of ; for command separation.
- SIGUSR1 not really defined in windows. - use systemCall instead of spawnCall. - Removed the FMI bin and include folders. Not really needed. - the fmuModelica.tmp is used as fmuModelica.h. check the make file.
- FMI Import updated. - Added the new importFMU API. - fmuWrapper.o is removed. - fmi section is added to the makefile.Common. - build fmi in order to get the executable and required files.
- media fixes (allow instantiation of partial functions for now) until we can check if a class is basic type before we do the damn instantiation - we cannot fill all slots if the function has extends in it so SCode.getElementName will fail, so don't check if ALL the slots are filled in Static.elabCallArgs2 - most of Media models flatten now, we still have to test them a bit - we have one failtest in plus now due to these changes.
- Allow connectors to inherit from records. - Removed the ModUtil package, because it mostly contained duplicates and unused functions, and had a confusing name. The only three functions that were used (pathEqual, innerOuterEqual and pathStringReplaceDot) have been moved to Absyn instead.
- New visualize2 API. - writes the file .visualize with the information about the visualization objects. - Later it needs to be extended to call the visualization tool and then pass the simulation result file and .visualize to it. - removed an extra print from getElementName. - OMEdit: the modelbrowser window take less area now.
- SimCode.mo do not use listReverse on libs as List.union does not reverse the list anymore. this is needed to fix the wrong library order for linking. - update to version 1.8.0
- Added API call reopenStandardStream(OpenModelica.Scripting.StandardStream.stdin,"program.txt"); for MM course + This way, we do not need to redirect stdin in eclipse
- update to MinGW gcc 4.4 (use -static-libgcc to not require additional gcc .dlls) - SCodeUtil: check for duplicates separately in absyn and loaded builtin functions (to allow MDT to load the builtin files without issues).
- Fixed some issues with elaboration of the matrix operator. - Changed Static.elabMatrixToMatrixExp to only convert 2-dimensional arrays to matrices. - Fixed some type issues and added type checking of empty arrays. - Added Types.verifyExpressionType which can be used to check that the type of expressions is correct. - Moved Epidemics1 and DimConvert from failing tests to working tests in mosfiles, and corrected some invalid tests.
- revised generation of jacobian matrices - now they are generated column-wise(speed up while compilation) - expand BackendDAE with a type - add some debug flags for jacobians in dassl
- Added check for unused variables in the partitionIndependentBlocks optimization module and enabled it by default (it simply does these checks for now; it does not partition the system)
- Made the dumping of external declarations better. - Changed so that only constant complex equations are constant evaluated in InstSection.instEqEquation2. - Added handling of integers in omc-diff, so that integers are compared exactly (otherwise we allow a relative error for line numbers in errors).
#1610 - Rewrote the ANTLR parser to use END_IF END_FOR, etc tokens in order to produce sane error-messages + Note: 'end /*EVIL COMMENT*/ if' will no longer work due to lexer conflicts
#1597 - DAE.MATRIX refactoring (it now has a Boolean scalar instead of storing this with each element in the matrix). The matrix was also renamed from scalar to matrix as this is more appropriate.
- getTypeOfAny modified for record type. Instead of returning the complete record it only returns the record name. - getRecordElementName to return specific element name on request.
- call main_initialize from fmu::fmiInitialize - generate modelname.def for dll generation to export only necesary functions - generate for fmu only modelname.c modelname_record modelname_functions - small changes to simulation_init and solver_main to avoid linker problems
- BackEnd refactoring: Grouped the common fields in the DAE into a single uniontype to ease sending only these to functions without tuples, multiple inputs, etc
- BackEnd refactoring: Now uses list of equation-systems instead of only one - No optimization module, etc can handle this yet (only lists of length=1), but this will change soon enough
- New preOpt module stub: partitionIndependentBlocks + Finds independent blocks of equations (and does nothing with them except prints a pretty dump if more than 1 block was found)
#1407 - OpenModelica extension: Functions now accept "parameter input" and "constant input", which simply requires an argument to be a parameter/constant expression
#1420 - Added initial support for sharing array constants (stored as pointers instead of being constructed at each reference) + Currently only done for called functions, but will be extended to simulation code
- API CHANGE for getNthConnectionAnnotation. It was only working if connection annotation starts with Line primitive, but now it will return the list of all annotations. ------------------------------------------ - Test (see new output below): ----------- test.mos --------------------- loadModel(Modelica); getErrorString(); getNthConnectionAnnotation(Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot, 6); getErrorString(); getNthConnectionAnnotation(Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot, 9); getErrorString(); adeas31@IDA-LIU085 /c/OpenModelica/trunk/build/bin $ omc.exe /c/TestModels/test.mos true "" {Line(true,{0.0,0.0},0,{{-5.0,35.0},{20.0,35.0},{20.0,14.5},{33.5,14.5}},{0,0,0},LinePattern.Solid,0.25,{Arrow.None,Arrow.None},3,Smooth.None)} "" {Text(error), Line(true,{0.0,0.0},0,{{-80.0,-10.0},{-79.0,-10.0},{-79.0,-15.0},{-62.5,-15.0},{-62.5,-45.0},{-25.0,-45.0}},{255,204,51},LinePattern.Solid,0.5,{Arrow.None,Arrow.None},3,Smooth.None)} "" ------------------------------------------ - The output shows Text(error) because OMC was unable to elaborate graphics expression of such kind :: connect(controlBus.axisControlBus2, axis2.axisControlBus) annotation ( __Dymola_Text( string="%first", index=-1, extent=[-6,3; -6,3]), Line( points={{-80,-10},{-79,-10},{-79,-15},{-62.5,-15},{-62.5,-45},{-25,-45}}, color={255,204,51}, thickness=0.5));
- Removed cref filter argument in call to Inst.instClassIn in Lookup.lookupVarInPackages. This makes the whole test suite ~35% faster, and some media tests ~97% faster. - Updated test suite.
- Fix code generation of ASUB(ASUB(...,x),y), by making ASUB(...,xy) instead - Previously, we created one case for integer asub, one for 2d integer asub, etc... But forgot mixed int and enum asubs... The new code should work for any dimension, and any mix of asubs - Testcases were updated because we print [1,2] instead of [1][2]
#1574 - Fixed indexing using non-constant subscript in simulation context - Also, made this fast by indexing the double* directly instead of creating an intermediate array+vararg addressing
- Code generation: Create an array of (void*) for temporary boxed types - This should speed up garbage collection a lot, especially if the runtime is rewritten to store (void*,size_t) instead of just (void*), since then push/pop are faster
- Added check for unused input variables in external functions - Also added a disabled implementation for regular functions, which has some quirks left to solve (and lots of problems to fix in the compiler sources)
- BackendDAEOptimize.mo: move equal code in one function - BackendDAETransform.mo: update dynamic state selection (passes now testsimulation, not all with same results as old method but all simulate :) )
- Fix an additional test for bootstrapping by making RML output NaN regardless of platform - Note: This requires RML r213 to work, but should mean the testsuite will work on both OMDev and Linux (previously only Linux worked fully)
#1520 - Added check for shadowed function input variables before performing tail recursion optimization - Removed all such occurances from the compiler sources
#1520 - First working tail recursion testcase - Limited to the last statement being an assignment to a recursive call; but adding if-statements, if-expressions and match-expressions should be a minor addition
- Removed some debug prints in Types.removeMod, which made the test suite about 20% faster. Some of the larger Media models became almost 40% faster. - Updated some tests due to the previous SCodeDump changes.
- Added API call saveTotalSCode to dump the result of SCodeFlatten to file. - Use the +showAnnotations flag in SCodeDump to determine whether to dump annotations and comments or not.
- Fixed lookup of components in constant class array instances again, but correctly this time (I hope...). - Updated Modelica.Media test. - Changed test mofiles/EndIllegal to status incorrect.
- Added flag to Inst.instElement to ignore failed elements, which is used by Inst.partialInstClassIn to allow Lookup to find elements in packages that contain components with unknown dimensions. - Updated test suite.
- BREAKING 16 tests in the testsuite with this commit: ==== Log /tmp/omc-rtest-adrpo/biochem/log-BiochemModels.mos ==== Log /tmp/omc-rtest-adrpo/bootstrapping/log-SimCodeTest.mos ==== Log /tmp/omc-rtest-adrpo/interactive/log-Rename.mos ==== Log /tmp/omc-rtest-adrpo/mofiles/log-ArrayModification13.mo ==== Log /tmp/omc-rtest-adrpo/mofiles/log-Constant9.mo ==== Log /tmp/omc-rtest-adrpo/mofiles/log-Discrete2.mo ==== Log /tmp/omc-rtest-adrpo/mofiles/log-Modification9.mo ==== Log /tmp/omc-rtest-adrpo/mofiles/log-Overwriting3.mo ==== Log /tmp/omc-rtest-adrpo/mofiles/log-Overwriting4.mo ==== Log /tmp/omc-rtest-adrpo/mosfiles-nosim/log-FinalTests.mos ==== Log /tmp/omc-rtest-adrpo/mosfiles/log-BuiltinMath.mos ==== Log /tmp/omc-rtest-adrpo/mosfiles/log-CheckEvents.mos ==== Log /tmp/omc-rtest-adrpo/parser/log-CheckSourcesForTabs.mos ==== Log /tmp/omc-rtest-adrpo/parser/log-ParseCompilerSources.mos ==== Log /tmp/omc-rtest-adrpo/redeclare/log-RedeclareFunction.mo - i will fix them in the next days (they are not that problematic) - quite big commit, some fixes for Media 255/26 instantiate/check now. i'm still loosing redeclares in some cases (mostly weird restrictions like connectors), i'll do some more chasing for redeclare mods in Inst in the next days. - running the Media testsuite with nogen and noevalfunc (for now as even so takse ~10 minutes) will fix function problems later. - plenty of other new stuff: + some partial Graph implementation Edge.mo, Element.mo, Instance.mo, Node.mo, Reference.mo, SCodeGraph.mo, Visited.mo + general stuff Scope.mo, Name.mo, NamePool.mo, Relation.mo (moved to Util), more stuff in AvlTree.mo + global data structure which could be used anywhere (Global/Global.mo) + collecting all files in SimCode.mo (i had also send them to templates, but i will not push those changes as the templates get more complicated). - added Values.EMPTY and DAE.EMPTY to be returned when we do not have bindings. - many more things i forgot about.
- Implemented constant evaluation of Lapack external functions. - Fixed dimension count in cat_alloc_real_array for less division by zero. - Added test case Modelica.Math.Matrices.LAPACK to test Lapack functions. - Updated test suite.
Fixes for BUG: #1370 - Compiler/susan_codegen/SimCode/SimCodeC.tpl + fixed iterators for functions not returning anything (added empty) + added more comments to the C code to understand where are things coming from (we can remove them later) + changed the order in which we evaluate function arguments and function variable declarations + changed the order in which we evaluate external function: vardecl->bivar->extArgs. + removed duplicates in the list map of extFunCallVarcopyF77 + changed handling of default value in extFunCallBiVarF77 + fixed handling of modelica_string send to Fortran (should not be prefixed by &) + changed algStmtTupleAssign to have a preExp and afterExp (before the preExp in writeLhsCref was never unparsed anywhere as <%preExp%> was before it??!!) + scalarLhsCref used daeExpCrefRhs??!! which was rather totally wrong for anything besides scalar component references; now it uses a new daeExpCrefLhs which has the causality reversed (for some parts as I haven't implemented all cases). + all *Lhs* templates now take an afterExp buffer instead of preExp to do more things after the actual statement (such as array slicing, etc); used in heavily in Modelica.Math.Matrices.mos, i.e. (eigenvalues[:, 1],eigenvalues[:, 2],eigenvectors, info) := LAPACK.dgeev(A); first we bind the call outputs to temps, then update the arrays slices using indexed_assign_<%type%> as an afterExp. - more error messages in the array handling inside c_runtime - added test to test Lapack and BUG #1370 in testsuite/mosfiles/TestLapack.mos - added test to test Modelica.Math.Matrices in testsuite/libraries/msl31/Modelica.Math.Matrices.mos - moved main from functions to the actual generated code for the model. - add SimCodeAdevs.mo to testsuite/bootstrapping/LoadCompilerSources.mos - all tests go.
c_runtime - merged libsim and libc_runtime into libSimulationRuntimeC - renamed some of the functions in c_runtime fortran generated files to avoid name collision. this also helps to avoid multiple definitions when we link with blas and lapack. We should really get rid of the fortran generated files and link directly with blas and lapack. - removed main.o from libf2c/makefile.mingw (to avoid multiple main definitions) - now libSimulationRuntimeC does not have a main anymore, the main function is generated with the model and calls _main_SimulationRuntime. - libSimulationRuntimeQss is now generated instead of libsim_ompd
- Added boxing of arrays to Types.typeConvert to fix the 'setState_pTX not found' errors. - Added ten more working or partially working models to the Modelica.Media test case.
- Fixed stack overflow for Modelica.Media.IdealGases.Common.SingleGasNasa, see added comments in SCodeFlattenRedeclare for explanation of the fix. - Added test case redeclare/RedeclareBaseClass1 and removed duplicate test redeclare/RedeclareFunctionBug1432.
- updated C# template - fix C template: use Util.escapeModelicaStringToCString() (instead System.escapeString()) to escape also \n in comments of SIMVARs in globalDataVarInfoArray() template
A NEW OMDEV and RML (2.5.0 revison 209) is needed for this (svn up or wait for your update) - generic AvlTree.mo (not tested yet, but it compiles fine) - small additions to Pool.mo - some more stuff in Util.mo - note that these generic files are not yet added to the Makefile.common, will come soon more.
- YOU WILL NEED A NEW OMDev (svn up) or a new RML (svn up or wait for update) for this! - Added Pool.mo as a generic Pool of objects. - I've not added Pool.mo to the Makefiles yet, will come in a next commits.
- add fmi feature dynamic external function, for more information have a look at https://www.modelica.org/events/modelica2011/Proceedings/pages/papers/14_3_ID_162_a_fv.pdf
- BIG CHANGE! - generate Model_init.xml instead of Model_init.txt - clean objects in Model.makefile before compiling (Make doesn't seem to get that Model.c is newer than Model.o if we issue two simulate commands for the same model, even if the model changed via loadFile.) - check the result of fflush in systemimpl.c and printimpl.c - fflush in c_runtime/linearize.cpp - added c_runtime/simulation_input_xml.h and cpp to read the Model_init.xml file. - link the generated code with the XML parser library -lexpat as libc_runtime needs it now - Model.c and Model_init.xml will now contain a GUID which is used in c_runtime/simulation_input_xml.cpp to check if the Model_init.xml is matched with Model.c (Model.exe) - The Model_init.xml is based on FMI but with much more information that we need for OMC. - The Model_init.xml file it has no schema yet as it may change in the near future to include more things that are now static in the generated code (Model.c). This will make compilation of generated code faster. - disabled testsuite/interactive-simulation/runInteractiveSimulation.mos and added only a compilation test (more work is needed to make the run test more robust). - updated tests and compiler files with the name change from _init.txt to _init.xml.
- Inst.mo: - fix bug of number of output arguments - change implementation of strongconnected components, use now special types insted of list>, ToDo: move tearing and handling of constant equation systems from simcode to preoptimisation phase - fix testsuite for new implementation of strong connected components
- YOU WILL NEED A NEW OMDev FOR THIS revision, just do SVN update on OMDev - moved some binaries from /trunk into OMDev. + liblpsolve + libsqlite3 + liblapack-mingw.a + libblas-mingw.a + lib/libtmglib-mingw.a
- first db implementation, un-comment the new added deleted lines in Main.mo and Inst.mo create a db (called omc.db) with a table Inst.mo(path, time_to_instantiate)
- removed SCode.Accessibility element from SCode.Attributes and DAE.Attributes and the entire compiler. - Static.elabCref now returns DAE.Attributes instead of the SCode.Accessibility so one can check the flags in there, (flow, stream, direction, variability, etc).
- moved all c_runtime/meta_* files to c_runtime/meta/ (also rml_compatibility.h) - changed all the required makefiles in Compiler/runtime/ and Parser/ - added SCodeFlatDump.mo. - implemented a first phase in SCodeFlat.mo.
- Changed the installed library structure to omlibrary/Modelica 3.1 instead of omlibrary/msl31/Modelica - Testcases now use loadModel(Modelica,{"3.1"}), etc, instead of env.vars
- Cleaned up elaboration of subscripts in Static.elabSubscriptDims. - Corrected evaluation of subscripts in Static.elabSubscriptDims. - Added test case mofiles/SubscriptEval. - Corrected test case redeclare/Modification1.
- fixes for linking with lpsolve in c_runtime - compiled static lpsolve with mingw and used that to link with omc.exe and c_runtime. - todo: move it to OMDev.
- continue to move analysation of strong connected components directly after blt algorithm, change modpar and TaskGraph to use new strongcomponent type
- fixes for boostrapping on Windows (missing an "l" in -lpsolve55) - copy Compiler/runtime/lpsolve/lpsolve55.lib $(builddir_lib)/omc/liblpsolve55.a as the runtime is needing it now.
Fix for bug #1523: - {} is no longer allowed in Modelica code, since it's not allowed by the specification. - Added test case mofiles/EmptyArray and updated the test suit.
#1499 - Rewrote external function handling to use the FunctionTree and real external C functions - This means we now support array arguments for external objects
Fix for bug #1522: - Consider size of arrays in function to be variable, since their size might depend on input arguments. - Added test case mofiles/FunctionEval12.
- Fixed return values for size in Expression.sizeof (size(x) returns an array and size(x, 1) a scalar, not the other way around). - Cleaned up and moved Inst.elabArraydimDecl to Static.elabArrayDim.
Added code generation functions for cpp template for update, handling event and make file. Modified the simcode for cpp code generation, added a flag for createEquation in a different way and sorting state variables. Modified the index generation for relations. Added a flag to call the simulation executable in a different way for cpp simulation run time.
- Changed simulation code from C++ to C - ~80 seconds faster testsuite - pre(),edge() and change() operators no longer need to search for the array they are located in
- start to move analysation of strong connected components directly after blt algorithm, this has the advantages of speedup(because analysation is done only once), reporting kinds of appearing systems and easier implementation of new optimisation algorithms for this systems(simply as preoptimisation modules)
- Better propagation of flow and stream prefixes for structured components, and better propagation of attributes overall. - Cleaned up instElement and instVar a bit. - Added some new test cases.
- got rid of BackendDAE.StringIndex and array> strIdxLstArr from BackendDAE.VARIABLES as is not used anywhere. - ~5 minutes speedup for the testsuite (and a bit less memory consumption).
Fix for bug #1513: - Changed CevalFunction to fail if it can't evaluate a function parameter binding instead of giving it a default binding. - Added test case mofiles/FunctionEvalFail.
- remove old flag for EliminationLevel, cause it is not used anymore - implement last part of the equation system pipeline (index reduction handler), add new flag +indexReductionMethod to select the method for index reduction - remove some old error msg from Derive.differentiateEquationTime
#1085 #1509 - Do some fun hacks when elaborating fully-qualified enumeration matrices - We simply compare the name of the cref to the type of the enumeration. Saves a lot of lookup (66% speedup for M.E.Digital.mos)
- Use referenceEq in traverseExp() so that we do not construct new expressions identical to the input - Theoretically, this should reduce the load on the GC (since less records are constructed), but due to RML oddities, we will create new garbage regardless. This new garbage will have 0 references and resides in the young region, which leads to it being removed early. Memory consumption should decrease for larger models.
- Added function SCodeFlatten.flattenCompleteProgram which flattens a whole program, and use it to flatten the initial classes (ModelicaBuiltin, etc.). - Added case for Absyn.Code to Absyn.traverseExpBidir.
- use -O3 for omc_release and -pg for omc_profiler - have an (key,value) array of 70% of bucket size in hashtables instead of size/10! - faster false = Expression.expHasCrefs(e) to be used instead {} = Expression.extractCrefsFromExp(e); - smaller hastable sizes in SimCode.translateFunctions - Hashtables do not take second size anymore, just bucket size.
- BackendDAEOptimize: add function to count Simple Equations. This function count the simple equations on the form a=b and a=const and a=f(not time) in BackendDAE.BackendDAE. Note this functions does not use variable replacements, because of this the number of simple equations is maybe smaller than using variable replacements.
- Fixed bug which occured when an error message token contained %s, in which case it was replaced by the next token. - Added new positional index directive to error messages, see package comment in Util/Error.mo for details.
- fix testsuite - add minmax, nominal asserts to simcode, use type of var because type of componendreference is sometimes wrong (for example for stateselect) - BackendDAEOptimize: merge minmax attribue, and add compiler warning if min > max - DAEUtil: add setMinMax - Expression: add case for enumerations to expReal, add functions expMaxScalar, expMinScalar
- VarTransform.mo: remove unused code - BackendVarTransform: change implementation to replace arrays and records. For example if there is a variable a.b[3] to replace all crefs a.b will be extendend to {a.b[1],a.b[2],a.b[3]} and a.b[3] will be replaced, same for records
SCodeFlatten improvements: - Redeclare improvements. - Better recursive short class definition detection. - More redeclare error messages. - Reorganised the redeclare parts of SCodeFlatten by moving most of the code that handles redeclares to SCodeFlattenRedeclare. - Added some more redeclaration test cases.
- Changed Absyn.pathString to add a dot in front of fully qualified paths. - Added Absyn.pathStringNoQual with the old pathString behaviour, and replaced calls to pathString in some places that depended on the old behaviour of pathString. - Updated test suite.
- fixes to c_runtime so no more crashes on Windows (even better on Linux)! - matrix.h (double assigned to modelica_boolean) *loc_ptrs[i]=values[cur_value_indx*size+i]; loc_ptrs is a array of pointers to doubles which is set to addresses of modelica_boolean then at those addresses a double is copied (values is a double array) - other files + initialize most variables to 0 or NULL or "". - flagSet now returns integer instead of bool! - fixes interactiveSimuation -> interactiveSimulation.
- changes to Absyn, SCode, DAE, Env! - Absyn.mo + Parser/Modelica.g + fixed some of the weird naming - SCode.mo + SCode.Class is gone, SCode.Program is now a list of elements + SCode.Attributes are now in DERIVED instead of Absyn.ElementAttributes + grouped the element prefixes into SCode.Prefixes and put them both in SCode.CLASS and SCode.COMPONENT + added visibility attribute to all Elements (extends, import, etc)! + replaced some false/true flags with real records for easier following of patterns or expressions. - DAE.mo + use flags instead of false/true - Env.mo + better naming for fields - SCodeHashTable.mo + new file to help with SCodeFlattenExtends.mo + more to come here.
- BackendDAEOptimize.mo: - remove old remove simple Equation - add remove equal function calls equations module - use new remove simple Equation for Linearization - BackEnd/BackendDAEUtil.mo - change incidenceMatrix, now it generates the incidenceMatrix and the transposed incidenceMatrix at once - use removeFinalParameters,removeEqualFunctionCalls,removeSimpleEquations,expandDerOperator as default preOptModules - BackendDump.mo: add function debuglst - update testsuite
- use removeFinalParameters,removeSimpleEquationsX,expandDerOperator as default preoptModules - use lateInline,inlineArrayEqn,removeSimpleEquationsX as default pastoptModules
- Added tracing of the new symbolic operations (alias/simple eq) - Removed unreachable cases in Ceval (evaluation of integer matrices cast to Real scalars, etc)
- use structure for simulationresults functions, make them global in the files including SimulationResults.c, this is usefull to load several result files at the same time
- Added support for annotation LateInline=true as an alias of __Dymola_InlineAfterIndexReduction and __MathCore_InlineAfterIndexReduction - With priority LateInline > Inline > EarlyInline This line, and those below, will be ignored--
- Added support for NORETCALL in Interactive statements - Added new API call writeFile (analogous to System.writeFile) - Added ElementSource to SIMVAR instead of Info - Added files to generate html documentation out of our packages
!! this update will most likely need 'clean' or deletion of omc.exe as your old Susan parser will complain on the updated SimCodeC.tpl ... sorry for the inconvenience - Susan keyword 'from' is changed to 'fromindex' (according to the last Susan specification) - some other errors are now reported with correct source location (string conversion, argument type check, options type check, function/template lookup).
- Changed replaceExp to return a Boolean that signals if a replacement has been made - This should also be using less memory than before due to not constructing data-structures if nothing changed
- All clients runtimes are moved to OMTools/bin - All required qt libs are moved to OMTools/qtdlls - Some updates in OMPlot and OMEdit - plotParametric3 and plotAll3 is added.
- Disable running simplify after each unary elaboration - Traverse each instantiated equation using simplify1 - cevalIfConstant on VAR variability expressions now does simplify1
- Fixed detection of recursive short class definitions. - Fully qualify all extends to avoid exponential lookup complexity. - Handle fully qualified names in SCodeLookup.lookupName. - Updated parallel test script to not run msl221 tests twice.
- Added a new command plot3 that uses OMPlot - plot3(x, true/false(externalWindow), filename, title, legend.....) - added spawnCall function in system.mo since system method blocks the execution so using spawn instead. - small update in plotwindow
- Changed simplify of LUNARY and LBINARY (we now only simplify these at the end; i.e. in the equations and bindings - not while doing static elaboration of the expression)
- BackendDAEOptimize.mo: - bugfix removeSimpleEquationsX, use var direct to update aliasVars - SimCode.mo: - use flag "qssinfo" to generate structure code QSS
- replace Debug.fcall("..",print, .. crefStr(..) .. expStr(..) by adding print functions, this is a speedup because the unused string generation from crefs and exp are avoided - Bugfixes removeSimpleEquationsX
- BackendVariable: reimplement moveVariables and deleteVar using traverseBackendDAEVars -> speedup because arrays only traversed onc instead of twice because of generating a list from the array, add function deleteVars
- for testsuite mosfiles-msl22 separated and actived some tests (initialization) - clean up testsuite - deactived print call in BackendQSS.mo, since it break the testsuite
#1461 - Added support for LibraryDirectory and IncludeDirectory - The paths search are the default ones according to the Modelica specifiction, plus mingw32 on Windows and uname -sm | tr "[A-Z] " "[a-z]-" for other OS'es
First part of SimCodeCpp.tpl. Generate code for Modelica system header file. Generate implementation for init, writeoutput method, constructor code and System default implementation methods. Extended VarInfo structure for dimension of first and second order state variables. Added variable index to SimVar structure.
- third version of GC, still disabled for now. - still about 2-3 times slower than RML. - returned to the struct implementation of mmc_mk_rcon (and intercept the MMC_REALHDR in sweep_page). - made VC++ happy by returning values from functions that should do that in RTOpts_omc.cpp
- Fixed parser so that modifiers declared as 'redeclare replaceable' gets a proper Absyn.Info instead of NULL, which caused a segfault in Error.addSourceMessage.
- Added API function uriToFilename (takes file:// or modelica:// and produces a filename, if one exists) - Based on new functionality in System/CevalScript (to be used to generate Makefiles with -I and -L-flags set) - Added support for grouped import-elements (import A.B.{c,d=e}, etc; these generate a warning for now)
- BackendDAEOptimize.mo: remove simple equations b = der(x) - Bugfix for removeParameterEqns - new module removeProtectedParameters - update testsuite cause of new case for remove simple eqs
- Changed popTimerStack in systemimpl.c from double to void, since it doesn't return anything. - Added missing RML_TAILCALLK(rmlSC) to System__setDataPort.
- implement runtime options +preOptModules and +pastOptModuels, now it is posible to select the optimisation modules for the backend via flag, use for example +preOptModules=removeSimpleEquations,removeParameterEqns,expandDerOperator or +pastOptModules=lateInline,inlineArrayEqn,removeSimpleEquations,removeAliasEquations ToDo: implement a script function to set and get the optimisation modules - dumpComponentsGraphStr is now availible via the pastOptimisation flag use +pastOptModuels=dumpComponentsGraphStr
- Use Makefile instead of Makefile.omc for mmdev - Rewrite PAMTRANS using Susan - Use less RML operators in the mmdev examples - Added configure option --disable-omshell-terminal - Added boxptr_stringLength - Added optimization for removal of unreachable branches in if-statements
- Store SCode.Element.CLASSDEF in SCodeEnv.Env instead of SCode.Class.CLASS, so that we have access to redeclare information. - First attempt at handling element redeclarations in SCodeFlatten, still needs more work. - Updated the Modelica.Media test with more working models.
BackendDAECreate.mo: - deactivated minmax and nominal assert, due to the fact that Bug [# 1454] is caused. SimCodeC.tpl: - changed measure_time_flag to be able activate it by simulation flag "-v" SimCode.mo: - added case for generation only the "jacobian" dg/dx with debug flag "+d=jacobian" BackendDAEOptimize.mo: - adjusted to SimCode.mo "+d=jacobian" solver_main.cpp and simulation_runtime.cpp: - activated "euler" solver again, was deactived for some reason. - added additional solver names : "dassljac" and "dasslnum" for using a symbolic jacobian and own numerical jacobian in dassl. - clean up some things. testsuite: - deactivated some tests that initialise wrong, due to the Bug [# 1455] - update some tests to correct results.
- improve annotation evalute handling, now equations from MultiBody examples looks better - do not propaged the dummy fixed attribute, do merge them -> ToDo
- Susan now reports unresolved bound values with proper source code location (Eclipse MDT plugin will mark the error lines) (remaining errors are still "reported" the old way, ...)
- Replaced SCodeLookup path prefix fix for imported functions with a better fix, since the old fix caused some problems. - Fixed wrong name in failtrace in BackendDAECreate.mo.
- improvements to mmc GC (still disabled for now as is still slow) + added roots management to SimCodeC.tpl - make VS happy by + having an array of 1 records without fields (Unparsing.tpl) + moving includes around - new file SCodeCheck.mo (more will come here) - better display of elements in SCode.mo - added RCS lines to some files.
- Fixes to Patternm.elabResultExp2 to NOT ASSIGN THE INPUTS. - This had a really bad behavior in the bootstrapped compiler: Util.splitTuple2List({(1,2),(3,4),(5,6)}) -> ({}, {}) instead of the correct: ({1,3,5},{2,4,6})
-added some dassl stats for debugflag -v - added more debug verbose level in simulation -lv {LOG_STATS,LOG_SOLVER,LOG_EVENTS,LOG_NONLINSYS,LOG_ZEROCROSSINGS,LOG_DEBUG}
updated makefile to create .fmu zipped file with proper directory structure. I have added code that creates .lib file to make it compatible with dymola import. Now we can export small models and import them in dymola.
- removed templateError() imported function (from my previous commit) ... to be replaced by the new approach: - introduced new magic builtin function sourceInfo() that returns contextual Absyn.Info structure based on the position in template files. The sourceInfo() can only be used as a direct parameter into a template/imported function,... no let binding of its value is possible for now (to be possible when full semantics of the let will be implemented) - added two Tpl functions Tpl.addSourceTemplateError() and Tpl.addTemplateError() to SimCodeTV.mo which can be used to implement user defined templates for reporting template errors, - see error() and errorMsg() example templates in SimCodeC.tpl and one usage of error() in literalExpConstBoxedVal() template - Susan compiler now fully captures source info for every expression, so the proper semantic errors are on the way "to be really soon ..."
- rewrote the generation of the analytical jacobian -> gain the performace a lot - fixed bug in solver_main - added "dassljac" as solvername that use the analytical jacobian for simulation
- BackendDAECreate.mo: do not add asserts for min,max,nominal if const true - BackendDAEOptimize.mo: merge nomnial attribute - BackendDAEUtil.mo: bugfix checkinitialconditions for remove alias equations - BackendDump.mo: dump min,max,fix,nomial,start - FMU: bugfix alias equations
Fixes for Media: - Fixed Inst.makeBinding so that it correctly handles records. - Commented out recursive calls to simplify2 in ExpressionSimplify.simplifyBinarySortConstants and simplifyBinarySortConstantsMul, see bug 1450. - Changed declaration of sat in Modelica.Media.Water.WaterIF97_base.BaseProperties to be a modification instead, since it already exists as an inherited component (see ticket 505 on the Modelica Issue Tracker). - Updated test cases due to different simplifications. - Added test mofiles/RecordConstant4 to test the record binding fix.
... continuation from the previous commit (I hit enter accidentally) - added templateError() imported function to be used inside templates to report an "unexpected template error", usage is like this:
- Fixed lookup of components in constant class instances. - Cleaned up SCodeFlatten by removing some unnecessary code. - Renamed badly named protected_ to variability in DAE.ATTR. - Added test cases mofiles/RecordConstant1 and mofiles/RecordConstant2. - Updated Modelica.Media test with Modelica.Media.Air.SimpleAir.
- fmu: fix bugs - add new functionality removeAliasEquations (usable with +d=removeAliasEquations), the alias equations are removed from the knwon equations TODO: implement output of alias equations in simulation_result_(plt,mat,csv) - add Alias vars to BackendDump.dump - use DAEUtil.setFixedAtt for function BackendVariable.setVarFixed - add function BackendVariable.setVarStartValue - use BackendDAEUtil.numberofZeroCrossings to generate SimCode.createVarInfo -> speedup because calculate size of states, algs, bool, ... only once
- Improved Ceval of reductions without default value (use the first non-filtered value) - ListReductionCodegen now fails because I added the above as a testcase (the generated code will select the first expression regardless if it is matching...)
- Use elabExp to determine the actual expression that should be used in code generation - This is an extra field stored in DAE.REDUCTION, and is needed in order to handle sum() for different array types, etc
- Added codegen test of reductions (list/listReverse/min/max/sum/product/array), using both lists and arrays as the input - Note that array-reductions now work in generated code - TODO: More general reductions (sum of strings for example)
- Fixed checkSubscripts to handle non-constant ranges as subscripts, which previously caused CevalFunction to fail for some functions (this speeds up the Modelica.Media test). - Fixed stupid check in bootstrapping/LinkMain.makefile.
- Made System.int/realMaxLit external "builtin" again (because external "C" is limited to 32-bit int, while our longs are 64-bit) - Plus some fixes to the runtime system (declaring them in a header, since external "builtin" does not do that for us)
- Added rules for DAE.REDUCTION in ExpressionSimplify instead of Static - Removed the hack used for multiple iterators (DAE.REDUCTION should support this rather than only supporting constant ranges of multiple iterators) - This causes the synthetic tests using multiple iterators to fail; they will be fixed at a later date - Added Option to DAE.REDUCTION instead of having multiple versions of the start-values in the compiler
- Remove path prefix from imported function in the same scope in SCodeLookup. - Removed check for checkModel in elabBuiltinCat2, it's needed otherwise too. - Ported external function parts of r7879 from the maintenance branch. - Added support for fill and ranges on integers in c_runtime. - Fixes for external fortran function: - Fixed correct types for function definitions. - Commented out function parameter names function definitions, since several parameters might have the same name. - Moved initialisation of output variables after initialisation of local variables, since the output variables might depend on them. - Added default values for scalar output variables (not sure if this is according to the standard, but Dymola does this). - Added test case libraries/msl31/Modelica.Media for Modelica.Media models. - Updated test suite.
Fixes for bug: #1446 - fixes bug: https://openmodelica.org:8443/cb/issue/1446 - get the info annotation from external declaration in a function! - added testsuite/interactive/showDoc.mos to test this.
- Changed Absyn.ForIterator from tuple to uniontype, and added a field for guard (only parsed when +g=MetaModelica is enabled; and doesn't do anything yet)
- Added support for list and listReverse reductions - listReverse builds the result using cons - list builds the result using destructive cons-operations - Neither way uses listReverse or allocate more cons-cells than required
- FMU: - use integer as type for enumerations, until implementaion is not complet - do some more tests, add flag for calculate outputs/dependend variables
Fix for bug #1438: - Fully qualified parent classes InstExtends.instClassExtendsList2 when handling class extends. - Added test case mofiles/ClassExtends5.
Fixes for bug #1436: - Replaced the dependency analysis in CevalFunction with a new that uses the Graph package, to fix bug 1436 (and probably more too). - Added traversal function Expression.traverseExpBidir. - Added function ComponentReference.crefEqualWithoutSubs, which compares two crefs but disregards their subscripts. - Extended Expression.subscriptExp to handle more cases, and added subscriptIndexExp that has the old behaviour of only handling DAE.INDEX. - Added test case mofiles/FunctionEval11 to test fix for bug 1436.
- Added warning message in Inst.instWholeDimFromMod for when we can't deduce a variables dimensions from it's modifier (to avoid failing without an error message). - Updated test case libraries/msl31/Modelica.Blocks.mos.
- measureTime=true now does the timing of the non-linear solver based on the whole time (incl. the solver itself, not only the time of the residual function)
- Made it a simulation error to an output-format that is not known instead of defaulting to plt - Updated the measureTime option to print outputFormat and data sizes - Improved handling of simulate() errors (now prints the contents of output.log when the simulation executable signals an error)
- README-WIN32.txt is no longer actual as we only compile the release with MinGW and OMDev and only create the .msi from these executables. - Look into README-BUILD-RELEASE.txt to see how to build on windows.
- first MetaModelica GC draft, disabled for now - see more in c_runtime/meta_modelica_gc.h - added GC bindings to: Compiler/susan_codegen/SimCode/SimCodeC.tpl, commented out for now - made all structures non-constant to allow marking/unmarking.
- IN WINDOWS YOU WILL NEED A NEW OMDEV (just do svn update on OMDev) OMDev is now in Subversion here: https://openmodelica.ida.liu.se/svn/OpenModelica/installers/windows/OMDev - now we copy xsltproc and gnuplot directories from OMDev/tools to build/lib/omc/libexec - Linux/Mac users are unaffected.
- Fixed issues when looping over ranges with step=0 (add assertion), negative step (inf.loop in CevalFunction) and zero-length ranges (the generated C-code would iterate once anyway) - This is tested by testsuite/mosfiles-nosim/ZeroRange.mos
- Use -O3 -falign-functions for simulations (our users should not run LARGE simulations with -O0...) - Use -O0 -falign-functions for dynamically loaded functions (we generally only execute this code once) - falign-functions is needed in order to make garbage collection work
- Added a fix for debugging longjmp on any platform (the debugger needs to be a breakpoint on file Catch.omc:1 in order for step over to work) * meta_modelica.c needs to be compiled with debug symbols for this work, but that's a minor issue
Fix for bug #1334: - Added cycle detection to instElementList for constants and parameters. - Also sort parameters in instElementList. - Updated test cases due to different sorting of parameters. - Updated mofiles/CyclicBindingParam and mofiles/CyclicBindingConst and moved them from failing tests to working tests.
- Changed tuple-assignments to use subtype instead of matchType (since the type-casting rules do not become part of the DAE) - All testcases still work (because only MetaModelica uses this feature, and when using MM, we have access to pattern-matching assignments, which do work properly)
- Added better output when doing time measurements of simulations. - For now, I use xsltproc and gnuplot for transforming an xml representation of the time measurement (in addition to png thumbnails and svg plots)
- Implemented dependency sorting of constants in instElementList. - Rewrote Util.listDeleteMemberOnTrue to be more efficient and to return also the deleted element. - Updated some test cases that changed because of the dependenc sorting. - Fixed some errors and test cases due to commit 8048.
- Enabled removal of unused constants in SCodeDependency. - Rewrote Util.listIntRange* to be tail-recursive and to better handle all cases, to get rid of the stack overflow in test bootstrapping/UtilTest. - Replaced implementation of ExpressionSimplify.simplifyRange with call to Util.listIntRange3. - Removed Absyn.optPathAppend because of duplicate functionality in Absyn.joinPathsOpt. - Removed test case mofiles/Function3, because it was incorrect.
- Fixed a bug with plt output when variableFilter is used - Added Absyn.Info to SimCode.Function - Started working on -modelinfo flag of simulation executables - Removed "bin" output format as mat has similar performance, and also contains headers so we can access the data
- Fix result-file containing names C.der(x) instead of der(C.x); the first one is not a valid Modelica identifier and won't parse... - Fix plotting in OMEdit (send "filename.mat" instead of filename.mat)
- added cplusplus macro to the read_matlab.h so that it can be linked against c++ files. - Changed the simulate command to use mat as default. - Changed the plot API accordingly.
- Moved the getBuiltinAttribute functions to ModelicaBuiltin.mo - Enabled the mosfiles-nosim/attributes, which still fails - This is due to CevalScript.getBuiltinAttribute apparently not working correctly
- Updated enableSendData(true) to use the variableFilter option of simulate() instead of using the setVariableFilter API call - Removed the setVariableFilter API call
- Moved plot,plot2,plot2,plotAll and visualize commands to ModelicaBuiltin.mo - Their API changed slightly (this will be announced when plotParametric also has been moved to ModelicaBuiltin.mo, and documented in trunk/doc): * Instead of plot(className, {x,y}), you now call plot({x,y}, "className_res.mat") * This is because className is usually used as a default argument, and thus should not be the first argument since then you cannot call plot({x,y}) * Also, we use the filename of a result file because then we can plot renamed files or files that were created using the fileNamePrefix option of simulate()
- Fixed assignments in Interactive.mo to use the value to determine the type of a binding (since the elaborated type may contain unknown dimensions, but the Value certainly does not) - Fixed a bug in the handling of readSimulationResult (if the input size does not conform to the expected value, we now fail instead of writing to the error buffer and succeeding anyway) - Moved list() to ModelicaBuiltin.mo - Added support for default bindings of type OpenModelica.Code.TypeName
- Added OpenModelica.Code.VariableNames since the type system cannot handle arrays of Code expressions or vectorization of these - Added readSimulationResult to ModelicaBuiltin.mo instead of using a special handler
- Updated the default outputFormat of simulations to be .mat - Only mosfiles-dassl/Sample2.mos changed its output; this seems to be because we have an event at the last time-step. I'll see if we can change the interpolation to always find the right limit
- Added function Util.listMapAndFold1. - Rewrote updateComponentsAndClassdef in InstExtends and SCodeFlattenExtends to use Util.listMapAndFold1, to make it tail recursive and easier to understand.
- bugfix in differentiation rule for abs() - added some improvments in the c_runtime - adjust the SimCodeC.tpl for the c_runtime - adjust some testcase and moved some from msl221 examples to failed testcase, because they not simulate correctly anyway.
- Rewrote Expression.terms to always return the input argument if it can't do anything else, so that terms are not lost. - Added test case mofiles/Simplify2.
- Added DAE.BOX and DAE.UNBOX to Expression.terms, so that they don't disappear in Expression.simplify. - Added test case meta/Simplify1 to test the fix.
- Added a new SimulationResults.c - It only supports val() for now, but handles both .mat and .plt - It caches the last file opened for .mat (and the read variables). This should make it rather fast when scripts use a lot of val() commands. Especially since the whole Time vector is stored in memory (2 fread required for each val command; searching for a variable is done in log(n) time since all variables are sorted, etc). - NOTE: Someone should test simulate(A); simulate(A); on Windows. The file might need to be close prior to each simulate command (add a call in System.mo if this is the case) - TankPID.mos now tests val() on .mat-files - val() now returns NAN on error, and sets the error buffer instead of printing to console
- Added new module SCodeDependency for SCode dependency analysis. - Added new debugflag +d=scodeFlatten to enable SCode flattening. - Removed environment path when printing error for components with same name, since it sometimes printed nonsense paths otherwise. - Updated test cases that changed due to above change. - Renamed absynExpOption to binding in SCode.Mod. - Added function Util.listMap02. - Added some more builtin Modelica functions (assert, constrain).
#1317 - Added support for simulation option fileNamePrefix (in the simulation runtime) - Added support for quoted identifiers in generated code - See for example testsuite/mosfiles-dassl/JapaneseBouncingBall.mos
- Added option variableFilter to translate/buildModel/simulate commands/simulation runtime - This argument is a regular expression; any variable that matches this expression is present in the result file - The default value is ".*", which matches _any_ variable - The regex provided is treated as: ^(%regex%)$, i.e. you are forced to write regular expressions that match the complete name (no substring matches) - Currently only implemented for plt/csv formats with mat coming in the near future
- fixes for testsuite dassl2 and modelicaML - rewrote assert and terminate process for solver - added function checkForAsserts() - added asserts for sqrt(<0) changes in detail: - boolean_array.* -- added function for print modelica boolean - options.cpp -- fix bug for using options in simulation programm - simulations_events.* -- rewrote searching process - simulations_runtime.cpp -- added flag for solver switch (-s ) - solver_main.cpp -- adjustments to other changes - BackendDAEUtil.mo -- check RELATION for discrete Variables - SimCode.mo -- added searching for sqrt-asserts, some other adjustments - testsuite -- adjustments
Fix for bug/tasks: #1429 - replace the function with an additional variable with type of return value. Maybe some models of the testsuite using checkModel does now not work but my laptop is to slow to run the hole testsuite.
- Fixed handling of string literals: - elabExp will now unescape any string to canonical form - calling MM stringLength on a string now returns the actual length of the string - calling expEqual on strings now works correctly - using CevalScript now returns properly escaped strings; for example "ab\"c" is now displayed instead of "ab"c" (which would not parse) - Note: list() in CevalScript and Interactive is different! The one in Interactive will not escape output strings - This seems to make OMEdit work as expected, but the function should probably be fixed - Note: Any elabExp-style function (takes Absyn.STRING as input) should now use System.unescapedString on the given string to make it canonical - System.unescapedString will only break string sharing if the string has to be modified (if it has no sequence to unescape it returns the old string)
- Added initial implementation of scripting function regex (we might make this part of the MetaModelica builtin environment because it is so nifty...) - This version lacks some features (only returns true/false, but it does set Error.mo so even if it looks like it succeeds you should check it)
- Fixed correct limits for reductions on 64-bit platforms. - Added simplification of reductions of an array with one element. - Updated test mofiles/NonConstantReduction.
Fix for bug #1412: - Removed error message for non-constant reductions. - Added test case mofiles/NonConstantReduction. - Fixed test case mosfiles/val.
Fix for bug #1422: - Fixed incorrect type on ranges when doing type conversion. - Updated test mosfiles-dassl2/nonConstantParam and added test mofiles/SimplifyRangeInCall.
- Added a new type of cref, Absyn.CREF_INVALID, which is used for crefs that could not be looked up in SCodeFlatten (which might still be valid, as long as they are not used). The error reporting for crefs that could not be found is now delayed until elaboration instead. - Removed some code for checking optional conditions, which is no longer needed because of CREF_INVALID.
- Fixed extends so that imports are not inherited in SCodeLookup. - Added error message for extends-clauses that depend on inherited elements. - Added test case mofiles/InvalidExtends1 (disabled for now until SCodeFlatten will be used). - Fixed invalid use of extends in test mosfiles-nosim/FinalTests.
- Renamed SCodeFlatten.flatten to flattenProgram and added flattenClass. - Added flattening of functions in Interactive (disabled by default). - Renamed some functions in SCodeFlattenImports to be grammatically correct. - Added fail as a builtin MetaModelica function in MetaModelicaBuiltin. - Added missing declarations in test case parser/MetaModelicaMatchElse.
- Propagated Absyn.Info from Absyn.ElementSpec to SCode.Element in SCodeUtil. - Replaced print with proper error message in SCodeEnv.checkUniqueQualifiedImport;
- Added printing of Absyn.Info when assertions happen in the simulation runtime, i.e. + e.g. [StringTest.mo:8:1-14:56:writable] Simulation call assert() at time 0.11 ...
- Changed SCode.COMPONENT to have an Absyn.Info instead of an Option. - Changed print to proper error message in SCodeEnv.avlTreeAdd2. - Updated some test cases due to better error messages.
- Changed SCodeFlatten.flatten so it uses the correct variables. - Changed SCodeEnv.printEnvStr so it prints the whole environment instead of only the last frame. - Implemented support for derived classes in SCodeFlattenImports.
SCodeFlatten fixes: - Fixed path-merging bug when looking up through imports. - Propagated Absyn.Info where needed and replaced some print-calls with proper error messages. - Added evaluation of conditional expression when lookup of a component fails.
- Updated Absyn.Modification to store an EqMod instead of Option. This also contains Absyn.Info. - Moved more scripting functions from Interactive.mo to CevalScript.mo, and defined them in ModelicaBuiltin.mo - Some of the scripting functions are defined in the builtin environment instead of special rules - getEnvironmentVar now returns "" instead of "error" - Removed MetaModelicaBuiltinImports.mo (defined in MetaModelica.mo as builtin instead of import X=Y) - Added simplification of String() - Fixed a bug in getTmpDir for RML
#1399 - Added some CevalScript functions to ModelicaBuiltin.mo - This means we now get vectorized builtin operator, and ExpressionSimplify - CevalScript still does not Ceval the inputs + loadFile(intString(1)+".mo") might not work + loadFile("a" + ".mo") will now work + loadFile({"a.mo","b.mo","c.mo"}) works + setCompilerFlags("singleFlag") now works as the function is vectorized instead of taking an array of strings as input
- When converting from match to switch, (x as _) is treated as _ to determine if a column of patterns are WILD or not - Also, the last case is excused from this check as it may be a default case
- Added support for a "default" case when doing the match->switch translation - intString now checks for numbers 0-9 and returns the literal directly, based on the fact that most (99.9995%) intString calls use these numbers (see below)
- Added match->switch conversion for integers. - There are very few cases using this, but they are used for lookup and the performance increase seems good
- Fixed inlining of function pointers that do not return boxed data - Added expression simplification for "if cond then true else false => cond" and "if cond then false else true => not cond" - This found more simple equations in mosfiles-nosim/Model{1,2}.mos
- Annotated a few functions with __OpenModelica_EarlyInline - A NEW (r204+) OMDev or MetaModelica/RML is needed for this (older RML version do not parse annotations in regular functions): OMDEV: http://www.ida.liu.se/~adrpo/omc/omdev/mingw/ Debian/Ubuntu Linux: apt-get update && apt-get upgrade rml-mmc OSX: port update && port upgrade rml-mmc - Also fixed a bug where inlined call expressions were not boxed - TODO: Propagate the inline annotation of functions in crefs that are pointers to a specific function
- Bugfixes for ZeroCrossing in algorithm for loop - correct ident in simulation_events.{h,cpp} and solver_main.cpp - add testcase for ZeroCross in for loop and adjusted some other testcases
- Fixed handling of redeclares in variable modifications and extends clauses in SCodeFlatten lookup. - Ported optimizations from Env for the AVL tree to SCodeFlatten.
- Removed some Builtin.isXXX functions that should not be used (pattern-matching is a lot faster and we no longer need it in order to look for sin or Modelica.Math.sin)
- Known external "C" calls are now treated as external "builtin" - That is, Modelica.Math.sin becomes a call to sin because it is calling the same C function we know that the builtin function is calling - This finds more functions than just Modelica.Math.sin (some of the testcases mapped their own external "C" function to C) - We should also be able to change Derive.mo to do pattern-matching against "sin" now, instead of calling Builtin.isSin
#1397 - Declaring for example Modelica.Math.sin as external "builtin" now works as expected - The compiler will treat this as a call to the builtin function sin() - This means Derive.mo and Ceval.mo will work properly without dynamically loading the function or requiring special rules that check for MyPackage.sin or sin - Added testcase ExternalFunctionBuiltin.mo
- -mt now generates profiling information for nonlinear, linear and mixed systems - meta_modelica_string_lit.{c,h} is now in svn instead of generated by sh (the script has problems supporting multiple platforms)
- added index DAE.Relation that are ZeroCrossings(for models e.g. CheckEvents.mo) therefore rewrited BackendCreate.findZeroCrossing and adjusted simulation_runtime and Compiler/*.mo files -> all testcases from mosfiles works also with dassl2
- Made valueEq faster by not comparing the names of uniontypes (only the index), as well as comparing the headers of boxed types directly instead of checking if lhs and rhs are both list or option, etc... - This made checkEngineV6_analytic ~10% faster for the bootstrapped OMC
- Started using System.stringHashDjb2Mod instead of intMod(stringHashDjb2 for most hashtable functions - Tested using a hashtable instead of linear search for Types.elabType, but this seemed slower
- Added support for converting cases with matching distinct strings (that also have distinct hashes) into a switch-case over their hash - Only matches elabBuiltinHandler for now since there are problems with escaped strings
- Added optimization that converts match-expressions (for-loop searching for matching pattern) to switch (jumps to the correct case at once) - Works for records - Seems to be broken for strings so I disabled it (it uses string hashing, and DAE.SCONST is a bit weird at times so it needs more debugging)
- Rewrote crefPrefixOf, crefEqualNoStringCompare and setsEqual using match instead of matchcontinue (~20% speedup of checkEngineV6_analytic for bootstrapped OMC)
- Fixed Static.makeASUBArrayAdressing so that it doesn't create unnecessary ASUBs. - Added test case ArrayIndex2 that tests indexing of arrays with arrays.
- Fixed lookup of builtin functions and variables in SCodeFlatten. - Fixed lookup bugs in SCodeFlatten. - Split SCode.traverseEEquationExps into traverseEEquations and traverseEEquationExps to be able to correctly handle for-equations in SCodeFlatten. - Added traversal function Absyn.traverseExpBidir, that can traverse an Absyn.Exp both top-down and bottom-up. - Added more builtin function to ModelicaBuiltin.mo. - Fixed test case interactive/interactive_api_param so that it uses valid Modelica.
#1402 - Added checkpoint/rollback of error messages for if-expressions when they are used like combitables (condition is a parameter expression and one branch is invalid)
- Added function names array in the simulation runtime - These are output with -mt on a simulation file (in addition to execution count and time of each function for every timestep)
- Made the pointers to intAdd, etc functions part of the C runtime - They are now either function pointers or inlined; SimCode was updated to ignore builtin function pointers
- Started implementation of generateSeparateCode() API call - Generates code for all loaded packages at the moment - Fixed OMC source code where this new API call found errors (Main.main only found errors in functions that were actually used by the compiler)
- Started removing pattern inputs that are never used (OMC dead code): case (1,_) ... case (2,_) => case 1 ... case 2 - We have a lot of these because of RML forces us to put all inputs of the function as the inputs of a match-expression - This makes more match-expressions simplify into if-expressions - Made all packages encapsulated (and fixed Susan so it outputs encapsulated packages) - This should make dependency analysis on OMC work better
- Enabled expression simplification for assignment statements - Added simplification for 1-input match-expression with a single true and false pattern and no body (result is an if-exp)
- Minor fix in generated code (deinitializeDataStruc would try to free output vars if input vars was requested; but the code is only used when everything is requested so no bug could be triggered before)
- Ran the automatic matchcontinue to match script - OMC now detects empty cases at the end of the case list and safely converts to match anyway - The script disables the rest of the dead code elimination since it's not safe to convert these without also removing cases in the middle of the cases
- Removes as-bindings that bind local variables (these never have any effect; the compiler finds 1927 such instances) - Also, fixed a bug in traverseExp for DAE.ASUB
- Changed DAE.STMT_ASSIGN_PATTERN into the regular STMT_ASSIGN - Added DAE.Exp.PATTERN (so we can traverse a DAE and collect all variable refernces; including DAE.Pattern.PAT_AS) - Started detection of unused local variables; around 6000 were found
- Added Absyn.Info to each case in a match-expression - Started dead code elimination in match-expressions (removing empty, failing cases) - This can detect that more matchcontinue expressions can be translated to match (it's not safe to refactor all of these without first removing the dead code)
- Added some constant string literals to the runtime - Codegen and mk_scon now both use the same literals for 1-length strings - Some more matchcontinue to match
- Automatic translation of matchcontinue to match (1448 hits) - testsuite/bootstrapping/refactor-mc-to-m.sh is the script that can perform this refactoring automatically
- +g=MetaModelica now enables makes all strings boxed in the runtime - This breaks MatchCaseInteractive2.mos (and Uniontype7.mos); regular records used as input of dynamically loaded files crash - checkEngineV6_analytic now works (using only 7GB of virtual memory) - + some matchcontinue->match
- Added codegen support for "case ... then fn()", where fn() has multiple outputs - Added simplification for match expressions: (cr1,...,crn) = exp; then (cr1,...,crn); => then exp; - GCC should handle this, but if we need to do special optimizations for tail recursion in the future, we need to be able to access the last expression of a case quickly
- Fixed SimCodeTest using bootstrapped omc (force grammar in the test so it's not shared when loading the shared object) - Plus some matchcontinue to match, and less listAppend in some functions
- Changed printimpl.c from having static "global" variables since they got unpredictable behaviour when dynamically loading bootstrapping examples in the bootstrapped omc. - Now, all copies will share the _same_ print buffer, which means using Dynload.mo to run a function may change the internal state of the compiler (mainly print buffers). - Debug flags, etc are not shared though (I think). We don't test these much anyway.
- Added optimization: If a case in a matchcontinue expression is followed by a (list of) cases that do not have overlapping patterns with the first one, an optimization can be made. If we match against the first pattern, we can jump a few positions in the loop!
- Improved mmc_alloc_bytes (still no GC, but does allocation in 512MB chunks instead of many small calls) - This is a big performance improvement for bootstrapping: Before: == Total: 20 out of 1365 failed, 32.05 minutes (single thread) After: == Total: 17 out of 1365 failed, 27.88 minutes (single thread)
- Added an optimization doing automatic matchcontinue->match translation if it is safe to do so. - This made 5 more tests run in the 300 second limit I set for bootstrapped OMC testcases - Now only 20 tests fail for bootstrapped OMC (8 tests fail for regular OMC)
#1396 - Use vfork/execl instead of system for the System.systemCall implementation on Linux - This does not sometimes spin in an endless loop using bootstrapped omc
- Rewrote parts of Env to use match instead of matchcontinue (while the performance gain is small per call, Env is called millions of times so it adds up for the bootstrapping implementation)
- Rewrote part of BackendDAECreate.lower2 for the bootstrapping (which does not optimize if the first statements of different equation-sections are identical) - lower2 needs more work done as it does too much listAppend - this small change reduced the memory consumption from 16GB to 500MB for large simulations using the bootstrapping implementation
- Added Expression.expEqual support for MetaModelica types - This reduced the size of Main_main.exe by 0.9MB and compilation time by ~20% (this is a result of reducing number of literals by 75%)
- Fixed some type errors in elaboration of CONS expressions (minor thing that RML also did not handle properly) - Updated PartialFn15.mo to its original form
- The boxptr_-function is now only generated if not all of the function in/outputs are boxed (meaning the wrapper is only generated if needed; otherwise it's a preprocessor macro)
- Made sure all arguments of a METARECORDCALL are boxed - Started sharing metarecord literals (30000 more constants shared for Main.main, up from 10000) - Some functions using large constants (such as Error.lookupMessage) now have 500 less malloc calls, which should result in a performance improvement
- Implemented scripting command getModelicaPath() (setModelicaPath() already existed) - OMEdit now uses this command to query the path instead of getting it from the system environment
- Started the implementation of sharing constant literals - It is a one-pass phase on list, right before code generation starts - For now, it is limited to string constants (not even boxed strings...) - It is also limited to function code (not simulations) as equation-systems in general don't use MetaModelica types, which will benefit the most from this change (gcc already shares string constants)
- Changed implementation of InstHashTable to the new generic HashTable - This solves some issues for the bootstrapping implementation and gives us less code to maintain
Fix for #1041 - Reduce the number of error messages generated by builtin operators (only add the generic error message if a specific one was not added)
- Added a generic error message for elabExp (only 1 testcase needed to be updated; no scary floods of failed expressions followed...) - Changed errorext.cpp slightly: Now we remove duplicate errors when pop'ing the stack. - The reason for this change is that if we called Error.addSourceMessage and the top already had a copy of that message, the error count would not increase. This could cause additional generic error messages to appear.
- fix for extendRecordEqns - add case for records for getVar - ComponentReference.mo add function creffromVar - SimCodeFMU.tpl - use {guid} like in xml file, otherwise strcompare fails
#1388 - Absyn->SCode now checks if duplicate classes have been defined in the top-level scope - This includes a check for duplicate builtin classes - Added testcase ErrorMultipleClasses.mo - Removed a duplicate definition in Constants.mo
- Rewrote the simulation runtime slightly - names and comments of a variable is now stored in a record instead of different arrays - This record also contains the Absyn.Info information (filename, line/column start/end) - Removed sendDataHumbug. It has been replaced with preprocessor macros that disable sendData
- Remove noEvent from c_runtime. It's now handled in SimCodeC.tpl - The names and comments of variables are now separated also by a newline. This makes the code more readable. - Removed tabs from SimCodeC.tpl
- fixes for DynamicSelect in annotations (return the first and constant part) - faster retrieval of annotations. - fixes for the interactive simulation test and small fixes to the client.
- Split SCode.traverseStatementExps into traverseStatements and traverseStatementExps to be able to correctly handle for-statements in SCodeFlatten. - Implemented more of SCodeFlatten. Some of the major things are lookup through extends and lookup of crefs.
- updates to readmes and interactive-simulation test - added the interactive-simulation to be run with the testsuite - updated SimulationApplicationExample_TwoTanks.zip
- more work on testsuite for interactive-simulation - made a better client.cpp that knows also how to read commands from a file. - fflush(stdout) everywhere where we have cout! - got rid of some warnings. - still more work is needed for testing the test. - translated *german* (duh!) messages to English.
- Fixes for #1371 - Implemented errors when functions contain illegal elements (except public elements that should be protected, since MSL uses that) - Added testcases FunctionWithEquation.mo and FunctionProtectedInput.mo
- do stream operators handling phase only if System.getHasStreamConnectors() is true. - tail recursive implementation of DAEUtil.traverseDAE2 to get rid of stack overflow for very large models.
Update Solver dassl2 - handle sample call as time events - some event handling bugfixes for dassl2 - added mosfiles-dassl2 to testsuite as copy of mosfiles - two testcases (Delay.mos, TanksConnectedPi.mos) are temporarily broken
- add c_runtime/fmiModelFunctions.h c_runtime/fmiModelTypes.h c_runtime/model_fmu.in - c_runtime/linearize.cpp, c_runtime/simulation_events.cpp use && instead of and - c_runtime/tables.cpp define fmin and fmax for visual studio - SimCodeC.tpl - bugfix for models with none algebraic variables - SimCodeFMU.tpl - bugfixes for visual studio
- c_runtime/CMakeLists.txt, c_runtime/ModelicaExternalC/CMakeLists.txt - add ModelicaExternalC to CMake - add macro for fmu - c_runtime/fmu_model_interface.c, c_runtime/fmu_model_interface.h - bugfixes for visual studio - SimCode - add model name to message for translated to FMU - testsuite/libraries/msl31/simulate - add testcases for simulation of examples with start and end values
- Added annotation __OpenModelica_Impure. Using it prevents constant evaluation of a function call. - DAE.T_FUNCTION now has FunctionAttributes instead of InlineType (which is now stored together with the other function attributes)
- BackEnd/BackendDAETransform.mo - use NONE as variable attibutes for dummyder vars - libraries/msl31/simulate/Makefile - add tests for Modelica.Mechanics.Translational.Examples simulation
- BackEnd/BackendDAETransform.mo - use NONE() for dummyvar variable attributes - BackEnd/BackendDAEUtil.mo - add functions for analysation of initialisation system - BackEnd/BackendDump.mo - print nothing if start values is not given - BackEnd/BackendVariable.mo - use fixed=false als default for states - add function isConst - BackEnd/SimCode.mo - use function BackendDAEUtil.checkInitialSystem to fix the initialisation systems.log - delete older functions for initialisation stuff - update tests for mosfiles - Initialisation.mos: no warnings anymore - DAEexample2.mos: use x as fixed=true because it has a start value
- Added function to Absyn: prefixPath, prefixOptPath and pathToCrefWithSubs. - Finished implementation of the SCode traversing functions in SCode. - Updated SCodeFlatten module.
- ExpressionSimplify: - Added rules for e and false, e or true - Added rules for stringAppendList - Added DAE.BOX, DAE.UNBOX instead of weird mmc_unbox_xxx calls (these are similar to DAE.CAST)
Fixes for task: #1344 - split into directories: FrontEnd BackEnd Template Script Util Main - only working on OMDev MinGW Windows right now, I'm working on the Linux part.
- Added annotation __OpenModelica_EarlyInline = true - This annotation will inline as early as possible, making function calls look like expanded macros - MetaModelica builtin functions use this annotation
- Removed the old arcsin, arctan, arccos and ln functions since they are not part of the standard - They are also no longer used in the standard library - Started using renaming imports for functions that are simple aliases, e.g. import realSin = sin - This will make expressionSimplify and derive work without writing new special cases
Fix for #1356 - More of the function in the initial environment now have real classes instead of just a type - Added test Import7.mo that tests if you can write "import sinx = sin;"
- DAEDump now displays the language of an external function instead of always displaying external "C" - Added initial support for external function language "builtin" - These functions call the other function directly without overhead - external "builtin" functions are omitted from DAEDump
- SimCode.mo, BackendVariable.mo - for initialisation use not startvalue use pre(variable) this is the same value but it is possible to change the startvalue with the model_init.txt file - also add residual equations from vars moved to known variables - ToDo: - change states variables fixed=true by default to fixed=false and do not set the fixed attribute from variables (dummy_states) to false if it is true. - analyse the initial equaition system if additional variables must be fixed for initialisation - add some stuff for calculating the initialisation values via matching algorithm. This works if the number of unknown variables es equal to the number of equations for initialisation, use the debugflag=initdlowdump and uncomment the initialisation method via initial_residual function
- BackendDAEOptimize.mo - use not "a = der(b), a not state" case for simpleEquation because this leads to problems in the removed equations Example model Modelica.Mechanics.Translational.Examples.Damper : 5 : $DER.mass1.v := $DER.$DER.mass1.s 6 : mass1.a := $DER.mass1.v - update test because of this
- BackendDAETransform.mo - speedup replaceDummyDer - set starvalue of dummy_der to zero - BackendDump.mo - add Startvalue to dump - BackendVariable.mo - use named parameter for case - States are not fixed=true for default - add function varStartValueFail - Expression.mo add case for DAE.REDUCTION to isConst
- Removed space in front of unary minus and plus when using Dump, to make linearize/test_05 succeed on linux too (where you get -0 instead of 0). - Updated test cases due to these changes. - Updated the parallel test script to handle modelicaML tests. - Fixed spelling in Absyn.
- added API: getExperimentAnnotation and getSimulationOptions Example: getExperimentAnnotation(Modelica.Blocks.Examples.PID_Controller); getSimulationOptions(Modelica.Blocks.Examples.PID_Controller); simulate(Modelica.Blocks.Examples.PID_Controller, outputFormat="empty"); Result: {StopTime=4} {0.0, 4.0, 500, 1e-06, "dassl", "Modelica.Blocks.Examples.PID_Controller", false, false, "", "plt"} /* startTime, stopTime, numberOfIntervals, tolerance, method, fileNamePrefix, storeInTemp, noClean, options, outputFormat */ - now the simulate(Model, ...) will read the experiment annotation from the model if there is any and use these settings. - updated SimulationRecord to display simulation options. - updated tests to suite the new SimulationRecord. - added a generic COMPILER_WARNING in Error.mo and function Error.addCompilerWarning
Fixes for bug #1238 - fixes for bug #1238 via construction of fully qualified crefs from modifications so we can properly check for duplicate modifications. - added tests for bug #1238 - moved some things from Inst to Mod and PrefixUtil as they belong there.
- BackendDAETransform.mo - got ride of some unused print calls - BackendDump.mo - add function dumpStateVariables - fix tests from testcase, now more trivial equation are detected
- implement new feature: evaluate parameter with annotation(Evalute=true), see Modelica specification 3.2 chapter 17.3 Annotations for Code Generation, codeGenerationFlag
- BackendDAEOptimize.mo, SimCode.mo - use equations like "a=der(b)" with a is not a state to replace a in all equations with der(b), This solves problems with fullRobotR3 initial equations.
- BackendDAEOptimize.mo - implement new features: - remove constant equations from simple equations - add alias variables to BackendDAE.DAE.aliasVars - BackendDAEUtil.mo - add function addAliasVariables
- BackendVariable.mo - reimplement isVariable - BackendDAEOptimize.mo - use new feature removeParameterEqns - SimCode.mo - implement new feature: sort the bound parameter equations in right order. - fix some testcases of mosfiles - AlgorithmArrayEqn.mos: delete generated files - EventIteration.mos: delete generated files - InOutStrings.mo: use parameter to test also simulation - ModelBalance1.mos: delete generated files - ModelBalance3.mos: change number of equations because of new feature remove parameter eqns
- BackendDAEOptimize.mo - fixe bugs for function removeParameterEqns - BackendVariable.mo - add function setBindValue - SimCode.mo - check also bindvalue for inital value
- BackendDAE.mo -add type IncidenceMatrixElement - BackendDAEOptimize.mo - add function removeParameterEqns Detect all equations with only one time depend variable and check if it is a time independend variable. In case of time independendce it add a bind expression and remove the equation --> this solves the problems for Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.oneAxis but testsuite does not yet work, use debugflag "optimizeParameter" until testsuite problems not fixed - BackendDAETransform.mo - got ride of some unnessesary integer operations - BackendEquation.mo - add function equationDelete (used for removeParameterEqns) - BackendVariable.mo - add function setBindExp (used for removeParameterEqns) - CevalScript, Main, SimCode, XMLDump - use removeParameterEqns - ExpressionSolve.mo - reimplement function solve3 - Derive.mo - delete case for derive DAE.BCONST because derive of false is unkown - uncomment case for DAE.RELATION because The derivative of c > d is not der(c) > der(d). It is the derivative of (c>d) "der(c>d)" and this is perhaps NAN for c equal d and 0 otherwise
- Fix Compiler/runtime/corbaimpl.cpp (use the same path as Settings.getTempDirectoryPath() as the temp-dir) - Updated OMShell, so it does not assume /tmp is the tmp-dir
- Derive.mo - add derivativeTime of abs - use type to generate zero - check if call have only parameters -> no derivative of call needet - Expression.mo - use type to generate zero - vectors are scalar arrays -> for function makeZeroExpression - SimCode.mo - use Expression.expSub, Expression.negate, ... - error message from translateModel commented out because of testsuite
- Defer the check of Interactive.typeCheckFunction when adding functions through CORBA. The check needs to be done in the new environment if the function is recursive or has other dependencies that were added in the same sent command. - Added ceval of DAE.CONS
- Util.mo add function listIntRange3 - BackendDAECreate.mo start to implement: use the range of for_stms for findzerocrossings and detectimplicit discrete bug-1368
- partial fixes for #1365 - Derive.mo - bugfix for derive ASUB - return correct type of Zero for call expressions - Expression.mo - add case to makeConstOne so the function does not fail - ExpressionSolve.mo - return also asserts for solved expression Example for the equation 0 = a*(b-c) solved for b the assert (a!=0,"..") is added and the equation is solved b = c
- partial fixes for #1365 - ExpressionSolve.mo - add case for expressions like a*(b-c) solved for b or c - createSingleArrayEqnCode use matchingAlgorithm to solve the array equations correct
Partial fixes for #1365 SimCodeC.tpl - handling ET_ENUMERATION where ET_INT is handled - handle string comparison via strcmp - handle ASUB(e, {index}) via string(et.ty)_get(arr, index - 1)
Partial fix for bug #1365 - partial fixes for 1365 - call clearDifferentiated after remove simple Equations - abs() and sign() are only discrete expression if all parameters discrete expressions.
Partial fixes for #1365 SimCodeC.tpl - fixed code generation for enumeration casting - handling integer(...) builtin operator - write more information about not handled ASUB in the generated code. - updates to testsuite/libraries/msl31/simulate/Modelica.Electrical.Digital.Examples.mos due to changes in codegen.
Help for dealing with bugs: #1365 #1364 - code for sharing crefs (too slow for now so disabled) in ComponentReference.mo - use Expression.makeASUB everywhere where DAE.ASUB is created so we can check if the given expression is a cref and give a warning if +d=checkASUB is on. - function Expression.makeCrefExp will display a warning if +d=checkDAECrefType is ON and we give a *different* type than the one already present in the cref. - flags +d=checkASUB and +d=checkDAECrefType should be used with -trace to see where the functions that are buggy are actually called! - fix warning in Compiler/susan_codegen/SimCode/SimCodeC.tpl for equations: enum = pre(enum) by casting: enum = (modelica_integer)pre(enum) previously it only added cast for ET_INT, now it handles also ET_ENUMERATION - maybe we should create *ALL* expressions via functions so we can easily check if the typing is OK!
- Adding a MetaModelica optimization: (a,b,c) := match ... is now translated to a tuple assignment instead of pattern-matching assignment - This reduces total memory consumption by around 33%
- use Expression.crefExp or Expression.makeCrefExp to create DAE.CREF - use ComponentReference.makeCrefIdent and ComponentReference.makeCrefQual when building DAE.CREF_IDENT and DAE.CREF_QUAL
- use Expression.crefExp or Expression.makeCrefExp to create DAE.CREF - use ComponentReference.makeCrefIdent and ComponentReference.makeCrefQual when building DAE.CREF_IDENT and DAE.CREF_QUAL
- use Expression.crefExp or Expression.makeCrefExp to create DAE.CREF - use CevalScript.buildCurrentSimulationResultExp instead of building the component reference for the simulation record directly.
Fixes for #1365 - bugfix for Modelica.Mechanics.MultiBody.Examples.Loops.Fourbar1 cause of an error somewhere the type of the expression CREF is not equal to the componentreference type
- Changed the interactive buffers to no longer be read-only, so we can use the API to modify them - Added a testcase for renaming components inside read-only files
- increase hash table sizes and use a prime number of bucket size (the default is now defined in BaseHashTable.mo) - leave a space at the end in Unparsing.tpl
- remove spaces in DAE.ASUB printing (to make it exactly as ComponentReference) - got rid of most of Util.boolAndList which were not exactly needed - added more specific map functions that can check global list properties - updated tests due to changes in DAE.ASUB printing - changed the annoying "Modelica specifications" to "Modelica specification" in Error.mo and tests - get rid of warning due to missing newline at the end of Compiler/OpenModelicaBootstrappingHeader.h
- get rid of rml_prim_once in Compiler/runtime/SimulationResults_rml.c - add $CFLAGS a bit later so people can use it to link libraries via MODELICAUSERCFLAGS in Compiler/susan_codegen/SimCode/SimCodeC.tpl - removed old comment from Compiler/runtime/System_rml.c
- Added support for the new special Library annotation, OpenModelicaCorba, which will use the configured Corba implementation to choose appropriate linker-flags for external functions
- More work on SCodeFlatten. It can now remove all imports from EngineV6, but a lot of work still remains. - Changed Util.listMapAndFold to return the folded argument.
- Ported BackendDAEExt to OMC runtime - Note: This might also be a fix for some weird bugs, or stuff that just accidently worked before (the old code would use the second argument of functions taking only 1 argument)
- Fix exception handling infinite loop on Linux; enable it on Windows (seems to run properly there) - Added Dynamic function loading to the bootstrapped compiler (mofiles is now at 100% using the bootstrapped compiler)
- Fixed invalid propagation of connection sets from redeclared components (commit 7185 to OpenModelica-1.5.1-Maintenance branch). - Take face of connector components into account when connecting potential connectors (commit 7173 to OpenModelica-1.5.1-Maintenance branch). - Optimized findEquSet and findFlowSet to terminate earlier in some cases. - Cleaned up ConnectionGraph. - Cleaned up connection handling in InstSection. - Updated test cases that changes due to equation ordering changes.
- Change try/throw/catch implementation on OMDEV to setjmp/longjmp (fixed the bug by copying the whole data-structure instead of only backing up the first 1/16 of the array)
- Susan now: - translates case local names into function wide local names and has nicer name prefixes to have more easily distinguishable origins of the generated identifiers - respects full 'hasindex' semantics with a new keyword 'from' added that is used instead of indexOffset= option new syntax is: lst |> elem hasindex myIndex3 from 3 => '<%elem%><%myIndex3%>' the 'from' keyword is optional (and can only together with 'hasindex'); default is 0 - does not hide implicitly scoped patterned matched record fields in 'if' expressions (only directly tested implicitly scoped values was visible after 'then' till now) - has much better 'let' scoping, to be continued ... - has better emptiness testing of Texts in 'if' expressions (does direct Text value test for emptiness instead of translating it to string) - reports better errors for options; mainly does not allow a typo in option names and non-sense options are errors now
- Added flag +orderConnections=[true|false] that enables/disables alphabetical ordering of connections (default true). - Added API calls setOrderConnections and getOrderConnections.
- added new API getNamedAnnotation(class, name) to get non-standard annotations: getNamedAnnotation(Modelica.UsersGuide, __Dymola_DocumentationClass) -> {true} getNamedAnnotation(Modelica, __Dymola_DocumentationClass) -> {}
- Added boxptr_intLt,intGt,realLt,realGt - Fixed Util.listMap6 RML error - Moved Parser/OpenModelicaBootstrappingHeader.h to Compiler/OpenModelicaBootstrappingHeader.h - It should also be used by Compiler/runtime so it makes more sense to keep it here - Simulations and functions now generate a _records.c file containing record declarations - This is needed so that external C functions can also construct metarecords - Updated Unparsing.mo (no longer needs to duplicate the record declarations)
Fixed for bug #1361: - Fixed elaboration and constant evaluation of ranges with negative step. - Updated test case mofiles/drmodelica/RangeVector, so that it's now correct. - Updated test case mosfiles-nosim/ZeroDims that changed due to commit 7161.
Fixes for bug: #1315 - manually ported from: https://openmodelica.ida.liu.se/svn/OpenModelica/branches/OpenModelica-1.5.1-Maintenance - fixes for bug 1315 - relaxed typing if checkModel is ON: TypeName should be ok to match a TypeName[0] - added tests for: Modelica.Mechanics.MultiBody.Visualizers.Internal.Lines in testsuite/libraries/msl31/Modelica.Mechanics.MultiBody.mos - added more tests for zero dims in testsuite/mosfiles-nosim/ZeroDims.mos
- Added SimulationResults_omc.cpp - Added the remaining external functions in System_omc.cpp - Main.main now passes the gcc linker and produces a 15MB executable that at the very least can display the help text on start (the main() function ignores argv,argc)
- Added new API call generateHeader(), for generating the uniontype header for the parser external code - Uses a new Susan module for unparsing - Added the OMC version of the ANTLR parser to the default make target - Note: Due to mutual dependencies the generated header will point to different constants for the record description in external code. To produce more efficient code, all uniontype record descriptions need to be generated in its own C-file (last on the GCC line)
- Updated the external C code for Settings.mo - If OPENMODELICAHOME is available and OPENMODELICALIBRARY is not, we look for libraries in the default locations
- Added an error message in manner that plot() usually fails: Return Values.STRING(msg) instead of Values.BOOL(...) (this is very good for scripting and keeping the types consistent) - Anyway, if we compiled --without-sendData, we now return an error instead of success - This error is returned through CORBA instead of stderr + return success - OMEdit displays this error message if we use an OMC without sendData support
- Further changes from char* to const char* - Now all strings in the simulation runtime should be const - Implemented some additional external functions for libomcruntime.a
- Fix so that Susan runs (SimCodeC.tpl->SimCodeC.mo works) using bootstrapped OMC - It uses too much stack so we can't run it in the testsuite, but the test has been updated so that it is easy to try it yourself
- Changed the C runtime to allow the use of const char* instead of char* for string literals - We no longer need to strdup every single string literal we find. This should produce a lot more efficient code if someone likes priting a string constant every time step, etc
Fix for #1360 - We now copy string outputs of functions - Previously, we could overwrite strings and get really weird results - Added testcase StringPool.mo
- fixed more problems with annotations. - now if we fail to instantiate an annotation we return it as it is: { annotation(...) } - if an annotation is not present at all we return {} instead of empty string. - moved interactive tests to testsuite/interactive - Lookup.lookupVar2 now only prints an error message if +d=lookup is present (not on +d=failtrace). - added all extra tests into testsuite/interactive/interactive_api_annotations.mos
- Fixed propagation of enumeration indices when connecting arrays. - Fixed connections with multi-dimensional arrays. - Added test case mofiles/ConnectEnumArray.
- add an extra newline at the end of h files in Compiler/susan_codegen/SimCode/SimCodeC.tpl - fixes in Compiler/runtime/config.h - other smaller issues
- Improve CevalScript.cevalGenerateFunction - No longer does lookup+inst again on every function (this was already done by elabExp) - generateCode() for MainTest.mos now only generates code; it does not compile it (saves 1~2 minutes of testsuite time and reduces the RAM requirements for running the testsuite)
- CevalScript.generateFunctions speed-up (breaks error messages in one testcase) - This change is needed (or something similar); the speed-up for bootstrapping is ~100 times - Fixes for bootstrapping
- Changed SimCodeCTest to SimCodeTest - It is more extensive; a lot more external functions - It also covers the DAE to SimCode translation (for functions)
- Implemented some more external functions in libomcruntime - On Unix you no longer need to set OPENMODELICAHOME - It uses the --prefix from configuration - OPENMODELICAHOME still overrides that since most developers don't run make install
- Remove Absyn.VALUEBLOCK - Remove DAE.VALUEBLOCK - Remove DAE.STMT_MATCHCASES - Remove Convert.mo - These constructs were no longer needed since the match implementation was rewritten from scratch
- New match implementation using Absyn->SCode->DAE->Done instead of Absyn->SCode->DAE->SCode->Absyn->SCode->DAE->Done - The meta testcases are almost 40 seconds faster now
- Improved instantiation of algorithm assignments (a separate function) - We only elaborate the expression at most one time. This is faster and does not produce duplicate error messages
- changed SES_MIXED.values to list to save memory (but no computer on earth will save you if you need to do permutations of 0/1 for 34 variables!). This should be fixed somehow.
- Util.arrayMap now works on empty arrays - BackendDAEUtil.incidenceMatrix now works directly on arrays and can generate normal or absolute index values. - made some other backend functions work on arrays directly. - some other memory usage improvements
- Inst.instantiateClass: clear the inst/type cache at the end of instantiation. - SimCode.createResidualEquations: less memory consumption. - some fixes in Util.mo (bad judgment)
- Use Error.addSourceMessage instead of Error.addMessage when printing inStream and actualStream elaboration errors. - Turned on stream connector balance checks by default, because models using stream should follow Modelica 3 rules anyway. - Added Modelica.Utilities.Files.list to libraries/msl31/Modelica.Utilities test case. - Added a couple of stream test cases.
- added assert() and terminate() to c_runtime - moved Linearization stuff to BackendDAEOptimize - fixed index bug for partial and numerical derivative in Linearization
- Changed the pattern-matching implementation (for statements, now STMT_ASSIGN_PATTERN) - This uses the DAE instead of converting back to Absyn to create a match-expression - It should be faster and work more often
More fixes for bugs #1347 #1335 - fixed an issue when annotation was not find in a class containing multiple sections. - added more tests in testsuite/mosfiles-nosim/interactive_api_annotations.mos
- Removed error in Interactive.evaluateWhileStmt that immediately exited the while loop. - Fixed elaboration of graphical annotations. - Moved meta/PartialFn15.mo to failing tests. - Moved some libraries/msl221/ tests that are not part of the normal testsuit to failing tests, since they are part of the parallel testsuit. - Updated parallel test script.
Optimization problem support tokens OPTIMIZATION and CONSTRAINTS are added to BaseModelica_Lexer.g and Modelica.g Absyn.mo : new record CONSTRAINTS SCode.mo : uniontype Restriction updated with R_OPTIMIZATION Dump.mo: unparseRestrictionStr updated Absyn.mo: printClassRestriction updated tith Absyn.R_OPTIMIZATION() ClassInf.mo: trans updated, new record in State
- Added work-around for checkModel when BackendDAECreate.lowerArrEqn gets an array equation of unknown size. - This fixes the mosfiles/ArrayParameterSize test case.
- Fixed array reduction with unexpandable range for checkModel. - Fixed v[i] := (function returning tuple). - Added libraries/msl31/Modelica.Utilities test for Modelica.Utilities.Streams.readFile. - Added Modelica.Math.Vectors.reverse to Modelica.Math test case.
Fixes for bugs: #1353 #1298 - final parameters and constants are NOT input in record constructors. - disable checking for duplicate modifications via (Mod.lookupCompModificationFromEqu) in InstExtends.mo if the EqMod modification is typed and the sub modification is not. - keep the variability of the component in records - use the variability of the default bindings also when calculating the constant-ness of the call - update tests testsuite/libraries/msl31/Modelica.Magnetic.FluxTubes.mos (now correct) testsuite/records/RecordModifications.mo (improved it) testsuite/records/RecordVariability.mo (now display constant instead of input) - some other small changes (mostly indentation).
- Fix for HashTableStringToPath (using Util.id as its String->String functions) - This should also fix other similar issues with the type inference of polymorphic types
- Fixed issues with Types.getDimensionSizes returning -1. - Rewrote Static.sameDimensions to use DAE.Dimension instead of Integer. - Added testcases mosfiles/ArrayParameterSize and mofiles/ArrayInvalidDims.
- Relaxed type requirements of Util.listGetMemberOnTrue to make it more versatile. - Added Util.listRemoveFirstOnTrue. - Implemented inStream and actualStream for one-to-one stream connections.
- BackendEquation.mo - add functions traverseBackendDAEExpsEqnList, traverseBackendDAEExpsEqn - use traverseBackendDAEExpsEqnList for equationsCrefs - BackendDAEUtil.mo - use BackendEquation.traverseBackendDAEExpsEqns for traverseBackendDAEExpsEqns - BackendDAECreate.mo - use BackendEquation.traverseBackendDAEExpsEqns for expandDerOperator
- BackendDump.mo - fix bugs (BackendDAE.Variables to Variables and remove newline for zero crossings) - BackendDAEUtil.mo - use traverseExpTopDown for isDiscreteExp, statesEqns, incidenceRow - delete unused function incidenceRowStmts - BackendDAECreate.mo - delete function expandDerOperatorStmts and use DAEUtil.traverseDAEEquationsStmts
- Use traverseExp in CevalFunction.optimizeExp to traverse all expressions. - Use the cache in CevalFunction. - Updated parser/ParseCompilerSources test.
- Changed Lookup.lookupIdentLocal to have the same behaviour as lookupVarLocal, i.e. continue searching if the current scope is a for loop scope. - Implemented record assignment in CevalFunction. - Changed test case mosfiles/AlgorithmForInClass so that it doesn't use uninitialized variables. - Removed loading of MSL from some tests in mosfiles-msl22 that doesn't use the MSL.
Fixes for bug: #1347 #1335 - for annotations that contain references to the model parameters the class is instantiated and the parameters in the annotations are evaluated. - fixed getDocumentationAnnotation
- Added boolEq (bootstrapping) - Fixed MetaModelicaDev testcases (they need +d=noevalfunc so the new CevalFunction does not try to ceval external calls)
Added initialize function for FMU C file. fmu_model_interface.h contains structure that will be used to store model status information. Added checkInvalidState function in fmu_model_interface.c file to verify if a model is in invalid state or not. Added some code to fmi setter/getter functions also.
- Implemented more of CevalFunction (now available with comments!), so that it's now more or less functionally equivalent to Cevalfunc. - Removed Cevalfunc and switched to CevalFunction. This makes instantation of EngineV6 more than twice as fast. - Removed reduction to valueblock transformation in InstSection. - Fixed some type issues with Static.expandArray. - Implemented constant evaluation of fill in Ceval. - Added Util.listThreadFold. - Fixed listSplit so that the second list isn't reversed. - Fixed issues in Types.typeConvert with unknown dimensions. - Updated ForIterator1.mo in mofiles and mosfiles because of a dimension mismatch that was previously not caught.
-Fixed bug in AbsynDep for building class dependencies. -Added Exp.makeDivVector and Exp.makeProductVector. -Fixed bug with enum literal in Exp.terms and Exp.allTerms
- order potential roots by component reference string (alphabetic) if the priority is equal - this fixes some models in the MultiBody testsuite (for some reason in trunk they are ordered differently).
- Util.mo switch function arguments from listRemoveOnTrue to use it in compination with listFold_1 - BackendDAECreate.mo - remove all output variables from input variables for algorithm sections -> now testsuite works (mosfiles)
- YOU WILL NEED A NEW OMDEV/MetaModelica/RML for this: http://www.ida.liu.se/~adrpo/omc/omdev/mingw/ (revision 187) - replaced Util.boolString with boolString - get rid of local case/else declarations in ExpressionDump.mo - minor formatting changes
- get rid of local case/else declarations. - minor formatting changes - got rid of unused imports - added subversion RCS id to the files where it was missing
- homogenize printing (include package name). - get rid of local case/else declarations. - minor formatting changes. - added subversion RCS id to the file. - got rid of unused imports.
- homogenize printing (include package name). - get rid of local case/else declarations. - minor formatting changes. - added subversion RCS id to the file.
Updated CevalFunction implementation: - Fixed correct dimensions for function variables. - Added dependency analysis for function variables so that they are added to the environment in the right order. - Added function to convert all ASUBs to CREFs. - Implemented support for : and slices. - Implemented support for if, for and while statements.
- Added utility function Util.listSplitOnFirstMatch. - Added valueInteger and valueDimensions to ValuesUtil. - Implemented more parts of CevalFunction.
- fix some bugs check for records improved rename BackendDAEUtil.traverseExp to traverseAlgorithmExps - Expression.mo delete makeCrefExpNoType use crefExp improve isConst
- changed stringEqual to stringEq - YOU NEED A NEW OMDEV/MetaModelica/RML: OMDev: http://www.ida.liu.se/~adrpo/omc/omdev/mingw/ MetaModelica/RML for Linux, revision 183.
- Fixed polymorphism so that Util.listListMap now works - Removed DAE.T_POLYMORPHIC_SOLVED - Instead, we prefix polymorphic types from the called function with $.
- use setGlobalRoot/getGlobalRoot instead of System.addToRoots/getFromRoots - use Inst.instHashIndex instead of 0 in the set/getGlobalRoot - you will need a new MetaModelica/RML (or OMDev) to be able to compile/run: OMDEV: http://www.ida.liu.se/~adrpo/omc/omdev/mingw/OMDev-mingw-msvc-2010-10-26-revision-181.zip MetaModelica/RML for Linux, revision 181.
- SimCode.mo do not use DAELow.getAllExps. This is a realy bad function for large models. It needs too much memory. Use DAELow.traverseDAELowExps instead.
- added BackendVariable modele that deals with BackendDAE.Var, BackendDAE.Variables and BackendDAEVariablesArray. - started to push functions from SimCode.mo and DAELow.mo to that file.
- Exp.mo sort the functions and remove functions with equal functionality - ComponentReference.mo update Comments - BackendDAEUtil.mo improve error msg and use flag "checkBackendDAE"
Fix for bug #1323: - Fixed bug in Lookup.checkSubscriptsRange2 that only worked on constants. - Updated CyclicPerm test case, since it now gets a more correct error message.
- Added elaboration for internal builtin functions as a separate function - simplify() is now called OpenModelicaInternal.simplify() - The same goes for the mmc_xxx functions
- Algorithm.mo use Exp.makeCrefExp for crefToExp - Convert.mo use Exp.unelabExp for fromExpExpToAbsynExp use ComponentReference.unelabCref for fromExpCrefToAbsynCref - DAELow.mo use ComponentReference.crefAddPrefix for crefPrefixDer and delete makeDerCref because it has done the same as crefPrefixDer - SimCode.mo use crefPrefixDer instead of crefPrefixDer
- start to separate DAELow.mo on the files BackendDAEUtil.mo and BackendDAETransform.mo - all functions regarding the lowering are moved to BackendDAETransform and util functions need there moved to BackendDAEUtil
- DAELowUtil.mo - finish function to check that a variable (cref) used in an equation or algorithm is actually present in the declared variables. bug #1302 - Exp.mo - add function traverseExpTopDown, is used for DAELowUtil.mo
Fix for bug #1330: - Removed handling of implictly connected flow variables, because for some reason it's no longer needed and it causes problems with some old models. - Made the parallel test script a bit more random. - Updated some test cases due.
- continue to copy all functions do something with a ComponentRef from Exp into ComponentReference - DAELowUtil.mo - finish check of BackendDAE object Bug 1302 - Exp.mo - add function traverseExpTopDown, used for check of BackendDAE
!!! use clean or delete omc.exe to compile this update, I am sorry for the inconvenience. - Susan "import" clause implementation, use: import TemplatePackage.*; //for unqualified import ... the package-name prefix is optional when calling imported template (but may be used when a name hiding occurs) import TemplatePackage; //for fully qualified import .. similar to MM, the package TemplatePackage. must be used to access a template, e.g. TemplatePackage.aTemplate(..) - the new syntax for interface packages (typeviews) - in the interface package, see SimCodeTV.mo for example, use: interface package SimCodeTV package SimCode ... end SimCode; ... end SimCodeTV; - in the importing template package, SimCodeC.tpl for example, instead of typeview "SimCodeTV.mo" is now: import interface SimCodeTV; - SimCodeC and SimCodeFMU slightly redesigned to accommodate the new Susan's import feature and possibility (removal of the stringEqual() usage and some other changes) my notes here: - try to avoid data transforming operations to preserve model/view separation; express the transformation in the SimCode structure instead (usage of intAdd(), for example) - try to avoid overusing of the MM style of value bindings ... use dot notation instead - try to avoid bringing new names by the let clause when only aliasing other name or "naming" simple template invocation (except preventing multiple identical invocations) - indenting is natural and automatic in Susan, see the changes in SimCodeFMU.tpl (although, there are some remaining design issues here; to be soon finished) - Susan's "indexedby" keyword is now changed to "hasindex"; although one still must use only i0 or i1 names for the index ... to be soon finished - the "spackage" keyword changed to "package" used as the top-level package clause in the .tpl template packages (--> towards Susan and MM integration)
DAELow.mo: - bugfix for partial partialAnalyticalDifferentiation and partialNumericalDifferentiation of functions. Derive.mo: - add case for differantiate abs(). Exp.mo: - add solveLin for LinearSystem. SimCode.mo: - add functions to create always linear system in Jacobian code. - add sorting of Jacobian variables. Utils.mo: - update only some comments. simulation_runtime.* and solver_main.cpp: - add some code for dassl2 that enables the usage of the analytical Jacobian for calculations. - enable this feature by the solver flag "-jac", only availible if soure code was created with the flag "+d=linearization"
- Added OMEdit as a make target (built together with qtclients) (The Debian package has also been updated and should include an OMEdit package if all goes according to plan) - The OMEdit Unix makefile creates symbolic links/etc needed to compile OMEdit
- Fixed makeASUBArrayAdressing for package constants. - Updated some test cases, because for some reason we use different formatting for crefs and ASUBs. - Better elaboration of inStream and actualStream.
- Updated the testcases that load compiler sources to run a common script (less files to update if the compiler structure changes) - Don't load _stub files in parser/ParseCompilerSources (if you do, you don't test input/output of functions as they are overridden)
Partial fix for task: #1327 - this is a hack for lowering the memory requirements for storage of DAE.ExpType. - to activate this feature use +d=useTypeMemory - the feature is not activated by default as it slows down the testsuite by about 2 minutes (24 min. vs. 26 min).
Fixes for bug #1329: - Fixed prefixing of subscripts in crefs that could not be found in the environment, such as package constants. - Added test case mofiles/SubScript3 and updated libraries/msl31/Modelica.Electrical.Digital.
- The compiler flag +showErrorMessages now also shows Error.mo messages as they occur. This should make it easier to relate Error messages to failtrace messages. - If a message would be reverted, this is of course sort of bad + Keeps memory consumption low for large models + For looping models, you can now see errors even though instantation will never succeed
#1318 - Fixed inputs/outputs of all functions using match expressions (all crefs are now in the correct order, with the correct name, and without duplicates)
#1318 - Add API call strictRMLCheck() - Checks that all input/output of a singleton match expression in a function matches the function arguments - Run it on the whole compiler in the testsuite - Currently 179 functions fail the check
#1318 - Remove NONE from all places in the code. It has been replaced with NONE() - This is enforced when parsing the compiler sources (which is done in the testsuite)
#1318 - Remove more NONE() - Add check for NONE already in the parser (so the testsuite can automatically fail if someone uses evil syntax) - Should probably only be enabled with +d=rml, but +g=MetaModelica will work for now
- Improved error messages for lookup of function (now states that it was looking for a function; previously we didn't know if it was the type of an element or a function call that failed)
#1318 - Add testcases PartialFn15 and updated DumpTest (with Exp.printExpStr and DAEDump.dumpDebugDAE) - These testcases all use function pointers as data (in lists or options), as well as pattern matching on these structures - Added more functions to RTOpts_omc
Update symbolic jacobian and generation of linear model - fixed handling of algorithms for symbolic jacobian - fixed some general bugs for calculating symbolic jacobian - improve the performance for calculating symbolic jacobian - add simplifying equations and removing unused equations for codegen - fixed some general bugs for generation of linear model - update testsuite/linearization
Fixes for bug: #1325 - merge cached overconstrained connection graph with the current overconstrained connection graph Compiler/ConnectionGraph.mo Compiler/Inst.mo - added test for this bug in testsuite/libraries/multibody/elementary/DoublePendulum.mos testsuite/libraries/multibody/elementary/Pendulum.mos
- Util.mo - add listMapFlat2 - add DAELowUtil.mo - add function to check DAELow object checks if all componentreferences of an expression part of the DAELow object - DAELow.mo - add a additional input to traverseDEALowExps - run DAELowUtil.checkDAELowWithErrorMsg not yet in function lower because of unexpected error msg from checkDAELow for some testcases - SimCode.mo - adjustments for additional input to traverseDAELowExps
- prepare for 1.5.1 - update version number in settingsimpl.c - update directories in Examples/ModelQueryAPIexamples.onb Examples/UsersGuideExamples.onb - build a new OMNotebook.exe
Fixes for bug: #1324 - fixes for updateConnection: https://openmodelica.org:8443/cb/issue/1324 - update the interactive symbol table with correct program in Interactive.mo - add testsuite/mosfiles-nosim/interactive_api_attributes.mos to test for this bug.
- Added runtime support for stringCharListString - Fixed a bug with generation of names for function pointers - We can now generate code for TplMain.main (no testcase has been added; it is slow and does not link)
Implementation for tasks: #1277 #1279 - Rewrote parts of the connection handling so that all flow variables are added as inside connectors by default, which is according to the Modelica specification. - Removed the phase that connects unconnected flow variables, since it's no longer needed now. - Potential connection sets are now sorted alphabetically, and the first element in the set is then connected to all the others in the set. - The equations from connects are now generated at the top level, instead of for each class as was previously done. - Deleted components are no longer instantiated. - Added utility function Util.listMergeSorted. - Updated the parallel test script to report missing test cases. - Updated some test cases due to the changes made.
- Add error message if inputs or outputs of a match expression are not component references - Added testsuite/meta/ErrorMatchInOut{1,2,3}.mo to test this
- Changed the path of a metarecord from Package.MetaRecord to Package.UnionType.MetaRecord - This means we can get the path of the uniontype by looking at the MetaRecord (this is needed if we create a list of metarecords)
Fixed a couple of bugs in traverseExp, it now properly traverses subexpressions in matrix and array expressions. As a result all dependencies are found in expressions like:
- SimCodeC.tpl - add Version of Compiler to first comment - System.mo - add function getCurrentDateTime - add function getUUIDStr both used for fmu xml file - Util.mo - add uniontype DateTime - add function getCurrentDateTime both used for fmu xml file - SimCodeTV.mo - add function builtin.add - add function builtin.stringEqual - add functions System.getCurrentDateTime and System.getUUIDStr and Util.getCurrentDateTime - add uniontype Util.DateTime - continue with SimCodeFMU.tpl - add file c_runtime/fmu_model_interface.c
Fixes for #1318 - Added field patternInfo to Absyn.CASE (it displays fileinfo only for the pattern; the other parts of a case already have Absyn.Info embedded) - Propagated this field to more functions in the pattern matching modules
Bootstrapping: #1318 - Changed System.stringAppendList to use stringAppendListExt in OMC (else you get conflicting types) - Added testcase meta/DumpTest.mos: It tests Dump.dump Dump.dumpStr Dump.getAstAsCorbaString and DumpGraphviz.dump functionality in OMC - Bugfix for errorext.cpp (declaring globals as static, so they are not free'd multiple times when we dynamically load functions that also linked against errorext)
Added features for generating linear models, that looks like: der(x) = A*x+B*u; y = C*x+D*u; The Code to generate the Matrix's A,B,C,D is not activated by default. It can be activated with the debug flag "+d=linearization". With the usage of this debug flag a linear model can be created from the simulation program by using the flag "-l ".
#1308 - Fix so that X.identity does not lookup the builtin identity function - This is just a partial fix of the problems we have with builtin functions
- Changed the polymorphism implementation a bit more - We now use a new function Types.subtypePolymorphic that does polymorphic bindings if the expected type contains any polymorphism - Now, we can't try to convert an expression while solving the system of polymorphic types - Added an error message if we can't solve the polymorphic bindings (such as when we have contradicting input)
Fixes for bugs: #1272 #1130 #1270 #1120 - finished the expandable connectors implementation - added tests for expandable connectors: testsuite/expandable/* [many thanks to Pavol.Privitzer for providing the models] testsuite/libraries/msl31/Modelica.Blocks.mos [BusUsage] testsuite/libraries/multibody/systems/RobotR3.mos [oneAxis and fullRobot] - other small edits, comments and formatting.
- Remade polymorphic function calls: We iterate, trying to solve the variables until fixpoint is achieved - There might be more problems with the algorithm (some cases have probably been forgotten, and there might be problems with using Types.equivtypes with empty lists or NONE()) - Added boxptr_stringAppend - Added cevalBuiltinListLength - Added testing of Util.getOption and Util.listMap1r to UtilTest.mos
- Changed Static.instantiateDaeFunction to not use print() for error messages - We use Error.mo instead; and we do not print error messages if another was already produced - If Static.instantiateDaeFunction fails, return status Util.FAILURE() - This disables the error message that no candidate exists (and the error lists a candidate with the same type...)
- Improved MetaModelica error messages by performing the conversion to list() when elaborating an array - This is only performed if MetaModelica grammar is specified and the type cannot be a Modelica array (only boxed types) - Added a debug flag +d=rml which will improve the error messages even further by also transforming arrays of basic types into lists - Bugfix Types.isBoxed: T_METARECORD was previously missing
- faster instantiation of enums by more tuning of the inst cache preconditions in Inst.prefixEqualUnlessEnum. Modelica.Electrical.Digital is about 1-1.5 minutes faster. - renamed some of the SCode restrictions to full name INT->INTEGER, BOOL->BOOLEAN, etc.
Fix bug #1303 - Bugfix for Inst.checkRecursiveDefinition - We now check if the class we looked up is the same as the actual class, instead of just comparing the last identifier (this should also successfully guard against renaming imports/etc) - Added testcase NotDependsRecursive.mo
Fixes for bugs: #1304 #1305 - implemented setting of array bindings in functions - implemented String(x, format="str"); where x can be any of integer, string, real - rem is now translated to mod_real or mod_integer depending on the type of first argument - fixed handling of external functions with *no return* arguments, i.e. Modelica.Utilities.Streams.print - handle case DAE.STMT_NORETCALL in DAEDump.mo - added testsuite/mosfiles/Random.mo testsuite/mosfiles/Random.mo to test these things and more.
- Fix bug in System.trim (becomes a 1-char long string with random memory when called on a string with length 1) - Fixes the randomly failing EventIteration testcase
- Changes to function instantation are now almost working - There is a problem with record constructors (the added type is not the RECORD_CONSTRUCTOR function) - Derivative annotations are not handled properly yet
Fixes for BUG: #1071 - allow different type names for components if they lead to the same class but issue a warning about it - add source message to the duplicate component warnings and errors - nicer printing of component in SCode.unparseElementStr - nicer display of the error/warning message - added more tests and updated the old
Fixes for bug: #1234 - handling Absyn.UNQUAL_IMPORT in InstExtends.mo fixes the 1234 bug. - check earlier in Inst.mo if Type name equals Comp name in Inst.addComponentsToEnv. this will get us a warning before running into lookup errors so the user has some idea what the real problem is. - add source location to the warning above. - changed System.mo so that System.strcmp returns only -1, 0, +1 so we can patter match on it directly used in Lookup to get more deterministic code. - added warning for updating the environment with a different kind of item than is already there VAR vs. CLASS. Disabled for now, see more info in the code. - other minor edits.
Fix for bug #1262: - Add generation of initialization for local variables in functions. - This also causes default values on output variables to work. - Added test case mosfiles/LocalVariableInit.
- Refactoring: Moved DAE.FUNCTION and DAE.RECORD_CONSTRUCTOR from DAE.Element to DAE.Function - This simplified a lot of code in the compiler; the elements were usually filtered to either contain functions or non-functions
Fixes for bug #1134: - Fixed constant evaluation of String(enumeration literal). - Implemented minimumLength and leftJustified when constant evaluation String(). - Removed significantDigits from *_to_modelica_string function in runtime except for real, because real is the only one that supports significantDigits. - Updated test cases that use String().
Fix for bug #1040: - Added new record to DAE.Const, DAE.C_UNKNOWN, which is used for component binding with unknown variability. - Rewrote Static.elabBuiltinFill to use DAE.C_UNKNOWN when checkModel is used and fill couldn't be expanded. - Added test case mosfiles-nosim/ModifierVariabilityError.
- remove the space at the end of OPENMODELICAHOME in: set OPENMODELICAHOME="..." && ... by adding a \\\n after the last " - any of the OpenModelica nightly-builds done since this space appeared are not able to compile any models if OMDev is not present. Doh! - many thanks to Carlos Antunes [ cmantunes nowthor com ] for pointing this out!
- Updated grammar to allow Code( () ), i.e., expressions with surrounding parentheses. Before, anything inside Code() starting with a parenthesis was assumed to be a modification.
Fixes for bug #1040: - Added optional scope information to Env.Frame, so that it's possible to see if the current scope is a function or not. This is needed for bug 1040. - This means that we can now check if we're inside a function or not in Static.warnUnsafeRelations, so that we don't print a warning about == and != inside of a function. - Added new function Env.newEnvironment to create a new empty environment, and made Env.newFrame protected, since newFrame was only used to create empty environments anyway. - Extended Env.newFrame to set name and type of the new frame. - Updated test case libraries/msl31/Modelica.Math, since the erronous warnings about == on Reals are no longer issued.
- Remove all (match) equations of the kind "x = x"; these are generated by match x case x ... - Since Modelica disallows assignment of input variables, it's a good idea to remove these assignments (when we enforce this property; we either need to enforce it or change the matchcontinue implementation to first copy all inputs)
Fix for bug #1207: - Fixed so that iterators in for loops get correct type when the range is of enumeration type. - Added test case mofiles/ForIteratorType and updated mofiles/Enum7.
- Check if SimCode is trying to generate code to dynamically load a function that takes a function pointer as input - This is an error (the runtime doesn't support it), and a testcase has been added for the error message
Final fixes for task: #1268 - now the user can select in GraphViz lefty which connect edge to break. - the selected edge is passed to OpenModelica breaking algorithm as a guide. - this all happens in an interactive loop until the user is satisfied. - heavy tailor of openmodelica.lefty to: + not be able to break branches + easier and targeted menus + complete help text.
Partial fixes for task: #1268 - implemented means to display the overconstrained connection graph to the user so that he can decide which connect to break. - added flags: +d=cgraphGraphVizShow use this to generate the overconstrained connection graph as GraphViz file and display it with GraphViz lefty. You will need to have lefty[.exe] in the PATH +d=cgraphGraphVizFile this flag will only generate a GraphViz file Model.gv - still left to do: handle the user input and order the connects so that the edge given by the user is handled last and will be broken - added Compiler/scripts/openmodelica.lefty which is an adaptation of dotty.lefty for GraphViz. Copy this file into share/omc/scripts on build. - moved Inst.selectList to Util.selectList. - more explanation to System.writeFile, what is file name and what is data.
- Changed SimCode structure slightly: - When elaborating functions, we collect the includes and libs - This avoids duplicate includes, which were previosuly not collected. It also does more things in a single pass - We also only generate the in-function for the "main" function (we could also generate a main() function for this one if the inputs were list or void) - The testsuite should be slightly faster as GCC will only have to compile roughly half as many functions
Fixes for bugs: #1244 #1295 - More information is now printed when we can't find an outer for an inner: The inner components that were found until we instantiate outer are listed so the user can find out if he didn't misspelled the name of the outer: Example: Warning: Variable particleEffect1.particleEffect2: No corresponding 'inner' declaration found for component particleEffect1.particleEffect2.updateVisualization2 declared as 'outer '. The existing 'inner' components are: MyPackage.UpdateVisualization updateVisualization; defined in scope: MyPackage.Examples.Effects.ParticleEffect. Referenced by 'outer' components: {particleEffect1.updateVisualization} MyPackage.UpdateVisualization particleEffect1.updateVisualization; defined in scope: MyPackage.Effects.ParticleEffect1. Check if you have not misspelled the 'outer' component name. Please declare an 'inner' component with the same name in the top scope. Continuing flattening by only considering the 'outer' component declaration.
Fixes for #1296 - Moved the generation of pattern-matching equals equation to instStatement, since RML allows pattern matching here as well - lhs := rhs is translated into: _ := match () local vars // list of temporary vars case () equation vars = rhs; match vars case lhs /* lhs becomes bound here */ then (); end match; then () end match; - Error messages for this are probably pretty bad... - Note that you can now write "3 := 1+2" in an algorithm section if MetaModelica grammar is enabled (just like in RML) - Added testcase meta/AlgPatternm.mos
- Reverted part of r6231 (re-enable String pool; malloc() doesn't work to 100% when returning strings through the interactive API) - Updated meta/UtilTest.mos (we create a much smaller list of Strings, and a large list of integers instead)
Fix for bug #1044: - Added Util.listUnionComp, list union with a compare function. - Made SCode.equationEqual public. - Use list union in Inst.instClassdef2 to filter out identical equations. - Added test case mofiles/IdenticalEquations.
- Implement support for match expressions that return a tuple to a single cref - b := match () case () then (1,2); end match - Also added error messages for when the number of actual/expected output of a match expression differ - Testcase for this will be added when Absyn.Info is propagated for match expressions
DAELow.mo, DAELow.lower2 - include source position when reporting errors - when running checkModel ignore warnings/errors about unimplemented features in the back-end: + initial algorithms + initial if equations that cannot be translated to if expressions + if equations of the form if initial() then equations end if; + constrain function
- Fixed instantiation of derived types that are uniontypes (MetaModelica/RML uses type UT = T1.UT syntax instead of import T1.UT) - Propagated Absyn.Info to instClassDef (better error messages)
Fixes for bug #1121: - Removed index from DAE.ET_ENUMERATION, since it no longer needed due to DAE.ENUM_LITERAL. - Split the list of variables in DAE.T_ENUMERATION into one list containing literals and one containing attributes. - Implemented enum->Real implicit type casting. - Fixed connect with enumeration variables. - Fixed so that enumerations are basic types. - Static.elabCref now takes the variables subscripts into account when determining it's variability. - Added utility function Util.isPrefixListComp. - Removed testsuite/mofiles/rtestsim, since it's not used. - Updated test cases and enabled the Modelica.Electrical.Digital tests.
- Added CREF_FULLYQUALIFIED to the parser (and Absyn,Static,Lookup,Dump,Exp,etc). - This is needed to parse Modelica 3.2 properly (e.g., abc = .Modelica.x.y.fn()). - Disabled the string pool in c_runtime/modelica_string.c - It never free'd allocated strings anyway, so changing it to strdup is safe (but stupid) - Updated DFA.mo to use Absyn.CREF_FULLYQUALIFIED for primitive operations such as listRest() - Else a function named listRest that uses the listRest() primitive will become a recursive call due to going back to Absyn (Valueblock implementation limitation) - Added testcase UtilTest.mos - Tests Util.listIntRange2, Util.listMap1, Util.listMap and Util.listFold - We test the actual Util.mo from the trunk, so changes to that code reflects on the testcase
- Updated makefiles to link against sqlite3 instead of compiling it ourselves on Linux - Updated README to cover this dependency - Updated omdev makefiles to generate Compiler/runtime/runtime.a like Linux does (this is so Windows and Linux can link different objects in Compiler/runtime) - Updated configure script to search for sqlite3
- Added support for if-equations in match-expressions - Added some error messages when an equation that is not valid in the context of match-expressions is found
Fixes for #1294 - in MinGW/MSVC/Windows open the parsed file in "rt" mode Parser/antlr-3.2/runtime/C/src/antlr3filestream.c - in MinGW/MSVC/Windows open the written file in "wt" mode Compiler/runtime/printimpl.c Compiler/runtime/systemimpl.c
Fixes for #1294 - System.writeFile and Print.writeBuf now open the file in *binary* mode with "wb". Otherwise, if you open the file with "w" it opens it in text mode and when you write \r\n into the file it writes \r\r\n because \n on Windows is \r\n! - added testsuite/parser/ParseModel.mos to test that Parse-Write-Parse cycle works.
- Fix for ModelicaExternalC - Compile with "-Dstatic=", to remove static keywords everywhere. - Static functions are not exported, but all functions were declared static. - Compile with -D_POSIX_ so OSX works
- Added /libraries - a common place for the Modelica libraries we test OpenModelica against - It is possible to switch between Modelica versions using the following environments: - OPENMODELICALIBRARY=/libraries/msl221:/libraries/common - OPENMODELICALIBRARY=/libraries/msl31:/libraries/common - (Separate with ; on Windows platforms) - Moved /libraries/testsuite/libraries/ ... msl221 msl31 BioChem to /libraries - Added ModelicaAdditions, SimpleFluid to /libraries - Updated testcases to reflect these changes (testcases that load MSL now use loadModel)
Fix #1294 - In the parser, we replace CRLF with LF in Windows. This is because fprint("\r\n") in MinGW is CRCRLF. - This is performed as backpatching because you can't set the text of a fragment rule (the STRING_GUTS is just the start/stop index in the instream). The alternative would be to lex strings by hand (including exception handling/error messages) - In Linux/OSX, the backpatching is not performed, since this issue is not present there - NO testcase was added for this because rtest ignores whitespace
- Added support for parsing class Code - cref's can't use the CODE token due to parsing conflicts with expressions, but the MSL 3.2 beta now parses - Added testcase parser/Code.mo to test this as it's not needed to add the whole MSL 3.2 to the repository yet
- update RedesignBackendOMC.doc - Util.mo - add listMapFlat and listMapFlat1, this is the same as listMap and listFlatten, but with less memory consumption - DAELow.mo and Algorithm.mo - add functions to traverse all expressions of an DAELow object/ algorithm - SimCode.mo - reimplement extractDelayedExpressions with less memory cunsumption and speedup
Fix for bug #1286: - Added error message for modifier type errors. - Added test case mofiles/ModifierTypeError. - Fixed some error messages in InstSection, and updated some tests to reflect these fixes.
- Added new module InstSection.mo. It handles instantiation of algorithm and equation sections (including connect-equations) - The split is rather well defined (for loops sometimes need to declare a new loop variable, so it still needs to import Inst) - Combined compilation time is the same (split 67/33) - ~40 seconds faster to compile omcd with a single-line change in Inst.mo
Fix #1291 - Propagate Absyn.MatchType to SCode, DAE and finally code generation - Use throw instead of break when calling "fail()" in the then clause of a case - Don't catch exceptions in match expressions (pattern matching failures break instead of throw) - Added testcase MatchCase12.mos
Fixes for bug #1272: - Fixed several checkModel issues with parameters without bindings. - Removed dummy dimensions phase from CevalScript that was introduced in r6142. - Disabled "unbound parameter"-warning when doing checkModel, because we can't know whether a parameter would have been given a binding when instantiated or not. - Cleaned up the handling of dimensions a bit: - Renamed DAE.DIM_NONE to DAE.DIM_UNKNOWN and DAE.DIM_SUBSCRIPT to DAE.DIM_EXP, to better tell what they represent. - Use DAE.DIM_UNKNOWN instead of previously used DAE.DIM_SUBSCRIPT(DAE.WHOLEDIM) (a subscript is not a dimensions). - Updated tests Modelica.Math and Modelica.Blocks in libraries/msl31, and enabled Modelica.Blocks.Continuous.StateSpace in Modelica.Blocks.
Fix #1290 - Functions that fail() now return that as a value, so we can distinguish between those and cases when code generation/ceval failed - More make fix-svn-eol-style
Fix #1292 - Changed ModelicaExternalC makefile so that it does not use the CFLAGS env.var when compiling in Unix. Instead, we use the CFLAGS specified when configuring. This solves the issue of -ansi -pedantic being added to a file that cannot be compiled -ansi -pedantic.
- Changed default optimization level from -O0 to -O3. MODELICAUSERCFLAGS may override this. - Testsuite runs ~0.2% slower than earlier (our testcases only simulate for 4 or 5 time steps, which means the additional cost of GCC optimizations is higher than the gain) - Actual simulations see a 5~25% improvement due to GCC optimizations
- Susan's text rendering improved performance; now using Print.printBuf instead stringAppend ( approx. 4x faster Text -> String conversion; resulting to approx. 3x faster template evaluation for tested models; with the cost O(n+s) where n is number of strings and s is their overall length; previously it was O(n^2*m) where m is average string length! ) - template based generation of simulation initial data file; the new type SimulationSettings added to SimCode TODO: complete initial values elaboration for enumerations; now, algebraic enumeration start values won't work (e.g.,discrete enum vaiable) -> see DAEUtil.mo comments - timeCodeGen time in SimulationResult record is now separated into timeSimCode and timeTemplates for SimCode structure building and templates evaluation - fixed non-working optional parameter fileNamePrefix in script commands simulate() and buildModel() - added 2 external helper functions to Print to support fast template rendering (Adrian, please, check it if they are OK) - changed SimCode.ModelInfo.name to Absyn.Path - fixed a bug in SimCode.cre2simvar to correctly deal with derivatives - added SimCode.derComponentRef to support der(cref) handling in templates -> TODO: this is only a workaround; there should be nothing like der(cref) in as an input expression - C# codegen improvements
Fixes for bug #1272: - Allowed Inst.elabComponentArraydimFromEnv to fetch dimensions from the component declaration if a component doesn't have a modification.
Fixed for bug #1272: - Added phase before instantiation when doing checkModel that inserts dummy dimensions where needed. - Added working models in Modelica.Blocks to test suite.
Fixes for bug #1275: - Allow arrays in instBuiltinAttribute when checkModel is used, so that checkModel can be used on array types with modifications. - Added test case libraries/msl31/Modelica.Mechanics.MultiBody.
Fix for bug #1237: - Added special case for Modelica.Electrical.Analog.Lines.M_OLine.segment in Static.elabSubscriptType, to allow that model to use Real as array index. - Updated test case libraries/msl31/Modelica.Electrical.Analog. - Replaced Absyn.pathPrefixOf with a function of less algorithmic complexity. - Renamed Absyn.stringPath2 to Absyn.stringListPath and made it public.
Speed improvements #1264 - System.mo/systemimpl.c: added System.stringAppendList and improved checking for file writing - Print.mo/printimpl.c: improved file handling and buffer filling + new functions for Template Codegen - CevalScript.mo: check also partial classes in CevalScript.checkAllModelsRecursive and do not filter libs. - Util.mo: call System.stringAppendList in Util.stringAppendList
Fixes for bug #1274: - Implemented calls on the form min|max(function returning multiple values), which may or may not be valid Modelica but which is used in Modelica.Math. - Unified elabBuiltinMax and elabBuiltinMin, since they do the same thing anyway. - Added Static.makeBuiltinCall, to make it easier to create builtin calls. - Added fixed models to test case libaries/msl31/Modelica.Math.mos.
Fixes for bug #1274: - Replaced Static.dimSize with Types.getDimensionNth. - Rewrite Static.computeReturnType to allow unknown dimension in matrix multiplications when checkModel is used.
Fixes for #1273 #1282 - allow partial classes to be fully instantiated via checkModel and issue a warning about it. - update testsuite/libraries/msl31/Modelica.Electrical.Analog.mos - update msl31/Makefile - make sure msl31.log is always generated in testsuite/libraries/Makefile
#1266 - do memory profile only when MEMORY_PROFILE is defined - use $CLAGS in Makefile.common - more comments in Makefile.vc - ensure that variable declarations are first in a block in Modelica.g (for Visual Studio CL crap compiler) - do not use void inside macros in ModelicaParserCommon.h (for Visual Studio CL crap compiler) - ensure that variable declarations are first in a block in parse.c (for Visual Studio CL crap compiler)
- Fixed connect statements of array with enum dimensions. - Added test case mofiles/EnumConnectArray.mo. - Removed unnecessary parentheses around annotations in DAEDump. - Modified msl31/Makefile so that the parallell test script can parse it correctly.
Fixes for bugs: #1273 #1156 - OMC will now use the start value for a parameter during instantiation if the parameter does not have a default value and report a warning about it. This is widely used in Modelica 3.1.
Fixes for bug #1274: - Changed Static.elabBuiltinSize so that the resulting expression is not a constant if we don't know the dimensions yet. - Added check for checkModel in Static.elabBuiltinCat2, in case the dimension is not known.
- add a cumulative timer in System: + System.resetTimer() -> set the time to 0 + System.startTimer() -> starts counting + System.stopTimer() -> stops counting and adds the elapsed time since System.startTimer() to the cumulated internal time + System.getTimerTime() -> retrieves the internal time.
- transform an integer literal into an enumeration literal if the requested type is an enumeration. - used in Modelica.Electrical.Machines and Modelica.Electrical.Digital.
- Transform strings that contain \ not followed by a proper escape char with \\ - We print a warning whenever we do this. It is not in the specification; only for compatibility with Dymola. - Fixes bug #1143, add testcase testsuite/parser/DocumentationBackslash.mo
- Implemented assignments on the form cref := function_returning_tuple(...), which is possibly needed for bug #1274. - Added test case mofiles/TupleSingleAssign.
- got rid of an left out debug print in Compiler/runtime/errorext.cpp - give more memory to ANTLR3 by default in Parser/antlr-3.2/runtime/C/include/antlr3defs.h - use NULL instead of 0 in Parser/parse.c
- speedUp again the backend for handle the division by zero problem therefor Exp.printExp2Str have two new inputs. This inputs are functionpointers. One for how ComponentRef should be printed and one for how DAE.CALL should be printed - Inline.mo - remove unused import
- ClassInf.mo: handle all cases in ClassInf.getStateName - Exp.mo: minor edit - CevalScript.mo library filtering for checkAllModelsRecursive (disabled for now) we should make possible to specify a filter in this API.
- Allow the parser to treat list[:] as valid MetaModelica code, since that's the syntax used in the compiler. - Fix a bug when a generic parser error got as the previous token. - Added testcase for this - Added a testcase that loads all the Compiler/*.mo sources and parses them - None of them give error messages using the new parser
- speedUp the backend for handle the division by zero problem therefor Exp.printExp2Str have two new inputs. This inputs are functionpointers. One for how ComponentRef should be printed and one for how DAE.CALL should be printed
- use g++ for now to compile the generated parser/lexeer code until MetaModelica problems with the alignment of double is solved. - fix compilation errors and warnings due to compilation using g++ vs. gcc.
Fixed a bug in tables.cpp, when table is not read from file - in that case it is passed to table-intialization function as an array (which is a local variable in a wrapper function). Previously the code did not copy that array (just the pointer value).
- Adding Compiler/runtime/rtclock.c; a part of the System module - Contains functions for _accurate_ timing (the Linux timer reports a 1-nanosecond resolution) - Added extra fields to the SimulationResult record returned by simulate() - totalTime, timeFrontend, timeBackend, timeCodegen, timeCompile, timeSimulation - The fields are disabled when running omc through rtest - Added new flag to omc, --running-testsuite flag (note that you need to use -- --running-testsuite in order to prevent the RML runtime from eating the flag)
- Implemented option to output annotations in flat modelica. - Cleaned up Interactive.evaluateGraphicalApi to make it easier to maintain. - Updated some msl221 test cases that are normally not run, due to Martins recent changes.
- Changed the output of simulate() - Two fields: resultFile and messages - If the command fails, only messages will be present - If the command succeeds, the messages field is the contents of output.log - More fields will be added (for time measurements; to be disabled by a compiler flag so we can run the testsuite)
- Fixed so that iterators in for loops get correct type, instead of assuming that the iterator is an integer. This fixes enumerations in for loop ranges. - Updated test cases and added test case mofiles/EnumFor.
- Removed unnecessary VarTransform.VariableReplacements from DAELow.removeSimpleEquations. - Changed type of aliasVariables in DAELow.DAELOW (currently ignored in trunk).
- ClassLoader change: Sort subdirectories so list() output is the same in Linux and Windows - Add (preliminary) parser support for fully-qualified names and crefs - Absyn was not updated with CREF_FULLYQUALIFIED; a warning is output - pathString was not updated to print the initial dot for fully-qualified paths, since the function is used in so many places - Added testcase for empty within statements
- Added parsing support for empty tuples, and Modelica wildcard matching in tuples: (a,,c) is (a,Absyn__WILD,c). It's the same as writing (a,_,c) with a MetaModelica lexer.
- Implemented reduction of enumeration ranges so that the enumeration literals are preserved. - Added utility function Util.listSub. - Added test case mofiles/EnumRange.mo.
- handle also inputs from DAELow.ALGORITHM in remove simple equations - check if all inputs/outputs still used in algorithms - more information in case of an error for lowerWhenEqn
- Fixed elaboration of sum of array with enumeration dimensions. - Expanded test case mofiles/EnumDimSum to test the new functionality. - Changed Util.listMap1_tail and Util.listMap1r_tail so that they use listReverse instead of listAppend. - Added function Util.listMapAndFold.
Reverted checking for stricly-monotonous time samples in c_runtime/tables.cpp. It turned out that having only monatonous time samples is not the smartest idea, since CombiTimeTable does not raise any events.
In c_runtime/tables.cpp, fixed modulo divison in extrapolation and add zero-division guarding in interpolation (since time samples do not need to be strictly monotonous anymore).
- added missing c_runtime/ModelicaExternalC/Makefile - fixed ö from Linköping in ModelicaExternalC.cpp and included "../tables.h" instead of "tables.h"
- handle also inputs from DAELow.ALGORITHM in remove simple equations - remove negation sign, - remove equal inputs - TODO: check if all inputs still used in algorithm
- handle also inputs from DAELow.ALGORITHM in remove simple equations - TODO: remove negation sign, remove equal inputs, check if all inputs still used in algorithm
- Handle $Code in ANTLR2 and ANTLR3 parsers; in preparation of MSL 3.2 support - Tools are recommended to use $Code instead, but for now Code is also supported
- ANTLR3 parser - Handle code expressions as in ANTLR2 (never output as VARIABLENAME or TYPENAME) - Commented Absyn.mo to reflect that the parser shouldn't consider these - Handle integer overflow in the parser (64-bit versions now get up to 63-bit integers; this may cause differences in test models - if so, simply force them to be real numbers)
- Added support for Parse.parsestring and parsestring in the ANTLR3 parser - Now clients like OMNotebook and OMShell work fine with it - Added testcase for parsing "else" in matchcontinue expressions - TODO: Flat Modelica
- Updated ErrorExt runtime - The C version now has a function rollBackAndPrint, which does a rollBack to an ID, and returns the strings of all errors that were removed from the stack. - To be used by the new parser for handling the weird output of Parse.parsestring
- Modified some old testcases that used MetaModelica grammar (+., +& operators) even though they were Modelica testcases - Fixed some issues with the ANTLR3 parser crashing when the lexer was fed bad input - Fixed parser errors in testsuite/mosfiles/BouncingBall.mos (non-backtracking parsers can't see the difference between if-expressions and if-statements; it needs parenthesis or to be part of an assignment statement in order to work properly) - Fixed rtest (erroneous testcases now always print "erroneous" regardless if they fail or not)
- ANTLR3 parser now compiles lexers in separate object-files, and can switch between them at runtime. No MetaModelica tokens will be generated from the Modelica3 lexer. There is also a Modelica2 lexer if someone wants it.
- Fixed some more issues in the ANTLR3 parser (97 of 1036 testcases failing now) - Still needs to be able to work as string parser (CORBA communication, etc) - Needs to be checked for performance issues (loadFile() is faster, but instantiateModel() is slower when working on the generated data structures) - Needs to have two (or three) different lexers (for Modelica, MetaModelica, maybe flat Modelica modes) - Currently, there are some special macros for MetaModelica stuff, but these are ugly - Moved around in the testsuite: created a parser library strictly for testing lexing/parsing/unparsing - One of the new testcases does not work with the ANTLR2 parser, because it can't switch between MetaModelica and Modelica mode
- Fixed bug 1241, wrong array index in expanded multidim equation. - Added test case mofiles/ArrayIndex2 to test the fix. - Updated test case mosfiles/SliceAssignment with bug id.
- Commented out case in DAELow.traversingextendArrExp that converted component references belonging to blocks to empty calls. - Added test case mofiles/BlockResult.
- Fixed bug 1249 by relaxing the condition in crefHasScalarSubscripts, so that crefs can have less dimensions than subscripts. - Added test case mosfiles/SliceAssignment.
- Introduced a new Exp type, ENUM_LITERAL, that represents enumeration literals. - Enumerations in array dimensions and array subscripts are now kept in the flat Modelica output. - Replaced DAE.ArrayDim and Inst.DimExp with DAE.Dimension. - Added type constants to Builtin.mo to make it easier to change type representations. - Changed Exp.printExp2Str to take a string delimiter as input, so that DAEQuery and XMLDump don't need their own copies of printExp2Str. - Fixed a lot of type errors in Static, Exp and ValueUtil. - Updated the code generator to handle enumeration literals and the new dimension type. - Updated the parallel test script to handle erronous test cases. - Updated a couple of test cases due to changes in the flat Modelica output. - Added a test case to test enumeration dimensions in array equations.
- Updated ANTLR3 grammar slightly (if-expressions). It can now handle ~623 of the testcases, and many of the "failing" ones are just old ones but with improved error messages.
- More actions to the ANTLR3 parser - Now initializes like an RML module so we can use real RML calls and see how slow the parser is using lots of malloc()
- Simulation runtime change: - The cref defines also define $P$old<%cref%> (and old2) - This is a replacement for the old() old2() functions and is a lot faster
- fixed a bug in SimCodeC.daeExpAsub() in the last case where context condition should be FUNCTION_CONTEXT vs. other contexts (did not work for OTHER context) - removed a redundant case (repetitive code) with Susan's "or case" feature in SimCodeC.daeExpMatrix() - a new version of C# code generator (better array support in functions, mainly 2D slicing)
Improved error messages in Static.mo - added Prefix information into them. Modified test files where needed. See http://openmodelica.ida.liu.se:8080/cb/issue/1235?navigation=true
- Changed the inline implementation slightly so that it works properly with events - Added functionODE_inline in the runtime (only called by the inline solver) - Now uses RK order 4 properly (was order 1 previously) - Verified that RK produces correct results with der(z) = time - The inlined code now updates the global time instead of the solver routine
- Added "inline-rungekutta" solver - Uses C preprocessor, and for now "inline-euler" and "inline-rungekutta" requires adding environment variables so that the executable compiles code for the inlining
- Added new solver "inline-euler" - Works for all equation blocks OpenModelica currently can generate derivative assignments for - Does not generate callback functions for all the blocks (which means it can't be used to implement inline-rungekutta) - Mixed equation systems inline the solver in each iteration, which is not optimal performance - Does not require any API calls or flags to use this solver - simulate(..., method="inline-euler") works
- Added failtrace to DAELow.lowerStatementInputsOutputs. - Fixed correct type of DAE.STMT_ASSIGN_ARR in Algorithm.makeAssignment2. - Fixed code generation for array equations in algorithm sections in models.
- Added a generic error message for failing to instantiate an equation - There are many ways that the equations can fail, and only error messages for some; it's important to at least print something - Closing bug #1239 (which had 2 errors in it; neither of which were caught)
- Updated OMC lexers to use look-ahead that detects if +. is supposed to be PLUS followed by some text, or realAdd (i.e. PLUS) - Fixed bug #1148, and added testcase RealOpLexer.mo
- Refactoring MetaModelica Real operations - The source code now contains a space after each real oepration (e.g. a*. 0.4) - The RML and OMC parsers will be updated to require a space after these operations in order to avoid ambiguity with regular Modelica code
- Backend: Better error messages when if-equation to if-expression fails. - Backend: Ignore assert() and terminate() in if-equations, and print a warning. We need to do this to get some MSL models to generate code since OpenModelica doesn't fully support if-equations.
- Added output String name to lookupVar functions, so it's possible to create the correct FQ path from the output - Testcase Import6 tests this (import a=X.b would previously get FQ path X.a)
- Fix XmlDump; escape comments (bug #1101) - Fixed the rtest script, so that it is possible to have output that starts with "xmlNameSpace:..." or similar
- Fixed the DAE function cache when elaborating the expression in a reinit() statement - Added simulation testcase FunctionReinit.mos - Closing bug #1023
- Commented out cases for arrays in writeLhsCref in SimCodeC.tpl. - Changed the type of return variables for the size operator to modelica_integer instead of size_t, so that min works on arrays of unknown dimensions.
- In errorext.cpp, fix the error message when a mismatched delCheckpoint is detected (id and top of stack used to be switched around, making you debug the wrong piece of code) - Added checkpoint rollback for "instArray", and renamed it "instArray Real[0]"
- fixes to make slicing like a[1,:] := a[:]; and/or a[2:3,2] := x[2:3]; work: - fixed code in indexed_assign_real_array(), index_real_array() and index_alloc_real_array() - fixed daeExpCrefRhsIndexSpec() template to generate "zero" dimension size for scalar subscripts for INDEX case: (0), make_index_array(1, <%expPart%>), 'S' - added test ArrayAssignWholeDim.mo; but it should be moved to mosfiles to ensure C-runtime invocation TODO: the same should be done for integer_array.c; then the character slice coding, i.e. 'S','A','W', can be removed entirely; or, perhaps, the slicing operation can be generated inline as appropriate nested for loops (I'll do that for C# generator, then it may be ported back to C++) - fixed daeExpAsub() template for _get_1D() .. _get_4D() constant index cases ... decremented indexes, because the _get_#D() functions works with zero based indexes - commented out #include "utility.h" in simulation_events.cpp to enable debugging in Visual Studio - added NO_INTERACTIVE_DEPENDENCY macro switch used in simulation_runtime.cpp for simpler compilation of simulation runtime in Visual Studio - added SimCode.cref2simvar(ComponentRef,SimCode)->SimVar function and daeLow field into SimCode.SIMCODE record to enable lookup of representation arrays in templates (C#); note that only cref2simvar() is visible from templates, but not the daeLow field which is not added to SimCodeTV.mo; the function needs a SimCode value as a whole, so the implementation is effectively hidden from templates' viewpoint; BUT, this is only a workaround for the lack of the needed information in component references themselves (hope they will have it in the future); see usage of cref2simvar() in SimCodeCSharp.tpl - added extern int const specifiers in functionStoreDelayed C++ template to resolve a link problem in VC++ - renamed local identifiers named cref to cr or ecr (ecr when of type DAE.Exp) in the C++ templates to disambiguate them from cref() template name (will be checked in the future; now value binding names and template names has separate name scopes, but that will be changed in the next versions of Susan); maybe the cref() template should be renamed to compRef() because there exist fields named cref in SimCodeTV.mo - simplified several constructs like '<%val%>' to just val and/or like (libs |> lib => lib) to just (libs) in C++ templates - re-factored some case clauses when they shared the same then part (Susan can have "or" cases,e.g.: case PAT1 case PAT2 case PAT3 then tplExpr ... where the same tplExpr is lexically used for every given case) - renamed subscriptsTpl() and subscriptTpl() templates to more suitable names subscriptsStr() and subscriptStr() - added many improvements in C# code generator - changed some make commands for Susan/C# codegen testing - added testmo make command to Makefile.common
Added output of results into a MAT-file that Dymola is able to read, so Dymola's variables' browser can be used. Specifications of Dymola's output format are described in Dymola User's Guide.
-Fixed bug with infinite recursion when trying to constant evaluate parameter that has no binding (must be allowed when e.g. checking models). Testcase in multibody/checkingModels/BodyCylinder.mos
-Added ClassInf.State to the Prefix information so at least the state is part of ET_COMPLEX information in DAE.VAR. Note that list of variables in ET_COMPLEX is still missing (this is a little bit of the chicken and egg problem, since the type can not be properly filled in before the type of the class is known). However, by at least having ClassInf.State in ET_COMPLEX one can distinguish between e.g. connector variables and other variables in the backend. Also note that for expressions in equations and algorithm the ExpType is correctly filled with type information, since those are elaborated first when the components have been instantiated (and their types are known), so the above is only concerning DAE.VAR objects.
- Fixed test case AlgorithmForInClass that was broken by commit 5859 by fixing the lowering of for statements. - Fixed bug #1236, constant evaluation of product in nested for iterators. - Implemented constant evaluation of empty ranges in reductions. - Extended sum reductions to also handle vectors, matrices and strings. - Use correct type for the iterator variable. - Extended the ConstantReductions test case to also test the new functionality.
- DAELow.mo - extend arrays in algorithms - fix bug DAE.STMT_ASSIGN_ARR results in error " Too few equations, underdetermined system. The.." - SimCode.mo - check index of array to test singleAlgorithmSection - ToDo: SimCodeC.tpl array = f(...), (array,array) = f(...)
- Moved valueExp from Static to ValuesUtil. - Added a new cevalIfConstant function to Ceval, and removed the old one from Static. - Removed calls to cevalIfConstant in Static, and added calls to cevalIfConstant to Inst, Interactive and Mod where appropriate. - Updated testcases due to changes in constant evaluation.
- Propagate Absyn.Info from every equation and algorithm up to the DAE AST - One exception: The parser segfauls on Absyn.Algorithm in mosfiles, so dummyInfo is provided for most algorithm sections.
- Builtin.mo - add function isCross, isMax, isMin, isTranspose, isSkew - DAEDump.mo - add in function dumpDebugElement some elements - DAELow.mo - if initialarrayequation is lowered add it to initalarrayequations - uncomment case for DUMMY_STATE in function statesDaelow2 because this is not a state - add variables with kind STATE to BinTree "states" to avoid removing of states in function removesimpleequations - if complex equations are lowered and extendet to its elements add array equations to list of array equations - remove functions extendAllRecordEqns, extendRecordArray, extendRecordEqOpt and extendExp because the are now unused (topic above) - add cases for matrix expressions to lowerMultidimeqns2 - remove simple equations in function matchingAlgorithm after index reduction because multibody models have a lot of simple equations after index reduction - Derive.mo - use Builtin to check if builtin function - Exp.mo - add case for functions min and max to function simplifyBuiltinConstantCalls - to more simplifacation in case of array expressions - add case for matrix + array of array to function simplifyMatrixBinary because function identity generates array of arrays - SimCode.mo - dump also components with bltdump in function translateModel - improve createSingleArrayEqnCode
- Added Absyn.Info field to Absyn.{Equation,Algorithm}Item - Renamed SCode.Algorithm to SCode.AlgorithmSection since that is what it is - Added new datatype SCode.Statement, which is what an AlgorithmSection contains lists of - All statements have comment and info fields preserved so they can be used by Inst/Error
- Updated c_runtime/Makefile to use the CFLAGS set by the configure script - OMDev is still always -msse2 - Default Unix is -O3 -march=native, which means it's tuned for your CPU regardless of what kind you are using - To override, specify any CFLAGS (CFLAGS=-O2 ./configure, ./configure CFLAGS=-O2, etc)
- DAELow.mo - makeMatrix: check if exp is scalar - use SUB_ARR because Exp.isConst work now for arrays and matrix - calculateJacobian: make array equations singular with all possible subscripts - Exp.mo - isZero implement Matrix - isConst implement Array and Matrix - SimCode.mo - dlowEqToExp: make array equations singular with all possible subscripts - SimCodeC.tpl - implement built in function cross --> now multibody elementary examples DoublePendulum,InitSpringConstant,Pendulum,PointGravityWithPointMasses,World simulates
- Added new field to DAE.ElementSource - A list so we can propagate line numbers for equations/algorithms further - Absyn.mo does not yet contain this information, so the list is empty for now - Changed code generation of functions without outputs - They now have void as return type, and we generate a lot less code when calling them - Added support for using builtin functions as function pointers - PartialFn14.mos tests this functionality - So far only print() is implemented in the runtime - SimCode.getCalledFunctionsInFunction was updated slightly to work better with the new DAE structure - DAEUtil.getNamedFunction now also looks in the FunctionTree structure
- DAELow.mo - extend all records in array equations so remove simple equations will work - Inline.mo - case for inlining functions with record constructors as arguments --> DoublePendulum oscilates now with model Revolute( constant Real e[3] and constant Modelica.Mechanics.MultiBody.Types.Axis n instead of parameter)
- DAELow.mo - extend all unextended array componentref so the rest of the backen would work right - SimCode.mo - replace der operator also in multidimequations now multibody double pendulum model generates compilable code
- DAELow.mo - function statesAndVarsExp add special Case for unextended arrays - remove unneeded listreverses from calculateJacobian - SimCode.mo - createOdeSystem: - because listVar orders the elements not like listEquation the pairs of (var is solved in equation) is twisted, simple reverse one list --> now multibody simple pendulum model oscillate
The "Boolean asInSimulationCode" parameter of the dumpXMLDAE() API method was changed in "String translationLevel". Allowed strings are: flat, optimiser, backEnd.
- replace equality(x = y) with stringEqual/intEq/realEq - added more comments and updated some of the formatting - use Exp.crefEqualNoStringCompare in ConnectUtil.setsEqual as we cannot have stringified crefs there. - proper dimension printing in PrefixUtil.printPrefixStr - removed some debug prints from SCodeUtil.mo to make it faster
- Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum now simulates - fixes to handle code generation for world.gravityAcceleration function - code generation for functions now take the functions from the DAE.FunctionTree instead of re-instantiate them - some problems appeared with partial functions (i fixed some of them but more debugging is needed to fix all)
- updated OMCMonitor to work on Windows Vista and 7. - updated the project to VS2010 - you can find a binary version here: http://www.ida.liu.se/~adrpo/omc/OMCMonitor/
- Added an error for components having bindings of variabilty higher than their own (see http://openmodelica.ida.liu.se:8080/cb/issue/1040); - Fixed a bug in lookupVarF returning wrong properties; - Improved error messages for non-processed modifications of built-in types; - Modified testsuite accordingly.
- Derive.mo - div ADD_ARR, SUB_ARR - DAELow.mo - simpleEquation for Arrays - do inlining of Array equations in lowerArrEqn - bugfix calculation Jacobian for arrays - bugfix equationToResidualForm for arrays - bugfix extendExp for CREF Exptype - Inst.mo - bugfix ExpType for expand record equations - SimCode.mo - bugfix dlowEqs for arrays - Exp.mo - bugfix for arrays, to not use typeBuiltin to detect arrays use DAEUtil.expTypeArray - simplifyUnary also for arrays
- Removed the global variable numpoints from the simulation runtime, as it was used before set. - Instead we use the number of output steps as an initial guess for the size plt needs to allocate for result variables
- Added function printTypeOfAny function to c_runtime for GDB debugging of MetaModelica code - Simply use the command "out printTypeOfAny(exp)" (or printAny()) in GDB to print the data structure's type or value - Fixed a problem with mmc_mk_rcon on 64-bit architectures
- Ran Valgrind on some simulation executables: - Updated simulation runtime/code generation to free more of the allocated structures - Didn't update c_runtime/interactive/, which has the majority of memory leaks now
- Changed code generation for when external object constructors are called - It is now done after the input file has been read - Ext.objs can now depend on (fixed) parameters, including strings - Added code to support string parameters - Added testcase ExtObjStringParam.mos based on bug https://openmodelica.org:8443/cb/issue/1163
- Updated code generation for min/max/abs builtin functions - Previously, they would always return a double - Now, integers are produced if both arguments are integers - This fixes ExternalFunction4 (will allocate 2 elements instead of 66187348)
- Added arument to simulate: outputFormat= - Default is "plt", which is the old format. It's the only format currently capable of using simulation results within OMC. Other formats need external tools. - "csv" is another textual format. It's roughly twice as fast and uses no additional memory (plt uses several GB for large simulations). - "empty" does the same thing as interactive simulations - it disables result file generation. Useful for benchmarking. - "bin" is experimental and should not be used. It basically measures the overhead of converting doubles to strings (speed is 50x times faster than CSV) - Model_init.txt has a new field for the output format - The c_runtime contains the interface used for result file generation. - Added testcases for "csv", "plt" and "empty" simulation results. - Added these options to OMNotebook/OMShell commands.xml.
- CevalScript.mo, Main.mo, SimCode.mo - do late inlining earlier to avoid generade code for unused functions - Exp.mo - bugfix expStriplastSubs - isZero for UNARY_ARR - getTermsContainingX also for arrays
- Update makefiles for qtclients. - Added Makefile.unix.in in each client's directory - Should be easier to customize behaviour now - Now copies the binary from OSX .app's into the build dir when doing a Unix build
- VarTransform.mo - implement addMultiDimReplacements to replace arrays and records - Inline.mo - bugfix for records - Exp.mo - implement expStripLastIdent, is used from Vartransfrom.addMultiDimReplacements - extend isZero for arrays - simplify array_add and array_sub - Derive.mo - do simplify after derive equations - run inline functionality after derive functions - bugfix derive functions - DAELow.mo - use VarTransform.addMultiDimReplacements - remember derived arrays and multidimequations to avoid duplicate arrays and multidimeqations - bugfix incidenceRowExp for array variables - bugfix extendRecordEqns
Fixed constant evaluation of all functions used in the multibody loops models, which gives large speedups (Engine1a.mos went from ~21 sec to ~9 sec, while EngineV6.mos went from ~10 min to ~8.5 min). The axesRotations function is currently not evaluated in Cevalfunc though, because for some reason it's much slower to constant evaluate it with cevalFunc than with dynamic loading. - Fixed correct dimensions in ValuesUtil.matrixStripFirstColumn so that ValuesUtil.multScalarProduct works correctly. - Added support for record variables in Cevalfunc.extendEnvWithInputArgs so that they are correctly added to the environment. - Added support for imports in Cevalfunc.extendEnvWithInputArgs (only SI-import at the moment, because other imports cause large slowdowns when evaluating the axesRotations function from MSL). - Added handling of DAE.WHOLEDIM in Ceval.cevalSubscriptValue.
-Fixed bug with stateSelect set to parameter not picked up due to limitation in type system (enumeration(:) not implemented. This is mostly used in new MultiBody library.
- Added flag -noemit to the simulation executable - Up to 10x faster than a simulation that stores results - Only useful to get performance of a simulation without taking file IO into account
- Added compilation check of the sendData dependencies to the configure scripts - Added support for LDFLAGS="-L/my/path/to/lib/" for LIBSENDDATA_LDFLAGS
- uncomment Static.cevalIfConstant as is was commented by mistake - replaced equality(x = y) with true = intEq/realEq/stringEqual(x, y) - replaced equality(x, y) with Exp.expEqual(x, y) in Static.eqSubscript
- Activate function inlining after move it into lowering process. Now inlining should work and generate better results because remove simple equations is done after inlining.
- Updated configure/Makefile to work using MacPorts on x86_64 - qmake-mac can be found, and used to generate sendData makefiles - omniORB can be found, and used to generate the CORBA communication - The qtclients were not updated - The following configure command needs to be provided in MacPorts: ./configure '--with-sendData-Qt' '--with-omniORB' 'LDFLAGS=-L/opt/local/lib/' 'CFLAGS=-I/opt/local/include/' - The following packages should be installed: antlr qt4-mac lp_solve omniorb autoconf and probably some more
- Rewrote templates for for-loops and reductions to share more code. - Implemented code generation for reductions where the range is not a RANGE. - Renamed the previously named member boolean in record DAE.STMT_FOR to the more descriptive name iterIsArray, and added a comment on what it does.
- Updated configure/Makefile to handle qmake on OSX differently - Updated makefiles to check if qmake and idl exists before trying to compile qtclients - Don't try to clean qtclients if qmake does not exist (systems without qmake can now make clean again!)
Inst.mo - first draft of the expandable connectors - return the environments in Inst.instClassdef2 and pass them along - return the new environments where needed and pass them along - changes due to Lookup.lookupVar*
- Added new function call for interactive sessions: - checkSettings() : record OpenModelica.Diagnostics.ImportantValues - Add any information you constantly need to ask users for when debugging their problems - A single command that you can get a lot of useful information from that OMC doesn't always check - Updated System.regularFileExists, System.directoryExists to return Boolean instead of Integer - Updated System.systemCall to return the exit code rather than the exit status (which is platform-dependent) - For example, an application that returned 127 would show up as 32512 in Linux
- Added ringbuffer implementation for delay() - It is faster for large simulations, although not much so (the original impl. is O(log(n))). Note: The template code does not have access to delayMax for the store function, which is where the buffer should be cleared. Now it's done after binary search, but only if delayMax == delayTime. The SimCode really should have this information added.
- Changed the exit() function in c_runtime to an EXIT macro - This is aliased to _exit() on Unix because exit() always returned 0 - Fixed better handling of assertions in Euler and Dassl runtime - Updated StringTest.mos as it now prints that simulation failed
- Removed name mangling from DAELow, and implemented it in the template-based code generator instead. - Removed origVarName from DAELow.VAR, since varName is now the same. - Removed unused functions Util.modelicaStringToCStr and Util.cStrToModelicaString. - Removed unused stringify functions from Exp (Exp.stringifyComponentRef etc.). - Fixed remaining issues with the template-based code generator, such as external fortran calls, function pointers and returning records from functions. - Added unboxing of arrays to meta_modelica.h - Removed the old SimCodegen module and replaced it with the new SimCode module. - Removed printing before ASUB expressions in Exp.printExp. - Updated lots of testcases to comply with the changes made. - Fixed some spelling errors (Descrete => Discrete, Resudials => Residuals)
add a brute-force approach for DASSL with synchronous event handling + usage with method=dassl2 + rename solver_euler* to solver_main + add s-stage runge-kutta method
If expr is a constant or parametric expression, der(expr) is replaced during elaboration: by 0.0 if expr is Real or Integer; by an array of corresponding size filled by 0.0 if expr is an array of Real or Integer.
-Fixed bug in instantiation of external objects. Even thought they do not generate equations, the connection set must be propagated through it. Before it returned emtpy set.
- Fix for delay() when the time step taken was larger than the max delay - This is a problem because the next value from the buffer will be used even though it has not been initialized - Should possibly be fixed in the future by changing the assert to i+1, and changing the solver to never take a too large time step
- Updates due to printing mosfile output to stdout directly - dynload.c - flush output buffers function call for deterministic behaviour - Testsuite updated - testcases that used stdout now prints lines in different positions than earlier
- new implementation of the inner outer to get rid of very expensive phases that are not needed, see Inst.instVar - got rid of phases: InnerOuter.checkMissingInnerDecl, InnerOuter.renameUniqueVarsInTopScope, InnerOuter.changeOuterReferences - phase InnerOuter.changeOuterReferences replaced with lighter phase: InnerOuter.changeInnerOuterInOuterConnect - prefixing of outer cref is now done directly with correct prefix of the corresponding inner cref. - Inst.sortInnerFirstTplLstElementMod is now called to correctly sort the inner components to be instantiated first even if they come from extends. - PrefixUtil.prefixExp now gets the instance hierarchy and uses it to prefix the outer crefs. - added Util.listMapMap0. - Main now runs a .mos file directly on the standard output. - updates to Makefiles to compile and link the new packages: IOStream.mo IOStreamExt.mo DAEDump.mo and the new C file: runtime/IOStreamExt.c - missing of the inner component declaration now generates only a warning.
- added function evaluateToStdOut now used in Main to display the result of running a command in a .mos file directly on standard output instead of building strings. - send the instance hierarchy to Mod.elabMod as is now needed in prefixing crefs.
- use the faster crefEqualNoStringCompare instead of crefEqual in crefPrefixOf - use stringEqual(x, y) instead of equality(x = y) - unelab reductions back to an Absyn.CALL
- renamed fcallret to fcallret1 - added fcallret0 to be used when only printing and not returning values. - the new function is used in package Main for printing to standard output based on a debug flag.
- do not store the instantiated class in the Interactive Symbol Table as it takes too much memory and is not very useful. - use the new DAEDump.dumpStr to dump the DAE.
- changed the messaged for Error.MISSING_INNER_PREFIX to display more information. - also this error is now a warning instead of an error as we can use the outer object directly if no inner is present.
- changed the inner outer implementation to handle all cases via the InnerOuter.mo instance hierarchy. - outer components are now *always* prefixed directly with the correct prefix of the inner using the information stored via InnerOuter.addOuterPrefixToIH into InnerOuter.TOP_INSTANCE.outerPrefixes - some of the code is now dead code, we leave it in the file for now.
- new module DAEDump.mo which contains the dumping functions for the DAE. these functions were moved from DAEUtil.mo. - corrected a bug which did not display the terminate statement in the flattened code.
- dump functions moved to DAEDump.mo - function splitElements classifies elements into: variables, initial equations, initial algorithms, equations, algorithms, external objects. is it used in DAEDump.mo
Implemented translation to equations with if-expressions for if-equations which contain other if-equations in their branches (see bug 1229). Also implemented correct equation count for such if-equations.
- polished Susan's operators precedence and associativity ... see SusanGrammar.txt (TplParser.mo) and .tpl files for changes - (generated) SimCode/SimCodeC.mo and SimCode/SimCodeCSharp.mo set svn:eol-style to LF
- Susan parser with the new syntax, together with transformed SimCodeC.tpl and SimCodeCSharp.tpl - produced SimCodeC.mo and SimCodeCSharp.mo are the same as before - the implementation is mostly on syntactical basis now, to be continued ... - see susan_codegen/SusanGrammar.txt and all .tpl files for the details
- Fixed bug #1215: http://openmodelica.ida.liu.se:8080/cb/issue/1215 (Records as input arguments to functions). - Added instantiateImplicitRecordConstructors to Static, to make sure that record constructors are instantiated when needed, even if they are not explicitly called. - Fixed code generation for record instances that are input arguments to functions. - Updated some testcases where record constructors where instantiated earlier than before. - Added testcases records/RecordFuncParam.mo and records/RecordFuncParam.mos to test the bugfix.
- Fixed bug #1226 - Changed backend code generation of external functions - The in_ function is the same as for normal functions; it simply calls the other function - Fixed the normal function; the in_ function generated more correct code - Fixed size() expressions for F77 code
- Main.mo: +i flag will now generate code with the correct filename - Added code for scheduling sample() events before runtime. DASSL uses this code for a (really) small hint now (not taking too large steps). This improves event-heavy sims by around 10%, but can be a lot better if someone who knows the solvers has a look. - Simulation code now uses const char* instead of char*. This removes a LOT of warnings in the log files.
- Added the general utility function unique (removes duplicate elements from a sorted C array). - Added a stub for initSample with some code that could be used to generate all the times when a call to sample() generates an event.
- continue with derivatives of functions: bugfix, use to compare Types Types.equivtypes - be more informative in case of if-equations - add case for complex equations (Derived.differentiateEquationTime), fail because derivative of records not implemented jet
- Added className to handleUnitChecking (for debugging purposes only) - Added MMath.rationalString - Fixed bug in unitparser. before adding baseunit, check if it already exists.
-Fixed bug in DAEUtil.addEquationBoundString -Fixed bugs in Exp.typeof and Exp.simplifyAsub -Fixed bug with functions not picked up in if-equations (all multibody examples affected). -Added boolean to crefVectorize to decide if limits on dimensions should be checked against or not. -Changed so UnitAbsynBuilder.registerUnits only performs work if unitChecking flag is set. -Added Util.listPartition
- TplParser.mo : - hole is delimited by <% %> instead of < > - %( )% syntax is removed - NO escape sequences inside of <<...>> and '...' are allowed, ... so, for example, <<\\>> and '\\' is really double back-slash now ... to achieve "<%" inside a template, use ' ... <% "<%" %> ...' or << ... <% "<%" %> ...>> ... to achieve ">>" inside <<.. >>, use << ... <% ">>" %> ... >>, or use ' ... ' as template delimiter if possible, then ' ... << ... ' ... to achieve "'" (single-quote) inside '...', use '...<%"'"%> ...', or (better) use << ... >> as template delimiter, then << ... ' ... >>
- Added Compiler/Makefile.compiler_subdirs.common - This is a file common for all of omc_release,debug and profiler - It is also common for proper Unix and OMDev - Fixed a bug where the absyn_builder,modpar or runtime folders could fail, but compilation would still continue
- generate DAE.ARRAY_EQUATION from the equalityConstraint function instead of DAE.EQUATION as otherwise the counting is wrong. - update to testsuite/libraries/multibody/loops/Fourbar1.mos due to the changes above.
- Removed Compiler/Makefile.common.omdev.mingw - It was identical to the Linux one with one difference - However, all files that include this file set USE_CORBA so the ifdef should result in the same Makefile as the old one
- fix for bug: https://openmodelica.org:8443/cb/issue/1221?navigation=true now the equality constraint function call contains the correct inline annotation. - added Inline annotations to testsuite/libraries/multibody/loops/_LoopsTotal.mo to test the propagation of annotation into the flattened code (as a comment for the function) - update to the tests due to annotations
- search for annotations also in the algorithm section. this is needed as Modelica 3.2 requires annotations to be present at the end of the class. - now annotations (Inline, etc) present in the algorithm section at the end of the class are detected correctly.
- Added fix for ptolemyio.cpp using atof (which has no exception handling for reading things that are not numbers) - We now use strtod instead, and return NaN for invalid strings (we also handle Inf for the Windows platform).
- Fix for bug #1216: http://openmodelica.ida.liu.se:8080/cb/issue/1216 + Inst.implicitFunctionInstatiation now sends the correct environment to getDeriveAnnotation.
- Merged testsuite/mathcore-mofiles with testsuite/mofiles. - Moved testsuite/mathcore-mofiles/drmodelica to testsuite/mofiles/drmodelica, and removed testcases from testsuite/mofiles that were already in drmodelica. - Added all missing test cases to testsuite/mofiles/Makefile. - Updated testsuite/Makefile to reflect these changes. - Added a case for the return statement in DAEUtil.ppStmt.
- Added configure option --with-sendData-Qt to disable sendData even if we have Qt installed. - QTHOME should no longer be used. - Disabling sendData reduces the time to run the (short) testsuite by around 14%; 1m32s down from 1m44s.
- Fixed bug #1210: http://openmodelica.ida.liu.se:8080/cb/issue/1210 + Changed Static.elabBuiltinTranspose so that it sets the correct constness on the elaborated expression. + Added testcase mofiles/Transpose2 - Added missing RTOpts failtrace guard in Inst.instElement.
An unfinished attempt to fix the multiple class definition bug (http://openmodelica.ida.liu.se:8080/cb/issue/1182). I tried to improve the function Inst.checkMultiplyDeclared so that it could be used for class definitions, not only for component declarations. Unfortunately, trying to call this function from instElement (when a class definition is processed) makes some files from the testsuite to fail. So I have left the extended checkMultiplyDeclared and comparison functions it calls, but commented out the call in instElement. I.e., the functions are not called, so nothing gets broken, but they are there in case somebody wants to continue the work. It seems to me, though, that the problem is not in comparison functions but in the place they are called from (instElement). But I do not know what the correct place is.
- Fixed writePtolemyplotDataset/etc functions to use Print.mo instead of string concatenation. - We can now plot files with more than 200000 datapoints per variable without stack overflow.
Fixed bug #1212: http://openmodelica.ida.liu.se:8080/cb/issue/1212 - Disabled error message from Ceval when constant evaluating parameters in Mod.elabModValue. - Changed some tests that no longer gets these error messages.
Fix for bug #1208: http://openmodelica.ida.liu.se:8080/cb/issue/1208 - Disabled constant evaluation of parameters with fixed=false in Mod.elabModValue.
- Bugfix: https://openmodelica.org:8443/cb/issue/1209?navigation=true - Backend will now replace pre(a) with alias "a = -b" correctly: - Correct way is -pre(b); previously pre(-b) was used.
- Fixed bug #1191: http://openmodelica.ida.liu.se:8080/cb/issue/1191 + Added function Inst.addEnumerationLiteralsToEnv that is used in Inst.getUsertypeDimensions to add enumeration literals to the environment when needed. + Added functions SCode.makeEnumType and SCode.isValidEnumLiteral, which are used by Inst.makeEnumComponent. Enumeration literals are now checked so that they are valid (i.e. you can no longer use reserved attribute names such as start as a enumeration literal). + Added an error message INVALID_ENUM_LITERAL to Error. + Replaced the unused function Error.infoStr with a more usable function. + Added testcases Enum10 and EnumInvalidLiteral.
- Added trunk/Makefile.common, and restructured Makefile and Makefile.omdev.mingw - Fixed lots of weird install targets for files - Moved commands.xml, etc files from bin to share/omnotebook, share/omshell. - Moved ptplot.jar from bin to share/omc/java. - Moved ptplot_license.txt from bin to share/ - Moved omc_helptext.txt from bin to share/doc/omc - Added antlr_license.txt - Moved OPENMODELICA/include to OPENMODELICAHOME/omc/include - This way we won't override system libs/includes if we install to /usr - Did the same for /lib - Left to do: Move scripts from bin to usr/share/omc/scripts - Updated OMNotebook and OMShell to reflect new paths of xml files. - Updated doPlot commands to reflect the new location of ptplot.jar
- Changed systemimpl.c to not use OPENMODELICAHOME during the init call. - Instead, we use Main.main to check for OPENMODELICAHOME (and set mingw paths). - Updated System.setEnv to take a boolean as third argument instad of int.
- continue with derivatives of functions not Working: - output arguments - check derived function inputs and outputs (frontend) - order > 1 - zeroDerivative, noDerivative,
- We now handle redeclare modifications in extends in InstExtends instead of passing back the modification and handling it later. + This added support for the record constructor function when redeclaring records.
- Fixed bug #1194: http://openmodelica.ida.liu.se:8080/cb/issue/1194 by adding a case for arrays in Types.getFixedVarAttribute. - Added testcase mofiles/FixedFinalParameter.mo to test the fix.
- Fixed lookupVarInPackages to store previous environment frames when doing lookup in the parent scope. + This prevents infinite recursion if you want to lookup A.B.C.myConst in scope A.B.C.MyFunction.
- Implemented the possibility of specifying multiple .mo(f)-files on the command line, and which class to instantiate. + Combined the cases for single .mo-file and for .mo-file with libraries in Main.translateFile. + Added a case in Main.loadLibs for loading .mo(f)-files. + Added flag +i in RTOpts, which is used to specify the class to instantiate. + Moved the instantiation to it's own function Main.instantiate, which checks the flag +i to determine which instantiation function to call. + Added the function Absyn.stringPath, that converts a String to a qualified Absyn.Path. + Rewrote parts of Inst.instClassInProgram to report an error if the class specified with the +i flag was not found. + Updated the help message to reflect these changes. - Fixed spelling in SimCodeC.tpl.
- fixed bug [1185] https://openmodelica.org:8443/cb/issue/1185 Error: Variable stateGraphRoot in package Modelica.StateGraph.Examples.Utilities.CompositeStep2 is not constant Error: Variable stateGraphRoot in package Modelica.StateGraph.Examples.Utilities.MakeProduct is not constant The problem was the that the lookup in in InnerOuter.lookupVarInnerOuterAttr can fail so I added error checkpoint/rollback.
- Fixed bug #1193: http://openmodelica.ida.liu.se:8080/cb/issue/1193 + Changed Mod.lookupIdxModification so that it can merge a final variables EqMod with it's other modifications. + Added testcase mofiles/FinalParameterModification.mo.
- Fixed bug #1190: http://openmodelica.ida.liu.se:8080/cb/issue/1190?navigation=true + Added the function Inst.isFunctionInput that checks if a component is a function input argument or not. + Ignore modifiers on function input arguments in elabArraydim, since the size of input arguments should not be determined there. + Added testcase mofiles/FunctionDefaultArgs.mo to test the fix.
- Adding testcase Extends8.mo - This tests that all inherited class definitions are actually put in the environment (this sometimes wouldn't work if you extended and extended class).
- overconstrained connection graph improvements and fixes. + the graph changes generated by disabled components ( Type comp if false ) should be discarded (created problems for ForceAndTorque.mos) + delete the branch edges, roots and connects from the connection graph when they lead to a disabled component.
- finish relaxation algorithm works also for template codegen, - use "+d=relaxation" to solve linear systems with relaxation algorithm (gaus ellemination without pivoting)
- Fix order of cases in updateComponentInEnv in order to fix libraries testcases. - Also updated Multibody testcases due to Adrian's previous changes. - Fix testsuite/rtest to print time spent when it gets equation mismatch. - Refactoring Lookup.mo (Derived classes are no more).
- Fix for bug #1186: http://openmodelica.ida.liu.se:8080/cb/issue/1186?navigation=true + Added function Exp.arrayContainWholeDimension that checks if a list of dimensions contain a wholedim. + Added a check in Static.cevalIfConstant so that only functions with return types of unknown dimensions are constant evaluated to determine the dimensions. + Modified some testcases to reflect the changes made.
- fixes for bug [#1188] https://openmodelica.org:8443/cb/issue/1188 Connections.isRoot evaluates to wrong value in Modelica.Mechanics.MultiBody.Examples.Elementary.FreeBody - the problem was a typo in ConnectionGraph.addBranchesToTable generated a wrong hash table. - moved public functions in the beginning of ConnectionGraph.mo - make all functions not accessed from outside be protected in ConnectionGraph.mo - more testsuite/libraries/multibody/ need updating (will do that with a later commit).
- CMakeFiles now work on win32 and linux to generate omc executable. - Linux define RLMHOME, point to your rml install path - win: define OMDEV environment variable, point to your OMDev installation - Attention: because function rml_user_gc is defined at rml.lib you can - at force flag to TARGET_LINK_LIBRARIES(omc rml) (for win32 -> TARGET_LINK_LIBRARIES(omc -FORCE:MULTIPLE rml)) or - rebuild rml lib without function rml_user_gc
- Updated configure script to be a lot faster when searching for ANTLR headers (look in ANTLRHOME/include and ANTLRHOME/lib instead of searching all of /usr). - Fixed an issue where ANTLRHOME can be set to /home/user/src/ but the script finds the headers in /usr/local and Makefiles then fail. - You may now have ANTLRHOME unset when doing ./configure. - The default ANTLRHOME is /usr. - Readme file updated to reflect these changes.
- moved getTotalProgram from Interactive.mo to a new package Dependency.mo so that it can be shared between OpenModelica and other tools (MathModelica).
- Updated configure script for better performance and stability when installing rml and setting RMLHOME to a too common directory (sources in /usr/local/src and binaries in /usr/local - the old script would find both include directories)
- Fixed testsuite/mofiles/ConstructParameters1.mo (printing parser error is the expected result). - Added a guard to instBasictypeBaseclass - if a primary type is extended with a new component, we should not try the next case, but rather print an error. - Updated testsuite/mofiles/SimpleTypeExtend.mo (it is supposed to fail according to the line above).
- Fix for mofiles/Array13.mo - Handle instModEquation when the dimension of the MOD is 0 as a special case (there is no equation). - Added testcases Array14,Array15 that are the same as Array13, but test it for constants and variables instead of parameters.
- Adding testcase Extends7.mo, based on bug #1184. - Adding builtin function classDirectory()->String to the initial environment. - It is a non-standardized function does not have an implementation in OpenModelica.
- Fixed a slight bug in Compiler/InnerOuter.mo (was printing error trace when it shouldn't). - Updated mathcore-mofiles for new rtest script. - Updated testsuite/Makefile to use parallel make for all tests.
Fix for bug #1187: http://openmodelica.ida.liu.se:8080/cb/issue/1187?navigation=true - The checkModel flag is now set in CevalScript when checkModel is run. - Static.elabSubscriptsDims2 now avoids printing error messages for out of bounds indices when checking a model. - DAELow.checkAssertCondition now skips checking assertions when checking models.
- Generated outvar init code before memory management - Implemented generation of: - MUL_MATRIX_PRODUCT - UMINUS_ARR - Updated so subscripts work for CREF_QUAL as well - Fixed some other small issues to make multibody tests pass
- Re-added the changes (r5194) reverted in (r5215) - With some additional changes that fixes problems with it (regarding changing modifiers to NOMOD in updateComponentInEnv). We now do that as before, but only for variability VAR or DISCRETE. - Fixed more issues with filenames being absolute paths when running the testsuite (and removed +d=rtest flag; we simply always make the substitution so it's easier to do development). - Added testcases invertedPendulum, nonConstantParam (from MathCore). - Also removed Env.BCEnv (baseclasses in Env), since the list was always empty now. - Fixed the testsuite/libraries/Makefile (hopefully for the last time).
- Added an error message in the backend when trying to lower the constrain function, since this previously failed silently. - Implemented support for functions without return values (since they were already mostly implemented anyway).
- Added System.stringFindString (same as System.findString, but returns the found String instead of an index). - Modified Error.mo to look for the +d=rtest flag. - If the flag is present, you look for "/testsuite/" in the filename string, and print the path relative to /testsuite/. - Updated the msl221 and biochem rtest files to use this flag. - Updated the PID_Controller.mos testcase so you don't have to run the testsuite from c:/petar/dev/... in order to get the same error messages.
- update CMake Files, now only the linker fails because of runtime.lib(systemimpl.obj) : error LNK2005: _rml_user_gc ist bereits in librml.lib(p-usergc.obj) definiert. >msvcprt.lib, MSVCRT.lib, error LNK2005: __errno ist bereits in LIBCMT.lib(dosmap.obj) definiert. ...
Fixed two bugs that affect the code generation in MathCore backend: -Fixed a bug in Exp.stringifyComponentRef (last type should be picked up, but it wasn't). -Fixed a bug in vectorize call (giving wrong type to component refererences.
- Removed the non-standard constrain function from the initial environment, since it's not handled in the compiler and caused the compiler to fail without a proper error message when constrain was used.
- Fixed testcase #1179 [http://openmodelica.ida.liu.se:8080/cb/issue/1179] + Changed Inst.getUsertypeDimensions so that it also returns any modifiers from user defined types, which are then sent on to instVar2 from instVar_dispatch when instantiating user defined types. + Changed some testcases to reflect that modifiers are now propagated correctly. + Added testcase UsertypeModifications to explicitly test this fix.
- Fix for failtrace of the new InstExtends when extending components with IMPORT elements. - Only traverse elemets that have not been traversed already (no significant speed improvement).
- Added new module InstExtends.mo - Removed SCode.BaseClassPath from the SCode module - InstExtends will now traverse the inherited elements and replace referenced crefs with fully-qualified paths instead of the old baseclass concept. + This is closer to what the specification says about how to handle extends and might work better when trying to implement Modelica.Media.
- Extracted extra record declarations from uniontypes - Extracted libraries (arrays of libraries) from annotations - Generated external type for meta types
-Another fix for variability of for iterators. It now has a ceiling of PARAM variability, since cevalIfConstant otherwise fails. This needs to be refactored when cevalIfConstant is removed in the future. Added another testcase to make sure this is covered (AIMC_DOL.mos) -Minor fix in errorext.cpp
- Extracted record constructors as functions and generated code for them - Generate complex constant expressions in daeExpMetaHelperConstant - Generate type descriptions for meta types
-Implemented sorting of functions when printing DAE as preparation to make testsuite more robust. (All multibody tests updated because of this too) -Changed how variability of for iterators are handled. They must be correct after the iterators have been elaborated to prevent false error messages later on. But this affects how e.g. indices are elaborated. Earlier they were always constant evaluated for const and param variability, but this is not the case when inside a for iterator scope, since the iterators do not have a value. Therefore added special scope name for for iterator scopes, and treat them separately, see Env.forIterScopeName and Static.elabSubscriptsDims2.
- Added special write_noretcall when called function has no output variables - Generated code for STMT_NORETCALL - Don't generate ending comma for METARECORDCALL if no arguments
-Fixed bug in array reductions. The variability of for iterators were always added as C_VAR, even if they had constant or parameter variability). This resulted in ceval error messages. Testcase in TransformerYY.mos
-Fixed bug in lookupVarInternal, returning empty frame as scope of variables. -Fixed bug with lookup of variables performed in parent scopes (now limited to for loop scopes and top scope for builtin variable time) NOTE: This destoys a lot of meta-modelica tests, probably since there it is okay to look in parent scope, e.g. for matchcontinue, etc. Someone else has to fix this, as I am not familiar with the code.
- Fixed Lookup.expandWholeDimSubScript so that it doesn't drop for-iterators from the subscripts, which caused the testcase mofiles/VectorTest to fail. - Changed the testcase mofiles/VectorTest, since it previously expected the wrong result.
- Added HashTableStringToPath.mo (first HashTable module with a name you can actually guess what key-value pair it uses?). - Updated the other HashTable files (some of the functions that take a Key don't have input Key). - Added pathReplaceFirstIdent and crefReplaceFirstIdent to Absyn.mo. - These functions will be used in later commits. - These functions allow you to change the first part of a path: (a.b.c, d.e) => d.e.b.c - Part of their purpose is to remove the need of the base class concept in Inst (let extends lookup imports, etc instead of adding base classes).
- do a bit more simplification for matrix addition: example m[3,3] = a[3,3]+b[3,3] works but m[3]=A[3]+(B[3,3]+C[3,3]*C[3,3])*D[3] worked also before but generades bad code. testcase mofiles/VectorTest and mosfiles/APIClass failed also before this change
-Changed implmentation of ErrorExt: setCheckpoint,delCheckpoint and rollBack. They now take unique indentifiers. If rollback and delCheckpoint passes identifier that doesn't match what is on the top of the stack, the application exits. This is to make absolutely sure that error message checkpoints are handled correctly. -Also fixed bugs to make sure that above is fullfilled. -Fixed bug with wrong type inside crefs -Removed Static.generateCompiledFunction since it is not used.
- Fixed testcase Lookup10, which together with other recent fixes fixed bug #1151: [http://openmodelica.ida.liu.se:8080/cb/issue/1151?navigation=true]. - Added RTOpts failtrace guard in Inst.partialInstClassIn.
- Updated parser/lexer to support 'operator' and 'operator function'. The keyword 'operator' can also be used as an identifier in several places so we can parse the OpenModelica compiler sources. We can change the sources and replace 'operator' with 'op' or something similar later. - RollingWheelSetPulling.mos now flattens without error.
Fixed for loops in class algorithm sections: [https://openmodelica.org:8443/cb/issue/1180] - Static no longer tries to constant evaluate iterators, which earlier caused Ceval to print an error message. - Fixed the broken counting of equations in for loops. - Fixed the C name generation for variables in for loops that used iterators as subscripts. - The testcase AlgorithmForInClass now works again.
- Added support for enumerations in external C functions. + This causes RollingWheelSetPulling.mos to print some extra warnings (because the annotations for external C functions are missing in the multibody testsuite).
- Implemented STMT_MATCHCASES - Implemented STMT_BREAK - Added missing record STMT_RETURN in the typeview (solving the problem described in the removed comment)
- Modified the ModelicaUtilities testcase to use save() and pre() on strings during simulation runtime. + Updated the generation of simulation makefiles to link libraries in the correct order.
- flush the stderr in ModelicaFormatError (otherwise the stderr is printed at the end in Windows) - do not delete ModelicaUtilities_*.dll as you cannot do that in Windows when is loaded in the omc process!
- Generate correct external type for records - Only declare init variable if it does not already exist in return struct - Extract record declarations from external functions in addition to just regular Modelica functions - Fixed bug in writeOutVar: a comma too much if external function had no input arguments
- Added test mosfiles/FinalTests, from MathCore - Added the ModelicaUtilities.h header (Utility functions for external C function) - Changed the generation of makesfiles to make it possible to reference these functions. - Added a simple implementation of these functions. - Added test mosfiles/ModelicaUtilities - Fixed a bug in SimCodegen where solved string would not be escaped before printed as C-code.
- added the constantness of the for loop range as an option in DAE.TYPES_VAR for a variable in the environment to be able to detect if the variable is a for index. - Lookup.lookupVar* will now return also the constantness of the range of the variable (if is a for index, otherwise NONE()). - if a variable is a for index *do not* prefix it in PrefixUtil.mo - unroll for loop statements that contain when statements and report an error if the range is not constant or parameter. - functionality to unroll all for loops with constant range but is not activated right now (we want to move towards non expanded arrays).
- use the actual QTHOME in Linux if is set and replaced tab with two spaces (systemimpl.c) - generate an unique log filename for each external viewer (sendData.cpp)
- detect header changes in c_runtime (Makefile*) - assert should be based on SIZE_ELEMENTS in size_alloc (memory_pool.c) - more index elements (memory_pool.h) - get rid of unused variable warning (real_array.c)
- Added fixes for new testcase mosfiles/EnzMM.mos, provided by MathCore + We now check all frames in the current scope before looking in the baseclasses.
-Fixed bug with incorrect types in DAE.CREF_IDENT and DAE.CREF_QUAL. The types should be that of the identifier -without- subscripts. This also required that this type information is returned from lookupVar, which resulted in the splicedExp changed to a SplicedExpData which contains the optional spliced expression and the type of (the last) ident. (See Lookup.mo) This will probably not affect OpenModelica backend, since it only uses the type from DAE.CREF, but MathCore backend uses these types, so they must be correct. -Fixed bug with functions not picked up to dae in lookupFunctionsInEnv -Fixed bug with simpliciation of scalar products (required by MultiBody simulations, testcase at MathCore).
- Removed some of the ErrorExt.rollback and setCheckpoint I added for pointless error messages. - We now check if the modifications could possibly generate basic types (only start,nominal,etc NAMEMOD's allowed). + This also removes the old error messages.
- Fixed Env.cacheGetEnv2 so that it searches all branches of the CacheTree when looking up qualified names, and not just the first one. This was needed for bug #1151. - Added testcase Lookup10 that tests the fix in Env.cacheGetEnv2. - Commented out some debug-related lines in Inst.
- Added support for external function annotation Library={"lib1","lib2"}, as per the 3.1 specification. + Updated MetaModelicaDev testsuite to use this functionality.
- Fixing another bug where error messages are sometimes printed out even though they shouldn't. + This occured in instBasictypeBaseclass because errors from elabMod were only rolled back if the class was builtin. + Added a testcase for this.
- Removed directory Compiler/template_precompile which was part of the old template code generator prototype. + This directory made MDT not work correctly (multiple copies of Util.mo for example).
- Fixing a bug where error messages are sometimes printed out even though they shouldn't. + This occured in instBasictypeBaseclass2 because noone made an ErrorExt checkpoint before trying to roll back the message.
Unified handling of Icon and Diagram annotation, since getDiagramAnnotation didn't work in all cases. Both Icon and Diagram annotation are now handled in the same way.
- Fixed when_sorting test case by extracting a new set of equations including when equations (used in functionUpdateDepend template) - Generated functionCheckForDiscreteChanges function correctly
- Changed instElement to get the class and component modifications before updating them. - This solves issues when you try to update modifications that are discarded anyway.
Added a field `aliasVars' to structure DAELow, where replacement transformations for alias variables (originating from trivial equations) are stored. Currently, this field is ignored everywhere -- it will be only used in code generation in my own branch `omprof'.
- reimplement Exp.solve for ifexp because use solvenonlinsys is very slow(with solvenonlinsys: 5sec. without 0sec) The testcase IfEquation2 works now because there is no division by zero (a*x/y,y==0 all the time) anymore. It does not fail with solvenonlinsys because solvenonlinsys returns 0 for this special case.
- Don't use Inst.updateCompeltsMods on DAE.NOMOD. This reduces failtrace logs. - Updated multibody testcases. * Changed eol-style to native. * updateCompeltsMods caused changes in the order in which functions in the DAE were generated.
- Added the correct modification in Inst.updateCompeltsMods, instead of DAE.NOMOD. - This mainly removes errors and failtraces that would later be patched in anyway. - It should now be easier to debug large models since most of the failtrace should be relevant again.
- Added lookup of partial packages that have modifications (needed for base classes). - Changed lookup of imports to use previous frames and the new constructs for only looking up in the current scope.
Fixed bug #1170, which included: + Fixing elaboration of vector function. + Enabling Inst to determine the size of an unknown dimension (WHOLEDIM) from a variables modifier. + Fixing the c_runtime to handle assignment to column slices of matrices correctly (or at least more correctly than before...). + Adding a test case VectorTest.mo.
- Removed some cp -u lines from Makefiles. They don't work in OSX (GNU extension). - Added x86_64-OSX version of liblpsolve55.dylib. - Most regular Modelica testcases work in 64-bit OSX. MetaModelica testcases seem to fail, however (probably due to not using the 64-bit datatypes in the headers).
- ValuesUtil.unparsePtolemySet2 was failing due to some problems with dimensions of Values.ARRAY; because of this plotting was failing, now it works again.
- Added baseclass paths to the elements of class definition in addInheritScope - Added ceval for DAE.SLICE - Added testsuite/mofiles/Extends6.mo to test these things
- Updated Lookup.lookupClass - Instead of removing prefixes from the path we are trying to look up, we now store previous frames. - So if we are in scope A.B.C.D and don't find C.E in either D or C, we lookup C.E in A.B with the previosuly stored frames {C,D}. We then rebuild A.B.C and lookup E with previously stored frame {D}. - We also send a stateful Boolean around in lookupClass. - If we ever find a matching name, this boolean is set to true. - If the boolean is true, we can no longer go up a level in the scope. - So if you have a class A.B.C.B and try to lookup B.C, it will now correctly only look for C in the scope A.B.C.B (and not A.B as it would previosuly do). - Note: This still doesn't solve all issues because the compiler stores UNTYPED mods sometimes, and this could potentially be elaborated in the scope A. - Added testcase mofiles/Constant11.mo for one of the issues now solved.
- Added a stateful Boolean to Util.mo - It's really a Real[:], but the abstraction makes it look like a single value. - Useful if you need to set a flag to stop a recursive operation (stop continue on fails).
Quite big check-in: DAE.mo: - added some comments to operators DAEUtil.mo : -added some utility functions. Exp.mo: -implemented simplification of cross - fixed some bugs in simplification - added some utility functions Inst.mo: - bindings on parameters and constants are now also created using makeVariableBinding, as for variables. This makes them also type converted properly as for variabeles. (This affected many flat models). - Fixed bug in setFunctionInputIndex (used for derivative information on functions) Lookup.mo : - fixed bug in makeExpIntegerArray with wrong value on the scalar attribute. Static.mo : - made elabBuiltinCross2 public (used by Exp.simplify1)
- Exp.mo Handle also WHOLEDIM in Exp.replaceSliceSub. WHOLEDIM is *also* a special case of SLICE that contains the all subscripts, so we need to handle that too! This will get rid of errors like: The generated equations: controller.observer.y[:,1] = controller.L.u[:,1]; controller.observer.y[:,2] = controller.L.u[:,2]; should be instead; controller.observer.y[1] = controller.L.u[1]; controller.observer.y[2] = controller.L.u[2];
- Bugfix: there was an error in daelow for bind expressions. The error occurred because in Exp.replaceExp has been traversed a component refs but this is wrong because m2.a will be replaced to m2.%$a for {{a,%&a},{m2.a,%&m2$Pa}}.
- Refactoring of code; no changes made to the DAE AST + Constructors of builtin types, such as (DAE.T_INTEGER({}),NONE) are now made through a constant DAE.T_INTEGER_DEFAULT + This refactoring will make it easier to change the representation of the DAE.Type
- fixed for bug [#1175] (https://openmodelica.org:8443/cb/issue/1175?navigation=true) instantiateModel(Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum); wrongly gives errors: Error: Variable body.sequence_start[1] not found in scope Error: No constant value for variable body.sequence_start[1] in scope . Error: Variable body.sequence_angleStates[1] not found in scope Error: No constant value for variable body.sequence_angleStates[1] in scope .
*BEWARE*, quite BIG changes, MathCore will need to update their files! - new implementation for inner outer to get the Elementary ThreeSprings working + inner components are put first in the list returned by Inst.splitElems to be instantiated first + when instantiated the inner component environment and the dae is saved into InnerOuter.InstHierarchy + when instantiated the outer component the inner component is looked up into InnerOuter.InstHierarchy and the returned environment and dae are processed to make it usable for outer: * components in the environment are switched from INNER to OUTER * components in the dae are switched from INNER to OUTER and prefixed with the prefix of outer - tons of other fixes
- Added list dimLst to Values.ARRAY * This means we can ceval {} and still know it has dimensions [0,3,2,5] * Updated C runtime * Updated elabBuiltinXXX to return correct type * Rewrote parts of vectorizeCall * Rewrote ValuesUtil and Ceval to set the correct dimensions of its calculated results * Didn't optimize all parts that use listLength on the valueLst. This could be improved also in in runtime
Types.vectorizableType: - Changed it so that the expected type is lifted instead of the expression type unlifted - This means {{1,2,3}} with expected type Real[1,3] now becomes {{1.0,2.0,3.0}} with type Real[1,3] instead of CAST({{1,2,3}}) with type Real[3] as it previously returned. + The added dimensions are returned like before, no other changes were required.
Added a variant of buildModel that takes a stepSize instead of startTime, stopTime and numberOfIntervals. This is used by Parham Vaseles OpenModelica Interactive implementation.
- Bugfix: XMLDump, replace all "<" and ">" with W3C standart "<" and ">", not the best implementation but i thing we should use susan for XMLDump.mo - implement Tearing in susan codegen (also use DAELow.STATE_DER for state derivative) - start with division by zero problem - added a few more simplify to Exp.mo
- Fixed vectorization of types extended from base types to also work for matrices of any dimensions (bug #1119). - Extended the VectorizeExtendedType test case to also test this fix.
- fixes for 3.x annotations - added getNthInheritedClassIconMapAnnotation and getNthInheritedClassDiagramMapAnnotation for retrieving annotations placed on extends.
- Fix for instantiateDaeFunction when the input is fully qualified and the function exists within a model, not a package. + Use the non-fully qualified name - the same we used to get the function type.
Added dereferencing of the the filename string pointer in read_input, so that you get a meaningful error message if it fails to open the input data file.
- Added c_runtime/fortran_types.h + Contains only fortran_integer - the same size integer as the ones used by the DASSL solver. - Updated solver_dasrt.h to use fortran_integer instead of long. + Fixes some of the new 64-bit issues. + Also updated functions that were used by this function. + Updated code generation for the new function defintions. - The testsuite now runs on 64-bit machines (except some MetaModelica tests)
-Fixed bug with infinite recursion of derivative functions (found throught the derivative annotation) -Removed "koning lookup" functions that hasn't been used for years.
-Partly fixed instantiation of recursive functions (need to check in so others can continue working on MultiBody). Still some problem left with invalid cache.
A basic implementation of the built-in function delay(). Lacking features: * Handling of delayed events * delayMax is ignored * Checks for some improper usage
-Added instantantiation of functions in Static. All used functions (inluding derivative annoation functions) are now instantiated and added to the DAE. The code generation will now (TODO in OpenModelica backend) be generated only from the DAE, and not Absyn. - Changed ClassInf.State to contain Absyn.Path instead of string - Added option envCache, to turn on and off cache during runtime (used in cevalfunc) -Changed DAE.ET_COMPLEX to contain Absyn.Path instead of string
- Fixed cevalBuiltinSizeMatrix to work on non-constant matrices. - Fixed elaboration of non-constant for-loop range limits. - Added testcase DiagonalBlock for bug #1149.
- Codegen.mo, for external functions: + Previosuly, if the order of outputs are different from the one in the call mapping, it would write the results in the incorrect order. + Added testcase for external C functions, where 4 outputs are mapped in different orders. + External Java functions use the same mapping as C functions, and do not need testing. + Test cases were also added for external FORTRAN 77 functions since the code path for code generation of F77 functions is different. However, the code actually calls the same function as in the C example (the function prototype is identical).
- getAstAsCorbaString now clears the buffer before traversing the AST. + For example, loadModel would store some old messages in the buffer even after the call was completed.
Implemented code generation of reductions to fix bug 1136, which involved: - Extending Exp.expContains to handle reductions. - Fixing elaboration of reductions in Static.elabReduction. - Adding code generation for reductions to Codegen. - Adding testcase 'Reductions' in mosfiles.
-Huge change of DAE.DAElist. It now contains a list of elements and an avltree for functions. Almost all inst functions and static.elab functions now return DAE.DAElist, so all functions used by a model gets picked up and added to the DAE. (The next step, which is not implemented yet, is to populate the avltree with all function instances used by the model) -Removed dead (commented) code in several places. If you miss this code, you will have to go back in the svn log an search for it! - removed Inst.initVarsModelicaOutput since we now keep modifier bindings as modifiers and not generate equation for them.
Bugfix for ticket #1154 - Add Inst.addComponentsToEnv to all components before elaborating any mods in records. + We now use instClassExtendsAndExtendsList instead of record-specific code for handling SCode.EXTENDS. + Added testsuite/record/RecordModifications.mo to test this. - Removed Lookup.buildRecordConstructorVarLst. + Lookup.buildRecordConstructorClass does almost the same thing. + Added Lookup.buildRecordType, a helper function for the functions that previously fetched varLst and created type based on that. - Inst.splitElts and Inst.instClassExtendsAndExtendsList were made public so they could be seen from Lookup.
- Fixed reductions so that they are constant evaluated in classes when possible. - Added testcase to test constant evaluation of reductions (ConstantReductions.mo). - Added missing reduction function 'product'.
Changed how elaboration of multiple iterators in array constructors are handled (multiple iterators give multi-dimensional arrays, not a flattened one-dimensional array).
- implemented instance hierarchy during instantiation Inst.updateInstanceHierarchy is called during Inst.addComponentsToEnv2 to build the hierarchy. - Inst.handleOuterWithModificationOnInner is called in Inst.instElement to lookup the modification from the inner element in the instance hierarchy. - adapted Inst.checkMultipleElementsIdentical to remove the inner modification when checking if the element is outer (not really 100% correct but for example Dym doesn't complain about modifications on outer components). - adapted Inst.modificationOnOuter to complain only if the modification on outer is NOT the same as the modification on inner. - used System.getHasInnerOuterDefinitions() to guard expensive functions in Inst. - replaced InstanceHierarchy.emptyInstanceHierarchy with InstanceHierarchy.emptyInstHierarchy everywhere
- functionality to strip the last prefix implemented in Prefix.prefixStripLast. - this function is used during instance hierarchy lookup by peeling of the furthest rhs prefix and appending the component name when searching for the inner component in the instance hierarchy.
- implemented side effects to set/get the information that a model contains or not inner/outer definitions. - using this functionality we can speed up some of the Inst functions as we skip doing them.
- fixes for ticket #1155: http://openmodelica.ida.liu.se:8080/cb/issue/1155 final parameter Real eAxis_ia[3](each final unit="1") = {1,2,3}; wrongly gives: Error: Variable eAxis_ia: trying to override final variable - added tests for this fix: testsuite/mofiles/OverrideFinalTest.mo
Java Interface: - When handling uniontypes, we now add the _UT suffix so we can compile e.g. Absyn.mo definitions to a jar-file on the Windows platform. - Removed the dependency on Sun JreSocketFactory (we won't need long CORBA timeouts if we send long strings through files anyway).
Java Interface: - JarCreator: Check if file already exists, and throw exception. + This happens on Windows systems if uniontypes and records have the same case-insensitive name. - DefinitionsCreator: Fix for when OPENMODELICA environment-variable doesn't contain a trailing directory-separator. - The Java testsuite now generates files in the proper order, but doesn't work on Windows due to case-insensitivity issues.
Java Interface - Added parse(Reader) to ModelicaOption + Fixed the Java testsuite - Added testcase for getAstAsCorbaString(filename) + Uses TankPID.mo, and a very short Java function. + Could also use CORBA to get the string, but that requires a little bit more code. It's better to pass the string using filename anyway, since 32-bit architectures are limited to 16MB strings in OpenModelica.
-Added boolean to DAEUtil.transformIfEqToExpr to only "constant evaluate" if-equations and not rewrite to if-expr. That way MathCore can use the functionality too. -Fixed bug with for iterator over complex subscripted componentrefs, see testcase ForIterator2.mo
Fixed "bug" from #4760, #4760. Connect.mo; statement: "source := Util.listReduce(Util.listMap(cs, Util.tuple33), DAEUtil.mergeSources);" caused the kernel to run out of memory in large models.
- Susan can import listLenght() function; ... generally any one-ret-value function with variable types can be imported - C# codegen stub added ... +d=tplmode,CSharp switch must be set to invoke the generator via translateModel() script function - a new test model - RightHeartStarling.mo - the first candidate from our lab to be in-browser running model that is fully automatically translated from Modelica source - complete error reporting in parser, including type-views
- update the readmes to point to the new location of ModelicaLib.tar.gz https://openmodelica.ida.liu.se/svn/OpenModelica/installers/windows/VC7/Setup/zips/ModelicaLib.tar.gz
- Changes to the OMC-Java interface (Java code) - Replaced the ANTLR grammar for parsing the CORBA communication + Max heap size reduced by 66% (down to 1GB from 3GB on 64-bit platforms) + Time to parse reduced to 33-50% of the original time taken (depending on typed or untyped parsing) + Added proper typed parsing also for list,tuple and Option - Added the TypeSpec.java class to represent complex types fully - Added missing JreSocketFactory - Parsing an AST with type information is no longer done in two phases - Updated the templated to generate jar files to reflect the changes above - MSL 3.1 can now be parsed fully, with full type information + Typecasting needs to be done for tuples due to Java weaknesses, but no longer using ModelicaAny.cast - standard (T)myTuple.get(0) should work. + The string is possibly too large for 32-bit OpenModelica to handle. However, it is no longer manipulated within OpenModelica, so it might accept it. Needs to be tested.
- Changed to the OMC-Java interface (Java code) + Added printToBuffer to all ModelicaObjects so toString() is almost instant even for large strings + Changed the interface of ModelicaRecord slightly - We now cache field names and types in order to reduce the memory consumption of an AST by ~75% - All records now need to have all fieldnames and types set when created + OMCorba.g now generates line and column numbers for all errors
- Extracted algorithm and equation asserts - Ignored (in some cases) discrete equations that also appears in zero crossings - Fixed incorrect component ref for a SES_NONLINEAR - Fixed incorrect expression for a SES_RESIDUAL - Implemented STMT_TUPLE_ASSIGN - Added more special built-ins: abs, String
- Main.makeDebugResult: Rewrote this with a proper guard, so it doesn't try to append large strings several times in a row if we are going to discard the result anyway. + This makes it possible to send large strings over 64-bit CORBA (even though it times out right now).
Connect.mo - added origin information to connections sets - got rid of some extra listMap by writing specialized functions so it should be a bit faster now.
- fixes for additional equations generated from a conditional component which has condition false and contains a connector which has a flow component. - now the MultiBody elementary models DoublePendulum and Pendulum are balanced!
- Added new function function_updateDepend needed by runtime - Just a copy of function_updateDependents (for now) - Implemented basic infrastructure for external functions
- Absyn.mo: Changed some componentReg to componentRef. - Dump.mo: Uses the more proper NONE() instead of NONE when dumping AST. - Dump.mo: Added a new way to dump a program (AsCorbaString suffix), which prints it like Values.Value is printed. This way, we can parse the AST in Java. + Note: This could not be fully tested since there seems to be complications with large strings even on 64-bit machines (segfaults for big strings sent over CORBA).
- added debug printing of model balancing activated with +d=checkModel added function Inst.checkModelBalancing similar to checkModel. If it doesn't work for MathCore we can comment it out. - send the connection graph to functions (also return a new one): + Inst.changeOuterReferences (also faster implementation by sending in sources/targets) down to Inst.changeOuterReferences2/3/4 + Inst.handleInnerOuterEquations + Inst.instConditionalDeclaration - updates due to Connect.INNER replaced by Connect.INSIDE Connect.OUTER replaced by Connect.OUTSIDE - for now disable the generation of equation from overconstrained connectors - some comments added/updated.
- handle also stringfied component refs in crefHaveSubs. - added sizeOf(expType) that returns the size of an ET_ARRAY or ET_COMPLEX the size is the number of the *scalar* components in the array or complex (record).
- update the complex equation counting for now just multiplying the same equation as many times as the size of the record (in lowerComplexEqn) - more debugging added - more compact display of DAELow
- use failure(cevalIsExternalObjectConstructor(cache,funcpath,env)) instead of (cache,false) = Static.isExternalObjectFunction(cache,env,funcpath); to guard against ceval of external functions.
- replace Face.INNER/OUTER with INSIDE and OUTSIDE to not create confusion - renamed function getInner* -> getInside* and getOuter* -> getOutside* - rewrote some of the comments.
- Fixed Print.printBuf scaling issues (it saved the length of the buffer, but did strlen(buf) regardless; major issues when reaching strings as short as 5MB).
-Fixed memory access violation bug in System.trimChar -Changed floor to follow specification (Real->Real, NOT Real -> Integer) -Changed System.stringReplace implementation to c++ (in systemimplmisc.cpp) (This was probably not necessary since bug was in trimChar, but impl. is now much more readable ;)
- partialInstExtendsList is now used (copy/paste made partialInstClass use the regular instExtendsList instead; it was probably just a little bit slower). - Inst.classdefElts2 now returns 2 lists. One with only constants so these can be explicitly instantiated (this was commented out due to breaking ClassExtends3.mo). - Inst.instElement now tries to update the mod one last time before instVar (this is because the mod that comes from the baseclass was untyped).
- Mod.elabModValue now won't try to ceval expression dependent on variables (they should always fail). - This makes debugging easier since expressions that aren't meant to be ceval'ed won't appear in failtraces. - Static.elabExp now generates C_CONST for MetaModelica NONE, NONE() and {}. - Static.elabExp will generate correct const-ness for SOME(exp) and list(e1,..,,en).
- implemented DAEUtil.selectBranches that is used to select the if equation branches if the conditions are Boolean literals (true/false). This is needed because Connections.isRoot is replaced with true/false at the end of instantiation.
- ConnectionGraph.mo: + faster handling of overconstrained connections when the connection graph is empty: no DAE walk! + handle expression: (NOT Connections.isRoot(A)) + gather operations into one new function: ConnectionGraph.handleOverconstrainedConnections which is called from Inst module when we reach the instantiation of the top level class
- Changed SCode Option baseClassPath to Option>. - When extending a class, we also add the SCode.Mod to the baseclass, so we instantiate the correct class later on. - Added a testcase that sets the dimensions of a matrix in the extends modifications.
- Fixed spelling error in ZEROCROSSING generation - Updated template scalarLhsCref - Fixed type bug in range-for generation - Added template daeExpCrefRhs - Added support for binary operations: ADD_ARR, SUB_ARR, and DIV_ARRAY_SCALAR - Changed ASUB template case to match how Codegen works - Changed the way relations are generated: non-simulation specific relations are now generated in simulation context
- When instantating a partial package, force partial instantation instead. - When partially instantiating a partial class, strip out all non-package elements.
- Fixed a bug (hopefully correctly) where too many AddEvents were generated - Implemented STMT_WHILE - Implemented STMT_ASSERT - Implemented STMT_WHEN - Implemented LUNARY - Implemented MATRIX - Implemented special build-in functions promote and transpose
- updated OpenModelica back-end to agree with the new DAE.FUNCTION definition. - 3 tests (testsuite/mofiles/ClassExtends*) fail due to changes in Inst.partialInstClassdef
Changed DAE.FUNCTION to a more generic structure for external and normal function as well as derivatives of functions. Construct in front end derivative information for functions.
Added initialization of record members by rewriting generateAllocOutvar, adding generateAllocRecord and modifying generateAllocOutvars and generateAllocOutvarsExt in Codegen.
- Changed array lists: stateEquations became the two lists allEquations and stateContEquations - Ignored when equations in equation lists - Changed to simulation context in a few places - Used context in more places - Generate for loops - Added templates typeStrFromExp and typeStrFromOp - Generate some asubs
- Added boolean inline to DAE.T_FUNCTION. - Changed elabCallArgs to use this flag instead of doing an extra lookupClass (which causes infinite recursion in Modelica.Media models). - Removed instElementList from partialInstClassdef (the classdefs are added to the environment and may be looked up anyway). - Added testcase ClassExtends3.mo.
- enumerations works now - ToDo: replaceable enumerations in models with equations/algorithms containig explicit enumeration literals does not work because the componentRef have to be replaced and the numbers of enumeration litterals from both enumerations should be equal - ToDo: do not replace enumeration litteral with it value inside loops - update workplan-status
- enumeration as loop var work now in algorithm sections - ToDo do not replace the enumeration literals with it integer value - start work on replaceable enumeration
- Changed variable name type from String to DAE.ComponentRef - Handle array variables - Added arrayCref to SIMVAR to support #defines of arrays - Extended algStatement template to handle some array operations - Implemented daeExpSize template - Temporarily disabled generation of function record declarations - Cleaned up some code
- calling an function via an instance (world.gravityAcceleration) now WORKS! - Static.elabCallArgs intercepts the world.gravityAcceleration, and then copies the function (World.gravityAcceleration) and dependencies (World.gravityAccelerationTypes) from World into the current scope with new name that prefixed by the instance name: "world.gravityAcceleration" and "world.gravityAccelerationTypes"
- Inst.addCachedEnv moved to Env.addCachedEnv (is more natural to be in Env) - Static.transformModificationsToNamedArguments (does what the long name say) - Lookup.lookupType2 reordered cases - Codegen - generate modelica_integer and integer for enumeration type. testsuite/mosfiles/Enum8.mos will fail because of this. To be fixed later. - more comments in Inst - Exp.crefEqual was checking for equality: + by comparing idents/subscripts by using equality(n1, n2) instead of true = stringEqual(n1, n2) + as a last resort (last case) by *converting* the crefs into strings and doing string comparison on them??!! + I changed all equality(n1, n2) into true = stringEqual(n1, n2) and improved the last case to handle stringified crefs better: CREF_QUAL(x, CREF_IDENT(y)) will be equal to CREF_IDENT(x.y).
- added DAELow.COMPLEX_EQUATION which is populated from DAE.COMPLEX_EQUATION and DAE.INITIAL_COMPLEX_EQUATION - no handling of DAELow.COMPLEX_EQUATION yet.
- added unsafe external functions in System.mo: + System.listAppendUnsafe (not used) + System.addToRoots and System.getFromRoots to implement global variables.
- handle DAE.COMPLEX_EQUATION and DAE.INITIAL_COMPLEX_EQUATION in VarTransform.applyReplacementsDAE - if no case in VarTransform.applyReplacementsDAE matched just move to next, DO NOT FAIL. Modelica.Mechanics.MultiBody.Elementary.DoublePendulum did not flatten because VarTransform.applyReplacementsDAE failed. - Use DAE.ET_OTHER instead of DAE.ET_REAL in VarTransform.applyReplacementsDAE as otherwise the correct type is not copied from the replaced expression.
- work on enumerations for loops in algorithm sections - DoTo: for e in Enum.e1 : Enum.en - bufgix SimCodegen: print enumeration as integer for T_Complex ComponentRefs - use modifiers like start, fixed, ... for enumerations and derived enumerations
- Updated partialInstExetendsList to do the same thing as instExtendsList. - Changed splitElts, listSelect in those functions to use a new splitClassExtendsElts instead (for performance).
- implemented SCodeUtil.translateSCodeModToNArgs which translates *derived* class modifications into named function arguments and also prefixes only the CREF_IDENTs from the binding expressions with the given prefix.
- Rename namemods when renaming classes due to CLASS_EXTENDS. - Fix so that you may extend from classes that use CLASS_EXTENDS nodes. - Added testcase for this.
- Fixed class extends by renaming the extended class and creating a new one extending from the old in the same scope. - We can now put proper modifications in the class extends node (they get elaboated in the correct scope). - Only the toplevel class extends are expanded (not inherited). This bug will be fixed in a later commit. - If the modifications on the extends node in the base class modifies the class we extend using class extends, those modifications will have higher priority. This is bug will be fixed in a later commit.
Changed scalar types to array types where suitable in Static.operators, and changed Codegen to reflect these changes. This was done to fix vector operations that didn't work.
- Generate empty functions file so that compilation will succeed (generation of function code failed for one test case) - Replaced DAELow.Equation with SimEqSystem as a step to support array eqs
- Fixed incorrect array name - Fixed incorrect switch variable name - Added support for constant subscripts - Generate removed equations in output functions - Added (temporary) generation of makefile to be able to run testsuit - Removed print statements since they interfered with rtest in testsuit - Fixed order of equation lists (they were reversed) - Fixed order of variables (now sorted by index) - Fixed indents to match << (and >>) in templates
- a first complete Susan lexer/parser error reporting implementation it is usable primarily with MDT in Eclipse ... reported errors are marked directly in code editor when the .tpl file is opened
- Static.operators was speeded up by a factor of 4. We now save a lot of the lists generated as constants. - Fixed compiler warning in meta_modelica.c - Fixed the BuiltinArray.mos testcase on 64-bit Linux
-Added HashTable6.mo : (cr,cr) -> exp -Fixed bug in Errorext.cpp: getMessagesStr (no comma's between messages) -Added some functions to Util -Added VarTransform.replaceExpRepeated that iterates replacement rules until it converges.
Fixed bug in runtime system that caused result data for some points in time to be written twice. Fixed test case BouncingBall2, because it depended on the above bug.
- Added MetaModelica arrayLength, arrayGet, arrayCreate, arrayList, listArray, arrayUpdate, arrayCopy, arrayAdd. All use arrays as the underlying datatype. The array type should be considered mutable.
- Added initial support for MetaModelica array, including initial versions of arrayCreate, arrayGet and arrayLength (based on a list implementation which needs to be replaced).
- Implemented function bound_parameters - Refactored expression templates - Fixed incorrect names for derivatives - Fixed incorrect names for some equations - Implemented function function_zeroCrossing - Implemented function handleZeroCrossing
- Renamed C runtime metamodelica_type to modelica_metatype, to fit with Codegen standards. - DAE.IFEXP now generates a temporary so it can be used with array functions. - Disabled PartialFn13.mos since the DAE.CALL of those functions have incorrect return-type, and correct code isn't generated.
- guard the MetaModelica lookupType in Static.elabCallArgs with true = RTOpts.acceptMetaModelicaGrammar(); as lookup is rather expensive. - in Static.elabBuiltinSmooth when smooth(0, expr) just return expr.
- Susan indentation with '<<' is now determined by indentation of the line where is the '<<' that is, in examples: << text >> << text >> case PATTRN then << text >>
- record construction vectorization in Static.elabCallArgs + testsuite/mofiles/RecordConstructorVectorization.mo + this is used in Modelica.Media for FluidConstants. - disabled stdout printing Type mismatch in equation and changed testsuite/mosfiles/ArrayDivError.mos to match - check the +s and +showErrorMessages command line parameters and display an error if they are wrong - display the error message for the flags just once in Main.mo - added Debug.trace[ln] to print the errors unguarded by debug flags and used this functionality to print some of the failtrace guarded by true = RTOpts.debugFlag("failtrace"); This way is faster as no more building of strings happen. - beautified code and added some comments; got rid of some really old commented out RML code - added check for setDebugFlags in CevalScript.mo
- Changed Types.match{Type,Prop} to also take a boolean that controls the output of error messages. It should now be possible to ensure that errors are only printed if both "match(lhs,rhs)" and "match(rhs,lhs)" fails.
- Function pointers and partially evaluated functions are now a default feature of Modelica (you no longer need the +d=fnptr flag or meta modelica grammar)
- made Connection.isRoot function non-constant in Stati.elabBuiltinIsRoot as otherwise it expects constant input arguments and generates errors of kind: "Error: No constant value for variable frame_a.R in scope Modelica.Mechanics.MultiBody.Parts.Body" - added ceval handler for rooted operator (non-existent in Modelica Specification but used in MSL) see more here: https://trac.modelica.org/Modelica/ticket/95 - more informative fail traces in Mod.mo, Types.mo, ValuesUtil.mo - speed up the fail traces from Types.mo (type checking should be faster now). - the fail traces from Types are now guided by "types" not by "failtrace" as they generate way too many messages that are not of interest. just add +d=types to bring the messages back. - more informative printing of enumerations in ValuesUtil.mo
- g++ is now set as compileCommand in Compiler/runtime/settingsimpl.c Compiler/CevalScript.mo CevalScript.compileModel now matches for "g++" instead of "" - Lookup.buildRecordConstructorElts now selects the full modifier only if the component modifier is empty.
- beautification of dumped code in Dump.mo. + no more space before ";" in Real x ; + print the comment of the partial derivative definition: x = der(func, b, c) comment;
- fixes for array modifications given on builtin attributes in functions input parameters. This component defined in a function now instantiates: input Integer sequence[3](min = {1,1,1}, max = {3,3,3}) = {1,2,3}; See testsuite/mofiles/Sequence.mo
- reverted 2 changes from revision 4547 as otherwise ALL of the (simulation) tests fail + settingsimpl.c -> compileCommand set to "" + Lookup.mo -> modifications on record components All tests go now. We'll discuss these changes and see what we can do about them.
- Removed the need to set CLASSPATH when building under Linux. - Updated configure script to not check for CLASSPATH (it only checks that Java exists and can load the provided antlr). - Updated the lexer/parser makefiles to run with parallel jobs. - Warning: Due to RML creating and using .srz-files from all imported packages, parallel execution of make may in some rare cases fail. Running make again will work because the other process will have cached the srz-files. It is possible to generate all srz-files in advance at the cost of efficiency (you may not do this is parallel, and it's not necessary if the number of jobs=1). - Warning: RML drains a lot of RAM. Running "make -j" launches an unlimited number of jobs. This will eat about 20GB of RAM and possibly crash the system, so don't do this. Max 1 job per GB of RAM is recommended.
- Updated Compiler and c_runtime Makefiles to support make -j (for parallel execution of jobs). absyn_builder is forced to use max 1 job since those Makefiles haven't been updated yet. - omc_release and omc_debug now first create mo-files and signatures before reloading the Makefile in order to ensure that all dependencies are updated. - Removed unused imports.
- Fixed a bug that prevented use of function references outside functions - If you want to use function references or partially evaluated functions, compile with +d=fnptr
- added operator (function)? to lexer/parser/walker but is commented out. we will uncomment it when is needed. - added operator (function)? to Absyn and SCode (not used as it doesn't come from the lexer/parser/walker)
- Fixes for extends of type which is an alias of array type. The problem was that the case in Inst.mo at line 6695 didn't match because of the annotation list! Example: type Alias = Real[3]; type Orientation extends Alias; end Orientation;
- Refactoring of DAE.Type - Removed DAE.Type (DAE.VAR already has a Types.Type since it's required for connectors and MetaModelica stuff). - Added DAELow.Type - a type that has truly been lowered (only INT,REAL,STRING,BOOL,ENUMERATION are allowed in DAELow).
- Do not add equations if we bind a record variable using a ceval'ed record constructor. - Do not change variability of record fields from const to param if the parent is declared param.
- fixes the last commit to compile on windows - include windows.h in systemimpl.h - moved dynload.o before libc_runtime.a in Makefile.common.omdev.mingw as otherwise you get undefined symbols
- Refactoring of System.executeFunction. Moved to DynLoad.mo. The implementation has a stub for those who wish to compile OpenModelica without support for dynamic loading and execution of functions. - No Makefile was update to use the stub.
- Removed the algorithms and mods on the result element in the record constructor (they didn't work if the field was parameter or constant). - Added a new kind of function in the DAE, DAE.RECORD_CONSTRUCTOR, so we can handle records that contain parameters or constants. - Fixed a bug that caused Values.RECORD to have ClassInf.RECORD("package.name") instead of ClassInf.RECORD("name"), which is in use elsewhere.
enumerations part 1 - what does not work - redeclaration - Integer(Enumeration) - String(Enumeration) - ... (perhaps more i have not yet finished all enumeration testcases)
- Fixed Algorithm.makeIf to type-convert expression to Boolean (so it works for boxed Boolean values, e.g. when calling function references). - 06_advanced added to the default testsuite. Tests polymorphic functions, e.g. listMap0, listMap1.
- Exp.T_FUNCTION_REFERENCE is now divided into _VAR and _FUNC (because the C-code generated from the CREF needs to be different). - With +g=MetaModelica, we now also generate a function with only boxed in- and output (which is used by all function references for simplicity). - Boxing of records is now performed (although it sadly fails for nested records due to ClassInf.RECORD/etc only containing a String, not a Path). - Unboxing of records works fine. Couldn't be tested on nested, boxed records.
- Inlining of functions now works for functions called from within other functions - Inlining is performed on functions that fill these requirements: - One algorithm statement, which assigns values to its output - Contains annotation(Inline = true) somewhere
- Convert.typeConvert support for DAE.FUNCTION_REFERENCE. - Added Types.POLYMORPHIC to the list of boxed datatypes. - Fixed a problem where code generation didn't filter function reference variables if they were duplicated. - It is now possible to use some higher-order polymorphic functions. The problem is functions that have in- or output non-boxed (Modelica) types. Integers work "best", since they are simply shifted 1 bit to the right in its unboxed state (compareInt still works, as does addInt, multInt returns a value 2x too high, etc).
- Fixed Types.matchSuperType for METARECORD/UNIONTYPE (was moved from Types.subtype to typeConvert) - Added Uniontype14.mos to check for this bug - Added 03_symbolicderivative to the default testsuite since it now works in OpenModelica
- mmc_unbox as macros. - Changed in cevalScript/SimCodegen generation of functions. - We now generate all metarecords of referenced uniontypes instead of only the ones created by a METARECORDCALL. This is necessary due to the possibility of external functions (lexers/parsers) generating these structures. It kinda worked before, but was a bit of a hack. - Codegen.getFunctionCalls(exps), etc renamed to getMatchingExps(exps, matchCalls).
- reverted the changes from revision r4419 as some of the models in the testsuite fail. - disabled Java testing for now as there are still some problems with it.
- Changed CevalScript to generate C code that looks more like the simulation code. We now put all the headers before the bodies so we can have cycles in call graphs.
- Adding modelica_java.jar to the repository (so JDK isn't required to compile OpenModelica) - Adding c_runtime/java_interface to the default make system. (If no JDK is installed, modelica_java.jar is simply copied to /build/...)
- Fixed f2c.h (2006 release of f2c fixed a 64-bit bug) and matrix.h (used long int* instead of integer* defined in f2c.h) - 64-bit Linux can now be used to pass all testcases
- JarCreator: Transforms backslashes of paths in zip-files to frontslashes. That way both javac.exe and java.exe work properly in Windows. - testsuite/java/JavaExt.java: Escape the string so backslashes are parsed by OpenModelica. - testsuite/{java,records}/rtest: Changed to an rtest that is not parallelized since Windows dll's hate that. (Also updated the mos-files since the old one requires // endResult - testsuite/java/Makefile: Better Windows-support using JAVA_HOME - c_runtime/java_interface/Makefile*: Better Windows-support using JAVA_HOME
- made parser/walker/Absyn.mo/Dump.mo to handle failure and equality in the algorithm section - do not dive into DERIVED classes when querying internal classes in Interactive.mo; is not correct to dive into derived classes and if we do then we run into stack overflow; Example: lookup of Env.Env in Env.Env.
- sort non scalar variables and known variables befor indexcalculation; aim: code generation write all elements from the non scalar variable in one memory block
- Fixed the testsuite Makefile (missed a backslash at the end) - Merged getDefinitions Interactive API function from the Bootstrapping branch - Fixed some of the Java-related issues OMC has in Windows (don't try to fprintf to stderr before calling abort() - in Windows the string will not get printed) - It will be necessary to set JAVA_HOME to a JDK if you want to run the java testsuite in Windows. If you call "java" directly, it will load Java from system32, which is a JRE and not a JDK (which means you can't call javac from it). Why Sun decided to install both JRE and JDK by default when downloading a JDK, I do not know.
- Updated the Makefiles to only run rml2sig/rmldep-new.sh if the file changes (the .sig-file does not always update in order to avoid re-compiling all files depending on the source unless the interface changes). We now also generate a dummy .sigx file which only tells us when rmldep was last run. If you change a lot of files (over time, lots of re-compilations), but never change the function interfaces, this can reduce the compile time by over a minute.
- Enabled the MetaModelica testsuite by default since the tests now work (even in Windows) - Merged Bootstrapping branch Revision: 4372 "Some changes for polymorphic function references" - Inst.addComponentsToEnv: Re-added capability for TCOMPLEX types to be instantiated - Inst.instEquation2: Added capability for equation-matching of MetaModelica types (needed because record modifications bind the result using equations) - Types.valuesToMods: Uses typeofValue and valueExp when converting records (they handle metarecords as well) - Added instructions for the MetaModelica Course
- Merged revisions 3852-4247 of the Bootstrapping branch - Support for external Java functions - Typed Java interface to OpenModelica functions using CORBA - Improved MetaModelica list,tuple,option,uniontype implementations - MetaModelica matchcontinue expressions - MetaModelica function references - Partially evaluated functions - Improved Record handling - Improved handling of NORETCALL functions (mainly used in MetaModelica) - Note that the MetaModelica, Java and Records testcases are not fully working after the merge
- Merged c_runtime from Bootstrapping - Fixed simulation_result.cpp performance issues (<< endl flushes the buffer, \n does not) - Added the Java-specific runtimes (C and Java) - Changes to read_write.{c,h} for record-in-record, NORETCALL and MetaModelica types
- yacclib.h SHOULD not be included anywhere and yacclib.c should NOT be used as these functions are now part of rml.h and librml*.a. Get a new RML/MMC from Subversion or from OMDev. - i renamed yacclib.c and yacclib.h to .txt to make sure this never happens again.
- fixed the problem that two or more plot commands end up plotting the same plot file by generating a unique tmpPlot_NN.plt file name for each plot[X], plotParametric[X] command.
- fixed the problem that two or more plot commands end up plotting the same plot file by generating a unique tmpPlot_NN.plt file name for each plot[X], plotParametric[X] command. - gcc4 seems to have a problem with include directories that contain / at the end so i removed the trailing slash from includes.
- escape string literals when generating C code as they might have \n in them which will fail to compile with a syntactic error. - added Util.escapeModelicaStringToCString to Util.mo
A lot of modifications: + release 1.5.0 + merged all other changes from trunk/* that happen in the meantime! + now omc can load libraries when called from command line directly. ./omc file lib1 lib2 ... libN + merged changes in the MathCoreOSMC branch + updated the Setup project, included a link to SimForge, added omc-mingw.exe to be used on Vista if needed. + updated DAEQuery.mo, XMLDump.mo + added more help text when running omc from command line.
- merged from trunk/tools Revision: 3981 Author: adrpo Date: 01:50:27, den 29 mars 2009 Message: - small updates to the RML to MetaModelica tool ---- Modified : /trunk/tools/rml2mod/absyn.rml
- fixed the getIconAnnotation! In Static.mo I added a SPECIAL case in elabCallArgs to deal with graphical annotations The code doesn't go via Lookup.lookupType as the Line record has [:,2] unknown sizes and when trying to instantiate it it fails! - changed in Static.elabNamedInputArgs in the second case the flag (checkTypes as true) to just checkTypes. - do error check pointing when dealing with annotations! - added more tests in testsuite/mosfiles/interactive_api_classes.mos as the previous file was WRONG!! - added noevalfunc flag to disable the Cevalfunc module - added usedep flag to enable the Interactive.getTotalProgram (we disable it for now until replaceable packages are OK). - corrected some errors in Constants.mo and added a "uniquely" named package so that we know when we are elaborating a graphical program! - added cases for ENUM and ARRAY in Types.valuesToMods - added ENUM case in Exp.typeString - fixed a bug in Lookup.buildRecordConstructorElts ( which wrongly got rid of component modifications) - put back the strip in the omc_release/Makefile.omdev.mingw - minor code beautification
-Improved efficiency of cache by a dirty hack: making cache an array of one element which is set as side effect, so cache is updated even if function fails.
-Implemented support for linspace() function in frontend. -Fixed bug with slicing in modifiers in several sub-component modifiers, e.g. PositivePin p[2](i(start={1,2})); -Fixed bug in prefixExp on general ASUB expressions
-Added rest of implementation for unit checking, including pretty printing of units using Mixed Integer Programming based on lpsolve. Unitchecking is deactivated by default. To activate set option "unitChecking" in OptManager to true.
* Changed ErrorExt to rollback from bottom instead of top(removed earliest msg before) * Implemented constraining class (for redeclaration) * Pretty print functions for Modifers * Redeclare checking, modifiers. * Check for multiple modifiers in same scope on same component * Improved order of variables for UpdateComponentsinEnv/UpdateCompeltsMods
Fixed the print buffer function 'int increase_buffer_fixed(int increase)' Now it actually increases the buffer, previous implementation did only allocate 'increase' amount of space.
-Fixed so MISSING_INNER_MESSAGE error is not produced if option "checkModel" is true. This option should preferably be set when instantiating class for checkModel.
Another attempt to fix the bug http://openmodelica.ida.liu.se:8080/cb/issue/1098 -- this time, without adding extra equations, only modifying parameter bindings.
Added the code for handling unit checking. The code for parsing unit strings is implemented in C++ and is located under directory "runtime". The actual checking (including unit inference) is implemented in file UnitChecker.mo.
The duplication of the dumpEquation method into dumpResidual equation method was necessary to prevent errors caused by the usage of the DAELow.equationToResidualForm call. The problem was that equations having non-scalar right hand side where not correctly translated into residuals. To make an example, the residual of the equation: x = y - z where not correctly calculated, thus obtaining x - y - z (instead of x - (y -z)). More investigation is necessary to understand if the DAELow.equationToResidualForm method makes the hypothesis of having scalar right hand side equations or not (comments of the method are generic).
- fixes for type alias on an array type. The declaration/usage of the form below now works: type Arr = Real[3](each min=0); Arr x = {1,2,3}; - constant evaluation of enumerations values in relations - small beautification of the code
-Added error message for circular equations (typically x=x) and logging of selected states (both used by MathModelica backend). -Inserted option to OptManager "logSelectedStates" which is by default turned off. -Implemented getNumMessages that returns the number of messages in the message queue.
Undid the last commit #4021 since it will make several models in the standard library to fail. This because there will be more equations then variables generated. (see Note: 4021 in Inst.mo)
- first implementation of further enumeration support: + comparison of enumerations + array declaration using enumerations + array indexing using enumerations + for equations using enumerations - changes to Values.ENUM - all flattening tests go
Added support for Connections.isRoot. - All calls to isRoot are replaced by true or false in its own phase after instantiation (Ceval was too early). This phase is implemented in ConnectionGraph and called from Inst.instProgram. - Some special case handling is needed in Static and Lookup, because all builtins have been so far in root environment and there were no support for builtins in virtual packages like Connections. - Bug fix in ConnectionGraph related to potentialRoots
- Inst.mo: small fixes to instantiation of a single constant in a package - Util.mo: added listFindWithCompareFunc, selectAndRemoveNth, listMap8 - VarTransform.mo: added dumping functionality for variable replacements - optmanager.cpp: small changes to some flags
Fixed the function Static.elabBuiltinTranspose2. This function looks the same in MathCoreOSMC branch, but the errors with transposition do not appear there. I don't know why.
Connection graph population and breaking algorithm. Current version doesn't work probably because equalityConstraints are lost in elaboration. Modification: - Refactored many instantiation methods to have ConnectionGraph.ConnectionGraph as input and output parameter. - Added Types.EqualityConstraint into T_COMPLEX - Inst.connectComponents contains special case for connections between components having equalityConstraints - Inst.instEquationCommon contains special cases for Connections.branch, Connections.root and Connections.potentialRoot - ConnectionGraph.mo contains the loop breaking algorithm
- In DAE:mo made ppStatementStr public. - In Env.mo made avlTreeAdd public (avlTreeGet was already public). - Added compiler option "noCse" to OptionManager (Specific option for MathCore backend, but other backends that in the future implement CSE (Common Subexpression Elimination) might also want to turn it off (similar as to turning tearing off).
- fixed vectorization of: matrix = pre(matrix); - Now flattening of the model below using ModelicaAdditions.MultiBody works. Thanks to Joerg.Wangemann eads net for reporting the bug and providing the model! model TestBodyFreeFall import ModelicaAdditions.MultiBody; MultiBody.Parts.InertialSystem inertialSystem; MultiBody.Joints.FreeMotion freemotion; MultiBody.Parts.Body acstructure(m=1, I11=0.1,I22=0.1,I33=0.1); equation connect(inertialSystem.frame_b, freemotion.frame_a); connect(acstructure.frame_a, freemotion.frame_b); end TestBodyFreeFall;
- fixed an error when counting variables in DAELow.mo (excluded RECORD) - fixed vectorization of reinit(arr1, arr2) - fixed vectorization of matrix = pre(matrix)
-Added constrain() with vector arguments - Added simplification to propagate noEvent operator on expressions down to relation subexpressions -Added symbolic expansion of skew function
- expose more of the c_runtime array interface - fixes for array iterators which stopped working after the merge - got rid of $$$ in the generated code (SimCodegen.mo) - Util. modelicaStringToCStr2 searches for "der(" instead of "DER(" - Handling some of the Exp.ASUB cases in Codegen.mo - Exp.ASSIGN now as an exp LHS instead of a component reference LHS - small fix in VarTransform.mo to be able to parse it with OMC - changes to some of the testsuite/mosfiles due to compiler changes.
- fixed an OMC crash on Vista (sendData.cpp) - added icons for Plot Window (ext.exe) and OMC (omc.exe) - display the Plot Window (ext.exe) on the taskbar - updated copyright in OMShell - added .pdb files for releases: ext.exe, OMShell.exe, omc.exe to make it easier to debug crashes - fixed the last date in OpenModelica System Guide - fixed 3D_Bouncinball3D.onb - fixed OMShell runtime error at start
Added the possibility to print the incidence matrix of the DAE system. The incidence matrix refers to the original problem, before running the matching and the BLT. The choice has been implemented using a boolean input (addOriginalIncidenceMatrix). By default is false.
Implemented a new functionality to dumpXMLDAE functional to output additional information for solving the DAE system: - matching algorithm output and - BLT representation information.
Fixed a bug concerning the reference index of algorithms within the XML file. Algorithms index starts from 0 while equations index starts from 1. Fixed.
* Implemented support, in frontend, for mod/div/rem * Readded Adrians code for handeling zero flow equations of arrays(Connect.mo) * Change/fixed the "current variable" in error message functionality * Added support for having "der(x) := x" in algorithm section. * function/operator skew() in Static.mo * Updated rtest to current Mathcore rtest version.
- merged the Array branch revisions 3782-3789 (see the revision comments below) - 13 tests are failing due to: + -traverse_classes2 failed + constant function evaluation seems not to work
- fixed getIconAnnotation and getDiagramAnnotation to get rid of the empty component: before: {x1,y1,x2,y2,,{graphics_elements}} after: {x1,y1,x2,y2,{graphics_elements}}
- issue a warning if integers are more than could be represented on 30 bits plus sign - update 3D examples - small changes in error messages - ClassLoader will display parse information only if +d=ClassLoader
- emit an error when trying to simulate a model that doesn't exist - fixed bug with min/max code generation: http://openmodelica.ida.liu.se:8080/cb/issue/1032
-Changed error reporting to always prefix message with the severity string (Error, Warning or Notification) -Added dependencies to some makefiles - Removed DAE.RECORD, instead use DAE.COMPLEX
- handle simple range i.e. 1:4 in Codegen.mo - fixed OMNotebook saving problem - updated for 1.4.5 release: + settingsimpl.c (getVersion) + Setup.vdproj and Uninstall.bat (new product code) + some of the DrModelica Files + the onb examples
- got rid of all the not-needed files for the front-end: I added not a Main_stub.mo which only does translateFile. I splited Derive.mo into 2. I also took out from the compilation: DAELow.mo, Codegen.mo, SimCodegen.mo, TaskGraph.mo, TaskGraphExt.mo DAEExt.mo. See omc_frontend/Makefile.omdev.mingw Unfortunately I had to fix the dependencies manually in the makefile, but we can fix that later.
- stubs CevalScript_stub.mo and BackendVarTransform_stub.mo - makefile entry for frontend, write frontend in the Eclipse window - this will create omcf.exe in omc_frontend and then copy it as build/bin/omc.exe - it will also create a frontend.a with all the objects.
- splitting of Ceval into Ceval and CevalScript - splitting of VarTransform into VarTransform and BackendVarTransform - modified all the needed files for the new changes - added the new .mo files to the Compiler/Makefiles.common.*
- added flag +showErrorMessages to show error messages while they happen. + the flag is used in Print.printErrorBuf - disable the ClassLoader.loadCompletePackageFromMp failure message as it might happen because of directories with no .mo files. - return the entire program in Interactive.getTotalModel as we have missing functionality right now.
- these changes fixes a bug with simplify and failure of Prefix.prefixExp + thanks to [Jens dot Frenkel AT mailbox dot tu-dresden dot de] for providing a test model that reproduced the bug. - added +noSimplify flag and setNoSimplify(bool)/getNoSimplify() API for models that have huge expressions in them. - simplify2 is applied only if this flag is set to false (the default). - when there is no prefix is Prefix.prefixExp just return the expression, do not fail. - get rid of -Wall flag for simulation code compilation as it takes longer to compile with it.
- update of ModelicaXML and FlatModelicaXML to parse Modelica 2.2.2 library - moved to Visual Studio 2008 - updated the .dtd and the parsers/lexers/walkers - moved to xerces-c 3.0
- increase the memory_pool for real numbers from 10000 to 1000000. - added the new element wise operators ./,.*,.+,.^ to the modelica/flat_modelica parsers, walker, lexers, Absyn.mo and Dump.mo - handling no return equations and algorithms in Dump.mo. - beautifying the output of the flat Modelica. - beautifying the generated code. - added a no return equation and algorithm in FlatParse.mof
- fixed a mistake in Absyn.EQ/ALG_FAILURE/EQUALITY, they should contain EquationItem and AlgorithmItem as built by the parser - got rid of function removal on loading as we can do it based on build time: Ceval, ClassLoader, Interactive, Inst, Static - beautifying dumping of MetaModelica code and handle also the equality and failure equations. - remove the .sig and .srz files on clean - fixed a bug with modifications merging (see Modification6.mo) - System__hash improved plus now considering the entire string + RefinedSimpleCircuitValid.mo changes due to different hashing. - more homogeneous function documentation strings here and there - small changes to sendData, OMNotebook and ext(ernal plotter).
- added better annotation handling: + annotationVersion flag to the compiler: * omc +annotationVersion=1.x|2.x|3.x + setAnnotationVersion/getAnnotationVersion API + see Constants.mo, RTOpts.mo, rtopts.c + more implementation is needed for Modelica 3.0 annotations.
- had to rename build/lib/libQt[NAME].a to build/lib/libQt[NAME]-mingw.a so that they don't interfere with Linux Qt libs. - changed ext.vcproj and trunk.vcproj to copy the executables and *.xml to build/bin - new OMNotebook.exe and ext.exe
- added target qtclients to build OMNotebook/OMShell/ext in Makefile.in (Makefile) - fixed a warning in mosh/src/mosh.cpp - added more documentation on how to compile the new Qt plotting and 3D functionality in README.Cygwin.or.Linux.txt
- the damn Qt doesn't have the same behavior on Linux vs. Windows! - added include for QTemporaryFile - changed the waitForConnected(-1) to waitForConnected(5000)
- update to makefiles + got rid of $OSTYPE (as we already have different makefiles for MinGW and Linux) + added -ftrace for Linux for easier testing + updated the Qt libs for Linux
- seems that on some Linux distros (Fedora, Debian, ??) there was a problem with malloc not being defined. i added now stdlib include to the needed files.
- fixed the broken +d=failtrace debugging facility - fixed bug http://openmodelica.ida.liu.se:8080/cb/issue/1022 pointed out by Alexander.Roehnsch dlr de. Thanks! External function with no input parameters do not typecheck!
- find readline on OS X (configure) - added VisualizationWidget to the ext project pro file - neutered the SoQt stuff on OSX until we get it working - added -framework Carbon and -lz to systemimpl for OS X compatibilty with Qt
- Linux fixes to detect MICO Corba libraries automatically using mico-config --libs - Updated README.Cygwin.or.Linux.txt and explain that MICO executables need to be in the PATH
- updated the READMEs due to changes to: + upgrades of all solutions and projects to MSVC 2008 + upgrades of OMDev package to GCC 3.4.5 and MICO Corba 2.3.13 - got rid of some deprecated compiler/linker flags in Makefile.w32 due to MSVC 2008 upgrade - added package documentation as comment to XMLDump.mo
- added the new functionality that supports the 3D visualization in OMNotebook + new sendData functions in c_runtime + visualization API in Ceval.mo, Static.mo, Interactive.mo, Values.mo + new external functions in Compiler/runtime/, files ptolemyio.cpp and systemimpl.c
HUGE CHANGES THAT FIX A MEMORY LEAK AND REQUIRE A NEW OMDev: [http://www.ida.liu.se/~adrpo/omc/omdev/mingw/] or a new MMC/RML Compiler: [do an svn update]
- more meaningful names for components into Env.FRAME record - gain a bit more speed by replacing Env.myhash with System.hash - some code and comment formatting and beautification - compile for tracing in debug mode in omc_debug/Makefile.omdev.mingw
- fixes for bug: http://openmodelica.ida.liu.se:8080/cb/issue/1012 Solving of linear system of equations generates incorrect results. - the problem was the fact that continuous equations were classified as discrete and ended up in functionDAE_output2 which is never called during the continuous integration but only at events.
- fixes for Visual Studio compilation add also gcc flags: -msse2 -mfpmath=sse when compiling with VS. - add base_array* to the c_runtime.vcproj - small changes to Setup.vdproj
- support for arrays of records and strings - records are now supported in the DAE representation - started support for semiLinear and delay in Builtin.mo and Ceval.mo - a bit more information on failures - removed unused imports from DFA.mo - small changes to beautify the environment printing in Env.mo - beautify the documentation for functions in Interactive.mo - got rid of unused imports in MetaUtil.mo - if trace is enabled show more info in printimpl.c - different gcc flags for different platforms in systemimpl.c - beautify the dumping of components in SCode.mo - in SimCodegen.mo changed $point to $p and $leftBrace to $lB and $rightBrace to $rB in generated C variable names to save on string memory. - small beautifying of Static.mo, Types.mo and Values.mo
- fixes for bugs: http://openmodelica.ida.liu.se:8080/cb/issue/1008 Matrix equations in connections not flattened properly. http://openmodelica.ida.liu.se:8080/cb/issue/1009 Equations for setting vector-valued flow variables to zero in externally unconnected connectors are not flattened.
- fixes for bug: http://openmodelica.ida.liu.se:8080/cb/issue/144 sample, pulse, trapezoid events where not handled correctly on x86 and x86_64 don't use the old FPU, use the SSE instructions to avoid problems with double in registers of 80 bit vs. 64 bit memory doubles.
The compiler should report more errors when running in the command line: - if the file given as argument does not exist report error - report errors in the parsing - fixes for bug: http://openmodelica.ida.liu.se:8080/cb/issue/1010
- fixes for bug: http://openmodelica.ida.liu.se:8080/cb/issue/111 "Too many points Error, could not save data. Not enought space." - now the simulationResultData is reallocated with a bigger size when needed.
Huge update =========== 1. Updated version to 1.4.4 in: ------------------------------- - Examples/*.onb - Setup.vdproj - settingsimpl.c - updated the new product code in Uninstall.bat
Fixed better support for if-equations. 1) Now, it also works inside when-clauses 2) if the branches have the same left hand side of the equations then equations of the form "lhs = if (cond) then tb else fb;" is generated instead of "0 = if (cond) then lhs - tb else lhs-fb;" 3) in code generation if the variable to solve for in an equation can be solved in both branches then the solved variable is extracted so that we no longer need to treat it as a nonlinear equation.
Fixes for bugs: Instantiation of partial models should fail: http://openmodelica.ida.liu.se/bugzilla/show_bug.cgi?id=174 Qualified Self reference should not give stack overflow: http://openmodelica.ida.liu.se/bugzilla/show_bug.cgi?id=179
- fixes bug: Incomplete generation of output array variable in external function call wrapper http://openmodelica.ida.liu.se/bugzilla/show_bug.cgi?id=180 Many thanks to Constantin Belyaev [cbelyaev !!at!! gmail] for providing a patch.
Fixed bug: http://openmodelica.ida.liu.se/bugzilla/show_bug.cgi?id=177 buildModel failed to work since we added the tolerance as a parameter to the simulation. Credits go to Constantin Belyaev cbelyaev/AT/gmail for providing the patch. Thanks!
RML_IMMEDIATE(RML_TAGFIXNUM(integer)) is used to transform an integer to a pointer. Here we actually want the inverse of that, we want to transform a pointer into an integer. Removed RML_IMMEDIATE(...).
- fixed bug 170: http://openmodelica.ida.liu.se/bugzilla/show_bug.cgi?id=170 - transpose now works even if the first matrix dimension is bigger than the second matrix dimension - added Transpose.mo to the testsuite so we don't run into this error again
- small changes to DAEQuery.mo, Ceval.mo, Static.mo and Exp.mo - changed the way if-expressions are output to the Matlab file - changed getIncidenceMatrix to exportDAEtoMatlab - made some Exp functions needed in DAEQuery public
- fixes to windows makefiles - changes to DAELow.lower to not simplify the DAE before dumping the incidence matrix from DAEQuery.mo - Changes to Ceval, Static, Main to write <> to Model_init.txt now tolerance can be specified when calling simulate: simulate(Model, tolerance=1e-5)
*Added static Qt libraries for MinGW *The MinGW version of Omc is now built with static Qt libraries *Added some Qt header files *Added range options to plot2/plotParametric2 *Removed some unnecessary files.
- added -ftrace option to Makefile.w32 - used -trace option in corbaimpl.cpp - updated Compile.bat to work on Vista - updated c_runtime.vcproj, added meta_modelica.c and meta_modelica.h - update omc.vcproj - updated VC7/rmlRuntime/runtime/common/main.c to take in -trace option - updated VC7/c_runtime.vcproj to take the OMNotebook and OMShell from trunk instead of M:\
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
- cosmetic changes - moved copyright from Modelica package comment to file ignored comment to speed up MDT - changed module to package - added RCS $Id$ to the files who were missing these
Updated MetaModelica pattern match algorithm and list handling (builtin functions for list handling, etc.). Merged the Matrix module with the DFA module.
- got rid of quotes (") from model_dir - added $MODELICAUSERLFLAGS in the second case of System.generateMakefile - removed the .NET Framework dependency from Setup.vdproj - cosmetic change in Makefile.common.w32
- VC7 Setup fixes for new stuff in OMNotebook - Parser fixes to handle multiple for iterators, both in array iterators and in for loops, Have a look at Absyn.ForIterators - Small changes in makefiles - Fixed stringEqual in external-rml.c - ptplot.jar dumps the plot image in $OPENMODELICAHOME/tmp/ - OMNotebook and OMShell in windows now starts in $OPENMODELICAHOME/tmp/
Uncommented the code for the un-nested for constructor iterators. The following cases should work: x := {EXP for VAR in EXP}; x := FuncCall(EXP for VAR in EXP); x = {EXP for VAR in EXP}; Added some comments to DFA, Matrix and Patternm.
Made some improvements to the valueblock expression implementation in Codegen and Static. Made some changes in MetaUtil.mo. Added code for for-iterator constructors to Inst (they will be uncommented later on).
Added compiling of MetaModelica lists. Added the list type to the type system files: Types.mo, Values.mo. List constructs in Exp.mo. Handling of lists in Inst.mo, Codegen.mo, Prefix.mo and Static.mo. Minor changes in Absyn.mo and DAE.mo. Also added a new file, MetaUtil, that contains several functions for handling MetaModelica extensions. All the testcases succeded (remember to make clean).
Inst.mo: Added support for list type in instElement, instVar, etc.. The list complex type is picked up in instElement. An extra boolean flag has been added to instVar, instVar2, daeDeclare, etc.. This flag (if true) indicates that a list type should be created in daeDeclare4.
- added new flag +g: omc [+g=Modelica|MetaModelica], default to 'Modelica' - added function RTOpts.acceptMetaModelicaGrammar() that returns true if omc is called with omc +g=MetaModelica ...
Constant comparison of strings added in cevalRelation. The MetaModelica ==& operator is used, perhaps == should be used instead (if it is working?). Very easy to change. Non-constant comparison of strings will be added to the OMC shortly ...
- small fixes for Corba implementation for making mosh.cpp compile - moved char* omc_cmd_message = ""; char* omc_reply_message = ""; to omc_communication_impl.cpp and made them external in corbaimpl.cpp. this way they don't need to be defined in mosh.cpp - removed char* omc_message from mosh.cpp as is not needed anymore
First commited version of MetaModelica matchcontinue. One entry point in Inst.instStatement, the rest of the code in the new files Matrix.mo, DFA.mo and Patternm.mo. Matching of uniontypes and list constructs will be supported later on. A few testcase .mo files added to testsuite/mofiles (match1.mo, match2.mo, ...).
Added two new builtin functions. stringCmp compares two strings and returns 0 if unequal. getTag fetches the type name of an ojbect reference, using the c++ typeid(ref).name().
- a lot of fixes to external functions. + RML_IMMEDIATE(RML_UNTAGFIXNUM(x)) is an ERROR, so i replaced it with RML_UNTAGFIXNUM(x) + fixed types using RML types as on 64bit architecture instead of integer we use long. - got rid of GCC_EXEC_PREFIX in Linux/Mac part
- added DAEQuery.mo to the compilation - DAEQuery.mo has functionality for dumping the incidence matrix: + getIncidenceMatrix(ClassName) will dump a file called ClassName_imatrix.m containing the incidence matrix in some sort of Mathlab format.
-Assertions are checked in DAElow.lower if they are always false. In that case error message is given and lowering fails. (to test this instantiate a CombiTable component and run checkModel, without giving any table data). -Assertions only output if accepting a step (see acceptedStep variable). -Fixed minor typos in comments.
* Absyn.mo: Added valueblock record to Exp uniontype. Added uniontype ValueblockBody. * Static.mo: Added two new cases to the elabExp function, evaluation of valueblock expression (one for valueblocks containing algorithm statements and one for valueblocks containing equations). Added a new function for converting valueblock equations into algorithm assignments. * Inst.mo: Had to change the accesibility of some functions from protected to public. * Exp.mo: Added (duplicated) uniontypes and records from DAE.mo, Algorithm.mo, Types.mo and Values.mo. Part of a work-around since the MetaModelica compiler can't handle circular dependencies. * Convert.mo: Functions that converts the duplicated data structures from Exp.mo into original form and vise versa. These functions are called in Static.elabExp and Codegen.generateExpression. * Prefix.mo: Added functions for prefixing algorithm statements since an expression now may contain algorithm statements. * Codegen.mo: Added a new case-clause in generateExpression for generating code for valueblock expressions.
- Clearing errormessages before executing checkModel and buildModel to prevent error messages from earlier evaluations. - Added error message for declaration modifiers. - Better error message for type checking of functions.
- fixes for Corba connection (mostly for Windows 2000) it seems that CORBA::ORB_init(argc, dummyArgv, "mico-local-orb"); ignores totally the first argument
Improved solving of nonlinear systems. Now tries both extrapolation and using old values. Extrapolation might end up in going into forbidden region, whereas using old values as starting point might have problems during initialization. Pendulum.mos requires extrapolation and dae2 in NonLinSys.mo requires old values.
Fixed bug with event handling. When dassl returns at an event it is not certain that the event condition becomes "true", i.e. passing the event. It may be a epsilon before the event. To prevent this, the code now (again;) takes a tiny step passed the event to make sure that all events are true. Added bouncingball example in BouncingBallExamples.mos to test this. Fixed so mixed systems (ideal_diode, etc) now becomes a linear system if if-expressions are present. This requires differentiation of if-expression to determine jacobian of linear system, i.e the A matrix. Changed Derive.differentiateExp to take boolean if differentiation of if-expressions should be done.
Changed small step taken when event has occured and Dassl should be reinitialized to continue integration. Step previously was 1e-13, now it is defined in terms of machine precision, a bit larger than HMIN. This will prevent dassl from reporting that step (tout-t) is less than HMIN, since HMIN is also is defined in terms of machine precision.
Removed need for fortran compiler by translating fortran files to c using f2c. Replaced nelmead.f with version that can be translated. Moved fortran files to folder named fortran. Several testcases updated due to small numerical differences between c and fortran.
Fixed bug with calculating nextTime when step is calculated from numberOfIntervals, giving numbers like 0.01111111111111111111111 due to inprecise floating point precision.
-Fixed bug with DASSL failing for large simulation times with few output steps. Solver now calls DASSL with largest step size=0.001, and then keeps track of when to output to result file separately. See LargeSteps.mo in simulation2.mos.
Split functionDAE_output into functionDAE_output and functionDAE_output2. The first contains only continuous parts and the second discrete parts. This makes discrete variables emit value both before and after event possible. See blocksources.mos (PulseTest).
- tail recursive implementations of some Util functions - cosmetic changes - increased the young generation size in rml.h and stack size in p-gccore.c - added ongoing support for dumping the incidence matrix - added partial-s-1.mo to failing tests because with the new tail recursive implementations the compiler goes into an infinite loop
Added "smart setting of fixed attribute". If initial equations are present in a model and no state has fixed=false, all states that occur in the initial equation section is set to fixed=false, and a warning is issued. This makes most "simple models" work as they would if we followed the standard and setting states fixed=false by default. (OMC instead has fixed=true as default for states due to allowing overdetermined initial equation systems).
- cosmetic changes for the upcoming MDT that folds away the LICENSE at the start of the file. - changed svn:eol-style to "LF" instead of "native" as a workaround for the debugger execution point positions, which are wrong if we have CRLF line endings.
- Added String() functions (String(1.0), String(100), String(true) ) to both Ceval and Codegen testcase: StringTest.mos - Implemented terminate and assert in equations - Added TerminateSimulationException that is thrown when simulation fails (e.g. numerical failure, assert, terminate, etc.)
-Added printout of "protected" in DAE, protected variables are now prefixed with protected when printing flat class. - Added cast to and from modelica_integer when storing integers in double vector (in Simulation code), to get rid of warnings during compilation of model code. - Removed dymTableTimeIni function in Static, was a unfinished hack to make MSL 1.6 work.
- Cleaned up some comments - Removed SCode.STRUCTPARAM, since it is no longer used. The compiler does currently not care if a parameter is structural. - Fixed bug with function variables making equation in dae instead of creating binding expression, which does not make sense. This also created bug setting default inititial values for function inputs in read_call_write code. This has also been fixed.
- cosmetic changes of Absyn.mo + qualified names in error messages + updates of function documentation - Setup.vdproj changes + replaced "This program is protected by copyright laws..." with "This package contains OpenModelica, a modeling and simulation environment based on free software".
- Changed Types.printType to Types.printTypeStr - Fixed bug with attribute modifiers on types not propagated to variable instances (testsuite/mofiles/Type9.mo) - added option -b to rtest which can be used to set expected result: rtest -b test.mo translates test.mo and updates the expected result last in file. - Fixed bug in merging of modifiers in DERIVED classes.
-Implemented rudimentary support for tables. (Modelica.Blocks.Sources.CombiTimeTable now works for parameter data or textual data on file, see CombiTimeTableTest.mos.) Implementation in C++ in tables.cpp. Modelica standard library must be changed to use different external function names (e.g. omcTableTimeIni instead of dymTableTimeIni2) - Redirected stdout and stderr to compilelog.txt when compiling functions in Ceval (System.compileCFile). -Added support for parameter and variable strings in init file.
Fixed small bug in codegen (statements in wrong order). Added whitespace when unparsing modifier list (nicer layout when printing large annotations) dummy equation der(dummy) = 0 changed to der(dummy) = sin(time*628.56....), to better cope with automatic step size when no states present in model.)
Merged from when-statements branch * when and elsewhen in algorithms now supported * correct sorting of equations in when clauses * events no longer takes an extra tiny step to make > and < work. Instead the relation takes into account the direction in which the relation expression is passed.
- cosmetic changes to Absyn.mo, Algorithm.mo, Builtin.mo, Ceval.mo, Util.mo + replaced old names in comments and error messages with new ones. + a bit more uniform error reporting; the errors include fully qualified function names. + replaced Absyn.expEqual with structural equality. + better names for some functions in Ceval
- cosmetic changes to Util.mo + got rid of some already existing functionality + renamed some of the Util.mo functions + rewrote some Util.mo functions to make them a bit faster
- Fixed bug in Exp.simplify (certain divisions lead to incorrect simplifications). - Fixed bus in printing of expressions (Exp.printExpStr) leaving out parentheses in some cases. This also required changes in testcases.
Changed code generation of tuples (returning several values from functions). Previously a struct was generated that contained names taken from the output arguments of a function. For instance, function foo ... output Real x; outpur Real y; ... end foo; resulted in a struct foo_rettype { modelica_real x; modelica_real y; }; But these names are not available in a call (i.e. in Algorithm.TUPLE_ASSIGN). Also this makes sense, since a tuple has only an oredered set of values -without- names.
- Fixed bug in state selection. If StateSelect.always is set but variable does not appears differentiated among equations, it was previously not selected as state. - Fixed bug in printing error message for non-linear system solving.
- Now OMC will now REFUSE to start on Windows if another one is running! An error message will be displayed. - Added +target=gcc|msvc flag in rtopts.c and RTOpts.mo to be used later when we generate different code and Makefiles targeted to GCC or MSVC. The flag can be retrieved using RTOpts.simulationCodeTarget()
- I have updated the README-WIN32.txt document - I tested the compilation on Visual Studio .NET + 2003 Pro + 2005 Express (Free, but it cannot build the Setup project) + 2005 Pro
- added +c=corbaSessionName to the Compiler/runtime/rtopts.c - fixed Compiler/runtime/corbaimpl.cpp to generate: + the Corba Object ID depending the corbaSessionName + the file dumped depending the corbaSessionName + the events and mutexes names depending the corbaSessionName - moved clientlock from omc_communication_impl.cpp to corbaimpl.cpp
- added break and return statements to flat_modelica_lexer.g and flat_modelica_parser.g due to changes to modelica_lexer.g and modelica_parser.g - without this the FlatParse.mof test fails.
Support for *break* and *return* Missing: (a) checking that used inside for/while and (for *return*) in function body (b) reading from flat Modelica (for/while if flat Modelica not yet supported)
Added support for automatic number of output steps by using intermediate-output model in DASSL. This can be used by setting a negative value on output step size.
- fixes to make the testsuite run on Linux - for some very obscure reasons in simulation_result.cpp, function: int deinitializeResult(const char * filename) code: ofstream f(filename) reset the filename to "" and the creation of the file failed. - fixed it in solver_dasrt.cpp and solver_euler.cpp - thanks to William Spinelli for providing a virtual machine where I could reproduce this error.
Implemented a better state selection mechanism. State selection is now base on 1. The stateSelect attribute 2. A heuristic. The heuristic looks at both the equations of state variables to find constaint equations and tries to put dummy state variables in the same component.
- doPlot renamed to doPlot.Cygwin and doPlot.Linux renamed to doPlot - changed Compiler/Makefile.in and Compiler/Makefile.omdev.mingw to mirror the changes
- doPlot renamed to doPlot.Cygwin - doPlot.Linux renamed to doPlot as Linux installation is far more spread than Cygwin! + this will get rid of an installation step on Linux and adds an installation step for Cygwin - changed README.Cygwin.or.Linux.txt to mirror the changes
Fixed bug with fully qualified names (which are created during instantiation) not possible to look up over encapsulated boundaries: Introduced new record FULLYQUALIFIED in Absyn.Path for this.
- fixed bug: http://bug.modelicacommunity.org/show_bug.cgi?id=30 - the precision problem when dealing with reals in OMC - MMC/RML uses double and because in read_write.c and systemimpl.c this was converted to float and back to double it was a precision loss. - replaced all float with modelica_real in read_write.c - replaced all float with double in systemimpl.c
Improved instantiation speed. (checkModel(CauerFilter) now takes about 10 seconds instead of > 500 seconds). Fixed memory leak in solving linear systems.
Initial code to support inner and outer semantics. Now, the inner and outer attributes are part of SCode.COMPONENT. Further, the outer elements are removed from DAE output. However, correct lookup rule of inner components are not implemented yet. Only components are considered in SCode. The other elements (functions, inner classes etc.) are not yet implemented. No considerations to type checking has been done yet.
Changed builtin functions asin,acos and atan to arcsin, arccos and arctan (same as in Dymola). Added eliminationLevel = 3 for removing only equations on the form a=constant. Added der(arccos),der(arcsin) and der(arctan) to Derive.mo Fixed performance problem with Exp.simplify. Fixed bug with matrix operation a*[1,2;3,4] in Exp.simplify. Fixed bug in tranforming a flat-parsed Absyn to normal Absyn (Interactive.mo).
- added testmos to Makefile.omdev.mingw to test just tests from testsuite/mosfiles - fixed the compilation problem on Linux. GNU GCC has more involved "inline". Just disable inline for now. - initialization of malloc-ed structures within simulation_events.cpp fixes the different result we got on Linux for IdealDiode.mos + i wonder if there may be some other initialization problems like this. - IdealDiode.mos changes due to different result.
Redesigned simulation_runtime. Divided into several files and made more modular. Removed method from command argument and added to init file instead. Remade several testcases to use val function instead.
- merged in the ndims(A) code from Stefan Vorkoetter in Static.mo + many thanks to Stefan for his first contribution! - merged in the ndims(A) test from Stefan Vorkoetter in matrices.mos - added another ndims(A) test based on flattening within matrices.mos - fixed bug http://bug.modelicacommunity.org/show_bug.cgi?id=80 by casting the pow(x, y) arguments to modelica_real within Codegen.mo - wrote more about testing in README-OMDev-MINGW.txt and README.Cygwin.or.Linux.txt - added some missing information in README-BUILD-RELEASE.txt - added OPENMODELICALIBRARY environment variable to OMDev-MINGW-OpenModelicaBuilder.launch-sample as is not really true that everybody has a OpenModelica release available (take Linux for example) and an OPENMODELICALIBRARY=/path/to/ModelicaLibrary environment variable set. - added a space in SimCodegen.mo :)
I did some changes to the OpenModelica SVN in order to speed up MDT a bit. Interactive.mo: --------------- - Changed SYMBOLTABLE, added loadedFiles: Fixed all the sources that used SYMBOLTABLE: Ceval.mo, Main.mo
- fixes for daeext.cpp (VC2005 compiled version doesn't crash anymore) i went for the longer version with push_back(0) as resize(nvars) could interfere with mmc backtracking. - made it clear in the Corba part what message is sent and what message is received. This seems to fix crash problems with VC2005 compiled omc IF we move to mico2.3.12. With mico2.3.11 it still crashes. I believe the problem is in mico2.3.11. - added ==& MetaModelica operator to the grammar
- Absyn.CLASS.restricion -> Absyn.CLASS.restriction - fixed more of MetaModelica parsing: x::y = expression; should be allowed. - fixed flat parsing by returning std::string instead of void* from flat_subscript - fixed ExternalLibraries.mos from testsuite by returning quoting the result of getErrorString with " when is called in Interactive.mo.
- replaceable type Type_x; is now replaceable type Type_x subtypeof Any; - The ALG_ASSIGN_TUPLE is gone! use ALG_ASSIGN(exp, exp) instead and check if first exp is Absyn.TUPLE - MetaModelica parsing now works. - all the tests (except those already failing) are working. - a new OMDev is required to be able to compile this: http://www.ida.liu.se/~adrpo/omc/omdev/mingw - in order to get the compiler out of infinite loop some changes were made to SCode.mo - changes to modelica and flat_modelica parser and lexer were made. - imports were changed, I removed to OpenModelica.Compiler from them to make MDT completion work.
Added extrapolation of variable trajectories as starting values for nonlinear equation systems. Required for solving nonlinear systems with multiple solutions, such as x^2-c =0 (Need to extrapolate to go from positive to negative solution)
- more MetaModelica additions + added more expressions to handle MetaModelica code in Absyn.mo + unified EQ_NORETCALL with ALG_NORETCALL and fixed the walker.g, Absyn.mo, Debug.mo, Interactive.mo, SCode.mo to handle this change. Now it EQ_NORETCALL looks like this: record EQ_NORETCALL ComponentRef functionName "functionName" ; FunctionArgs functionArgs "functionArgs; fcalls without return value" ; end EQ_NORETCALL; Before it was Ident functionName; + added more debugging within parse.cpp - all tests go
- fixed VC7 Debug configuration (needs new OMDev which contains mico2311 debug libs) + wrote some debug makefiles for VC7 + i think is a good idea to run a debugging omc.exe sometimes to figure out random crashes.
- changed Makefiles to actually stop when an error happens - added copyright to printimpl.c - added some more includes for strlen, strcpy and malloc - changed version number to 1.4.3 in settingsimpl.c - changed version number, product code in Setup.vdproj - changed the way MinGW and ModelicaLibrary are handled in the .msi release now, they are packed like normal directories and files not exploded at installation from mingw.tar.gz and ModelicaLib.tar.gz I think this will fix some problems with the installation - changed 1.4.2 to 1.4.3 into all .onb files - wrote a small README-BUILD-RELEASE.txt on how to build a OpenModelica release
- got rid of winruntime, now everything resides in runtime and the implementation is different via compiler and OS flags - changed so that System.writeFile uses fwrite insead of fprintf as is way faster and better. - updated copyright to year 2006 and added it to most of the files. - updated SG so that it doesn't talk on winruntime anymore - updated the omc.snl project and runtime.vcproj to take files from runtime instead of winruntime. - changed winruntime to runtime anywhere I could find it. - got rid of some warnings by casting the values to the needed type.
Fixed bug with pendulum example (see Pendulum.mo) (linear equation system rhs was wrong due to not sufficient Exp.terms implementation. Now uses Exp.allTerms instead)
- Changes to AST to handle MetaModelica. - Added TypeSpec with: + TPATH (path, Oprion) + TCOMPLEX(path, list, Option) - Only TPATH is used by the Modelica parser right now - fixed the ANTLR warning about string_comment returning a value
Equations containing function calls returning vectors are now handled as array equations. sum(v) and sum(A) are now symbolically expanded. WhatDoesNotWork.html is updated with missing operators in 3.4.3.
Added more type information to Exp.Exp, required to be able to generate correct code. Added some missing impl. in c_runtime. Still much to do here. Fixed bug with BouncingBallExamples.mos Fixed bug with eliminating top level input and output variables. RO attribute to Absyn.INFO now read from status of file. renameComponent now skips RO classes. Temporary fixed Test3PhaseSystem initialization. Still bugs with propagation of fixed attribute. Fixed several bugs with simplify returning expressions with wrong operators e.g. scalar ADD_ARR scalar.
- fixes by Peter F. to UG, DrModelica, omc_helptext.txt - fixes by Anders Sandholm to val(name, time) - addition of the BouncingBallExamples.mo/mos to the testsuite so that this example is sure not to fail in the future (now fails)
Fixed bug in event handling (edge used for checking changes in event. This was changed to 'change') Removed check of final in modifier since it gave errors even though correct Modelica code.
Fixed bugs in mixed system of equations (see simulation3.mos and BearingFrictionTest.mo) Fixed bug with missing events at initialization (see also BearingFrictionTest.mo)
- fixed some Linux stuff - fixed the API to return Modelica compatible syntax - fixed the API testsuite/mosfiles/loadFileInteractiveQualified.mos - added stdlib.h include to ExtObj.c - removed more unnecesarry files within mosfiles/ExtObj.mos
Fixed bug in event handling for e.g. initial(). See BooleanModel.mo Fixed bug with discrete equations not having zero crossings not being calculated. Fixed bug with getNthConnection on connector on form a.b[1], see mosfiles/interactive_api_classes.mos.
Solved the problem with integer overflows. Now, a value is converted to a real dynamically in the interactive environment, if integer operations overflows. This is not the ideal solution. A much better solution would be to have BIG-INTEGERS. However, this is not part of the Modelica specification (2.2) and requires much more work.
Fixed bugs with the OPENMODELICAHOME variable. MathModelica now works without having this variable and OpenModelica works with it. This means that it is now possible to have both installed.
New implementation of removeSimpleEquations2. Now handles a=-b and a=constant equations. Also redesigned to reduce code size. Added some verbose information to simulation_runtime.cpp (printed when using -v)
Redesigned VarTransform to allow replacement of variables with expressions, i.e. a -> b+c. This allows elimination of more equations, like a = -b (which also has been added to DAELow)
Changed modelica_string_t from struct to char* to make more similar to other builtin types. Added alias variables of external objects. Array equations now supported in non-linear systems. sign is now rewritten to if-expression.
Fixed bug with Strings, Integers and Booleans in connectors. (MC bug 499) mofiles/Connect14.mo Also added Connect13.mo for connectors containing arrays.
Fixed bug with lookup of constants in packages (infinite recursion, mofiles/Constant10.mo) Fixed bug which allows to write parameters or variables in packages (mofiles/Constan09.mo) Fixed bug with floor and ceil. (Should return Integer not Real, mofiles/Constant3.mo)
Fixed MC bug #592: setComponentModifierValue, Removing "outer" modifiers messes up modification. Fixed bug in Derive (implemented differentiation of sin and cos in differentiateExpTime.
Fixed these bugs: http://bug.modelicacommunity.org/show_bug.cgi?id=91 => the expression was not printed right: UMINUS(_, (n-1)) was printed (-n-1) instead of -(n-1) http://bug.modelicacommunity.org/show_bug.cgi?id=92 => 1+(1/y)^2 put the compiler in infinite loop These triggered modifications of 2 models from testsuite as the simplification is not the same now: => testsuite/mofiles/drmodelica/VanDerPol.mo => testsuite/mofiles/msl/Gear.mo
- erased omc_interactive_api.txt text and replaced with a reference to the Users Guide - fixed a small mistake in the debug/Makefile.in - replaced the OpenModelicaSystem.* files with the new versions from Peter F. hacked a little by me
- got rid of .nb files from windows Setup.vdproj - added Switch.mo to the Setup.vdproj - moved all non-overlapping models from testmodels/*.mo to Examples/*.mo + preparing to delete Setup/testmodels/ - moved UsersGuideExamples.onb from testmodels/ to Examples/
- fixes for Linux! - please don't use makefile.mingw in the Makefile as it breaks on Linux, instead, used make -f Makefile.omdev.mingw - changed also in build_mingw_libs.bat to use Makefile.omdev.mingw!
- fixed some 'end ident' that did not match 'function ident' - there is not testsuite/mosfiles/Constant7.mo so I changed Constant7.mo to Constant6.mo in testsuite/mofiles/Makefile
Speeded up instantiation by changing implicit instantiation of functions. Before it instantiated whole function, now when performing lookup, only class definition of function is added to environment. Also fixed minor bug with echo.
Changed build_mingw_libs.bat to use omdev-mingw Ceval are using Settings.mo setEcho to use echo removed some prints in ClassLoader.mo Interactive.mo are using Settings.mo for echo System has how strncmp to optimize things
Removed some print statements. Reverted luc change of der_x to der(x) in Variable name. Now uses der_x again. It did not work with defines to have parentheses.
Adrian Pop, adrpo@ida.liu.se, 2006-03-25 Quite some modifications to the setup project, the testsuite and RML to MetaModelica translator. OMC Stuff: ========== - taken out WinMosh from the modeq.sln (not needed). - fixed a new Uninstall.ico, i hated the one before. - added a link to OpenModelica website in the user menu, an icon for the url, etc. - added the converted DrModelica onb files to the Setup.vdproj. - made all .mo and .mos files have LF ending, otherwise Perl does not do well when checking the test results.
I fixed Codegen.generate_buitin_function to always use 'fabs' instead of 'abs', no matter what type the argument has. I did some tests and it seems to work on any compiler. All the tests go.
As you can see here: http://packages.ubuntulinux.org/cgi-bin/search_contents.pl?searchmode=filelist&word=libantlr-dev&version=breezy&arch=i386 on Ubuntu Linux the antlr is placed in: /usr/include/antlr /usr/lib I added those in the search for ANTLR includes and libs. I found this out while I was helping Dietmar Winkler from TU-Berlin to install RML and OpenModelica on Ubuntu Linux.
undated to Java names all the names of the external relations! please, if you add some other external relations do not use "_" in it at least until we move to MetaModelica.
- fixed Interactive.rml - get_class_information, missing a \" before class name in the returned string. - fixed omc_interactive_api.txt to agree with latest changes - fixed interactive_api_attributes.mos to agree with latest changes - fixed loadFileInteractiveQualified.mos to agree with latest changes - small modification to OMDev related Makefile.omdev.mingw and rml2sig/rmldep-new.sh
changes to: - .project (removed the MDT builder) (uses OpenModelica as project root) - builder OMDev-MINGW-OpenModelicaBuilder.launch (now builds from mo directly and has as OMDev path /c/OMdev) - Makefile.omdev.mingw (don't copy serialization files are they are not generated, print the dependency generation time) - rml2sig/rmldep-new.sh give some messages and generation time
- removed unused imports from .rml files - fixed rml2sig/rmldep-new.sh to dump .sig instead of .rsig - fixed Makefile.omdev.mingw to not copy *.sig only *.srz to omc_debug and omc_release
Adrian Pop, 2006-02-26 - compilation on Linux, Cygwin, MSVC works now from SVN. All tests are OK. - big changes to compilation result structure: The compilation result has now the following structure: build/bin (omc, OMShell, OMNotebook, ptplot.jar, Compile.bat, Compile, doPlot.bat, doPlot, omc_helptext.txt) build/include (all the .h files from c_runtime) build/lib (all the lib* and libf2c/lib* files from c_runtime) build/doc (trunk/doc and Compiler/doc) build/doc/testmodels (all the trunk/Examples/*.* files) --------------------------------------------- - the makefiles now copy the needed files to the above structure after compilation - changed the rml files to use this structure when compiling, or plotting. - changed the rtest files to use the build structure when running tests - changed the VC7 setup to use this structure when deploying - changed mosh (changed its name to OMShell) to use this structure when running omc - added an install to the root Makefile that installs in what was give to configure --prefix=path or just ./install if none given.
Adrian Pop, 2005-02-26 Changed some Makefile.in to copy executables directly into trunk/. not Compiler/. Also now it uses EXEEXT in all the needed Makefiles. This change is to allow mosh to find the omc compiler in the OPENMODELICAHOME not in OPENMODELICAHOME/Compiler and to move forward to a structure like: trunk/build |-bin |-lib \-include meaning that all the needed files should be in the trunk/build directory after compilation.
Adrian Pop, 2006-02-25 - fixed Linux compilation issues - fixed testsuite/mosfiles/rtest to call egrep without path. (you can't assume egrep is where you expect it to be) - fixed testsuite/mofiles/drmodelica/Makefile: InValid -> Invalid (Linux case issue) - fixed Compiler/absyn_builder/walker.g set k=1; (antlr-2.7.6) anyway we don't use any lookahead in the tree parser - fixed Compiler/Ceval.rml to use the .exe on Linux also, because it does not find the file to simulate otherwise
Adrian Pop, adrpo@ida.liu.se, 2006-02-24 - changed/added API functions + have a look at Compiler/interactive_api.txt or: - testsuite/mosfiles/interactive_api_attributes.mos - testsuite/mosfiles/loadFileInteractiveQualified.mos + changed getClassInformation API in Compiler/Interactive.rml + added getClassAttributes API in Compiler/Interactive.rml
Adrian Pop, adrpo@ida.liu.se, 2006-02-17 I hope this is the final version of the getCrefInfo! Changed: Compiler/Interactive.rml and testsuite/mosfiles/loadFileInteractiveQualified.mos There are no class* position info now. Instead they replaced the element* position info.
Partly implemented mixed system of equations. The solver now takes a tiny step beyond events such that mixed systems can be solved. Perhaps this can be done smarter in the future.
Added support for interactive versions of the "if" and "while" statement. Further, functions added in the interactive environment will now be type checked directly (not waiting until the function is called). Test cases are added to check the new functionality.
Adrian Pop, adrpo@ida.liu.se, 2006-02-14. I put back the position information of a class that is part of an element, because the element could be created, not parsed and has no position then.
Adrian Pop, adrpo@ida.liu.se, 2006-02-09 Fixed getElementsInfo interactive API. Fixed the testsuite/mosfiles/loadFileInteractiveQualified.mos Fixed the interactive_api.txt to follow the latest changed
Implemented support for structural if expressions. See mosfiles/structural_if.mo. The matching algrithm and strong components algorithm are are affected by this.
Adrian Pop, adrpo@ida.liu.se, 2006-02-06 - changed Absyn.INFO(file, isReadOnly, startline, startcolumn, endline, endcolumn) - the endline/endcolumn is not very easy to get from ANTLR, so I just used the same values as startline, startcolumn for now.
Fixed bug with index reduction: already differntiated equations should not be differentiated again. Fixed bugs with event handling. Changed interactive api for comments.
Adrian Pop, adrpo@ida.liu.se, 2006-02-02 - fixed so that Makefile.omdev.mingw use rml2sig/rmldep-new.sh instead of rmldep.sh - fixed some text messages in the Makefile.omdev.mingw Makefiles that appear when variables are not set
Adrian Pop, adrpo@ida.liu.se, 2006-02-01 ----------------------------------------- -systemimpl.c modified to fix java names. -the modification is based on a define, so it will work ok in the normal case
-Major rework in SimCodegen. Most parts now uses Codegen.generate_expression as they should. -Implemented assert and iniitial in codegen. - Event handling does no longer generate event code for discrete expressions, eg. pre(v) == 4. - Implemented special rule for differentiating a DUMMY_STATE variable. - Fixed bug with cardinality (covered in testsuite/mofiles/msl/Gear.mo) - Renamed mofiles/msl_1_5 to mofiles/msl as it now contains models from MSL v 2.2 as well. -Changed boolean represenation in c_runtime to be double so a boolean variable can be treated as an algebraic var.
2006-01-28 - Adrian Pop, adrpo@ida.liu.se - added trunk/c_runtime/libf2c/makefile.mingw - the trunk/c_rutime/Makefile can call mingw32-make -u makefile.mingw in the libf2c directory in order to compile libf2c.a using msys+mingw
Fixed bug instantiating Gear. Inherited elements where looked up from current env which could be encapsulated. Instead it should be looked up from top scope since baseclass annotation already was fully qualified.
Added symbolic simplification of matrix and vector operations (addition, multiplication, etc) in Exp.simplify Added symbolic simpl. in elab_builtin_diagonal Added elab_builtin_scalar.
changed void to int in checkForDiscreteVarChanges(double *t); changed the position of using namespace std; in simulation_runtime.h made global relation c_add_cleanups : (CFunction, CleanupStatement list) => CFunction corrected the generation of code and added return statetements to all c-functions
Implemented partial support for array equations on form v = foo(...). Other array equations should be flattened into scalar equations. Testcase: ArrayEquation.mos.
Partly implemented array equations. Fixed testsuite. Apparently someone has missunderstood the meaning of failingtests. Now all tests go through again....
added getName(double* ptr) to be generated in the c-code. This will be used for DIVISION macros. Redirected both stderr and stdout in the compile command to log-file
added getName(double* ptr) to be generated in the c-code. This will be used for DIVISION macros. Redirected both stderr and stdout in the compile command to log-file
Changed errorhandling to use the new Error module with separate error messages in large table and unique error codes. Client tools should use getMessagesString or getMessagesStringInternal.
2005-12-16 adrpo@ida.liu.se - added "loadFileInteractiveQualified" API + this returns the top names quafified with the path from within statement. - added loadFileInteractiveQualfied.mos and loadFile*.mo in the testsuite.
Fixed nicer plotting. Fixed missing term for neumann/robin boundary conditions in Poisson2D, Diffusion2D in FEMForms Fixed implementation bug workaround for neumann/robin boundary conditions
Implemented promote in matrix constructors. (Testcase BC11.mo now works). Fixed bug in cat operator. cat(2,{{1},{2},{3},{{4},{5},6}}) now works. (matrices.mos)
Changed so that the names of the external libs are put in a file named .libs instead of on the command line to the compile script. Otherwise system() in win32 fail.
2005-11-24 adrpo@ida - added System.set_env(var:string, value:string, overwrite:int) - added systemimpl.c for System.set_env for both runtime and winruntime - added getEnvironmentVar("varname") and setEnvironmentVar("varname","varvalue") to the Interactive API in Interactive.rml - added help to those into interactive_api.txt
implemented set_compile_command and get_compile_command reimplemented compile_model to use get_compile_command reimplemented Compile.bat and Compile to use the new way to call the compilation
Fixed bug with simplifying ASUB. Fixed bug for small equation system (array expandsion with expandedsize=0) Fixed remove simple equation bug (removing parameter)
Fixed bug #41. start values that are expressions are now calculated in initial_function. NOTE: Those start values can therefore not be changed from init file.
fixed bug in updateComponent (final, repl, etc.) implemented echo. echo(true) turns on echo of result in mosh, echo(false) turns off echo. fixed bug with connections (msl_1_5/BC8.mo now works. Added msl files to testsuite in makefile.
Implemented external function annotation Library and Include. Implemented setComponentAttributes. Cleaned up mosfiles testing by removing temporary files using system(rm -rf ...)
2005-10-31 adrpo@ida - added Info datatype INFO(filename, lineno, columnno) - changed so that CLASS and ELEMENT uses the Info datatype - fixed everything in the other rml files - tested on the standard tests and passed
Added comment to constraining clause in Absyn. Relaxed Real literal construction in lexer, now accepts .1 and -.5. Fixed get_diagram_annotation bug in Interactive.rml
implemented a buildModel function that only compiles the model without simulating it. added a setClassNamesForSimulation to use when to clients of omc collaborates
Fixed temporary hack for der(vector) and der(matrix) since vectorized calls not impl. yet. Fixed bug in builtin attributes, e.g. start, min, max, etc. Fixed bug in placement annotation in Interactive.
Added calculation of initial values from initial equations. For now, the initial equation system must be consistent. No additional equations are currently added, e.g. x=0 for some uninitialized state x.
Fixed bug with citation quotes on simulate command. Improved code generation of functions for simulation code. Added calculation of simple equations in simulation code. Fixed comment bug in comments from variables in simulation code.
Fixed neumann and robin boundary conditions. Fixed bug with extra blocked boundary values by patching the mesh so that it is consistent with rheolefs way of handling blocked edges. Rheolef blocked end points of edges that are blocked, if the end points themselves are not blocked. So we fix this in the mesh after reading the mesh, see PDEbhjl.FEMForms.Autonomous.Diffusion2D.
Changed so top level inputs are not part of model equations, but instead must be given as input "parameters" in input file. Also removed errobuf flag so error printing is allways done if main fails.
Updated some scripts and added Composite6. Added a test model (...3) for testing time dependent dirichlet bc. Added Readme.txt with installation instructions.
Adrian Pop, adrpo@ida.liu.se 2005-06-12 Fixed so that: - server_loop - server_loop_corba are completly deterministic. Please, if you add things to the first rule of these relation add it also to the second rule, otherwise the RML doesn't turn the two rules into a conditional.
improved the simulation code and added a check to remove_simple_equation2 to leave the equations that contain a variable that is on top-level an the direction is output
Added interactive function save, that saves a package structure or class given that it already has a filename associated with it. Also made some progress on explicit ode impl.
Changed MOSHHOME to OPENMODELICAHOME which shuld point to what ${MOSHHOME}/.. used to be. Also deleted some more (hopefully all) of the tornado stuff Deleted the old modsim module. Fixed Ctrl-C and Ctrl-V in WinMosh.
Function call fixes. Tuples support added. Testsuite extension for c compiler flag support. External function tests ExternalFunction1.mo ExternalFunction2.mo ExternalFunction3.mo
Added information for predefined types. Some implementation to extract the data from modification has been made but not called yet from a significant part of the program. (read it is not called at all from the main stream of the program!)
2005-02-04 Adrian Pop, adrpo@ida.liu.se Somebody added code for flat modelica and failed to add try{...} catch {...} statements. Also, some redundant code was removed H�kan pointed out this error!
to generate _all_ the equations a relation lower_with_simple_equations has been inserted in DAELow. Also generate_compute_state and generate_compute_output generates the needed c++ code
In translateModel and simulate the flat fail is generated with class insteead of fclass, otherwise ModSimPack won't work. Change back when ModSimPack understands fclass.
Fixed priority bug in print_exp2 and print_exp2_str Added dump_exp_graphviz Added exp_contains (can check if a component reference occurs in an expression) Added solve (can solve linear equations Added get_terms_containing_x (not used anymore) Added rules to simplify to simplify expressions (0+a, 1*a, - - a etc)
Removed buffer clearing for easier debugging! Added "none" virtual flag calls and "flatmodelica" flag calls. "none" will return true when no +d-debug flags is given.
Changed lookup. Components from inherited classes are annotated with the baseclassname and this is later used when instantiating to find correct environment. The old lookup, with baseclasses annotated to environment does not work for all cases.
Fixed bug with modifiers on extends clauses: Typeinfo on modifiers where earlier lost when flattening. Now they are preserved. The solution is to collect them together with each element item in the list that inst_element_list acts upon. NOTE: To prevent circular dependencies Mod.Mod was moved to Types.Mod
Redesigned implementation of builtin operators. elab only determines type and constant value properties. Ceval.ceval should be used to retrieve a value. The size operator has now been implemented using this new design. The other operators should also be implemented so. This code will probably destroy some parts of codegen, since size is not replace by functioncalls size_of_xxx_array, etc.
Added support for quoting using the Code keyword. Implemented a faster Env: is now a hashtable using RMLs vector datatype. This will prevent a linear search in each frame.
Added element support for builtin types, e.g. unit, quantity. Added getUnit, getQuantity,..., functions. Fixed optional modification in absyn and parser. Added support for structural parameters and partly implemented analysis to dectect those.
Moved many interactive functions to StaticExp, such that they can be evaluated in any sub-expression. Also fixed bug with getIconAnnotation, getDiagramAnnotation.
Added socket communication for an interactive mode compiler. Start modeq with +d=interactive,dump,interactivedump and then telnet to port 29500 to send models to the server. So far the models are not saved anywhere, they are only output if dump flag is set.