DEA mode activation in Dymola - solver

I have a problem regarding solving the model in DAE mode. I need to know the procedure for the activation of the DAE flag in Dymola 2019.

That is described in the release notes:
3.3 Simulating a model
3.3.1 DAE Mode
Dymola 2019 supports DAE (Differential-Algebraic Equations) mode. DAE mode is activated by setting the flag
Advanced.Define.DAEsolver = true
DAE mode is supported by the integrators Dassl, Radau IIa, Esdirk23a,
Esdirk34a, Esdirk45a, and Sdirk34hw. (The flag is by default false.)
Note that there has been improvements in the mode for Dymola 2020 and that not all models benefit from DAE-mode.
See also the conference paper: https://modelica.org/events/modelica2019/proceedings/html/papers/Modelica2019paper4D1.pdf

Related

Issue in configuring pins in MPLAB code configurator

I am using PIC16F1829 (SSOP-20 package) and trying to configure pin RC1 as C12IN1-(comparator C1 ) using MPLAB code configurator.
Now the problem is ,I am able to configure 3 pins RA1, RC2, RC3 as C12IN0-,C12IN2-,C12IN3- respectively but not RC1 as C12IN1-. As pin manager enable only above three pin for comparator 1 input pins.
So anybody can help how to configure RC1 as C12IN1- as comparator 1 inverting input?
I have checked APFCON0 or APFCON1 settings but i am not able to see option for these settings.
Appreciate the kind help in advance.
Regards
It seems that you have found a bug in the MPLAB Code Configurator.
According to data sheet DS41440B the configuration you need is supported by the PIC16F1829 but I could not get the MCC tool to allocate pin RC1 for the C12IN- selection on either comparator. Although all four C12IN- slections are available for the PIC16F1825 device.
You will need to take this matter up with the Microchip support by opening a support case, sometimes called a support ticket.
Microchip releases updates to MPLABX about every 3 months. There is no guarantee that Microchip will fix your bug even if you can convince the support staff it is a bug. My experience with them suggests it takes about a month before they take your report seriously.
If you want your PIC16F1829 project working before June you may need to abandon MCC and use the Microchip Libraries for Application (MLA) for sample code.

Which shader file format should I use in HLSL?

I've read this DirectX 11 tutorial on VS2015 (http://www.rastertek.com/dx11s2tut04.html), and found out that the author compiles the vertex and pixel shader separately, using the .vs file and .ps file respectively.
And I also found out that in the book "3D Game Programming with DirectX 11" the author use .fx file to organize the shaders throughout the book.
Which method should I use to develop my direct3D program with the latest version of Windows SDK, I wonder? Since I've heard that the Effects11 framework might be deprecated in the future.
You should avoid using fx targets for new projects, and opt for per-stage compilation instead. Note that this is independent of whether you actually put your shader code in separate files, though having one .vs or .ps per shader is a common convention. Full D3D11 support for effects profiles (i.e. fx_5_0) is already deprecated in the latest (Windows 10) compiler, and there is no fx_5_1 at all (some directx-12 features require shader model 5.1).

Blurred Qt Quick Text

