Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sogMBT
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PMC-SOG
sogMBT
Commits
dced2859
Commit
dced2859
authored
4 days ago
by
Taha
Browse files
Options
Downloads
Patches
Plain Diff
feat: update main
parent
cda9fc53
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/main.cpp
+15
-13
15 additions, 13 deletions
app/main.cpp
with
15 additions
and
13 deletions
app/main.cpp
+
15
−
13
View file @
dced2859
...
...
@@ -106,7 +106,7 @@ void SaveSOG(const SOG& sog, const string& sog_file) {
*/
void
PrintOutputObsWeights
(
const
RdP
::
net
&
model
,
SOG
&
sog
,
const
map
<
int
,
int
>&
obs_transitions
,
const
Paths
&
obs_paths
,
const
std
::
vector
<
std
::
vector
<
std
::
string
>>
obs_paths
,
const
std
::
vector
<
int
>&
weight_obs_paths
,
const
string
&
output_file_prefix
)
{
sog
.
PrintCompleteInformation
();
...
...
@@ -120,19 +120,22 @@ void PrintOutputObsWeights(const RdP::net& model, SOG& sog,
ofstream
weight_file
(
output_file
);
weight_file
<<
"# path weights: "
<<
weight_obs_paths
.
size
()
<<
'\n'
;
for
(
auto
w_path
:
weight_obs_paths
)
{
weight_file
<<
w_path
<<
'\n'
;
if
(
w_path
!=
0
)
weight_file
<<
w_path
<<
'\n'
;
}
weight_file
<<
'\n'
;
//
weight_file << '\n';
// save observable paths in the folder
std
::
string
output_obs_paths
=
output_file_prefix
+
"_obs_paths.txt"
;
ofstream
obs_paths_file
(
output_obs_paths
);
obs_paths_file
<<
"# obs. paths: "
<<
obs_paths
.
size
()
<<
'\n'
;
obs_paths_file
<<
"# obs. paths: "
<<
obs_paths
.
size
()
;
//
<< '\n';
for
(
const
auto
&
obs_p
:
obs_paths
)
{
for
(
auto
t_label
:
obs_p
)
{
obs_paths_file
<<
t_label
<<
'_'
;
cout
<<
t_label
<<
"_"
;
if
(
obs_p
.
size
()
!=
0
){
for
(
auto
t_label
:
obs_p
)
{
obs_paths_file
<<
t_label
<<
'_'
;
cout
<<
t_label
<<
"_"
;
}
}
obs_paths_file
<<
'\n'
;
cout
<<
'\n'
;
...
...
@@ -307,9 +310,9 @@ void ComputeAbstractPaths(const std::string& net_file, int bound, bool only_sog,
pn_sog
.
GenerateSOG
(
sog
);
auto
sog_time
=
GetTime
()
-
start_sog_time
;
std
::
cout
<<
" done
\n
Time for computing SOG: "
<<
sog_time
<<
" seconds
\n
"
;
std
::
cout
<<
"--------------------"
<<
std
::
endl
;
sog
.
PrintCompleteInformation
();
std
::
cout
<<
"--------------------"
<<
std
::
endl
;
//
std::cout<<"--------------------"<<std::endl;
//
sog.PrintCompleteInformation();
//
std::cout<<"--------------------"<<std::endl;
auto
elapsed_time
=
GetTime
()
-
start_time
;
std
::
cout
<<
"
\n
Total time: "
<<
elapsed_time
<<
" seconds
\n
"
;
...
...
@@ -402,7 +405,7 @@ void SaveObsPathsAndWeights(const string& net_file, int bound,
auto
sog_time
=
GetTime
()
-
start_sog_time
;
cout
<<
" done
\n
Time for computing SOG: "
<<
sog_time
<<
" seconds
\n
"
;
sog
.
PrintCompleteInformation
();
//
sog.PrintCompleteInformation();
std
::
cout
<<
"
\n
Generating regex from the SOG ... "
;
auto
start_regex_time
=
GetTime
();
const
std
::
string
language
=
pn_sog
.
GenerateRegExp
(
&
sog
).
begin
()
->
first
;
...
...
@@ -442,9 +445,8 @@ void SaveObsPathsAndWeights(const string& net_file, int bound,
cout
<<
"
\n
Total time: "
<<
elapsed_time
<<
" seconds
\n
"
;
// print output
PrintOutputObsWeights
(
model
,
sog
,
obs_trans
,
obs_
paths
,
weight_obs_paths
,
PrintOutputObsWeights
(
model
,
sog
,
obs_trans
,
paths
,
weight_obs_paths
,
output_file_prefix
);
}
/******************************************************************************
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment