modeling

Discretizing PDE in space for use with modelica

戏子无情 提交于 2019-12-13 01:17:23
问题 I am currently doing a course called "Modeling of dynamic systems" and have been given the task of modeling a warm water tank in modelica with a distributed temperature description. Most of the tasks have gone well, and my group is left with the task of introducing the heat flux due to buoyancy effects into the model. Here is where we get stuck. the equation given is this: Given PDE But how do we discretize this into something we can use in modelica? The discretized version we ended up with

ctree plot decision tree in party package in R , terminal node occurs some weird numbers - issue?

霸气de小男生 提交于 2019-12-12 19:17:46
问题 I came across something really odd.. and I couldn't figured it out why.. I use the same code here below : library(party) r_tree <- ctree(readingSkills$nativeSpeaker ~ readingSkills$age + readingSkills$shoeSize + readingSkills$shoeSize + readingSkills$score,data = readingSkills) plot(r_tree,type = "simple") r_tree two week ago I got normal graph .. but today my terminal nodes have some odd numbers in them like showing in this picture below.. I have tried to restarted my PC , uninstalled the

difference between 'when' and 'if' in OpenModelica?

让人想犯罪 __ 提交于 2019-12-12 16:36:01
问题 I'm new to OpenModelica and I've a few questions regarding the code of 'BouncingBall.mo' which is distributed with the software as example code. 1) what's the difference between 'when' and 'if' ? 2)what's the purpose of variable 'foo' in the code? 3)in line(15) - "when {h <= 0.0 and v <= 0.0,impact}" ,, shouldn't the expression for 'when' be enough as "{h <= 0.0 and v <= 0.0}" because this becomes TRUE when impact occurs, what's the purpose of impact (to me its redundant here) and what does

How to model an amount of Money in Java

主宰稳场 提交于 2019-12-12 08:21:22
问题 Can anybody recommend a class library or a design pattern that models amounts of Money ? I guess it should support: multiple currencies a mechanism to indicate the number of decimals math (respecting certain rounding conventions (cfr ie. Banker's Rounding)) serialisation to and from a String representation ... ? I.e. 19.99 USD could be serialized into " USD-2-00000001999 " (Whereas 2 indicates the number of decimals) 回答1: I would check the monetary module from the JScience project (by Jean

Design Decision: Generate OrderNumber which depends on a database value

天涯浪子 提交于 2019-12-12 04:02:07
问题 I'm building an ordering system using C# and got a problem on order number generation. I have an Order class which have an OrderNumber property. I want to make the OrderNumber property readonly, because it's not safe to change OrderNumber. Because the ordering steps are very complex (4 steps, some steps might take 10 minutes to complete), so I need to save the order in each step. But the client don't want to waste OrderNumber (order numbers are in "Year-Month-An_DB_Value" format), beause the

How can I atomically (or at least properly) create User in the system with multiple bounded contexts?

旧街凉风 提交于 2019-12-12 03:58:43
问题 I need to register user in the system. User cannot exist without a Role (and he surely cannot exist without login and password). Administrator is supposed to be able to add new users by selecting role, writing login/password and some user information. Login/password/security concerns are implemented as separate application/BC (authentication context), roles and permissions are in authorization context and user information is in separate account management context. How can I implement user

Data vault model: what are hubs good for?

佐手、 提交于 2019-12-12 01:16:29
问题 I was just reading about Data Vault modeling and as far as I understand it, the hub does only contain keys (and the record source). So I was wondering why I should create those hub tables, only to store the record source? Wouldn't it be enough to have only Satellites and Links? Btw: I'm looking for simple mysql tables in a data vault form to download and play with. 回答1: The hub is where the passive integration of multiple sources is applied. You would have a column for data source and record

Design Decision: OrderNumber property in Order class - Public or Private?

人走茶凉 提交于 2019-12-11 23:56:08
问题 I'm building an ordering system. And here I have an Order class, which has a property named OrderNumber . As you know, OrderNumber can only be assigned once, so I don't want to make it public (so I made it private ). However, the order number is generated according to a sequencial value stored in database. For example, the value in database is 10, now I genearte an order number, the order number will be " Year-Month-10 ", and the value will increase to 11. The value will be reset every month.

In SystemC, can the sc_signal_in/out type port be bound to the primary channel sc_buffer?

ε祈祈猫儿з 提交于 2019-12-11 18:37:52
问题 I am using SystemC for modelling, and I am a little bit confused about the "channel", which includes signal, buffer and fifo. So could anyone tell me the difference of signal and buffer? Is it the same as the difference between the wire and register variable in Verilog HDL? Can signal be bound to the buffer variable? 回答1: sc_buffer and sc_signal are both primitive channels that implement sc_signal_inout_if ; a 'buffer' is an object of type sc_buffer , while a 'signal' is an object of type sc

How to model a consitent database in alloy?

余生长醉 提交于 2019-12-11 16:39:18
问题 Alloy newbie here. I'm trying to model a medical database containing user and some medical information. sig User{ name: one String, surname: one String, socialNumber: one String, address: one String, age: one Int, registration: one UserCredential, healthStatus: one HealthInformation }{ age>0 } sig UserCredential{ user: one String, pass: one String, mail: one String } sig HealthInformation{} sig Data4Help{ users: some User, } pred show(d:Data4Help){ #d.users>1 } run show for 10 The analyzer