Stream: helpdesk (published)

Topic: Custom Type 'Resource'


view this post on Zulip qu bit (Apr 04 2021 at 11:51):

Hello Everyone:

Stage:
Windows 10 64-bit
Julia v 1.6.0
using SimJulia, Distributions

Does anyone know what the 'Resource' data type
has been updated to (from version 0.6.x)?

I am attempting to execute a counter
as part of the following instructions

rand(100);
    sim = Simulation(Int(16));
    k = Resource(sim, "Counter", Int8(1), false);
    s = Process(sim, "Source");
    activate(s,
             0.0,
             generate,
             max_number,
             mean_prep_time,
             mean_haircut_time,
             k,
             max_queue);

And am returning,

UndefVarError: Resource not defined

The goal is to:

run(sim, max_time)

Any suggestions? (Perhaps Resource >> StepRange)

view this post on Zulip Andrey Oskin (Apr 04 2021 at 12:01):

Presumably it was defined earlier in the tutorial where you took this snippet.

view this post on Zulip qu bit (Apr 04 2021 at 12:04):

Andrey Oskin

It was but that returns an error also --
I believe the 'Resource' datatype has
been discontinued since 2016.


Last updated: Oct 02 2023 at 04:34 UTC