simulation

Caching Matlab function results to file

核能气质少年 提交于 2019-12-20 02:54:19
问题 I'm writing a simulation in Matlab. I will eventually run this simulation hundreds of times. In each simulation run, there are millions of simulation cycles. In each of these cycles, I calculate a very complex function, which takes ~0.5 sec to finish. The function input is a long bit array (>1000 bits) - which is an array of 0 and 1 . I hold the bit arrays in a matrix of 0 and 1 , and for each one of them I only run the function once - as I save the result in a different array (res) and check

Count the number of adjacent boxes

杀马特。学长 韩版系。学妹 提交于 2019-12-19 17:53:58
问题 Suppose I have a set of (X,Y) coordinates of 1000 boxes. ( x1, y1) ( x2, y2) Area (0.0000,0.0000) (0.3412,0.4175) 0.1424 (0.7445,0.0000) (1.0000,0.6553) 0.1674 (0.7445,0.6553) (1.0000,1.0000) 0.0881 (0.0000,0.6553) (0.7445,1.0000) 0.2566 (0.3412,0.0000) (0.7445,0.4175) 0.1684 (0.3412,0.4175) (0.7445,0.6553) 0.0959 (0.0000,0.4175) (0.3412,0.6553) 0.0812 ....etc I would like to calculate the number of adjacent boxes for each of them using c/c++ . How can I do it? Example In this picture, the

How make a list of cumulative sum in netlogo

旧街凉风 提交于 2019-12-19 04:34:30
问题 How can i make a list of cumulative sum of a other list? i tried it that way: ;;all temperatrue-values around the turtle saved in list set temperature_values (list [(output-heat + 1)^ Freedom] of neighbors) ;;build cumulative value of temperatures and put each value in list let tempsum 0 set tempsum_list [] foreach temperature_values [set tempsum (tempsum + ? ) set tempsum_list fput tempsum tempsum_list ] but it doesn't work. can anyone fix this problem? it says that "+ excepted a input but

How to throttle network traffic for environment simulation?

☆樱花仙子☆ 提交于 2019-12-18 20:14:40
问题 I'm trying to test an application that uses a database connection. What I would like to do is throttling the bandwith to, say, 1 MBit or such to get a better feeling for the application under realistic conditions. I already use Wireshark to have a look at the communication with the DB and I expected Wireshark to have a feature like that but as it seems there is no way to do something like that. Any suggestions? 回答1: Check out WANem. You can download a bootable ISO that you boot up on any

Are there any programs that can simulate an unstable network connection? [closed]

泪湿孤枕 提交于 2019-12-18 19:22:37
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . We need to simulate an unstable network connection to try to debug some connectivity issues in our server/client application and I was wondering if there are any programs out there that can simulate those conditions such as on a faint wireless network. I'm not just referring to reducing bandwidth, but also

Results Analysis in OMNET++

*爱你&永不变心* 提交于 2019-12-18 18:22:00
问题 I am using Veins framework with OMNET++ to simulate a highway scenario. I am using cOutVector to collect the results from my experiments. I have more than 1000 nodes (vehicles), and the cOutVector collects results individually for each module (node). However, I need to collect the overall results. For example, How many beacons were received by all nodes? Is there anyway of collecting such results? 回答1: In OMNeT++ the output results can be saved in two different types, and thus, file formats:

Results Analysis in OMNET++

£可爱£侵袭症+ 提交于 2019-12-18 18:21:32
问题 I am using Veins framework with OMNET++ to simulate a highway scenario. I am using cOutVector to collect the results from my experiments. I have more than 1000 nodes (vehicles), and the cOutVector collects results individually for each module (node). However, I need to collect the overall results. For example, How many beacons were received by all nodes? Is there anyway of collecting such results? 回答1: In OMNeT++ the output results can be saved in two different types, and thus, file formats:

How to Implement Kirchoff Rules

烂漫一生 提交于 2019-12-18 09:57:08
问题 1.What data structure to use for electric circuit representation for Kirchoff Rules computation purposes how to differentiate between different types of electric components how to 'recognize' wire inter-connections between them 2.how to implement Kirchoff Rules how to obtain current and voltage loops how to store and evaluate Kirchoff equations [original question text] Specifically, how would the program recognize something is in series and parallel and how will it differentiate between a

Change a constant in ODE calculations under particular conditions with a flag

匆匆过客 提交于 2019-12-18 09:31:39
问题 I have an ODE for calculating how acidicity changes. Everything is working just fine, only I would like to change a constant whenever acidicity reaches a critical point. It is supposed to be some kind of irreversible effect I wish to simulate. My constants are coming from a structure file (c) I load once in the ODE function. [Time,Results] = ode15s(@(x, c) f1(x, c),[0 c.length],x0,options); The main problem I have here is not telling Matlab to change the constant but remember if it happened

Javascript event simulation library

跟風遠走 提交于 2019-12-18 09:28:05
问题 Do you know a JS library for DOM events simulation? I know that this operation can be done but i can't find any library to do it. UPDATE: I try to explain better my question. Javascript can simulate events like the user click, i'm looking for a library that helps me with this operation. 回答1: Kangax made a very useful set of extensions for the PrototypeJS framework, the one that might interest you is Event.simulate 回答2: http://developer.yahoo.com/yui/3/event/#eventsimulation """ Simulated