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


About WEAP

Home
Why WEAP?
Features
What's New?
Sample Screens
Demonstration
Publications
History and Credits

Using WEAP
Download
Licensing
User Guide
Tutorial
Videos (YouTube)

User Forum
Discussions
Members List
Edit Profile

Additional Support
Training
University Courses
Collaboration

About Us
SEI-US Water Resources Program
Please Contact Us

LEAP
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: 10107 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: 10100 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"