Skip to content

Elevator cost function that can also be used in elixir (Like all erlang code)

License

Notifications You must be signed in to change notification settings

jornbh/erlang_cost_function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cost-function for Erlang (And elixir)

If you have something to separate your elevators from each other (When using =:=), you can get the cost for taking an order by:

1> cost_function:get( {"My elevator", 1, up}, {"Other elevator", 1, hall_down}, 4).
6
>2 

Downloading does not work for elixir yet.

To add the cost-function to a rebar3-project, simply add the line/modify the deps-part of rebar.config to look like:

{deps, [
    {cost_function, {git, "https://github.com/jornbh/erlang_cost_function", {tag, "v0.1.1"}}}
]}.

If you want to use the library in an Elixir-project, modify deps() in mix.exs, so that it includes:

  defp deps do
    [

      {:cost_function, git: "https://github.com/jornbh/erlang_cost_function", tag: "v0.1.1"},

    ]
  end

There is slightly more info on how the module works in the documentation generated by rebar3 edoc.

About

Elevator cost function that can also be used in elixir (Like all erlang code)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages