Are there any guide line to run sample-broker?

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Are there any guide line to run sample-broker?

Tony
I downloaded package of sample-broker. But I do know how to run sample-broker. I would like to run it before I think to design my broker. Thank you in advance!
Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

grampajohn
Administrator
Tony and all -
Tony wrote
I downloaded package of sample-broker. But I do know how to run sample-broker.
Details on how to run the sample broker are given in its README file. To make it a bit easier, I have substantially updated the Getting Started page to describe how to use the visualizer and command-line interfaces on both the server and the sample broker. Please let me know if this meets your needs.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

tony2010
Hi John,

After running server succeffully by using command mvn jetty:run or STS, I successfully accessed http://localhost:8080/visualizer to get started. But when I am running the sim mode or bootstrap mode, the message I got is simulation started, but the game status does not change to running. Although I read the link which gave me as well as go to your forum to find the error which I have, I have still not solved it. I would like to present my some difficulties to you as follows:

1. In bootstrap mode,  I put bootstrap filename with name which I like for example abc and then, I run. The result is bootstrap stated but game status is not running.

2. In sim mode, I do not know where a bootstrap-data stay. Thus if it is empty in input Bootstrap data box, the result is ERROR: bootstrap data source not given.

3. I read a message in your forum and you said that we should run command mvn -Pweb before we run command mvn jetty:run. I run it in visualier direction and there are some happened errors. Furthermore, I do not know how to run the command mvn =-Pweb in STS

4. suppose that I successfully run the sim mode or bootstrap mode, Can you tell me to way to recognize brokers are activated.

5. I would like to run sample-broker in visualier but I have still not run it.

Thanks you in advance!
Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

grampajohn
Administrator
Hello, Tony -

I am sorry you are having so much trouble, and I hope you can help us improve the documentation so the next new user will have an easier time getting started.
Tony wrote
After running server successfully by using command mvn jetty:run or STS, I successfully accessed http://localhost:8080/visualizer to get started. But when I am running the sim mode or bootstrap mode, the message I got is simulation started, but the game status does not change to running. Although I read the link which gave me as well as go to your forum to find the error which I have, I have still not solved it. I would like to present my some difficulties to you as follows:
At the command line, you should not be using mvn jetty:run to start the embedded visualizer, but rather mvn -Pweb. I would be interested to know if we still have documentation somewhere that says to use mvn jetty:run. If so, it is out of date and we need to fix it.

In sim mode, the status will not change to "running" until all the brokers you have specified have logged in. In boot mode, I'm not sure why it would not switch, unless it was unable to open its output file or its log files.
1. In bootstrap mode,  I put bootstrap filename with name which I like for example abc and then, I run. The result is bootstrap stated but game status is not running.
Almost certainly, a filename with embedded spaces will not work, unless you somehow escape the spaces. And I don't know whether the escape characters would survive through the html form input.
2. In sim mode, I do not know where a bootstrap-data stay. Thus if it is empty in input Bootstrap data box, the result is ERROR: bootstrap data source not given.
The file should be created in the current working directory. If you are using mvn -Pweb from the command line, then it will be in the same directory with the pom.xml file. If you are running from STS, then it will be in the top-level directory of whatever project you are running from (most likely the visualizer project if you are using the visualizer, otherwise the server-main project).
3. I read a message in your forum and you said that we should run command mvn -Pweb before we run command mvn jetty:run. I run it in visualier direction and there are some happened errors. Furthermore, I do not know how to run the command mvn =-Pweb in STS
As I said, you should not be using the jetty:run command for maven. If you look at the pom.xml, you can see that the jetty command is embedded in the "web" profile, which means all you need to do is mvn -Pweb.

I don't know of a way to use maven commands directly in STS. It's probably possible, but I've never tried it. Perhaps someone else in this group could tell us how it's done? I always use maven from a command-line interface, but then I am an old guy for whom this newfangled WIMP stuff is just ... wimpy.
4. suppose that I successfully run the sim mode or bootstrap mode, Can you tell me to way to recognize brokers are activated.
The broker, like the server, generates log files as it runs, in its log subdirectory. I often do tail -f log/broker1.trace to see what the broker is doing. The server also generates log files as it runs, of course. If one or the other seems stalled, you can usually see why by looking at the end of the trace log file.
5. I would like to run sample-broker in visualizer but I have still not run it.
I am not sure what you mean by this. The sample broker does not run "in" the visualizer. You start the server, with or without the visualizer, and you start the broker, as a separate process, possibly on a different machine. The value of jmsBrokerUrl in both the server and broker have to match. The default is localhost.

