1

I am trying to compute the max{} within a report statement in netlogo.

I currently have the following expression:

report bestBid + (max{cost, bestAsk}- bestBid)/n 

I intend to report a bid to a procedure requiring a bid to be submitted.

1 Answer 1

1

max only works on lists, so you need to put the values in a list:

max list cost bestAsk 

you might decide it reads a bit better with parentheses:

max (list cost bestAsk) 
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you Seth, it actually makes a lot of sense. I presume I can use the same thought when dealing with min?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.