1. Obtain data set for training the neural network-based deterministic policies:
   Run "1_Prepare_Training_Data_Set_for_Det_Policy\Num_Exa_NeurIPS_2024_CCMPC_train_data_Entire.m" to obtain data set "data_train_entire.mat"
   (If you want to check the trained data set, run "1_Prepare_Training_Data_Set_for_Det_Policy\Check_Trained_Data.m")   

2. Train the neural network-based deterministic policies
   Run "2_Training_Det_Policy\NeurNet_Train.m"

3. Test the neural network-based deterministic policies 
   Run "3_Testing_Det_Policy\NeurNet_Test.m"

4. Calculate the flip probability for each threshold
   Run "4_Calculating_Flip_Probability\cal_for_cal_flip_prob.m"

5. Test the flipping-based policies
   Run "5_Testing_flip_policy\NeurNet_Flip_Test.m"

6. Plot the results
   Run "6_Plot_Results\Check_Test_with_flip_Data_NN"

----------------------------------------------------------------------------------
The goal of this code is to validate the advantages of flipping-based methods
over traditional methods for Chance-Constrained MDP.
The code should be implemented in MATLAB environment with optimization tool box
and deep learning tool box.
----------------------------------------------------------------------------------