Does this help?

John

Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

tony2010
Hi John,

Thank you for giving me your guidance. As you said I should not run command mvn jetty:run and I shoud run command mvn -Pweb in visualizer direction. There are some happened errors with this command mvn -Pweb. The capacity of memory in my desktop is 3.5GB. I do not know whether the capacity of memory in my desktop is appropriate for the simuation. In particular, these errors are shown as follows.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.313s
[INFO] Finished at: Wed Nov 14 11:07:51 EST 2012
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "web" could not be activated because it does not
 exist.
[ERROR] No goals have been specified for this build. You must specify a valid li
fecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id
>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are
: validate, initialize, generate-sources, process-sources, generate-resources, p
rocess-resources, compile, process-classes, generate-test-sources, process-test-
sources, generate-test-resources, process-test-resources, test-compile, process-
test-classes, test, prepare-package, package, pre-integration-test, integration-
test, post-integration-test, verify, install, deploy, pre-clean, clean, post-cle
an, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifie
dException
'cmd' is not recognized as an internal or external command,
operable program or batch file.
C:\Documents and Settings\dtl844\Desktop\powertac-server\visualizer>

Thank you in advance!
Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

grampajohn
Administrator
Tony -

OK, I think I see your problem.
Tony wrote
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
...
C:\Documents and Settings\dtl844\Desktop\powertac-server\visualizer>
The problem is that you are in the wrong directory. Each module has a pom.xml file, but within the individual modules they mostly serve to build, assemble, and deploy their respective modules. That's the case with the visualizer module. To run the server outside of STS, you need to be in the directory where you unpacked the server package that you can get from the download page. If you are working from a source environment, that's the server-distribution directory inside the powertac-server project. That's where the README file is, and that's where it's going to put the bootstrap data file and the logfiles.

It's probably possible to run the visualizer from the visualizer project inside STS, but that would require that you set up a jetty server in the STS environment. I've never figured out how to make that work, so I don't use that method. Perhaps someone else in the group knows. But it's not possible to run the visualizer using the command line from inside the visualizer project, as far as I know. You have to use the server-distribution setup.

Does this help?

John
Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

grampajohn
Administrator
Tony -

I now see that you have been trying to follow the README in the visualizer. We'll get that updated. I had forgotten there was a README in that project, even though it's entirely possible that I wrote it. It is definitely out of date. We apologize for the confusion.

John
Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

tony2010
Hi John,

Thank you for quick response.

I successfully run -Pweb command which you gave me. I have other difficulty. I presented it in detail as follows:

1. Downloaded two packages from your website including powertac-server-0.6.3-SNAPSHOT, Sample-broker.
2. I implement visualizer by this command; mvn -Pweb in server-distribution. And start sim. by adding this argument;
- input Bootstrap data : config/bootstrap.txt (which I already made)
- JMS URL :  (empty)
- Brokers > Add Sample1 and Sample2.

And then click the Run button.
Next, implement this command.
sample-broker - mvn compile exec:exec -Dexec.args="--config broker.properties"

Game status is successfully running. But screen output in game overview only show two broker names and the name of two brokers is the same name called default broker. One default broker has successfully run through changing number in Cash Balance, Engergy Balance and Subs. But other default broker is zero of Cash balance, Energey Balance, and Subs. It is correct that there are three are three brokers in game overview, their name are default broker, Sample 1, Sample 2 and there brokers successfully run through through changing number in Cash Balance, Engergy Balance and Subs.

Thank you in advance.

I am looking forward to hearing from you reply.

Best wishes!
Tony


Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

