Showing results for 
Search instead for 
Did you mean: 

PLS 13 Different process times (uniform and constant)




I am working with the 13 edition of PLS, where the "is, do and end;" is incorporated in the software, but how do I convert the following method to this version. 


For the same process, I have an uniform process time of uniform(4, 20min., 26min.) for A1 and a constant process of 20 min. for A2. In the previous PLS version the following code should work, but how do I call it in vers. 13, where the "is, do end end;" is deleted. It says error with the ":time". 





  if @.Name="A1" then

        return z_uniform(4, 1200, 1560);

   elseif @.Name="A2" then
        return 1200;


 Hope you can help, thanks!


Best regards


Re: PLS 13 Different process times (uniform and constant)


The code where there is  "is, do end" is called simtalk 1.0


and the code where there is no "is, do end" is called simtalk 2.0


and  looks like this for your posted simtalk 1.0 code :


-> time
if @.Name="A1" return z_uniform(4, 1200, 1560) elseif @.Name="A2" return 1200 end

Re: PLS 13 Different process times (uniform and constant)

Gears Phenom Gears Phenom
Gears Phenom



If you wish to use SimTalk 1.0 still as this is what you are use to then when you are in the method, go to:


Method -> Tools -> Options -> New Syntax


And click that button so the background is white and it should then start using the old form of programing. Alternativly there is an attribute called 'UsingNewSyntax' which if you set to false will then use SimTalk 1.0 as well.



Saying all of this, I still do recomend that you learn the new SimTalk 2.0 syntax as that has more features like default values for parameters which can come in handy when creating general methods for your model.


James Mason