Skip to content

Commit

Permalink
fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Petrik committed Jul 17, 2024
1 parent aec6dc6 commit 341ace3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 35 deletions.
38 changes: 4 additions & 34 deletions test/src/domains/.inventory.jl.~undo-tree~
Original file line number Diff line number Diff line change
@@ -1,36 +1,6 @@
(undo-tree-save-format-version . 1)
"7b11ea8f206fb4bfbd8a6eec3730eb9c98af26f5"
[nil nil nil nil (25921 45772 644259 104000) 0 nil]
([nil nil ((#("RobustRL" 0 8 (fontified t)) . 7) (undo-tree-id0 . -8) (undo-tree-id1 . -8) (undo-tree-id2 . -7) (t 25356 47990 803365 550000)) nil (25921 45772 644257 331000) 0 nil])
([nil nil ((7 . 11)) nil (25921 45772 644239 207000) 0 nil])
([nil nil ((1058 . 1061) (#("generic" 0 7 (fontified t)) . 1058) (undo-tree-id37 . -7) (undo-tree-id38 . -7) (undo-tree-id39 . -6) (t 25921 45772 655742 181000)) nil (25985 42540 497413 44000) 0 nil])
([nil nil ((1114 . 1117) (#("generic" 0 7 (fontified t)) . 1114) (undo-tree-id31 . -6) (undo-tree-id32 . 5) (undo-tree-id33 . -1) (undo-tree-id34 . -1) (undo-tree-id35 . -7) (undo-tree-id36 . -7)) nil (25985 42540 497410 32000) 0 nil])
([nil nil ((#(" " 0 1 (face font-lock-comment-face fontified t)) . -1366) (undo-tree-id0 . -1) (undo-tree-id1 . -1) 1367 (1367 . 1370) (#("w" 0 1 (face font-lock-comment-face fontified t)) . -1366) (undo-tree-id2 . -1) (undo-tree-id3 . -1) 1367 (1366 . 1367) (#("generic" 0 7 (face font-lock-comment-face fontified t)) . 1366) (undo-tree-id4 . -6) (undo-tree-id5 . -2) (undo-tree-id6 . -2) (undo-tree-id7 . -2) (undo-tree-id8 . -2) (undo-tree-id9 . -3) (undo-tree-id10 . -3) (undo-tree-id11 . -3) (undo-tree-id12 . -3) (undo-tree-id13 . -4) (undo-tree-id14 . -4) (undo-tree-id15 . -4) (undo-tree-id16 . -4) (undo-tree-id17 . -5) (undo-tree-id18 . -5) (undo-tree-id19 . -5) (undo-tree-id20 . -5) (undo-tree-id21 . -6) (undo-tree-id22 . -6) (undo-tree-id23 . -6) (undo-tree-id24 . -6) (undo-tree-id25 . -7) (undo-tree-id26 . -7) (undo-tree-id27 . -7) (undo-tree-id28 . -7) (undo-tree-id29 . -7) (undo-tree-id30 . -7)) nil (25985 42540 497402 987000) 0 nil])
([nil nil ((1182 . 1187) (t 25985 42540 533735 444000)) nil (25985 42576 573749 436000) 0 nil])
([nil nil ((#("Infin" 0 5 (fontified t)) . -1182) (1187 . 1196) 1187) nil (25985 42576 573748 709000) 0 nil])
([nil nil ((1191 . 1192)) nil (25985 42576 573747 970000) 0 nil])
([nil nil ((1196 . 1197)) nil (25985 42576 573747 493000) 0 nil])
([nil nil ((1244 . 1249)) nil (25985 42576 573747 8000) 0 nil])
([nil nil ((#("Infin" 0 5 (fontified t)) . -1244) (1249 . 1258) 1249) nil (25985 42576 573746 312000) 0 nil])
([nil nil ((1253 . 1254)) nil (25985 42576 573745 468000) 0 nil])
([nil nil ((1258 . 1259)) nil (25985 42576 573744 770000) 0 nil])
([nil nil ((1307 . 1312)) nil (25985 42576 573744 226000) 0 nil])
([nil nil ((#("Infin" 0 5 (fontified t)) . -1307) (1312 . 1321) 1312) nil (25985 42576 573742 873000) 0 nil])
([nil nil ((1316 . 1317)) nil (25985 42576 573741 450000) 0 nil])
([nil nil ((1321 . 1322)) nil (25985 42576 573737 814000) 0 nil])
([nil nil ((1749 . 1754) (t 25985 42576 610358 510000)) nil (25985 42598 406494 861000) 0 nil])
([nil nil ((#("Infin" 0 5 (fontified t)) . -1749) (1754 . 1763) 1754) nil (25985 42598 406494 267000) 0 nil])
([nil nil ((1758 . 1759)) nil (25985 42598 406493 707000) 0 nil])
([nil nil ((1763 . 1764)) nil (25985 42598 406493 241000) 0 nil])
([nil nil ((#(" " 0 1 (fontified t)) . -1766) (undo-tree-id46 . -1) (undo-tree-id47 . -1) (#(" " 0 1 (fontified t)) . -1767) (undo-tree-id48 . -1) (undo-tree-id49 . -1) 1768) nil (25985 42598 406492 394000) 0 nil])
([nil nil ((1802 . 1806)) nil (25985 42598 406489 695000) 0 nil])
([nil nil ((#("f" 0 1 (fontified t)) . -1803) (undo-tree-id40 . -1) (undo-tree-id41 . -1) (#("i" 0 1 (fontified t)) . -1804) (undo-tree-id42 . -1) (undo-tree-id43 . -1) (#("n" 0 1 (fontified t)) . -1805) (undo-tree-id44 . -1) (undo-tree-id45 . -1) 1806) nil (25985 42598 406488 681000) 0 nil])
([nil nil ((1803 . 1806)) nil (25985 42598 406477 309000) 0 nil])
([nil nil ((#("Infi" 0 4 (fontified t)) . -1802) (1806 . 1815) 1806) nil (25985 42598 406476 629000) 0 nil])
([nil nil ((1811 . 1812)) nil (25985 42598 406475 887000) 0 nil])
([nil nil ((1816 . 1817)) nil (25985 42598 406475 486000) 0 nil])
([nil nil ((1856 . 1861)) nil (25985 42598 406475 30000) 0 nil])
([nil nil ((#("Infin" 0 5 (fontified t)) . -1856) (1861 . 1870) 1861) nil (25985 42598 406473 855000) 0 nil])
([nil nil ((1865 . 1866)) nil (25985 42598 406472 336000) 0 nil])
([nil current ((1870 . 1871)) nil (25985 42598 406467 925000) 0 nil])
"9f647fe1fabc5b9fc87c9df1f5278759132cae6e"
[nil nil nil nil (26263 54871 786953 952000) 0 nil]
([nil nil ((#("#" 0 1 (face font-lock-comment-delimiter-face fontified t)) . 1394) (undo-tree-id0 . -1) (undo-tree-id1 . -1) (undo-tree-id2 . -1) (undo-tree-id3 . -1) (undo-tree-id4 . -1) (undo-tree-id5 . -1) (undo-tree-id6 . -1) (undo-tree-id7 . -1) (t 26263 54622 80027 711000)) nil (26263 54871 786950 896000) 0 nil])
([nil current ((1408 . 1414) (t 26263 54871 824005 845000)) nil (26263 56234 749345 614000) 0 nil])
nil
2 changes: 1 addition & 1 deletion test/src/domains/inventory.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import HiGHS
v2 = value_iteration(model_g, InfiniteH(0.95); ϵ = 1e-10)
v3 = value_iteration(model_gc, InfiniteH(0.95); ϵ = 1e-10)
v4 = policy_iteration(model_gc, 0.95)
#v5 = lp_solve(g, .95, HiGHS.Optimizer)
v5 = lp_solve(model_g, .95, HiGHS.Optimizer)

# note that the IntMDP does not have terminal states,
# so the last action will not be -1
Expand Down

0 comments on commit 341ace3

Please sign in to comment.