From 0e16bb8e4400836fc09c9d802f53da42534b2124 Mon Sep 17 00:00:00 2001 From: Thomas Knoll Date: Sun, 3 Dec 2023 17:42:43 +0100 Subject: [PATCH] some renames --- util/Grid.cpp | 4 ++-- util/PrismModulesPrinter.cpp | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/util/Grid.cpp b/util/Grid.cpp index 569fd76..fc4dbee 100644 --- a/util/Grid.cpp +++ b/util/Grid.cpp @@ -244,10 +244,10 @@ void Grid::printToPrism(std::ostream& os, std::vector& configurat printer.printKeysLabels(os, agentNameAndPosition->first, keys); } std::vector constants {"const double prop_zero = 0/9;", - "const double prop_adj = 1/9;", + "const double prop_next_neighbour = 1/9;", "const double prop_slippery_move_forward = 3/9;", "const double prop_slippery_turn = 6/9;", - "const double prop_neighbour = 2/9;", + "const double prop_direct_neighbour = 2/9;", "const double total_prop = 9;"}; printer.printConstants(os, constants); diff --git a/util/PrismModulesPrinter.cpp b/util/PrismModulesPrinter.cpp index 09f93b3..295f907 100644 --- a/util/PrismModulesPrinter.cpp +++ b/util/PrismModulesPrinter.cpp @@ -730,28 +730,28 @@ namespace prism { actionName = "\t[" + agentName + "turn_at_slip_north"; positionGuard = "\t" + agentName + "IsOnSlipperyNorth"; prob_piece_dir = { 0, 0, 0, 1, 1, 1, 0, 0, 0 /* <- R */ }; - prob_piece_dir_constants = { "prop_zero", "prop_zero", "prop_zero", "prop_adj", "prop_adj" /* <- R */, "prop_adj", "prop_zero", "prop_zero","prop_zero" }; + prob_piece_dir_constants = { "prop_zero", "prop_zero", "prop_zero", "prop_next_neighbour", "prop_next_neighbour" /* <- R */, "prop_next_neighbour", "prop_zero", "prop_zero","prop_zero" }; break; case SlipperyType::South: actionName = "\t[" + agentName + "turn_at_slip_south"; positionGuard = "\t" + agentName + "IsOnSlipperySouth"; prob_piece_dir = { 1, 1, 0, 0, 0, 0, 0, 1, 0 /* <- R */ }; - prob_piece_dir_constants = { "prop_adj", "prop_adj", "prop_zero", "prop_zero", "prop_zero", "prop_zero", "prop_zero", "prop_adj", "prop_zero" }; + prob_piece_dir_constants = { "prop_next_neighbour", "prop_next_neighbour", "prop_zero", "prop_zero", "prop_zero", "prop_zero", "prop_zero", "prop_next_neighbour", "prop_zero" }; break; case SlipperyType::East: actionName = "\t[" + agentName + "turn_at_slip_east"; positionGuard = "\t" + agentName + "IsOnSlipperyEast"; prob_piece_dir = { 0, 0, 0, 0, 0, 1, 1, 1, 0 /* <- R */ }; - prob_piece_dir_constants = { "prop_zero", "prop_zero", "prop_zero", "prop_zero", "prop_zero", "prop_adj", "prop_adj", "prop_adj", "prop_zero" }; + prob_piece_dir_constants = { "prop_zero", "prop_zero", "prop_zero", "prop_zero", "prop_zero", "prop_next_neighbour", "prop_next_neighbour", "prop_next_neighbour", "prop_zero" }; break; case SlipperyType::West: actionName = "\t[" + agentName + "turn_at_slip_west"; positionGuard = "\t" + agentName + "IsOnSlipperyWest"; prob_piece_dir = { 0, 1, 1, 1, 0, 0, 0, 0, 0 /* <- R */ }; - prob_piece_dir_constants = { "prop_zero", "prop_adj", "prop_adj", "prop_adj", "prop_zero", "prop_zero", "prop_zero", "prop_zero", "prop_zero" }; + prob_piece_dir_constants = { "prop_zero", "prop_next_neighbour", "prop_next_neighbour", "prop_next_neighbour", "prop_zero", "prop_zero", "prop_zero", "prop_zero", "prop_zero" }; break; } @@ -816,7 +816,7 @@ namespace prism { actionName = "\t[" + agentName + "move_on_slip_north]"; positionGuard = "\t" + agentName + "IsOnSlipperyNorth"; prob_piece_dir = { 0, 0, 1, 2, 0 /* <- R */, 2, 1, 0 }; - prob_piece_dir_constants = { "prop_zero", "prop_zero", "prop_adj", "prop_neighbour", "prop_zero" /* <- R */, "prop_neighbour", "prop_adj", "prop_zero" }; + prob_piece_dir_constants = { "prop_zero", "prop_zero", "prop_next_neighbour", "prop_direct_neighbour", "prop_zero" /* <- R */, "prop_direct_neighbour", "prop_next_neighbour", "prop_zero" }; straightPosIndex = 4; specialTransition = "(y" + agentName + "'=y" + agentName + (!neighborhood.at(straightPosIndex) ? ")" : "+1)"); break; @@ -825,7 +825,7 @@ namespace prism { actionName = "\t[" + agentName + "move_on_slip_south]"; positionGuard = "\t" + agentName + "IsOnSlipperySouth"; prob_piece_dir = { 0 /* <- R */, 2, 1, 0, 0, 0, 1, 2 }; - prob_piece_dir_constants = { "prop_zero" /* <- R */, "prop_neighbour", "prop_adj", "prop_zero", "prop_zero", "prop_zero", "prop_adj", "prop_neighbour" }; + prob_piece_dir_constants = { "prop_zero" /* <- R */, "prop_direct_neighbour", "prop_next_neighbour", "prop_zero", "prop_zero", "prop_zero", "prop_next_neighbour", "prop_direct_neighbour" }; straightPosIndex = 0; // always north specialTransition = "(y" + agentName + "'=y" + agentName + (!neighborhood.at(straightPosIndex) ? ")" : "-1)"); break; @@ -834,7 +834,7 @@ namespace prism { actionName = "\t[" + agentName + "move_on_slip_east]"; positionGuard = "\t" + agentName + "IsOnSlipperyEast"; prob_piece_dir = { 1, 0, 0, 0, 1, 2, 0 /* <- R */, 2 }; - prob_piece_dir_constants = { "prop_adj", "prop_zero", "prop_zero", "prop_zero", "prop_adj", "prop_neighbour", "prop_zero" /* <- R */, "prop_neighbour" }; + prob_piece_dir_constants = { "prop_next_neighbour", "prop_zero", "prop_zero", "prop_zero", "prop_next_neighbour", "prop_direct_neighbour", "prop_zero" /* <- R */, "prop_direct_neighbour" }; straightPosIndex = 6; specialTransition = "(x" + agentName + "'=x" + agentName + (!neighborhood.at(straightPosIndex) ? ")" : "-1)"); break; @@ -843,7 +843,7 @@ namespace prism { actionName = "\t[" + agentName + "move_on_slip_west]"; positionGuard = "\t" + agentName + "IsOnSlipperyWest"; prob_piece_dir = { 1, 2, 0 /* <- R */, 2, 1, 0, 0, 0 }; - prob_piece_dir_constants = {"prop_adj", "prop_neighbour", "prop_zero" /* <- R */, "prop_neighbour", "prop_adj", "prop_zero","prop_zero", "prop_zero" }; + prob_piece_dir_constants = {"prop_next_neighbour", "prop_direct_neighbour", "prop_zero" /* <- R */, "prop_direct_neighbour", "prop_next_neighbour", "prop_zero","prop_zero", "prop_zero" }; straightPosIndex = 2; specialTransition = "(x" + agentName + "'=x" + agentName + (!neighborhood.at(straightPosIndex) ? ")" : "+1)"); break;