Results

73 views
Skip to first unread message

José Carlos de Campos

unread,
Jul 26, 2011, 6:08:44 AM7/26/11
to dx-comp...@googlegroups.com
Hi,

How we show the results of our algorithm? Screen, to a file?!


Thanks,
Zé Carlos

José Carlos de Campos

unread,
Jul 26, 2011, 5:54:51 PM7/26/11
to dx-comp...@googlegroups.com
Hi,

After analysing the results file of ExampleDA, I found:
candidates = { { a = bias, b = switchedOff } [weight = 0.3], { c = stuckClosed, d = stuckOpen } [weight = 0.5], { c = stuckOpen, d = stuckClosed } [weight = 0.2] }
we should print the results in the same way? For example:
 candidates = { { s1 = healthy, s2 = healthy } [weight = 0], { s3 = faulty } [weight = 0.5] }


Thanks in advance,
Zé Carlos 

Alberto Gonzalez

unread,
Jul 27, 2011, 5:20:28 AM7/27/11
to dx-comp...@googlegroups.com
Hi

no, you don't have to print anything. You have to return a message to the DXC framework with your diagnosis. Please, take a look to the source code of the Example DA on how to do it.

Best regards,
Alberto

2011/7/26 José Carlos de Campos <zecapi...@googlemail.com>



--

  Alberto González Sánchez
  Software Technology Department, EEMCS Faculty
  Delft University of Technology
  home:   www.st.ewi.tudelft.nl/~albgonz

Rui Maranhao

unread,
Jul 27, 2011, 5:30:48 AM7/27/11
to dx-comp...@googlegroups.com
Alberto,

But, what is the format of those messages?

Best,
Rui

José Carlos de Campos

unread,
Jul 27, 2011, 5:39:51 AM7/27/11
to dx-comp...@googlegroups.com
Hi,

Yes I understand that, when I say "print" I mean return to DXC framework.

Our doubt is what we need to return to the DXC framework. The diagnosis, right.

At ExampleDA appears the following code:

CandidateSet exampleCandidateSet;
Candidate c1, c2, c3;

c1.getFaults()->insert(Fault("c", "stuckOpen"));
c1.getFaults()->insert(Fault("d", "stuckClosed"));
c1.setWeight(0.2);

....

exampleCandidateSet.insert(c1);

DiagnosisData* exampleDiagnosis = new DiagnosisData(true, true, exampleCandidateSet, "example diagnosis");

connector->sendMessage(exampleDiagnosis);

We only need to create new faults, add that to exampleCandidateSet and send them through the connector?
--
Best,
Zé Carlos

Andrew Dunn

unread,
Jul 27, 2011, 5:46:11 AM7/27/11
to dx-comp...@googlegroups.com

Alberto Gonzalez

unread,
Jul 27, 2011, 5:48:51 AM7/27/11
to dx-comp...@googlegroups.com


2011/7/27 José Carlos de Campos <zecapi...@googlemail.com>
Hi,

Yes I understand that, when I say "print" I mean return to DXC framework.

Our doubt is what we need to return to the DXC framework. The diagnosis, right.

At ExampleDA appears the following code:

CandidateSet exampleCandidateSet;
Candidate c1, c2, c3;

c1.getFaults()->insert(Fault("c", "stuckOpen"));
c1.getFaults()->insert(Fault("d", "stuckClosed"));
c1.setWeight(0.2);

....

exampleCandidateSet.insert(c1);

DiagnosisData* exampleDiagnosis = new DiagnosisData(true, true, exampleCandidateSet, "example diagnosis");

connector->sendMessage(exampleDiagnosis);

We only need to create new faults, add that to exampleCandidateSet and send them through the connector?

Yes, you have to return a candidate set, and the candidate set is made out of all your candidates, and the candidates are combinations of faults that you have diagnosed.

José Carlos de Campos

unread,
Jul 27, 2011, 6:13:50 AM7/27/11
to dx-comp...@googlegroups.com
Hi,

On Wed, Jul 27, 2011 at 10:48 AM, Alberto Gonzalez <a.gonzal...@tudelft.nl> wrote:


2011/7/27 José Carlos de Campos <zecapi...@googlemail.com>
Hi,

Yes I understand that, when I say "print" I mean return to DXC framework.

Our doubt is what we need to return to the DXC framework. The diagnosis, right.

At ExampleDA appears the following code:

CandidateSet exampleCandidateSet;
Candidate c1, c2, c3;

c1.getFaults()->insert(Fault("c", "stuckOpen"));
c1.getFaults()->insert(Fault("d", "stuckClosed"));
c1.setWeight(0.2);

....

exampleCandidateSet.insert(c1);

DiagnosisData* exampleDiagnosis = new DiagnosisData(true, true, exampleCandidateSet, "example diagnosis");

connector->sendMessage(exampleDiagnosis);

We only need to create new faults, add that to exampleCandidateSet and send them through the connector?

Yes, you have to return a candidate set, and the candidate set is made out of all your candidates, and the candidates are combinations of faults that you have diagnosed.

Ok, its easy. :-)

Just one more question, we need to group faults by your weight or not?

Example 1) [one candidate one fault]

CandidateSet exampleCandidateSet;
Candidate c1, c2;

c1.getFaults()->insert(Fault("c", "stuckOpen"));
c1.setWeight(0.2);

c2.getFaults()->insert(Fault("d", "stuckClosed"));
c2.setWeight(0.2);

Example 2) [one candidate many faults (with same weight)]

CandidateSet exampleCandidateSet;
Candidate c1;

