[erlang-questions] Unable to call functions that are in a module in the same location
Yves S. Garret
yoursurrogategod@REDACTED
Sun Aug 17 15:33:21 CEST 2014
This is it:
-record(sensor,
{id, name, cx_id, scape, vl, fanout_ids = [], generation}).
-record(actuator,
{id, name, cx_id, scape, vl, fanin_ids = [], generation}).
-record(neuron,
{id, generation, cx_id, af, input_idps = [], output_ids = [], ro_ids =
[]}).
-record(cortex,
{id, agent_id, neuron_ids = [], sensor_ids = [], actuator_ids = []}).
-record(agent,
{id, generation, population_id, specie_id, cx_id, fingerprint, constraint,
evo_hist = [], fitness, innovation_factor = 0, pattern = []}).
-record(specie,
{id, population_id, fingerprint, constraint, agent_ids = [],
champion_ids = [], dead_pool = [], fitness, innovation_factor = 0}).
-record(population,
{id, polis_id, specie_ids = [], morphologies = [], innovation_factor}).
-record(constraint,
{morphology = xor_mimic, neural_afs = [tanh, cos, gauss, abs]}).
On Sat, Aug 16, 2014 at 2:35 AM, Steve Strong <steve@REDACTED> wrote:
> I'm guessing that this:
>
> Morphology = SpecCon#constraint.morphology,
>
>
> Is setting Morphology to 'undefined' - that's what the stack trace looks
> to be saying.
>
> Cheers,
>
> Steve
>
> Sent from my iPhone
>
> On 16 Aug 2014, at 04:54, "Yves S. Garret" <yoursurrogategod@REDACTED>
> wrote:
>
> Hello,
>
> This is my code:
> https://gist.github.com/anonymous/5b9b2c55a7684f5386e2
>
> When I run my code inside of erlang (17.0), this is the error that I get:
> 7> genotype:create_test().
> {aborted,{undef,[{morphology,undefined,[sensors],[]},
> {morphology,get_InitSensors,1,
> [{file,"morphology.erl"},{line,8}]},
> {genotype,construct_Cortex,3,
> [{file,"genotype.erl"},{line,41}]},
> {genotype,construct_Agent,3,
> [{file,"genotype.erl"},{line,20}]},
> {genotype,'-create_test/0-fun-0-',0,
> [{file,"genotype.erl"},{line,434}]},
>
> {mnesia_tm,apply_fun,3,[{file,"mnesia_tm.erl"},{line,833}]},
> {mnesia_tm,execute_transaction,5,
> [{file,"mnesia_tm.erl"},{line,813}]},
>
> {erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,661}]}]}}
>
> genotype.erl and morphology.erl are in the directory, so why can't
> genotype's function call morphology's functions? Or am I missing something
> else entirely?
>
> Thanks.
>
> _______________________________________________
>
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140817/f70c7797/attachment.htm>
More information about the erlang-questions
mailing list