grampajohn
Administrator
Hello, Tony -
tony2010 wrote
...
2. I implement visualizer by this command; mvn -Pweb in server-distribution. And start sim. by adding this argument;
- input Bootstrap data : config/bootstrap.txt (which I already made)
- JMS URL :  (empty)
- Brokers > Add Sample1 and Sample2.
This assumes you will start up two brokers, and that one of them will have username set to Sample1 in its broker.properties file, and the other will have username = Sample2.
And then click the Run button.
Next, implement this command.
sample-broker - mvn compile exec:exec -Dexec.args="--config broker.properties"
I assume this means you use the mvn command in the top-level directory of sample-broker, correct?
Game status is successfully running. But screen output in game overview only show two broker names and the name of two brokers is the same name called default broker. One default broker has successfully run through changing number in Cash Balance, Engergy Balance and Subs. But other default broker is zero of Cash balance, Energey Balance, and Subs. It is correct that there are three are three brokers in game overview, their name are default broker, Sample 1, Sample 2 and there brokers successfully run through through changing number in Cash Balance, Engergy Balance and Subs.
This does not make sense. I would like to know what brokers actually logged in. The information is in the server's trace log, in the file log/powertac-sim-0.trace relative to the directory where you are running the server. You can use the command

  grep 'Log in broker' log/powertac-sim-0.trace

and let us know what you find.

Thanks.

John
Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

Tony
Hi John,

Thank you for your help. I successfully run the simulation. Although I run the simulation, I have not still understood all activities of brokers. In particular, I do not know how brokers work to gain the number of cash balance, energy balance and subscriptions. Please give me some advice so that I understand all activities of brokers as soon as posible because this is first time to study Power TAC. So, it is too hard for me.

Thank you in advance!

Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

grampajohn
Administrator
Hello, Tony -
Tony wrote
... I have not still understood all activities of brokers. In particular, I do not know how brokers work to gain the number of cash balance, energy balance and subscriptions.
Chapter 3 of the specification has a good list of the things brokers can do, including offering tariffs, trading in the wholesale market, and interacting with the balancing market. The code in the org.powertac.samplebroker package of the sample broker is an example of a complete but simple broker that does most of those things to a minimal extent. The communication with the server is through JMS messages that contain instances of the various types in the common module, some of which you create and send to the server (TariffSpecification, Rate, Order, etc.) and some of which the server sends to you.

Basically, you want to offer tariffs that customer will subscribe to, then make sure you purchase (and sell) enough power in the wholesale market to meet your customers' demands. Obviously you want to maximize the spread between the prices you pay for power and the prices you are paid, and you want to minimize other charges, like balancing charges.

Does this help? Others in the group are invited to offer suggestions as well, of course.

Cheers -

John

Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

tony2010
Hi John,

Thank you for your help. I have following difficulty and I need your help.

I successfully setted up and run the simulation in my laptop as you know. My laptop run windown 7 and Memory is 3GB. Today, I would like to set up and run the simulation in my desktop because the desktop is convenient for me to study. My desktop run windwon XP, and Memory is 3.5GB. Although I understand the process of setting up and running the simulation, there is some errors in my desktop.

In particular, I successfully run mvn -Pweb command in my desktop and then I go to visualizer to run a boot session to create bootstrap.txt but game status is not running and there are some following errors.

34875 [Thread-9] INFO org.apache.activemq.broker.BrokerService - ActiveMQ JMS Me
ssage Broker (simJmsProvider, ID:info-28y792s-1416-1353633875296-0:1) started
Exception in thread "InactivityMonitor WriteCheck" java.lang.OutOfMemoryError: J
ava heap space
        at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:88)

Exception in thread "ActiveMQ Broker[simJmsProvider] Scheduler"         at java.
util.zip.ZipFile$ZipFileInflaterInputStream.<init>(ZipFile.java:387)
        at java.util.zip.ZipFile.getInputStream(ZipFile.java:368)
        at java.util.jar.JarFile.getManifestFromReference(JarFile.java:184)
        at java.util.jar.JarFile.getManifest(JarFile.java:165)
        at sun.misc.URLClassPath$JarLoader$2.getManifest(URLClassPath.java:756)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:416)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
Exception in thread "Thread-9"  at org.mortbay.jetty.webapp.WebAppClassLoader.lo
adClass(WebAppClassLoader.java:392)
        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade
r.java:363)
        at org.apache.activemq.transport.AbstractInactivityMonitor.writeCheck(Ab
stractInactivityMonitor.java:142)
        at org.apache.activemq.transport.AbstractInactivityMonitor$2.run(Abstrac
tInactivityMonitor.java:111)
        at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.
