Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7563743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:44:28+00:00 2026-05-30T13:44:28+00:00

I am developing a simulation in NetLogo that will ultimately have multiple permutations. In

  • 0

I am developing a simulation in NetLogo that will ultimately have multiple permutations. In the end, I’ll have Sim1.nlogo, Sim2.nlogo, Sim3.nlogo, et cetera all including libsim.nls.

What I’d like to know is, if I have a function in libsim.nls that is identical in all but one of my models, can I overload it in the model that differs, or will I have to duplicate the code manually in each permutation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T13:44:29+00:00Added an answer on May 30, 2026 at 1:44 pm

    The exact thing you’re asking for isn’t possible. But you don’t need to duplicate code in all of the models, either.

    I’d suggest the following approach. In libsim.nls, give the standard implementation a standard name like foo-standard. Then in Sim1.nlogo and Sim2.nlogo you can have the one-liner to foo foo-standard end, and in Sim3.nlogo you can have to foo ... end with a different body, that doesn’t call the “standard” implementation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an android application, and I have a button which starts/pauses certain simulation
I have an iPad application that I have been developing on simulator just fine
Situation: I have a calculator that I'm developing using these formulas: // --- Math
I'm developing a OpenGL based simulation in C++. I'm optmizing my code now and
In my work, I'm developing a Viewer client for a Offshore simulation server, using
I am developing an application simulating a network comprising a number of nodes that
My situation is that I'm developing a C# application which is launching an instance
I have following situation: I'm developing an address-application to store the details of our
I'm about to start developing a game that's main feature revolves around 2D water
I have been working on a java simulation game for some time (remaking theme

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.