cancel
Showing results for 
Search instead for 
Did you mean: 

defect product doesnot change its integer value

Pioneer
Pioneer

I have modelled the machine to generate defect product.

here i have defined integer value 1 for defect product and integer value 2 for non defect..

 

but it generates only one type , even i have randomised

 

thank you for your help.

2 REPLIES

Re: defect product doesnot change its integer value

Genius
Genius

Hello Cplex,

 

please use the below program & change the data type of the attribute 'defekt' to 'real'  for the part 'a'.

var defekt : real
@.defekt := z_uniform(1,0,1);
if @.defekt > 0 and @.defekt<= 0.2 then
	@.defekt := 1
elseif @.defekt >0.2 then
	@.defekt :=2
end

 

Thanks & Best Regards,

Abhilash Sridhar.

 

Thanks & Best Regards,
Abhilash Sridhar
Mercedes Benz R&D India, Daimler AG

Re: defect product doesnot change its integer value

Phenom
Phenom

I have changed the names of the variables:

 

var rand : real
rand := z_uniform(1,0,1)
if  rand <= 0.2 then
	@.defekt := 1
else
	@.defekt :=2
end

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net