Click here to Skip to main content
15,894,825 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Questions about CPropertySheet::AddPage Pin
transoft21-Sep-09 2:07
transoft21-Sep-09 2:07 
GeneralRe: Questions about CPropertySheet::AddPage Pin
KarstenK21-Sep-09 2:38
mveKarstenK21-Sep-09 2:38 
GeneralRe: Questions about CPropertySheet::AddPage Pin
transoft21-Sep-09 2:47
transoft21-Sep-09 2:47 
GeneralRe: Questions about CPropertySheet::AddPage Pin
KarstenK21-Sep-09 3:13
mveKarstenK21-Sep-09 3:13 
GeneralRe: Questions about CPropertySheet::AddPage Pin
transoft21-Sep-09 6:08
transoft21-Sep-09 6:08 
GeneralRe: Questions about CPropertySheet::AddPage Pin
KarstenK21-Sep-09 21:16
mveKarstenK21-Sep-09 21:16 
Question[Message Deleted] Pin
includeh1020-Sep-09 5:07
includeh1020-Sep-09 5:07 
AnswerRe: how to change comple warning level by project setting ? Pin
Richard MacCutchan20-Sep-09 5:11
mveRichard MacCutchan20-Sep-09 5:11 
GeneralRe: how to change comple warning level by project setting ? Pin
includeh1020-Sep-09 5:36
includeh1020-Sep-09 5:36 
Questionis it possible to get warning message from UINT value mismatched? Pin
includeh1020-Sep-09 4:28
includeh1020-Sep-09 4:28 
AnswerRe: is it possible to get warning message from UINT value mismatched? Pin
Richard MacCutchan20-Sep-09 4:35
mveRichard MacCutchan20-Sep-09 4:35 
GeneralRe: is it possible to get warning message from UINT value mismatched? Pin
includeh1020-Sep-09 4:43
includeh1020-Sep-09 4:43 
GeneralRe: is it possible to get warning message from UINT value mismatched? Pin
Richard MacCutchan20-Sep-09 5:10
mveRichard MacCutchan20-Sep-09 5:10 
GeneralRe: is it possible to get warning message from UINT value mismatched? Pin
includeh1020-Sep-09 5:20
includeh1020-Sep-09 5:20 
GeneralRe: is it possible to get warning message from UINT value mismatched? Pin
KarstenK21-Sep-09 2:56
mveKarstenK21-Sep-09 2:56 
QuestionDifferent results with debug and release version of simulation program Pin
mass8520-Sep-09 3:37
mass8520-Sep-09 3:37 
AnswerRe: Different results with debug and release version of simulation program Pin
Chris Losinger20-Sep-09 4:08
professionalChris Losinger20-Sep-09 4:08 
GeneralRe: Different results with debug and release version of simulation program Pin
mass8520-Sep-09 4:23
mass8520-Sep-09 4:23 
GeneralRe: Different results with debug and release version of simulation program Pin
Richard MacCutchan20-Sep-09 4:33
mveRichard MacCutchan20-Sep-09 4:33 
GeneralRe: Different results with debug and release version of simulation program Pin
mass8520-Sep-09 4:46
mass8520-Sep-09 4:46 
GeneralRe: Different results with debug and release version of simulation program Pin
Richard MacCutchan20-Sep-09 5:00
mveRichard MacCutchan20-Sep-09 5:00 
GeneralRe: Different results with debug and release version of simulation program Pin
mass8520-Sep-09 5:24
mass8520-Sep-09 5:24 
GeneralRe: Different results with debug and release version of simulation program Pin
Richard MacCutchan20-Sep-09 7:20
mveRichard MacCutchan20-Sep-09 7:20 
GeneralRe: Different results with debug and release version of simulation program Pin
mass8520-Sep-09 9:47
mass8520-Sep-09 9:47 
OK. I've changed conditional statement, so there's no upLinkRatio variable just constant value 0.2. And I also added cout<<temp;

the result="" is="" quite="" strange.="" most="" of="" the="" temp="" values="" are="" 0...="" which="" course="" incorrect.="" do="" you="" know,="" what="" might="" be="" reason="" for="" that?="" i="" will="" looking="" anything="" suspicious="" in="" generator,="" but="" it="" hard="" to="" find...="" example="" function="" gettimebe="" returns="" correct="" values.

here="" parts="" code="" that="" can="" affect="" beload="" from="" generator="" (this="" class="" used="" generate="" pseudo="" random="" numbers):
<pre="">
class Generator{
private:
int a, h, q, r, m;
int *coreCRC;
int **coreCW;
int *coreTimeBE;
int *coreTimeBK;
int *coreUpLinkRatio;
int *coreBurst;
int *corePacket;

int uniform(int X){
h = int ( double (X) / q );
X = a*(X - q*h) - r*h;
if (X < 0) X = X + m;
return X;
}

public:
double getTimeBE(int staAddress, double intensity){
int x = uniform(coreTimeBE[staAddress]);
coreTimeBE[staAddress] = x;
return (-1/intensity * log(double(x)/m));
}
double getUpLinkRandom(int staAddress){
int x = uniform(coreUpLinkRatio[staAddress]);
coreUpLinkRatio[staAddress] = x;
return double(x)/m;
}
void initialize(){
coreCW = new int*[staNr];
coreUpLinkRatio = new int[staNr];
coreBurst = new int[staNr];
coreTimeBE = new int[staNr];
coreTimeBK = new int[staNr];
corePacket = new int[staNr];
for(int i = 0; i < staNr; i++) coreCW[i] = new int[AC];


coreCRC = new int[staNr];
int x = 17;
int msgs = int (5*msgsToObserve*(1 + transientPhase/simTime));
for (int i = 0; i < staNr; i++){
for(int j = 0; j < AC; j++){
coreCW[i][j] = x;
for(int k = 0; k < (runsNr*(10*msgs + 3*shift + runShift)); k++)
x = uniform(x);
}
}
////////////////
// code omitted
///////////////
for(int i = 0; i < AC; i++){
coreUpLinkRatio[i] = x;
for(int j = 0; j < (runsNr*(2*beMsgsToObserve + shift + runShift)); j++)
x = uniform(x);
}
}
Generator() : a(69621), q(30845), r(23902), m(2147483647) {}
};

GeneralRe: Different results with debug and release version of simulation program Pin
CPallini20-Sep-09 10:01
mveCPallini20-Sep-09 10:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.