java:33)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2245)
        at java.util.Arrays.copyOf(Arrays.java:2219)
        at java.util.Vector.grow(Vector.java:262)
        at java.util.Vector.ensureCapacityHelper(Vector.java:242)
        at java.util.Vector.add(Vector.java:778)
        at org.powertac.officecomplexcustomer.persons.Person.normalFill(Person.j
ava:271)
        at org.powertac.officecomplexcustomer.persons.Person.fillDailyRoutine(Pe
rson.java:251)
        at org.powertac.officecomplexcustomer.persons.PeriodicPresentPerson.refr
esh(PeriodicPresentPerson.java:96)
        at org.powertac.officecomplexcustomer.customers.Office.refresh(Office.ja
va:1057)
        at org.powertac.officecomplexcustomer.customers.Office.initialize(Office
.java:207)
        at org.powertac.officecomplexcustomer.customers.OfficeComplex.initialize
(OfficeComplex.java:290)
        at org.powertac.officecomplexcustomer.OfficeComplexCustomerService.initi
alize(OfficeComplexCustomerService.java:237)
        at org.powertac.server.CompetitionControlService.configurePlugins(Compet
itionControlService.java:590)
        at org.powertac.server.CompetitionControlService.setup(CompetitionContro
lService.java:350)
        at org.powertac.server.CompetitionControlService.runOnce(CompetitionCont
rolService.java:303)
        at org.powertac.server.CompetitionSetupService$1.run(CompetitionSetupSer
vice.java:376)
java.lang.OutOfMemoryError: Java heap space
        at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:88)

        at java.util.zip.ZipFile$ZipFileInflaterInputStream.<init>(ZipFile.java:
387)
        at java.util.zip.ZipFile.getInputStream(ZipFile.java:368)
        at java.util.jar.JarFile.getManifestFromReference(JarFile.java:184)
        at java.util.jar.JarFile.getManifest(JarFile.java:165)
        at sun.misc.URLClassPath$JarLoader$2.getManifest(URLClassPath.java:756)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:416)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade
r.java:392)
        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade
r.java:363)
        at org.apache.activemq.broker.region.Topic$6.run(Topic.java:683)
        at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.
java:33)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)


I am looking forward to hearing from you.

Thank you in advance!

Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

grampajohn
Administrator
Hello, Tony -
tony2010 wrote
I successfully run mvn -Pweb command in my desktop and then I go to visualizer to run a boot session to create bootstrap.txt but game status is not running and there are some following errors.

34875 [Thread-9] INFO org.apache.activemq.broker.BrokerService - ActiveMQ JMS Me
ssage Broker (simJmsProvider, ID:info-28y792s-1416-1353633875296-0:1) started
Exception in thread "InactivityMonitor WriteCheck" java.lang.OutOfMemoryError: J
ava heap space
        at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:88)
...
I believe Daniel has had the same problem; he found a bigger machine to run on. The answer is to increase the memory allocation for the mvn/jetty process (I believe maven runs jetty in its jvm rather than forking). I have heard a rumor that there's a way to do this inside the pom.xml file, but I don't know how to do it. In the meantime, there's an article on stackoverflow that shows a way to do it. I would suggest at least 1024 Mb.

Please let me know if this works, and if someone knows how to set the memory allocation inside the pom.xml, please let us know. I have not had time to chase it down.

Thanks.

John
Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

tony2010
Hi John,

Thank you for quick response. My error is related to out of memory. I read your guidance to fix this error. In particular, the result is presented as follows.

1. I set environment variable MAVEN_OPTS and then, I set MAVEN_OPTS="-Xmx1024"
2. I successfully run mvn -Pweb and then I go to visualizer and successfully run a boot session to create bootstrap.txt. But I can not run sample-broker. In particualr, if I set environment variable MAVEN_OPTS, sample-broker can not run.

I am looking forward to hearing from you,

Thank you in advance!
Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

grampajohn
Administrator
Hello again, Tony -

I have just a few minutes this morning, but I have some thoughts...
tony2010 wrote
1. I set environment variable MAVEN_OPTS and then, I set MAVEN_OPTS="-Xmx1024"
2. I successfully run mvn -Pweb and then I go to visualizer and successfully run a boot session to create bootstrap.txt. But I can not run sample-broker. In particualr, if I set environment variable MAVEN_OPTS, sample-broker can not run.
So setting MAVEN_OPTS gets the jetty version running. Then you are running your browser to interact with it, and you go to start the broker. But of course MAVEN_OPTS is still set, and now the broker wants 1024 Mb for Maven and another 1024 Mb for the broker itself. Probably that won't work given your memory limitations. You could get some more memory, or you could play with the memory allocations in both the server and broker (see how little they really need to run successfully), or you could run the broker on a different machine. It might even be enough to run your browser on a different machine.

