This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void updateStats(double dt) | |
{ | |
if(TNOW>endTime*warmUp) | |
{ | |
double totalinsystemdt = serversLevels[1].size()+2*serversLevels[2].size()+3*serversLevels[3].size()+4*serversLevels[4].size()+queueVector.size(); | |
//if(TNOW>9950){ | |
//System.out.println("-----------------------"); | |
//System.out.println("Time elapsed: " +dt); | |
//System.out.println("Z1: "+serversLevels[1].size()+" Z2: "+serversLevels[2].size()+" Z3: "+serversLevels[3].size()+" Z4: "+serversLevels[4].size()+" Q: "+queueVector.size()+ " Total: "+totalinsystemdt); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
public void updateStats(double dt, String output_file_name) | |
{ | |
if(TNOW>endTime*warmUp) | |
{ | |
double totalinsystemdt = serversLevels[1].size()+2*serversLevels[2].size()+3*serversLevels[3].size()+4*serversLevels[4].size()+queueVector.size(); | |
if(TNOW>9950){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Numeric.LinearAlgebra | |
import Numeric.GSL | |
import Control.Exception | |
import System.Environment | |
import Data.Maybe | |
import Control.Monad.Par | |
import Control.DeepSeq | |
---------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
pts = cartesian_product(c('x','y')) | |
d1 = cbind(pts, runif(nrow(pts),min=0,max=1), 1) | |
d2 = cbind(pts, runif(nrow(pts),min=0,max=4), 2) | |
colnames(d1) = colnames(d2) = c("x","y","val","k") | |
d = rbind(d1,d2) | |
p1 <- ggplot(d1, aes(x = x, y = y, fill = val)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum -y update | |
sudo yum -y install make glibc-devel gcc47 | |
sudo yum -y install gcc47-c++ | |
sudo yum -y install htop git | |
sudo yum -y install zlib-devel | |
sudo yum -y install freeglut-devel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum -y update | |
cabal update | |
cabal install either-unwrap | |
cabal install uuid | |
cabal install roots | |
cabal install integration | |
cabal install syb | |
git clone https://github.com/simonmar/monad-par.git | |
cd monad-par |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-| print_inst_uuid_list | |
Given a list of [IndividualParameterization], and an output filename | |
print a csv file describing each IndividualParameterization, one line | |
each. | |
-} | |
print_inst_uuid_list :: [IndividualParameterization] -> String -> IO () | |
print_inst_uuid_list xlist fname = | |
do | |
let headerstring = inputst_csv_string ++ ",nstep_s,nstep_w,uuid" | |
let inst_strings = map (inputst_to_csv_string . _ipp_inst) xlist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(cumplyr) | |
library(scales) | |
library(reshape2) | |
library(RColorBrewer) | |
library(tools) | |
library(gridExtra) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DeriveDataTypeable #-} | |
module HW4_23 where | |
import Data.Typeable | |
import Data.Generics | |
import Math.Factorial | |
import Data.List | |
import System.IO | |
import Data.UUID as U |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inner_decentral_sino_st :: ProblemParams -> (Double,Double,Double) -> (Double,Double,Double) | |
inner_decentral_sino_st pp (simin, simed, simax) = (simin', simed', simax') | |
where | |
p = fromIntegral $ _pp_p pp :: Double | |
t = fromIntegral $ _pp_t pp :: Double | |
h = fromIntegral $ _pp_h pp :: Double | |
myf_val = myfunN1 simed pp | |
thresh = (p*t)/(p+h) | |
if myf_val < thresh then |