You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/decision-programming/decision-model.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,9 @@ The motivation for using the minimum of these bounds is that it depends on the p
55
55
## Lazy Probability Cut
56
56
Constraint $(6)$ is a complicating constraint involving all path compatibility variables $x(s)$ and thus adding it directly to the model may slow down the overall solution process. It may be beneficial to instead add it as a *lazy constraint*. In the solver, a lazy constraint is only generated when an incumbent solution violates it. In some instances, this allows the MILP solver to prune nodes of the branch-and-bound tree more efficiently.
57
57
58
+
## Single Policy Update
59
+
To obtain (hopefully good) starting solutions, the SPU heuristic described in [^3] can be used. The heuristic finds a locally optimal strategy in the sense that the strategy cannot be improved by changing any single local strategy. With large problems, the heuristic can quickly provide a solution that would otherwise take very long to obtain.
60
+
58
61
59
62
## Expected Value
60
63
The **expected value** objective is defined using the path compatibility variables $x(𝐬)$ and their associated path probabilities $p(𝐬)$ and path utilities $\mathcal{U}(𝐬)$.
@@ -144,6 +147,8 @@ where the parameter $w∈[0, 1]$ expresses the decision maker's **risk tolerance
144
147
145
148
146
149
## References
147
-
[^1]: Salo, A., Andelmin, J., & Oliveira, F. (2019). Decision Programming for Multi-Stage Optimization under Uncertainty, 1–35. Retrieved from [http://arxiv.org/abs/1910.09196](http://arxiv.org/abs/1910.09196)
150
+
[^1]: Salo, A., Andelmin, J., & Oliveira, F. (2022). Decision programming for mixed-integer multi-stage optimization under uncertainty. European Journal of Operational Research, 299(2), 550-565.
148
151
149
152
[^2]: Hölsä, O. (2020). Decision Programming Framework for Evaluating Testing Costs of Disease-Prone Pigs. Retrieved from [http://urn.fi/URN:NBN:fi:aalto-202009295618](http://urn.fi/URN:NBN:fi:aalto-202009295618)
153
+
154
+
[^3]: Hankimaa, H., Herrala, O., Oliveira, F., Tollander de Balsch, J. (2023). DecisionProgramming.jl -- A framework for modelling decision problems using mathematical programming. Retrieved from [https://arxiv.org/abs/2307.13299](https://arxiv.org/abs/2307.13299)
This function does not exclude forbidden paths: the strategy returned by this function might be forbidden if the diagram has forbidden state combinations.
12
+
13
+
# Examples
14
+
```julia
15
+
objval, Z, S_active = randomStrategy(diagram)
16
+
```
17
+
"""
18
+
functionrandomStrategy(diagram::InfluenceDiagram)
19
+
20
+
# Initialize empty vector for local decision strategies
21
+
# Z_d = Vector{LocalDecisionStrategy}[] # Doesn't work for some reason...
22
+
Z_d = []
23
+
24
+
# Loop through all decision nodes and set local decision strategies
25
+
for j in diagram.D
26
+
I_j = diagram.I_j[j]
27
+
28
+
# Generate a matrix of correct dimensions to represent the strategy
29
+
dims = diagram.S[[I_j; j]]
30
+
data =zeros(Int, Tuple(dims))
31
+
n_states =size(data)[end]
32
+
33
+
# For each information state, choose a random decision state
34
+
for s_Ij inpaths(diagram.S[I_j])
35
+
data[s_Ij..., rand(1:n_states)] =1
36
+
end
37
+
push!(Z_d, LocalDecisionStrategy(j,data))
38
+
end
39
+
40
+
# Construct a decision strategy and obtain the compatible paths
41
+
Z =DecisionStrategy(diagram.D, diagram.I_j[diagram.D], Z_d)
42
+
S_active =CompatiblePaths(diagram, Z)
43
+
44
+
# Calculate the expected utility corresponding to the strategy
45
+
EU =sum(diagram.P(s)*diagram.U(s) for s in S_active)
- `model::Model`: The decision model, modelled in JuMP
124
+
- `z::DecisionVariables`: The decision variables
125
+
- `x_s::PathCompatibilityVariables`: The path compatibility variables
126
+
127
+
!!! warning
128
+
This function does not exclude forbidden paths: the strategies explored by this function might be forbidden if the diagram has forbidden state combinations.
0 commit comments