Welcome to WEAP's Website WEAP
WEAP is an initiative of the Stockholm Environment Institute.

About WEAP

What's New?
Sample Screens
History and Credits

Using WEAP
User Guide
Videos (YouTube)

User Forum
Members List
Edit Profile

Additional Support
University Courses

About Us
SEI-US Water Resources Program
Please Contact Us

Environmental News
'Subterranean estuaries' crucial to sustainable fishing and aquacultur...
Pioneering research suggests 'subterranean estuaries' may be critical in managing sustainable fishing and aquaculture --...

Chemicals from human activities in transplanted oysters far from popul...
Wastewater treatment facilities clean the water that goes down our sinks and flushes our toilets, but they do not remove...

Antarctic Circumpolar Current flows more rapidly in warm phases
Our planet's strongest ocean current, which circulates around Antarctica, plays a major role in determining the transpor...
Source: Science Daily
Interested in Energy?
Read about LEAP: SEI's software for energy planning.

Link WEAP and LEAP for combined Water-Energy planning.
Watch a video demo!

User Forum

All Topics | Topic "Scripting"
Log in to post new messages or reply to existing messages.
Author Message
Mr. s.mostafa mousavi

Subject: Scripting   
Posted: 6/24/2017 Viewed: 6334 times
dear friends Hi
I want to optimize some parameters.for do it, i must change "Monthly Demand" for Demand Area continuously.
if I determine one value for all parts , system will run successfully. for example:
WEAP.Branch("Demand Sites\Drink TRKminestan").Variables("Monthly Demand").Expression=26
but if I determine diffrent value for various parts , system shows Error window. for example:
WEAP.Branch("Demand Sites\Drink TRKminestan").Variables("Monthly Demand").Value(BaseYear ,5)=26
please help me how can solve this problems.
thank you for your aid
best regards
Mr. Jack Sieber

Subject: Re: Scripting   
Posted: 6/28/2017 Viewed: 6328 times
You can change expressions, but not individual values. WEAP uses one expression for all months of the Current Accounts, and one expression per scenario for all the months of each scenario. Therefore, if you want to change the value by month, you will either need to write an expression that varies by month, such as with the MonthlyValues function, or by reading in values from a CSV file using the ReadFromFile function.
Topic "Scripting"