模拟、分析和学习系统的编程|Programming of Simulation, Analysis, & Learning Systems MATH2504 my.uq

联系我们: 手动添加方式: 微信>添加朋友>企业微信联系人>13262280223 或者 QQ: 1483266981

This course is designed to build a students understanding of programming, software architecture, and general software development in the context of mathematical, numerical, symbolic, statistical, and machine learning applications. Students will learn the basic elements of software development in the context of mathematics and data-science using a scientific programming language like the Julia language, and also using tools such as git, Unix, and Integrated Development Environments (IDEs).

这是一份my.uq昆士兰大学MATH2504 的成功案例

模拟、分析和学习系统的编程|Programming of Simulation, Analysis, & Learning Systems MATH2504 my.uq

问题 1. text { Create a custom Simulation Optimisation Method }

证明 .

Open the Method Start.Comment all lines of code that use the Method SetConfiguration or TableFile Configurations, since we no longer use predefined configurations.Set initial values for NrJuniors and NrSeniors in the Method Start:

Reset WorkersNrSeniors : = 1NrJuniors :=1:=1

Create a new Method and name it SimOpt.Open the Method EndSim.Remove the whole code (Ctrl-X) below the computation of TotalProfit that is made conditional on CustomRun and paste (Ctrl-V) the code into the Method SimOpt. Now call the Method SimOpt from the place where you removed the code, such that the remaining code for EndSim looks as follows

$ begin{array}{ll} text { var now: } & text { time } text { var urgency: } & text { integer } text { var timesincespp: } & text { time } end{array}$
UpdateLocation(?, )
– Define variables.
$ begin{array}{ll} text { now } & := text { EventControllersimTime } text { urgency } & := text { Patients[“urgency”, } ] text { timesinceApp } & := max [0, text { now-max(Patients[“arrivalTime”, } text { ” }[ mathrm{~} end{array}$
– Calculate and save statistics.
Patients [“waitingTime”, ] := now – Patients[“arrivalTime”, 凶]
Patients “arrivalAtGP”, ?] := now
if timesinceApp $<=0$ Patients ["percelvedWaitingTime", :=0 elseif urgency $=1$ Patients ["perceivedWaitingTime", $ llbracket]:=$ timeSinceApp * $2.0$ elseif urgency $=2$ Patients ["perceivedWaitingTime", @] : : timesinceApp * $1.0$ elseif urgency $=3$ Patients ["perceivedWaitingTime", ?] : $=$ timesinceApp * $0.5$ end

发表回复