modeling

How to create user defined fields in Django

十年热恋 提交于 2020-01-02 10:11:09
问题 Ok, I am working on a Django application with several different models, namely Accounts, Contacts, etc, each with a different set of fields. I need to be able to allow each of my users to define their own fields in addition to the existing fields. I have seen several different ways to implement this, from having a large number of CustomFields and just mapping a custom name to each field used by each user. I have also seem recommendations for implementing complex mapping or XML/JSON style

Agent-based modeling resources [closed]

牧云@^-^@ 提交于 2019-12-31 08:39:10
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I would like to know what kind of toolkits, languages, libraries exist for agent-based modeling and what are the pros/cons of them? Some examples of what I am thinking of are Swarm, Repast, and MASS. 回答1: I found a survey from June 2009 that answer your question: Survey of Agent

what is the differences between class and dataType

做~自己de王妃 提交于 2019-12-30 08:14:51
问题 As i read through UML specification that: class has a set of attributes/operations and data type has a set of attributes/operations 1)with regards to attributes/operations of data type what this means? because i don't know how such a data type has attributes and operations? 2)What’s the main difference between a class and a datatype? 回答1: according to UML 2.4.1 specification A data type is a special kind of classifier, similar to a class. It differs from a class in that instances of a data

Associating Two Models in Rails (user and profile)

こ雲淡風輕ζ 提交于 2019-12-30 01:31:07
问题 I'm new to Rails. I'm building an app that has a user model and a profile model. I want to associate these models such that: - After the user creates an account, he is automatically sent to the "create profile" page, and the profile he creates is connected to only that particular user. - Only the user who owns the profile can edit it. I generated the user model using nifty_generators. When the user hits submit for the account creation, I redirect him to the "new profile" view to create a

mysqlworkbech 6.1 how to apply inserts data changed

一笑奈何 提交于 2019-12-25 18:56:52
问题 iam new to mysqlworkbench. i am using the latest 6.1 version of it. While iam designing model(EER diagram) i created a table and tried to insert some default data to it in the bottom inserts tab of the respective table. now when i try to close the bottom tab i get a pop up for saying to apply the changes, but i cant find the apply button anywhere on the GUI , Please help where is the apply button so that i can apply 回答1: There's an apply button on the toolbar: 来源: https://stackoverflow.com

UML sequence Diagram duplicate methods

浪尽此生 提交于 2019-12-25 09:55:56
问题 There can be 2 operations that retailer can make when he is updating inventory i.e. update existing record or add a new one. so after making those two operations the controller will invoke updateView() Method to change the main page view. All together i have used it thrice so is it ok to call a same method? I have added the image for the reference. 回答1: No. That's not ok. First: The Retailer will not directly call methods of the UIController. He will always use the View (Main Page). These

How do I model something like this?

蹲街弑〆低调 提交于 2019-12-25 02:39:17
问题 I have this machine problem, and here is one of those tricky parts which gets me a little confused. Here is the use case: Student enrolls in a section. System verifies no schedule conflicts. System verifies that the student has taken the required prerequisite(s). So I created 4 objects, called Student, Section, Schedule, and Subject. I'll only show you my "subject" class because this is where I got confused. The part where I get confused is this: System verifies that the student has taken the

How to prove the reliability of a predictive model to executives?

白昼怎懂夜的黑 提交于 2019-12-24 16:40:18
问题 I trained data from 500 devices to predict their performance. Then I applied my trained model to a test data set for another 500 devices and show pretty good prediction results. Now my executives want me to prove this model will work well on one million devices not only on 500. Obviously we don't have data for one million devices. And if the model is not reliable, they want me to discover the required amount of train data in order to make a reliable prediction on one million devices. How

How to implement decision variable in AMPL

断了今生、忘了曾经 提交于 2019-12-24 11:27:47
问题 I have an equation and i don't know how to implement it in AMPL for CPLEX. Here is it: enter image description here Thank you for your help! 回答1: With a linear solver (like CPLEX), the usual approach is to turn this into a linear constraint with a binary variable indicating which of the two cases applies. param eps; param beta; param bignum = 1e5; var z_s_1 binary; # will have value 0 when z_v <= eps, else 1 var z_s = z_s_1*beta; var z_v >= 0; s.t. Define_z_s_1_a: z_s_1 * eps <= z_v; # so if

Modeling FSM with conditions?

北城余情 提交于 2019-12-24 11:08:00
问题 I am supposed to model a FSM but I am unsure how to model conditions. Let's take the simple ATM example: If user presses "Confirm" AND PIN is correct, go to State 2. If user presses "Confirm" AND PIN is not correct, go to State 3. Or could I simply use input called "wrong pin" and "correct pin"? I would need it to be formal so that I can employ FSM testing procedures, like cover set generation etc. But I do not know if FSM can be modeled this way (maybe with adding states representing