This is an example from Qt Quick examples inside Qt Creator, when I run the project all texts lost their quality and blurred, the attached picture describes clearly the problem.
Qt Version: 5.4.1
Platform: Windows 7
It is an old bug that may be reproduced on some hardware when Qt uses system OpenGL capabilities "[QTBUG-31983] Font rendering on Windows XP shows artifacts with QML Text element"
Before Qt version 5.5 there are two types of Qt releases for Windows: ANGLE and OpenGL. They can be distinguished by the suffix "opengl" in the installer file name, for example:
qt-opensource-windows-x86-msvc2013_opengl-5.4.1.exe
qt-opensource-windows-x86-msvc2013-5.4.1.exe
See "Qt 5 on Windows ANGLE and OpenGL" for the explanation.
The ANGLE build does not have such defect. Only OpenGL build is affected. OpenGL is poorly supported by default on many Windows installations. In some cases it can just crash during QML window initialization. The manual video driver installation was required. However, for some old hardware it is a problem to find such good video card driver that have enough support for OpenGL.
Possible solutions:
Use ANGLE Qt build
It is possible to subclass the standard QML Text control with default render type Text.NativeRendering:
Text { renderType: Text.NativeRendering; }
ANGLE Qt build could be a good solution if Windows XP should not be supported.
If no intensive graphics usage is required the better solution is to use software OpenGL rendering. Before Qt 5.4 it is was possible to use MSYS Mesa library opengl32.dll (only some specific version should be used). If such library is placed in the executable folder of Qt application built with OpenGL Qt version, that library is automatically used for software rendering instead of default hardware rendering. Starting from Qt 5.4 such library is provided by Qt: opengl32sw.dll (http://doc.qt.io/qt-5/windows-requirements.html).
The software OpenGL emulation works perfectly on all types of hardware and it does not require any special video card driver.
Starting from Qt 5.4 there is the application attribute Qt::AA_UseSoftwareOpenGL:
Forces the usage of a software based OpenGL implementation on
platforms that use dynamic loading of the OpenGL implementation. This
will typically be a patched build of Mesa llvmpipe, providing OpenGL
2.1. The value may have no effect if no such OpenGL implementation is available. The default name of this library is opengl32sw.dll and can
be overridden by setting the environment variable QT_OPENGL_DLL. See
the platform-specific pages, for instance Qt for Windows, for more
information. This value has been added in Qt 5.4.
This happened to my QT 5.4.2 MinGW project as well. Using Text.NativeRendering solved the blurry text in my case.
This renders the font with native rendering. But not solves the problem with default Qt rendering.
import QtQuick 2.4
import QtQuick.Window 2.0
Window {
visible: true
width: 512
height: 300
Text {
anchors.centerIn: parent
text: "Hello World!"
renderType: Text.NativeRendering
}
}

Deploying Qt5 on Windows without Hardware Acceleration

Qt5 can use the OpenGL driver or the DirectX Driver by using ANGLE. As we cannot depend on an installed OpenGL driver, we need to use the ANGLE backend. Unfortunately, this doesn't solve all deployment problems especially on Windows virtual machines without hardware acceleration. On these systems, we're getting an error message saying that the creation of an OpenGL context failed.
Screenshot: Failed to create OpenGL context for format QSurfaceFormat
We're deploying all required libraries (libEGL.dll libGLESv2.dll libeay32.dll msvcp110.dll msvcr110.dll d3dcompiler_46.dll) but we're still getting this error message.
How do you deploy a QML application that needs to run on end user machines without OpenGL driver and on (virtual) machines without Direct3D Acceleration?
There is a page on the Qt wiki mentioning this problem, but that's not very helpful for solving it.
Update for Qt 5.4.0:
My findings so far are:
Setting QT_ANGLE_PLATFORM=warp -> creates a windows without content.
Setting QT_ANGLE_PLATFORM=d3d9 -> same error dialog, as expected.
Setting QT_ANGLE_PLATFORM=d3d11 -> same error dialog, as expected.
Setting QT_OPENGL=desktop -> same as QT_ANGLE_PLATFORM=warp.
Setting QT_OPENGL=angle -> same error dialog, as expected.
Setting QT_OPENGL=software + opengl32sw.dll (mesa for windows) -> unpredictable: May run, may crash, may show the error dialog.
Update for Qt Quick 2D Renderer
Although, Mesa seems to be a partial solution, the configration seems to be very crash often in Qt 5.4.0 .
Another fallback could be the Qt Quick 2D Renderer, but unfortunately this crashes too.
Copying softwarecontext.dll into /scenegraph + Setting QMLSCENE_DEVICE=softwarecontext -> crash
Update after some user experience:
Angle
Has some render bugs on some systems
Does not work reliable on all systems
Angle with Warp
Not reliable
Desktop OpenGL
The default implements OpenGL 1.1, which is too old.
Not reliable, even if the OpenGL version is ok.
Has render bugs, if used by Qt
QtQuick2dRenderer
Has some major render issues
Crashes, Freezes
Works on systems without HW acceleration
Mesa OpenGL Backend
Seems to be quite reliable at the moment
quite slow in general, very slow on some systems.
Heavy Deployment weight
Conclusion: there is still no real solution for these systems
Update for Qt 5.5
Anno 2015: Broken graphics drives are still broken.
My conclusion for the moment is:
Use QtQuick2dRenderer if possible.
Use Mesa backend otherwise.
Skip Angle, skip Desktop OpenGL, skip Warp.
QT 5 has huge compatibility issue with opengl on some hardware configurations
Combination of Intel HD3000 driver and Nvidia/ATI card won't work on Windows 10.
https://bugreports.qt.io/browse/QTBUG-42240
Intel drops support for this card but their drivers has bug that leads to crash.
You cannot rely on hardware opengl if you want to support customers with HD3000.
Under Windows, opengl32.dll is the default OpenGL driver. It implements OpenGL 1.1 (really old version).
ANGLE has a baseline of OpenGL ES 2.0 and needs DirectX 9/11 installed to map the calls into.
So if you got a video card that doesn't have an OpenGL driver installed, an OpenGL driver less than 2.0, and/or DirectX 9/11 not installed, your app is not going to work.
In regards to virtualization and 3D acceleration, these maybe worth a read:
Why does Qt Creator 3.0.0 Welcome Mode not work in VM?
https://bugreports.qt.io/browse/QTBUG-34964
Also, if you run a multi monitor Windows environment under VirtualBox, 3d acceleration will be disabled.
I re-checked this to see if these problems have been fixed by the latest release of QT 5.12.2, but no they have not. The function described in the QT wiki entry OP referenced
https://wiki.qt.io/Qt_5_on_Windows_ANGLE_and_OpenGL sounds good but in practice it simply doesn't work.
I conclude avoid OpenGL on QT in any form. It's just too unreliable.

OpenGL development for mac in Xcode. Can I force software render?

I'm porting an OpenGL game from iPhone to Mac, and having problems with textures getting corrupted. I guess it's a memory problem.
The thing is I've crashed the mac 3 times now (happens random when the game launches), so it's getting difficult to debug this.
Is there any way I can force software render?
Select kCGLRendererGenericID as NSOpenGLPFARendererID when you create the pixelformat attribute list for initing the context (initWithAttributes:).
NSOpenGLPFARendererID
Value is a nonnegative renderer ID number. OpenGL renderers that match the specified ID are preferred. Constants to select specific renderers are provided in the CGLRenderers.h header of the OpenGL framework. Of note is kCGLRendererGenericID which selects the Apple software renderer. The other constants select renderers for specific hardware vendors.
NOTE! I just saw that kCGLRendererGenericID has been deprecated and the one to use is kCGLRendererAppleSWID
Another tip is to start the app with the OpenGL Profiler. See here
http://lists.apple.com/archives/quartzcomposer-dev/2010/Jun/msg00090.html

Resources