If you want to run the broker on a different machine, you will have to change the jmsBrokerUrl in both the server and broker. The default setting is 'tcp://localhost:61616'. To run the server and broker on separate machines, you have to change localhost to the hostname (or ip address) of the machine running the server. It needs to be changed on both sides; in the broker it's in the broker.properties file, in the server it's in config/server.properties. You may have to uncomment it as well as changing the value.

Let us know if this helps. I'll try to check back this evening, but I will be out most of the day today.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

tony2010
Hi John,

Thank you for your help. My simulation is sucessfully run in my desktop because I setted up windown 7-64bit. Now I have a difficulty and need your help. This difficulty is presented as follows.

1. Downloaded two packages from your website including powertac-server-0.6.3-SNAPSHOT, Sample-broker.

2. I successfully run server by using -Pweb command which you gave me.

3. I run two sample brokers by using - mvn compile exec:exec -Dexec.args="--config broker.properties"

4. I go visualizer and put some arguments in web as follows:

- input Bootstrap data : config/bootstrap.txt (which I already made)
- JMS URL :  (empty)
- Brokers > Add Sample1 and Sample2.

And then click the Run button. Game status is successfully running. But screen output in game overview
is that default broker work well but Cash Balance, Engergy Balance and Subs in Sample 1 and Sample 2 brokers are zero and no change. Sometimes Sample 1 and Sample 2 brokers work well. I do not know how to fix it.

I am looking forward to hearing from you,

Best regards,
Tony


only show two broker names and the name of two brokers is the same name called default broker. One default broker has successfully run through changing number in Cash Balance, Engergy Balance and Subs. But other default broker is zero of Cash balance, Energey Balance, and Subs. It is correct that there are three are three brokers in game overview, their name are default broker, Sample 1, Sample 2 and there brokers successfully run through through changing number in Cash Balance, Engergy Balance and Subs.

Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

grampajohn
Administrator
Hi, Tony -
Tony wrote
2. I successfully run server by using -Pweb command which you gave me.

3. I run two sample brokers by using - mvn compile exec:exec -Dexec.args="--config broker.properties"

4. I go visualizer and put some arguments in web as follows:

- input Bootstrap data : config/bootstrap.txt (which I already made)
- JMS URL :  (empty)
- Brokers > Add Sample1 and Sample2.

And then click the Run button. Game status is successfully running. But screen output in game overview
is that default broker work well but Cash Balance, Engergy Balance and Subs in Sample 1 and Sample 2 brokers are zero and no change. Sometimes Sample 1 and Sample 2 brokers work well. I do not know how to fix it.
It is very hard to understand what is happening with this information. One thing you might try immediately is to use broker names without spaces, like "Sample1" instead of "Sample 1". I seem to recall we've had a problem with that, and we don't have a test to confirm that broker usernames with embedded spaces actually work.

If you want my help, I suggest you post the server and broker logs somewhere and send me a link (privately if you prefer) so I can see what is going on. You might want to try tracking it down yourself first; the broker logs record all the messages sent and received, so you can see whether your brokers are submitting valid tariffs - the server will respond with a tariff-status message that says "success". You can also see the login interactions, tariff submissions, and customer subscriptions in the server's trace log.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

LEE SEHOON
Hi John and Tony,

I also have a same problem and it is because the invalid tariff.

When I try to run the game with STS or mvn argument , -Pcli ... ' , it works right.

But using the visualizer with "- Pweb" argument, the tariff status is InvalidTariff


I used both sample broker for all the case.

Here is my log about tariff.

--------------------------------------------------------------------------------
1. using "mvn -Pcli"


7lfih5<tariff-spec id="200000391" minDuration="0" powerType="CONSUMPTION" signupPayment="0.0" earlyWithdrawPayment="0.0" periodicPayment="-1.0">
  <broker>Sample1</broker>
  <rates>
    <rate id="200000392" tariffId="200000391" weeklyBegin="-1" weeklyEnd="-1" dailyBegin="-1" dailyEnd="-1" tierThreshold="0.0" isFixed="true" minValue="-0.12959738618377628" maxValue="0.0" noticeInterval="0" expectedMean="0.0" maxCurtailment="0.0">
      <rateHistory/>
    </rate>
  </rates>
