---
# System prepended metadata

title: 'Meeting Note 4/2 Init, Vacc Conf Detail'
tags: [meeting note]

---

# Meeting Note 4/2 Init, Vacc Conf Detail
###### tags: `meeting note`

## Vacc Strat Conf
input side:
```
strategy [strategy parameter]
rollout 10
first_dose_date 2
second_dose_date 10
```

- strategy(string): 策略名稱
- rollout(int): 每天施打人數(白天打)
- second dose date(int): 開始考慮第二劑

e.g.

```
infect_prob
rollout 10
first_dose_date 1
second_dose_date 2
```

- the `date` is 1-index

simulation side:
- strategy parameter: if the strategy is location_first, then change to *location_id*

## Vaccine Strategies: Greedy

Define a ***heuristic function(score)*** for nodes, which can be measured by
1. Sum of transmission probabilities.
    - state, age of its neighbors
3. Age-dependent death rate
4. Potential contribution to YLL (Year Life Lost)
<!--- 4. Social actives -->

### Second Dose

After the first dose, with the resistance, its score is decreased.

---
In order to maintain the **score** of each node in every period 
We might need to make the following operations as efficient as possible
1. update scores (sorted after update)
    - neighbor change state (e.g. $I \rightarrow R$ or $E\to I$)
3. find top $k$ nodes
    - vaccine rollout $k$
5. insert nodes
    - neighbor $S \to E$

Data structure candidates:
1. Array (update all nodes' score first, then sort the array)
2. Max-Heap
    * [Quake heap](https://tmc.web.engr.illinois.edu/heap_ianfest.pdf)
    * Fibonacci heap
    * Pairing heap
3. Segment tree ???

|            | Increase score | Decrease score | Remove-Max | Insert |
| ---------- |:--------------:|:--------------:|:----------:|:------:|
| Complexity |     $O(1)$     | $O(\log({n}))$ |   $O(\log({n}))$   | $O(1)$ |

- Decrease score = Increase score + Remove-Max + Insert
<!--|          | Max node |  Not Max  |
|:--------:|:--------:|:---------:|
| Increase score |   NOP    |  HEAPIFY  |
| Decrease score | HEAPIFY  | HEAPIFY the subtree of node |-->

### Second dose

Set a "second dose date"

- Before that date:
Separate the nodes that have received first shot from those who haven't

- After that date:
Merge these two kind of nodes.

## Init Infect Conf

```
k
loc_1 n_1
loc_2 n_2
.
.
.
loc_n n_k
```

- $k$組init infect
- $loc_i,n_i$
    - 地區要init infect幾個人


## Concluding what Data Process should do

- vacc strat
    - replace census tract name with id(if neccesary)
- init infector
    - replace census tract name with id

## Initialization should **NOT** do (Removing)

- process vaccine strategy
- vaccine order
- init infector

## TO DO

- distinguish implementation from declaration

## Report next week

- paper structure
- discuss data structure
    - heap?
- main objective
    - with individual modeling, we have more vacc strat
    - find some strats outperform previous ones on mitigating infections, deaths or YYL.
- new feature
    - transition diagram
        - $I_{pre},I_{asym},I_{sym}$
        - $V_1,V_2$
    - more vacc strat
