Dynamically switching connect in Modelica in simulation - openmodelica

I have a principal model that involves a lot of components and I want some connections to change when the pressure value changes.
For example
if Pressure<1 then connect (evap.a,fad.b) else connect (evap.a,gol.c)
Can anyone here help me please, I already tried using if and when and it does not work.

What you want is not possible if Pressure is a variable, only if is a parameter or constant. All the connect equations need to be known at compile time.

Related

Localize Hololens in mapped space between application runs (wihout anchors)

Please is it possible to localize Hololens in specific map between application runs without using anchors? I would like to use coordinate system provided by SpatialStationaryFrameOfReference as it makes more sense for my use-case than anchors. However this would obviously result in different origin for each application run. Therefore I am looking for a way to get transform from SpatialStationaryFrameOfReference -> to absolute position in current map.
For example 3D view in device portal always shows Hololens in correct relation to current map - even when no anchors are placed in it. Therefore I thought it should be possible to do this also from application. So far I have only thought of placing some random anchor that would be then used to get a transform from the anchor’s coordinate system to that of the stationary reference frame (using TryGetTransformTo). I guess this should technically work, but I there might be also a better way, right? Thanks.
Another way to set the application's origin is to detect the QR code in the environment and establish a coordinate system. For more information please see:QR code tracking

Getting started at tradingview and referencing balances

I may be new to tradingview but their pinescript programming language seems to be the best I've ever seen for automated trading. They seem to really want me to succeed but I cannot find where it tells me how to access the balances for certain balances. I am trying to make a code where I do not reinvest the extra I make so I have to be able to reference the available amount. I have not quite finished the manual yet but I do not see what variable or function allows me to do that, or at least not where I would expect it.
Have a look at strategy.equity. There are quite a few built-in variables for strategy values. You can inspect them from the refman by searching on "strategy".
You can also calculate your own metrics using a technique like this one if you don't find what you need in the built-ins.
And welcome to Pine! This is the best place to start your journey:
https://www.tradingview.com/?solution=43000561836

How to create geocoding service (find polygons that intersect a given point)

SITUATION
I have a database with 2,000,000 cities. All of them have coordinates of the city center and mostly all - GeoJSON boundaries. I'm trying to implement a geocoding service that would find cities that intersect with a given point using node.js, mongodb, redis, memcached (and golang, if that is necessary, cause I'm just totally new to it )
PROBLEM
I know how to work with points (lat and lng) since both MongoDB and Redis support geoindexes but I've never seen anything about polygons.
I guess MongoDB won't really help cause of its speed (since it work on disks), but any memory database should deal with this problem. The thing is I can't even think of any way to implement it.
I'll be happy if someone point me how to make it. Thanks.
You may implement a point-in-polygon algorithm yourself. I've done something similar on https://api.3geonames.org
First do a bounding box to identify candidate polygons, then run a PIP. https://en.wikipedia.org/wiki/Point_in_polygon
geo.lua (https://github.com/RedisLabs/geo.lua) works with the requirements you have here but it's not very performant (not sure what has changed since last i checked).

Azure Machine Learning Studio Says "Value Required" for Cross Validate Module

I'm having a bit of trouble setting up this cross validate module in MS Machine Learning Studio.
I'm not sure which value it's referring to as needing, since the links connected to it just fine, and those were the values I thought I was submitting.
Nor do I think it's referring to the Random Seed, as I've gotten models to work fine without changing that value.
Any tips on how to make that module work?
This is the resource I'd been looking at before coming here:
https://gallery.azure.ai/Experiment/333e0a99ceac457d8992ef83bfbd98b6
An image of the module flow
You need to set the Label column in Cross Validate, i.e. the column that you're trying to train your model to be able to predict. In your case, that's most likely the Price column.

Dimensioning Family Instances.

I would like to Dimension the family instances. What is the reference I should be provided while creating dimension.
I have tried with several approaches but the dimensions are not getting deleted when I delete the family instances. This means that, the dimensions are not getting attached to the family instances.
Please help.
Have you found a way to address this manually through the user interface? That is mostly the best place to start when tackling a Revit API task. If you can solve it through the UI, the chances are good it can also be automated. If no UI solution is found, automation is mostly impossible as well.
I would analyse the exact differences caused in the Revit database on the elements involved and their parameters by executing the manual modification. Once you have discovered exactly what is changed by the manual UI interaction, you can probably replicate the same changes programmatically through the API. Here is a more exhaustive description of how to address a Revit API programming task:
http://thebuildingcoder.typepad.com/blog/2017/01/virtues-of-reproduction-research-mep-settings-ontology.html#3

Resources