c1.getFaults()->insert(Fault("c", "stuckOpen"));
c1.getFaults()->insert(Fault("d", "stuckClosed"));
c1.setWeight(0.2);

At Example 1) we have different faults with the same weight.
At Example 2) we "group" the same faults that have the same weight in a single candidate.


The two example are correct? If not, which is more correct?
--
Thanks,
Zé Carlos

Alberto Gonzalez

unread,
Jul 27, 2011, 6:26:29 AM7/27/11
to dx-comp...@googlegroups.com
these are 2 independent faults (similarity coefficients-like ranking). Either c or d are broken, and the weight of each explanation is 0.2
 

Example 2) [one candidate many faults (with same weight)]

CandidateSet exampleCandidateSet;
Candidate c1;

c1.getFaults()->insert(Fault("c", "stuckOpen"));
c1.getFaults()->insert(Fault("d", "stuckClosed"));
c1.setWeight(0.2);
this is different, it means that both C and D are broken, and the explanation has a weight of 0.2

José Carlos de Campos

unread,
Jul 27, 2011, 3:51:22 PM7/27/11
to dx-comp...@googlegroups.com
Hi,

Now we have a strange situation. We return the message to the DXC framework with the following lines (after adding a lot of candidates to candidateSet):

DiagnosisData* diagnosis = new DiagnosisData(true, true, candidateSet, "diagnosis");
connector->sendMessage(diagnosis);

But when
candidateSet has more than 1900 candidates the framework doesn't print our diagnosis to the results file.
We cannot understand why 1900 candidates. Do you have any idea why this happen?


--
Best,
Zé Carlos

José Carlos de Campos

unread,
Jul 28, 2011, 6:10:42 AM7/28/11
to dx-comp...@googlegroups.com
Try to change the sendDiagnosis function to this ( http://pastebin.com/gFyCYLfP ) and after that run ExampleDA with any scenario.

Why diagnosis does not appear in results file ("Example Diagnosis Algorithm - <name of scenario> - <name of scenario>-test-<number of test>.scn") ?


Thanks,
Zé Carlos

Alberto Gonzalez

unread,
Jul 29, 2011, 5:48:30 AM7/29/11
to dx-comp...@googlegroups.com
Hi

I have never seen this problem before. I'll try to investigate, but since I'm not the author of the DXC Framework I don't know if I can be of much help.

Alberto

José Carlos de Campos

unread,
Aug 4, 2011, 6:57:40 AM8/4/11
to dx-comp...@googlegroups.com
Hi,

We continue with the same problem, scenarios with a lot of input/output, framework doesn't return success.

If you run original ExampleProbeDA with replace scenario, you obtain (check Original ExampleProbe Diagnosis Algorithm - replace - replace-test-1.scn), until where everything is ok.
But if you change the ExampleProbeDA to probe all test's in replace scenario, in other words, change lines:

CommandSet cs;
cs.insert(Command("probe", Value::v("t1")));
cs.insert(Command("probe", Value::v("t2")));
cs.insert(Command("probe", Value::v("t3")));
CommandData cd(cs);

to this:

CommandSet cs;
for (int i = 1; i <= num_tests; i++) // at replace scenario, num_tests = 5542
    cs.insert(Command("probe", Value::v("t" + convertToString(i))));
CommandData cd(cs);

you will obtain (check ExampleProbe Diagnosis Algorithm - schedule - schedule-test-1.scn).

---8<---

What is the different between outputs? For original ExampleProbeDA, DX framework returns:

sensors @1312454767661 { t1 = true, t2 = true, t3 = true };
scenarioStatus @1312454767716 <SL> DA_TERMINATED;
profilingInfo @1312454767716 <SL> cpuTime = 0, maxMem = 54112;

For ExampleProbeDA modified, it seems that the framework isn't completed successfully (because it doesn't return these messages (DA_TERMINATED, etc).

Any idea?

--
Best
Zé Carlos
Original ExampleProbe Diagnosis Algorithm - replace - replace-test-1.scn
ExampleProbe Diagnosis Algorithm - replace - replace-test-1.scn

Alberto Gonzalez

unread,
Aug 5, 2011, 8:18:37 AM8/5/11
to dx-comp...@googlegroups.com
I'm in fact stuck with a problem with print_tokens, print_tokens2, and replace, I get an error about the scenariorecorder not being able to connect. Are you getting that problem too? Those are the 3 programs with the most test cases, so I think we may be hitting some limit that I don't know in the framework.

2011/8/4 José Carlos de Campos <zecapi...@googlemail.com>

José Carlos de Campos

unread,
Aug 5, 2011, 8:31:14 AM8/5/11
to dx-comp...@googlegroups.com
Hi,

On Fri, Aug 5, 2011 at 1:18 PM, Alberto Gonzalez <a.gonzal...@tudelft.nl> wrote:
I'm in fact stuck with a problem with print_tokens, print_tokens2, and replace, I get an error about the scenariorecorder not being able to connect. Are you getting that problem too? Those are the 3 programs with the most test cases, so I think we may be hitting some limit that I don't know in the framework.

Exactly, I thought the same. DX framework doesn't deal very well with scenarios with a large suite of tests.



--
Zé Carlos

Alberto Gonzalez

unread,
Aug 16, 2011, 9:59:15 AM8/16/11
to dx-comp...@googlegroups.com
Hi

as workaround, for this year I'll disable the cases that cause the framework to fail (print_tokens, print_tokens2 and replace).

Alberto

2011/8/5 José Carlos de Campos <zecapi...@googlemail.com>
Reply all
Reply to author
Forward
0 new messages