</tariff-spec>
...................................................................................................................................
<tariff-status id="1552" tariffId="200000391" updateId="200000391" status="success">
  <broker>Sample1</broker>
</tariff-status>



---------------------------------------------------------------------------------------------------
2. using STS

lf79hc<tariff-spec id="200000391" minDuration="0" powerType="CONSUMPTION" signupPayment="0.0" earlyWithdrawPayment="0.0" periodicPayment="-1.0">
  <broker>Sample1</broker>
  <rates>
    <rate id="200000392" tariffId="200000391" weeklyBegin="-1" weeklyEnd="-1" dailyBegin="-1" dailyEnd="-1" tierThreshold="0.0" isFixed="true" minValue="-0.13170374562178022" maxValue="0.0" noticeInterval="0" expectedMean="0.0" maxCurtailment="0.0">
      <rateHistory/>
    </rate>
  </rates>
</tariff-spec>
.....................................................................................................................................

<tariff-status id="1546" tariffId="200000388" updateId="200000388" status="success">
  <broker>Sample1</broker>
</tariff-status>



--------------------------------------------------------------------------------------------------
3. Using visualizer , Pweb

ot7gll<tariff-spec id="200000388" minDuration="0" powerType="CONSUMPTION" signupPayment="0.0" earlyWithdrawPayment="0.0" periodicPayment="-1.0">
  <broker>Sample1</broker>
  <rates>
    <rate id="200000389" tariffId="200000388" weeklyBegin="-1" weeklyEnd="-1" dailyBegin="-1" dailyEnd="-1" tierThreshold="0.0" isFixed="true" minValue="-0.13095422589686553" maxValue="0.0" noticeInterval="0" expectedMean="0.0" maxCurtailment="0.0">
      <rateHistory/>
    </rate>
  </rates>
</tariff-spec>

........................................................................................................................



<tariff-status id="1527" tariffId="200000388" updateId="200000388" status="invalidTariff">
  <broker>Sample1</broker>
</tariff-status>
Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

grampajohn
Administrator
LEE SEHOON wrote
I also have a same problem and it is because the invalid tariff.

When I try to run the game with STS or mvn argument , -Pcli ... ' , it works right.

But using the visualizer with "- Pweb" argument, the tariff status is InvalidTariff
This is strange, because I just did this yesterday on my laptop, which I have not been using for development for some time. Using the current 0.6.3-SNAPSHOT distribution, I was able to run the web version and sample broker without errors.

Since the tariff-spec and rate look OK to me, I suggest you blow away the directory tree ~/.m2/repository/org/powertac and try again. That will force maven to pull down the latest versions. It should have done that anyway, unless you had done a local mvn install of the common module.

Please let me know if this does not help.

John
Reply | Threaded
Open this post in threaded view
|

Re: Are there any guide line to run sample-broker?

tony2010
Hi John and SEHOON,

Thank you for your reply. To be honest, I need your help. Now, I present my case as follows.

After sucessfully running server and sample brokers, I go to http://localhost:8080/visualizer and run sim mode with config/bootstrap.txt (which is created by bootstrap mode). I found that sample brokers received zero in cash balance, energy balance and subs in both laptop and my desktop while the default broker works well. I spent a lot of time on fixing it. Then, I turned off all firewall in my laptop before I run servers and sample brokers. Up to now, server and sample brokers work very well in my laptop. But my desktop does not work although I do the sample process in my laptop. I would like to fix it in my desktop because it is convenient for me to study in my desktop.

Now, I will present problem in my desktop. My desktop is run in my school. Although I turn off all security of school such as firewall, virus software, brother authentication, servers and brokers do not communicate together. In particular, the some steps are implemented by me as follows.

- I sucessfully run servers and brokers
- Bootstrap.txt is generated in bootstrap mode.
- I run sim mode with config/bootstrap.txt. But broker sample received zero in cash balance, energy balance and subs. You can see my result with the following link:
http://www.mediafire.com/view/?u2twmqyiht7bnmh#

Furthermore, I send all file related to server and brokers including broker.trace, brokers1.trace, bootstrap.txt, powertac-sim-0.trace to you. You can download with following link:
http://www.mediafire.com/?1aik9x8vtkz9jk4

I am looking forward to heairng from you. Thank you in advance!

Tony.
12